Lesson 2 of 3 · 3 min read
Testing Agents with a Scripted Model
Most agent bugs live in the harness: dispatch, validation, budgets, retries, state, stop conditions. They can be tested deterministically by replacing the model with a scripted fake that returns a fixed sequence of replies, and replacing tools with fakes that can be made to fail. Tests then assert on behaviour (which tools ran with which arguments, what was refused, how the loop ended, what state persisted) rather than on model text. Scripted tests complement, not replace, evaluations with real models; they make the controls trustworthy so evaluations measure the model's judgement.
free sign-in, no card required
Practise it as an interviewer asks it
What does a build-an-agent coding round test, and how would you prepare for one in a week?What is an agent harness, and how is it different from a framework and from the model?Implement a tool-calling loop with validation, a step budget and error results in 45 minutes.How do you evaluate an agent whose path differs on every run?The coding agent makes tests pass by deleting assertions. Stop it.We run every model call at temperature zero, so the agent is deterministic. Agree?