Testing

Find every leak in a run, on every channel.

Replay a recorded multi-agent run, follow each sensitive value through eight channels — including the ones nobody exports — score it the same way every time, catch copies that were encoded on the way, and attack it on purpose.

Complete trace analysis

See what your agent exposes on the way to the answer.

AgentLeak replays the whole execution trace and follows every sensitive value through 8 normalized channels. A clean final answer no longer hides a leak in a tool call, shared memory, a log or a generated file.

8 channels, one schema

Traces from any framework normalize to one AgentLeak schema, so the analysis is identical whatever produced the run.

  • User input and final output
  • Tool calls and tool responses
  • Inter-agent messages and shared memory
  • Logs and generated files

Severity you can defend

Every finding gets a level from L1 to L4 based on how sensitive the exposed value is and where it went, not a vague red/yellow/green badge.

  • L1 to L4 severity per finding
  • The exact channel where exposure happened
  • Reconstructed leak path across events
  • Canary matching for realistic vaults

A fix, not just a flag

Each finding carries a remediation hint: prose for your team and a structured, machine-readable hint an agent can apply on its own.

  • Ready-to-paste code fixes
  • Per-channel redaction advice
  • Priority-sorted next steps
  • Structured hints for autonomous agents

From execution to evidence

Turn every agent signal into a privacy action.

Auto-create findings from agent runs

Capture disclosures from tool calls, memory and handoffs, then create trace-linked remediation without prompts or manual review.

Create privacy tests from every execution surface

Ingest frameworks, OpenTelemetry, MCP, logs and CI, then normalize every source into one auditable AgentLeak run.

Analyze a trace from the CLI

agentleak run --trace run.json --output ./reports --format html
open ./reports/run_0001.html

Read the implementation guide →

AgentRisk scoring

A privacy score your whole team can explain.

AgentRisk is a deterministic, severity-weighted risk index from 0 to 1, defined in a published benchmark. The same trace always yields the same score, so a regression in CI means the agent changed, not the judge.

Deterministic by design

The score is a closed-form function of the findings and the audited vault. No model decides the number, so it never drifts between runs.

  • Same trace, same score, every time
  • Severity-weighted, normalized 0 to 1
  • A readable 0-100 privacy score
  • Reproducible in CI and offline

Grounded in the benchmark

AgentRisk uses the same channels and severity model as the published AgentLeak benchmark, extended with two peer-reviewed datasets, so results are comparable across agents and versions.

  • 266 bundled scenarios across 3 leak modes
  • Adversary levels A0-A2
  • Comparable across agents
  • Trend the score over time

Built for regressions

Track the score per agent and per release. A rising risk index is an early, quantified warning before anything ships.

  • Per-agent leaderboard
  • Per-release trend line
  • Threshold you set per project
  • Evidence attached to every run

AgentRisk over time

Turn every run into a measurable release signal.

Risk milestones and policy dependencies

Map score thresholds, privacy gates and remediation dependencies across releases so the critical path to a safe deployment stays visible.

Predict privacy outcomes

Read AgentRisk trends, exposure volume and policy thresholds together to see when a release is approaching unsafe territory.

Score a trace from the CLI

agentleak run --trace run.json --format json --output ./reports
# Risk Index 0.18 · privacy score 82 / 100
# JSON report: ./reports/run_0001.json

Read the implementation guide →

Encoded and obscured leaks

Base64 is not a privacy control.

Agents pass each other base64 context blobs, hex identifiers, URL-encoded parameters and values split across messages. A detector that reads only plaintext misses every one. AgentLeak decodes what announces itself, and matches what does not against values the run already exposed.

Measured, before and after

The same 46 transformed copies (6 data types, 8 transformations) were run against the previous release and this one. A copy counts only when it is reported with the right type and the original value.

  • 0.14.1: 6 of 46 detected
  • 0.15.0: 46 of 46 detected
  • 266 bundled scenarios unchanged
  • Benign hashes, images and URL-encoded searches: no findings

Two families, two methods

Base64, hex, URL-encoding and letter spacing decode to readable text or they do not, so they are decoded and read by the normal detectors. Reversal, ROT13 and splitting look like ordinary text, so they are only matched against values already seen in plaintext earlier in the run.

  • Nested encodings followed two levels deep
  • Binary decodes dropped before detection
  • Anchored matching only forward in time
  • Splitting reassembled per recipient, for identifiers

One secret, however it was written

An encoded copy is attributed to the original value, so it raises exposure on its channel without inventing a second secret. A reversed SIN is the SIN, reversed, not some other SIN.

  • No phantom secrets in the risk score
  • Formatting lost in decoding is realigned
  • redact and the MCP gateway remove encoded tokens whole
  • Limits published next to the numbers

Measure it yourself

git clone https://github.com/yagobski/agentleak && cd agentleak
pip install agentleak
python scripts/encoded_leaks.py --installed
# agentleak 0.15.0 — 46 of 46 obscured copies detected

Read the implementation guide →

Adversarial red-team

Replay real attacks against your agent, not just clean traces.

Native plugins and Promptfoo privacy/security transpositions map to 46 observable attack classes, then combine with 10 delivery strategies across prompts, tools, RAG, MCP, memory and multi-agent execution — scripted or live.

Plugins say what; strategies say how

Select PII, prompt extraction, BOLA/BFLA/RBAC, SQL/shell/SSRF, MCP, memory poisoning or excessive agency, then deliver each probe directly, through guardrail-bypass framing, encoding, Unicode or multi-turn escalation.

  • 60+ native/compatible plugin IDs
  • 46 observable classes across F1–F6
  • 9 deterministic delivery strategies
  • A0 passive through A2 internal access

Scripted or live

Run attacks against a deterministic offline agent for repeatable regression tests, or against a real LLM endpoint to see how your actual agent responds under pressure.

  • Scripted mode: deterministic, no LLM cost
  • Live mode: your own model via BYOK
  • Pick a vertical, a count, or one specific class
  • Same detection pipeline as any other trace

A vulnerability report you can act on

Every probe is analyzed by the same AgentRisk pipeline, then organized into severity, defense rate, delivery method, risk category and a prioritized remediation report.

  • Critical-to-low vulnerability counts
  • Attack Success Rate and defense rate
  • Expandable families with one stored trace per probe
  • Prioritized fixes linked to the exact execution evidence

A five-minute campaign

Start with the deterministic scripted mode: select a vertical, A1, the agent_core preset and the balanced strategy profile, then run ten scenarios. Inspect the stored traces, fix the weakest channel, and repeat the same selection.

  • Healthcare, finance, legal, HR and customer support vaults
  • A0 benign, A1 external and A2 internal adversaries
  • Campaigns capped at 20 scenarios per request
  • Coverage tells you which plugins and strategies actually ran

Designed for safe regression testing

Use baseline on every pull request, balanced on protected branches, and complete or evasion on a scheduled security run. Live campaigns require an authorized OpenAI-compatible endpoint and BYOK; scripted campaigns stay offline and deterministic.

  • No platform LLM key required for scripted tests
  • Live mode replays the same scenario against the configured agent
  • Metrics: ASR, ELR, CLR and privacy score
  • Full reference: docs/redteam.md in the repository

Request body for a red-team batch

POST /api/projects/{project_id}/redteam
{
  "vertical": "healthcare",
  "n": 10,
  "adversary_level": "A2",
  "plugins": ["pii:direct", "mcp", "agentic:memory-poisoning"],
  "strategies": ["basic", "jailbreak-template", "crescendo"],
  "mode": "live"
}

Read the implementation guide →

FAQ

Questions, answered.