Skip to main content

Gauntlet ⚔️

Adversarial eval harness for any LLM agent pipeline — Claude, OpenAI, or your own

Python 3.10+ CI License: MIT PyPI

📦 gauntlet-eval on PyPI — pip install gauntlet-eval

Gauntlet solves a problem every AI engineer hits in production: how do you know your agent pipeline actually works before it breaks in front of a real user?

Point it at Claude, OpenAI, or any LLM agent, describe what it should do in plain English, and get back a pass rate, per-agent breakdown, adversarial findings, and concrete recommendations automatically.


Install

pip install gauntlet-eval

Add your Anthropic API key to your MCP config (recommended):

{
  "mcpServers": {
    "gauntlet": {
      "command": "python",
      "args": ["-m", "gauntlet.mcp_server"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key-here"
      }
    }
  }
}

Or if using the CLI/API directly, add it to a .env file:

ANTHROPIC_API_KEY=sk-ant-...

→ Full IDE setup: docs/MCP_SETUP.md


Three ways to use it

1. IDE — least manual work

Connect Gauntlet as an MCP server in Cursor or Antigravity. Type find in the chat — Gauntlet scans your workspace, detects agent files automatically, and runs the eval. No JSON, no terminal.

→ docs/MCP_SETUP.md

2. REST API

gauntlet serve
# Interactive docs at http://localhost:8000/docs

3. CLI

gauntlet run \
  --goal "Classify a support ticket as billing, technical, or general" \
  --agent-description "Single Claude classifier" \
  --agent-api-key "sk-ant-..." \
  --system-prompt "You are a classifier. Reply with one word." \
  --mode full \
  --runs 5

How it works

Your agent
    │
    ▼
┌─────────────────────────────────────┐
│          Gauntlet Runner             │
│                                      │
│  1. ScenarioAgent   → test inputs    │
│  2. AdversarialAgent→ hostile inputs │
│  3. JudgeAgent      → pass/fail      │
│  4. ReportAgent     → recommendations│
└──────────────────┬──────────────────┘
                   ▼
           gauntlet.db (SQLite)
Agent What it does
ScenarioAgent Generates realistic test inputs from your plain-English goal
AdversarialAgent Prompt injection, contradictory requirements, hallucination traps
JudgeAgent Scores each response pass/fail — supports custom success criteria
ReportAgent Turns failures into prioritised, code-level recommendations

Average cost per full eval run(Approximate): ~$0.002


Single-agent eval

Point Gauntlet at any Claude or OpenAI model with a system prompt via the REST API, CLI, or Python SDK. It generates test scenarios, runs them through your agent, and returns a full report.

→ See docs/ARCHITECTURE.md for SDK usage.


Multi-agent eval — automatic flow tracing

Add @trace("AgentName") above each agent function. Gauntlet automatically records every call, judges each step individually, and pinpoints exactly which agent is the bottleneck.

→ See docs/ARCHITECTURE.md for the full @trace example.

The report shows the complete execution flow:

Traced flow: Router → Writer → Validator

⚠️ Bottleneck: Writer (43% pass rate)

| Agent     | Pass Rate | Status        |
|-----------|-----------|---------------|
| Router    | 86%       | ✅            |
| Writer    | 43%       | ❌ bottleneck |
| Validator | 100%      | ✅            |

Scenario s2 — FAIL
  ✅ Router    → returned "billing" (120ms)
  ❌ Writer    → returned "" — output was empty
  ⚠️ Validator → never reached — upstream failure

Docs

Document What's in it
docs/MCP_SETUP.md Cursor & Antigravity setup, find command walkthrough
docs/CURSOR_PROMPT.md Ready-made prompt to paste in Cursor chat
docs/ARCHITECTURE.md System design, agent flow, data models

Contributing

pip install -e ".[dev]"
pytest tests/ -v
ruff check gauntlet/

PRs welcome.


License

MIT — see LICENSE.

Metadata

Release files for gauntlet-eval 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gauntlet-eval 0.1.3
File Size Uploaded Provenance
gauntlet_eval-0.1.3.tar.gz 28.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gauntlet-eval 0.1.3
File Interpreter ABI Platform
gauntlet_eval-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 59.3 kB

Release files / gauntlet_eval-0.1.3.tar.gz

Download URL gauntlet_eval-0.1.3.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
13b6d7886ce7e9dcc8229e2c4e722c0ec0fef9e6625e5932d2211a89c5d8761c
BLAKE2b-256 checksum
How to use checksums
7d48e36bb5a17ee9f07558ed8854bcee5e74db2539cf808883f53524b6091edd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / gauntlet_eval-0.1.3-py3-none-any.whl

Download URL gauntlet_eval-0.1.3-py3-none-any.whl
Size 30.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
404e939876729e4d33a0e09c77f745be96e05b8174de78ee68de5ff4f6112093
BLAKE2b-256 checksum
How to use checksums
646d54c54ac50ac3c2237f73a4f64ae62ab4b9a6556eeb2c5b18f95e3af3a753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for gauntlet-eval 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page