Skip to main content
By the end of this page you will have:
  1. An Agnes tenant and an API key.
  2. The Python or TypeScript SDK installed.
  3. A working analyze call returning a decision.
If you only want to scan inputs and never persist policies, this is enough. For everything else (custom policies, YARA rules, threat intel, multi-tenant admin) follow the links at the end.

1. Create an account

Sign up at agnes.lasscyber.com. Your first sign-in provisions a personal tenant so you can start hacking immediately. If you are joining an existing organization, ask an owner or admin to invite you first; the invitation email finishes the sign-up automatically.

2. Mint an API key

  1. Sign in and open Settings → Keys (or go directly to agnes.lasscyber.com/keys).
  2. Click Create API key, give it a description, and choose:
    • Live key (ak_…) — bills against your plan, calls real models.
    • Test key (ak_test_…) — free, deterministic canned responses, no upstream calls. Recommended for CI and first integration.
  3. Copy the key. It is shown once.
For everything below you can substitute ak_test_… and skip billing entirely. See Sandbox mode for the full canned-response matrix.

3. Install an SDK

The Python package is agnes-security on PyPI. The TypeScript package is @lasscyber/agnes-security on npm and works in Node 20+, the browser, Deno, Bun, and Cloudflare Workers.

4. Set the API key

Both SDKs read AGNES_API_KEY from the environment by default:
You can also pass it explicitly:

5. Run your first analysis

default-inbound is a built-in policy that runs prompt-injection detection, safety guardrails, sensitive-data, URL risk, and YARA in a sensible order with conservative thresholds. See Combined analyzer for the full execution plan and how to author your own.

6. Wrap an LLM call

Most production code never calls analyze() twice by hand. Use a guard context that scans the prompt before your LLM call and the reply after:
check_input uses the inbound policy; check_output automatically flips default-inbounddefault-outbound. Pass any other policy slug explicitly to override.

What’s next