ZeroLeaksDocs

ZeroLeaks Developer Documentation

Red-team AI agents from your code or CI, add runtime prompt defenses, or run the source-available ZeroLeaks scan engine.

ZeroLeaks red-teams AI agents: it profiles the agent's role, tools, and reachable data, derives the boundaries it must not cross, and tests those boundaries on every scan. Its three developer products are the hosted scanning SDK, the Shield API and runtime SDK, and the source-available zeroleaks scan engine.

Choose a product

How they fit together

ProductBest forRuns whereCredential
@zeroleaks/sdkRuntime and endpoint agent scans, plus skill scansZeroLeaks orchestration plus your runnerZEROLEAKS_API_KEY
@zeroleaks/shieldRuntime protection in an LLM request pathHosted API for default detection; your application for local helpersZEROLEAKS_API_KEY for hosted detection; none for local helpers
zeroleaksLocal scans, including system-prompt extraction tests, research, and custom scan enginesYour machine or CI runnerOPENROUTER_API_KEY

For most production agents, run SDK runtime scans against the real agent and add Shield for runtime defense in depth. Use the zeroleaks package when you need local control over the scanning engine.

Security note

ZeroLeaks API keys are server credentials. Keep them in a server-side environment variable or secret manager and never include them in browser bundles, mobile applications, source control, or logs.

On this page