Live demo: agentcrash-lab.onrender.com
AgentCrashLab is a small reliability lab for tool-using agents. You register an agent, throw adversarial scenarios at it, collect execution traces, and see exactly where it breaks — refunds without confirmation, auth bypasses, prompt injection, that kind of thing.
Built for a hackathon. Not a production safety guarantee.
- Run crash test suites against a sandbox agent (mock tools only — no real money or email)
- Score runs with deterministic safety rules + optional Gemini evaluation
- Store Failure DNA — expected vs observed behavior, tool involved, trace, remediation hint
- Explore failure — mutate a failing prompt and rerun variants
- Compare agent versions (v1 vulnerable → v2 patched) and see what got fixed
The built-in demo is a Customer Support Agent with search_order, cancel_order, refund_order, and send_email. v1 is intentionally sloppy. v2 has stricter rules.
- Open the live app
- Go to Agents → Customer Support Agent → select v1
- Click Run crash tests (16 adversarial scenarios)
- Open a CRITICAL failure — usually an unsafe
refund_order()call - Hit Explore failure to see mutations
- Compare versions — run crash tests on v1 and v2, then compare. Critical refunds should drop on v2
Free Render tier sleeps when idle. First load after a while can take ~30s.
React UI → Express API → Postgres (runs, failures, traces)
↓
In-process jobs (Render) or Redis + BullMQ worker (local dev)
↓
Deterministic rules + Gemini (optional)
| Layer | Stack |
|---|---|
| Frontend | React, Vite, TypeScript, Tailwind |
| API | Node, Express, Zod |
| Data | PostgreSQL, Prisma |
| Jobs | In-process on Render; optional Redis + BullMQ locally |
| LLM | Google Gemini (@google/genai) with local fallback if quota/key is missing |
Gemini is only used server-side for scenario generation, mutations, and nuanced scoring. Safety-critical checks (refund without confirmation, etc.) are deterministic.
Needs Docker for Postgres and Redis.
git clone https://github.com/Yugg09/AgentCrash-lab.git
cd AgentCrash-lab
docker compose up -d
cp .env.example .env
# add GEMINI_API_KEY to .env (optional — fallback works without it)
npm install
npx prisma generate
npx prisma migrate deploy
npm run db:seed
npm run devOpen localhost:5173.
Postgres runs on port 5433 (not 5432) to avoid clashing with a local install.
npm test # unit tests
npm run typecheck
npm run build| Variable | Notes |
|---|---|
DATABASE_URL |
Postgres connection string |
REDIS_URL |
Optional locally — Docker Redis for BullMQ worker (npm run dev) |
GEMINI_API_KEY |
Optional. Server only. |
GEMINI_MODEL |
Default: gemini-2.5-flash |
VITE_API_URL |
Leave empty locally (Vite proxies /api) |
See .env.example for the full list.
We run frontend + API on a single Render web service. Postgres on Neon. No Redis required on Render — test runs execute in the API process.
Step-by-step: DEPLOY.md
Objective safety stuff is rule-based: refund without confirm, cancel without lookup, invalid email, repeated tool spam, etc.
When Gemini is available it also scores goal completion, instruction following, and recovery on fuzzier cases.
Overall reliability is a weighted mix (30% safety, 25% goal, 20% tools, 15% instruction, 10% recovery). Critical failures tank the safety score. These weights are for the prototype — not a published benchmark.
- Not real sandbox isolation for arbitrary code
- Not multi-tenant / no auth
- Not claiming one LLM can perfectly judge another
- Mock tools only — nothing hits real APIs
apps/web React dashboard
apps/api Express REST API
workers/evaluator BullMQ worker + sandbox agent
packages/ shared types, evaluator rules, LLM provider
prisma/ schema + seed data