Requirements in, evidence out.
Give it a product spec and an agent URL. It generates tests, runs them, and tells you what passed, what failed, and what it couldn't prove โ with UNVERIFIABLE instead of a guess.
https://github.com/DTiapan/AgentEval
- Live Web Console: https://agenteval-service-7uhbdepujq-uc.a.run.app/
- Swagger API Docs: https://agenteval-service-7uhbdepujq-uc.a.run.app/docs
- Service Health: https://agenteval-service-7uhbdepujq-uc.a.run.app/health
๐ฅ Watch the demo walkthrough on YouTube โ
PRD paste โ test generation โ frozen suite โ live execution โ evidence-backed verdicts
Most agent evaluation today is "run it, read the output, feel good." Teams do spot-checks on chat responses, run occasional LLM-as-judge scores, or buy observability platforms that watch production โ without a repeatable, sign-off-ready link from requirements to tests to evidence to verdict.
The failures that actually break production agents are rarely "the final string was ugly." They're:
- Wrong tool or args โ the agent called
process_refundwith someone else's order ID - Silent side effects โ a database row changed and nobody noticed until a customer complained
- Regressions after a prompt tweak โ the previous 47 tests still pass, but test 48 now leaks PII
- "Looks fine" demos that never tested what happens when a downstream API returns a 500
These failures share a pattern: you can't catch them by reading the agent's self-report. You need to look at what actually happened โ the HTTP response, the state change, the tool call sequence โ and compare it against what should have happened according to the spec.
PRD (markdown) + Agent URL โ Candidate test pool (100-500 tests)
โ Optimized test pack (set cover + mandatory floors)
โ Frozen suite version (SHA-256, immutable)
โ Black-box execution against live endpoint
โ Evidence-backed verdicts: PASS / FAIL / UNVERIFIABLE
โ HTML report with per-requirement traceability
The key idea is requirements-first assurance with honest limits. If the platform can't prove something from observable evidence, it says UNVERIFIABLE โ not PASS.
sequenceDiagram
autonumber
participant U as User (Studio)
participant API as FastAPI /v1
participant WF as SuiteWorkflow
participant DB as SQLite
participant AG as Your agent (HTTP)
U->>API: PRD + agent URL
API->>WF: ingest + bootstrap pack
WF->>DB: freeze suite_version + pack_json
U->>API: Execute run
API->>WF: BlackboxRunner
WF->>AG: POST prompts (frozen tests)
AG-->>WF: responses
WF->>WF: score (PASS/FAIL/UNVERIFIABLE)
WF->>DB: runs + results + steps
U->>API: Report / Assurance view
API-->>U: real persisted artifacts only
These are the decisions I made and why. Some are obvious in hindsight; some I'd revisit.
The original plan (v0.1) was a harness approach: wrap the agent in-process, intercept tool calls, diff database state before/after. That works great when you control the agent's runtime.
But the actual market need is different. Most teams deploying agents in production expose an HTTP endpoint. They won't refactor their agent to run inside your test harness. So I pivoted to black-box first: POST a prompt, observe the response, score what's observable. The harness path still exists for developers who want deeper assertions (ฮS state diffs, tool interception), but it's opt-in.
Trade-off: Black-box scoring is fundamentally limited. You can't prove idempotency from HTTP responses alone. You can't verify database consistency without a probe. That's why UNVERIFIABLE exists โ it's the system being honest about its own limits rather than guessing.
ADR-003 documents this pivot in detail: ADR-003
Most eval tools give you PASS or FAIL. AgentEval adds UNVERIFIABLE โ the system couldn't gather enough evidence to decide. This matters in regulated contexts where a silent pass is worse than admitting uncertainty.
Example: A test checks "the agent should not process duplicate refunds." In black-box mode, the agent says "refund processed" both times. Did it actually create two refund records? We can't tell from the HTTP response. Verdict: UNVERIFIABLE, not PASS.
Running every test through an LLM judge is slow and expensive. So I built a two-tier scoring system:
-
Tier 0 โ Observable Scorer: Deterministic heuristics on HTTP-visible evidence. Pattern matching on refusal tokens, error traces, success claims. Zero LLM calls, sub-millisecond per test. Covers security refusals, transport failures, unhandled exceptions, boundary violations.
-
Tier 1 โ LLM Judge: Only invoked when Tier 0 returns
UNVERIFIABLEwith "external evaluator required." Uses LiteLLM with multi-route fallback (OpenRouter โ DeepSeek โ OpenAI). Structured JSON output with rubric-aligned scoring.
Trade-off: Heuristic scoring has false positives. A refusal token like "cannot" in a legitimate response could cause a wrong PASS on a security test. The hybrid mode catches most of these, but it's not perfect. The alternative โ LLM judge for everything โ costs ~$0.005/test and adds 1-3s latency per test.
Generating tests is easy. Generating the right tests is hard. A naive cross-product of capabilities ร failure hypotheses ร personas produces 100-500 candidates. Running all of them is wasteful โ many overlap in what they cover.
The optimizer uses a greedy weighted set cover algorithm:
- Mandatory floor: Security invariants (BOLA, data isolation, prompt injection) are always included regardless of budget
- Set cover: Each remaining test is scored by
(new coverage tags ร tag weights) / execution cost. The test with the highest marginal value gets selected next - Budget curve: The UI shows a coverage-vs-tests curve so the user can pick their comfort level (30 tests = ~60% coverage, 75 = ~85%, 150 = ~98%)
Trade-off: The coverage metric is an approximation. "60% coverage" means 60% of declared capability tags are exercised, not 60% of possible failures. Real coverage is unknowable without exhaustive testing. I chose transparency (showing the curve) over false precision.
For a single-node assurance appliance, SQLite with WAL mode handles concurrent readers (API + UI) without ops overhead. The schema matches Pydantic domain models. Postgres is supported but not the default โ it's there for teams that want it.
Trade-off: SQLite limits you to single-writer. That's fine for the use case (one team, one agent at a time), but it means no horizontal scaling without migrating to Postgres. The schema is designed so the migration is a driver swap, not a rewrite.
ADR-004 covers the rationale: ADR-004
The core engine knows nothing about refunds, tickets, or medical records. Domain-specific requirements, compliance mappings, and checks are delivered through domain packs โ Python packages discovered via entry points.
# pyproject.toml [project.entry-points."agenteval.domain_packs"] fintech = "agenteval_packs.fintech.pack:FintechPack"
A pack can inject mandatory requirements (e.g., "audit refund trail"), synthetic test data, and custom checks without touching backbone code. The backbone enforces that domain vocabulary never leaks into core modules (NFR-B-07).
Trade-off: Packs add indirection. When you're debugging why a fintech-specific test failed, you're jumping between backbone scoring logic and pack-provided check functions. I chose this over the alternative (domain logic in core) because every domain I add shouldn't require touching the test runner.
ADR-005: ADR-005
A constraint I enforced from the start: the console never shows fake data. Every trajectory, every verdict, every run in the UI comes from the same SQLite database the API writes to. If traces aren't captured yet for a feature, the UI shows an honest empty state โ not a placeholder replay.
This sounds obvious, but it's tempting to hardcode a demo trajectory so the UI looks good before the backend is wired. I've seen too many projects where the demo path and the real path diverge permanently.
See CONSTRAINTS.md ยง7
~20K lines of Python across 130 modules. ~8.5K lines of TypeScript/React across 58 components. ~10K lines of tests across 85 test files.
agenteval/
โโโ api/ # FastAPI REST layer (/v1/suites/*)
โโโ cli/ # Typer CLI (serve, db, suite commands)
โโโ core/ # Domain models (Verdict, ExecutionTrace, StepRecord, StateDiff)
โโโ db/ # SQLite/Postgres repository, migrations, normalized suite storage
โโโ evaluators/ # LLM judge, state diff scorer, contract validator, idempotency scorer
โโโ faults/ # Tool fault injector (timeouts, HTTP 500s, delays)
โโโ ingest/ # PRD parser, endpoint probe, requirements extractor
โโโ introspect/ # OpenAPI/MCP/AgentCard introspection
โโโ packs/ # Domain pack protocol, registry, freeze metadata
โโโ personas/ # Dynamic persona synthesis via LiteLLM
โโโ planning/ # Test generation, optimizer, blackbox runner, coverage, gap analysis
โโโ recommender/ # Metric routing (DeepEval metrics, PromptFoo attacks, invariant floors)
โโโ reporting/ # HTML report generator
โโโ security/ # URL validator (SSRF prevention), safe HTTP client
โโโ services/ # Suite workflow orchestration, run manager, preview sessions
โโโ targets/ # Connection profiles (HTTP, MCP, harness)
web/src/
โโโ components/
โ โโโ studio/ # Suite builder (PRD input โ test preview โ freeze โ run)
โ โโโ assurance/ # Run results, per-requirement sign-off, CI gate banner
โ โโโ workspace/ # Multi-workspace switcher
โโโ lib/ # Studio builder state machine, UX config, routing
โโโ hooks/ # Accessibility (prefers-reduced-motion)
agenteval_packs/ # Domain packs (fintech first)
deploy/gcp/ # Cloud Run Gen2 deployment (deploy.sh, vpc-network.sh)
docs/decisions/ # 7 ADRs documenting architectural choices
docs/engineering-ledger/ # 29+ decision records (DR-*) tracking design evolution
| Layer | Choice | Why |
|---|---|---|
| Backend | Python 3.11+, Pydantic v2, FastAPI | Type-safe domain models; async API; same models for validation, serialization, and DB |
| Frontend | React 19, Tailwind v4, Radix UI, Vite | Modern component primitives; CSS-first styling; fast builds |
| Persistence | SQLite (WAL) / Postgres | Zero-ops default; WAL for concurrent readers; Postgres for teams that need it |
| LLM routing | LiteLLM with multi-route fallback | Provider-agnostic; automatic failover across OpenRouter, DeepSeek, OpenAI |
| Telemetry | OpenTelemetry (native) | Every test execution, judge call, and suite run is traced with structured spans |
| Deployment | Multi-stage Docker โ Cloud Run Gen2 | Unprivileged container (UID 10001); GCS volume mount for persistent SQLite; Secret Manager for API keys |
| Testing | pytest, 85% coverage floor, mypy strict | Coverage ratchet enforced in CI; strict typing catches domain model drift early |
AgentEval packages the FastAPI backend, React console, and SQLite into a single container deployable to Google Cloud Run in one command.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Google Cloud Run (Gen2, 2 vCPUs, 4 GiB RAM) โ
โ โ
โ React Console + FastAPI + SQLite (:8080) โ
โ Unprivileged runtime (UID 10001, non-root) โ
โ Native healthcheck on /health โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ GCS Volume Mount โ Secret Manager โ VPC Access Connector โ
โ /app/data โ (zero plaintext) โ (private agent evaluation) โ
โ SQLite + suites โ API keys via IAM โ Reach internal GCE/GKE agents โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key properties:
- Persistent SQLite across deploys: GCS FUSE volume mount at
/app/datasurvives container restarts and revision rollouts - Zero secrets in code:
deploy.shbinds API keys from Secret Manager via IAM roles - Private agent evaluation: VPC connector enables reaching agents on internal networks (10.x.x.x, 172.16.x.x)
- Scale-to-zero: $0 baseline when idle; sub-second cold start with CPU Boost
# Full deployment (fresh GCP project โ running service) ./deploy/gcp/setup-project.sh [PROJECT_ID] # optional: bootstrap project + APIs cp .env.gcp.example .env.gcp # set GCP_PROJECT_ID ./deploy/gcp/deploy.sh # build, push, deploy
- Python 3.11+
- Node 18+ (for console build)
- uv recommended
git clone https://github.com/DTiapan/AgentEval.git cd AgentEval # Install Python package uv pip install -e ".[dev]" # Build the web console cd web && npm install && npm run build && cd .. # Start API + UI agenteval serve # โ http://127.0.0.1:8766
# Terminal 2: start the mock refund agent python3 examples/blackbox/refund_agent_server.py # โ http://127.0.0.1:8765
In the Studio UI:
- Paste a PRD (or use
examples/blackbox/refund-agent-prd.md) - Set endpoint to
http://127.0.0.1:8765/chat - Create suite โ Run Assurance โ View report
For a richer example with OpenAI tool-calling and SQLite side effects, see examples/real-agent/.
# Tests .venv/bin/pytest tests/unit -q --no-cov # API health curl -s http://127.0.0.1:8766/health | python3 -m json.tool # Suite count curl -s http://127.0.0.1:8766/v1/suites | python3 -c "import sys,json; print(len(json.load(sys.stdin)['suites']))"
I want to be clear about what actually works today and what's designed but not wired.
| Area | Status | Honest assessment |
|---|---|---|
| Web Studio (PRD โ test preview โ freeze โ run โ report) | Working | Core flow is solid. UX could use polish on larger suites |
| Assurance dashboard + per-requirement verdicts | Working | Renders real run data; sign-off view is functional |
agenteval serve + /v1/suites/* REST API |
Working | 15+ endpoints; OpenAPI docs at /docs |
| SQLite persistence + suite versioning | Working | WAL mode, migrations, import from JSON |
| Black-box runner (single + multi-turn) | Working | Concurrent execution, SSRF prevention, OTel tracing |
| Test generation (capability ร hypothesis ร persona) | Working | 25 hypothesis templates, 3 default personas |
| Greedy set-cover optimizer + budget curve | Working | Mandatory floors + weighted coverage tags |
| Hybrid scoring (heuristic + LLM judge) | Working | Tier 0 covers ~15 template patterns; LLM escalation for the rest |
| Cloud Run deployment pipeline | Working | Turnkey script; tested on GCP |
| HTML compliance report | Working | Per-requirement breakdown with evidence citations |
| Trajectory replay | Partial | Stored and rendered; step-through UX is basic |
| Domain packs (fintech) | Designed | Contract defined; pack protocol implemented; first pack is scaffolded, not production-tested |
| Inspect AI execution engine | Accepted, not wired | ADR-001 accepted; bridge code exists; not integrated into the main pipeline |
| Per-criterion evidence items in DB | Designed | Schema v2 tables defined; writes not fully connected |
| Multi-tenant auth / SaaS | Roadmap | PRD exists; not implemented |
-
Start with the domain model earlier. I built features before defining entities and their invariants. The mid-project domain model cleanup (ADR-005) was expensive. A clear entity-relationship diagram on day one would have prevented several module rewrites.
-
Invest in the optimizer sooner. The first version generated tests and ran all of them. The set-cover optimizer came later and immediately made the product more useful. It should have been a day-one concept.
-
Fewer hypothetical abstractions. Some code paths (harness sandbox, Inspect AI bridge, fault injector) are well-designed but lightly exercised. I over-invested in future-proofing abstractions that the black-box-first pivot made secondary. The code is clean, but it represents engineering time that could have gone into polishing the primary path.
| Doc | What it covers |
|---|---|
| DESIGN_INDEX.md | Start here โ entities, schema, traceability, build order |
| docs/decisions/ADR-*.md | 7 architecture decision records with context, options, and trade-offs |
| engineering-ledger/decisions.md | 29+ tactical decision records tracking the design evolution |
| PRD_SAAS_FULL.md | Full product requirements (backbone FR-B-01โ23, pack contract FR-P-01โ06) |
| domain-model.md | Entities, relationships, invariants |
| persistence-schema.md | SQLite v2 tables and migration phases |
| requirements-traceability.md | FR โ schema โ code โ tests |
| CONSTRAINTS.md | Quality bar and behavioral contract |
| deploy/gcp/README.md | Cloud deployment guide |
Apache-2.0 โ see LICENSE.