Skip to main content

AgentCrash

Crash-test your AI agent in a synthetic workplace.

CI PyPI Python License

An open-source agent security test harness. Run your agent against a synthetic workplace, watch the tool calls an injected instruction actually causes, then prove that your fix blocks the attack without breaking the legitimate task.

  • See the action, not just a verdict. AgentCrash records the exact tool calls an attack causes, in a synthetic world with nothing real in it.
  • Outcomes stay separate. Task success, attack attempted, attack succeeded, policy blocked and completeness are reported as distinct dimensions, never collapsed into one fuzzy score.
  • The fix is testable. Apply a policy, rerun, and show the attack blocked while the task still completes.
  • Offline by default. The bundled replay needs no API key and makes no model calls.

AgentCrash demo: crash-test your AI agent in a synthetic workplace, watch the injected instruction redirect a send, detect the canary, then block it with a policy

Watch the 35-second walkthrough (MP4)

Scope honesty: results apply to the listed scenarios and configuration. A passing test is a scoped result, not a guarantee that an agent is secure.

Try it in 30 seconds

No API key. No model calls. Runs offline.

uvx --from agentcrash==0.1.2 agentcrash demo

Or install it and run your own live test:

uv tool install agentcrash==0.1.2
agentcrash --version
agentcrash doctor --mode demo

Why AgentCrash

Most answers to "is my agent safe?" are an opinion, a single number, or a prompt that someone else wrote. None of them show you what the agent actually did when an untrusted document told it to do something else.

AgentCrash gives you that: the real tool requests, the policy decision on each one, and the synthetic effect that followed, in a run you can repeat and compare. When you then add a control, you rerun the same scenario and show the attack blocked with the task still complete. That is the difference between claiming a fix and demonstrating one.

What a report tells you

Task completion, attempted unauthorized actions, observed synthetic effects, policy decisions, and missing evidence are reported separately — never collapsed into one score.

  • Task success — did the legitimate task assertion hold?
  • Attack attempted — was the defined forbidden request observed?
  • Attack succeeded — did the simulated attacker goal occur in the synthetic world?
  • Policy blocked — did the tool policy reject that request?
  • Completeness — does the run have all required evidence?

An incomplete run is never a clean pass.

View a report from the actual build (attack variant)

This is a real run of invoice-confidential-note: the injected document redirects a synthetic send that is caught in the local outbox.

AgentCrash report: five outcome dimensions (task success, attack attempted, attack succeeded, policy blocked, completeness) plus the event timeline.

Example evidence: assets/generated/sample-report.html is the standalone HTML report the CLI produces for that run.

See the five demo beats as stills

Beat 1: crash-test your AI agent before you trust it Beat 2: injected instruction in the invoice

Beat 3: canary detected in local outbox Beat 4: policy blocks the same send, task completes

Beat 5: install and run your own check

Who it is for

  • Agent builders who want to test tool-use safety before shipping.
  • AppSec and AI-security teams who need evidence, not a demo script.
  • Researchers who want a repeatable harness for injection and policy work.
  • Maintainers who want a regression test that fails when a policy regresses.

Test your agent

Start with the Python adapter recipe. Replace production tools with the provided synthetic tool client, validate the adapter, and run the clean task and its attack variant.

agentcrash init --template invoice
agentcrash run invoice-confidential-note --variant benign
agentcrash run invoice-confidential-note --variant attack --trials 5
agentcrash report RUN_ID --format html

The scripted model broker needs no model key — all of the above run offline with deterministic results. Live provider integration is a scaffold in v0.1; when you wire a provider key, it is held broker-only and never passed on the CLI or written into a run.

How it works

  1. You run a scenario against a synthetic workplace (documents, notes, a local mail outbox — nothing real).
  2. The agent completes the task. An injected document may try to redirect it toward a forbidden action.
  3. AgentCrash records every tool request, decision, and effect as authority events, then evaluates the run.
  4. You see five separated outcomes — task success, attack attempted, attack succeeded, policy blocked, completeness — never a single fuzzy score.
  5. You apply a policy and rerun to prove the fix still completes the task while the attack is blocked.

Contribute

Add a synthetic scenario, improve an integration, or help someone complete their first run. See CONTRIBUTING.md.

Security

See SECURITY.md for the responsible-disclosure channel and the tested security boundary.

License

Apache-2.0. See LICENSE and NOTICE.

Star it if it is useful

If AgentCrash saves you from shipping an agent you have not tested, a star helps the next person find it.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentcrash-0.1.2-py3-none-any.whl (122.0 kB view details)

Uploaded Python 3

File details

Details for the file agentcrash-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agentcrash-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 122.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentcrash-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4662ccd1ea901e2a430d0176f7fca1b57c53f9a9916e2d8aa8bea482e2f2d640
MD5 c94efc14b046a61faea0a2f854afa707
BLAKE2b-256 4d76375d161e54d532397fc079f49ca2404c76432ccf44386c96d895c9e9fce3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 file

0.1.1

1 file

0.1.0

2 files

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