GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - DTiapan/AgentEval: Open-source agent assurance: turn a PRD and agent URL into frozen test suites with evidence-backed PASS/FAIL/UNVERIFIABLE verdicts. Web console, REST API, SQLite. Domain packs for regulated teams (fintech, insurance, health).

BranchesTags
Open more actions menu

Latest commit

 

History

89 Commits
89 Commits

Folders and files

NameName
Last commit message
Last commit date
.agents/skills
.agents/skills
 
 
.cursor
.cursor
 
 
.github/workflows
.github/workflows
 
 
agenteval
agenteval
 
 
agenteval_packs
agenteval_packs
 
 
deploy/gcp
deploy/gcp
 
 
design-system/agenteval
design-system/agenteval
 
 
docs
docs
 
 
examples
examples
 
 
scripts
scripts
 
 
tests
tests
 
 
web
web
 
 
.dockerignore
.dockerignore
 
 
.env.example
.env.example
 
 
.env.gcp.example
.env.gcp.example
 
 
.gcloudignore
.gcloudignore
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CONSTRAINTS.md
CONSTRAINTS.md
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
cloudbuild.yaml
cloudbuild.yaml
 
 
craft.project.yaml
craft.project.yaml
 
 
customer_support_prd.md
customer_support_prd.md
 
 
pyproject.toml
pyproject.toml
 
 
skills-lock.json
skills-lock.json
 
 
uv.lock
uv.lock
 
 

Repository files navigation

AgentEval

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

License Python 3.11+ Tests Cloud Run


Live Deployment & Demo

  • 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 AgentEval Walkthrough

๐ŸŽฅ Watch the demo walkthrough on YouTube โ†’

PRD paste โ†’ test generation โ†’ frozen suite โ†’ live execution โ†’ evidence-backed verdicts


The problem

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_refund with 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.


What AgentEval does

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.

How it works (end-to-end)

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
Loading

Design choices and trade-offs

These are the decisions I made and why. Some are obvious in hindsight; some I'd revisit.

Why black-box first, not harness-first

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

Three-verdict system (not two)

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.

Tiered scoring: heuristics first, LLM judge as escalation

Running every test through an LLM judge is slow and expensive. So I built a two-tier scoring system:

  1. 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.

  2. Tier 1 โ€” LLM Judge: Only invoked when Tier 0 returns UNVERIFIABLE with "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.

Test optimization: greedy weighted set cover

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:

  1. Mandatory floor: Security invariants (BOLA, data isolation, prompt injection) are always included regardless of budget
  2. 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
  3. 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.

SQLite as persistence, not Postgres

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

Backbone + domain packs (not a monolith)

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

Web UI reads API only โ€” no demo data

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


Architecture

~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

Key technology choices

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

Cloud deployment

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/data survives container restarts and revision rollouts
  • Zero secrets in code: deploy.sh binds 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

Quick start (local)

Prerequisites

  • Python 3.11+
  • Node 18+ (for console build)
  • uv recommended

Install and run

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

Try it with a sample agent

# Terminal 2: start the mock refund agent
python3 examples/blackbox/refund_agent_server.py
# โ†’ http://127.0.0.1:8765

In the Studio UI:

  1. Paste a PRD (or use examples/blackbox/refund-agent-prd.md)
  2. Set endpoint to http://127.0.0.1:8765/chat
  3. Create suite โ†’ Run Assurance โ†’ View report

For a richer example with OpenAI tool-calling and SQLite side effects, see examples/real-agent/.

Verify

# 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']))"

What's shipped, what's not

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

What I'd do differently

  • 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.


Documentation

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

License

Apache-2.0 โ€” see LICENSE.

About

Open-source agent assurance: turn a PRD and agent URL into frozen test suites with evidence-backed PASS/FAIL/UNVERIFIABLE verdicts. Web console, REST API, SQLite. Domain packs for regulated teams (fintech, insurance, health).

Topics

agent-evaluationagent-evaluation-evalagent-evaluation-toolsagent-evaluationsai-agentsevalsevaluation-framework

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.