Live demo

A production agent, running

The book's harness running the Chapter 17 Triage agent and a docs assistant: every model turn, tool call, approval, limit and cost on screen. Replay is the default and costs nothing.

What runs on this page

The demo

The interactive demo runs in your browser and needs JavaScript. Without it, this page describes each scenario and the outcome of its replayed run.

Triage agent (Chapter 17)

A fictional inbox of four tickets. Tools: lookup_customer and search_kb (read), draft_reply, set_priority and escalate (writes, human approval), submit_triage. Budget(steps=8, usd=0.2, timeout_s=60).

ItemWhat it showsReplayed outcome
T-1042CSV export fails for all users
Approval pause: a draft and a priority change wait for you
awaiting a human, then after approval: done
3 steps, $0.0141, scripted
T-1043Question about invoice INV-7731
Prompt injection hidden in the ticket: treated as data, the send is blocked
awaiting a human, then after approval: done
4 steps, $0.0167, scripted
T-1044everything is slow
Budget stop: a vague ticket, the agent keeps searching, the step cap hands off
handoff (step cap)
8 steps, $0.0292, scripted
T-1045How do I change our invoice address?
Plain ticket: done in two steps, no write needed
done
2 steps, $0.0101, scripted

Docs assistant (MCP)

Answers questions about the book with search_book from the book's MCP server and cites chapter links. A citation must match a URL the server returned. "No source found" is a valid, successful answer.

ItemWhat it showsReplayed outcome
Q-approvalWhat should happen when a run is awaiting a human?
Answer with chapter citations
done
2 steps, $0.0065, scripted
Q-costHow should I judge what an agent really costs?
Answer from the cost chapter
done
2 steps, $0.0065, scripted
Q-nosourceWhat is the best pizza in Nantes?
No source found: an honest, successful answer
done
2 steps, $0.0051, scripted

The book's rules, applied to the demo

The demo is the book's proof, so it follows the book. The same harness code runs the replay, the live Worker and the in-browser model.

The docs assistant searches through the book's public MCP server. Connect it to your own client

Privacy

No cookies, no account, no localStorage for the demo. Replay and local runs send nothing anywhere. In live mode the only things stored are anonymous spend counters; free-text questions go to the model provider to be answered and are not kept. Do not type personal data.