Skip to content

Commit 03b76c0

Browse files
committed
Update README.md
1 parent 71b5ca6 commit 03b76c0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@
99

1010
Understudy is a scenario-driven testing framework for AI agents that simulates realistic multi-turn users, runs those scenes against an agent through a simple app adapter, records a structured execution trace of messages, tool calls, handoffs, and terminal states, and then evaluates behavior with deterministic checks, optional LLM judges, and run reports.
1111

12+
## How It Works
13+
14+
Testing with understudy is **4 steps**:
15+
16+
1. **Wrap your agent** — Adapt your agent (ADK, LangGraph, HTTP) to understudy's interface
17+
2. **Mock your tools** — Register handlers that return test data instead of calling real services
18+
3. **Write scenes** — YAML files defining what the simulated user wants and what you expect
19+
4. **Run and assert** — Execute simulations, check traces, generate reports
20+
21+
The key insight: **assert against the trace, not the prose**. Don't check what the agent said—check what it did (tool calls, terminal state).
22+
23+
**See real examples:**
24+
- [Example scene](https://github.com/gojiplus/understudy/blob/main/example/scenes/return_eligible_backpack.yaml) — YAML defining a test scenario
25+
- [Test file](https://github.com/gojiplus/understudy/blob/main/example/test_returns.py) — pytest assertions against traces
26+
- [Sample report](https://htmlpreview.github.io/?https://github.com/gojiplus/understudy/blob/main/example/sample_report.html) — HTML output from `understudy report`
27+
1228
## Installation
1329

1430
```bash

0 commit comments

Comments
 (0)