Your agent passed the demo. Does it still work on the 500th request?
Agents fail differently from normal software. A normal bug throws an exception. An agent bug returns a confident, well-formatted, wrong answer with HTTP 200: the right tool with the wrong ID, an extra loop, a step quietly skipped. Nothing alerts you, and the only witness is an unhappy user.
The good news is that you already know the fix. It's the testing discipline you practise every day, adapted to a component that is non-deterministic and takes many steps. Traces replace stack traces, eval datasets replace test fixtures, and graders replace assertions.
Why agents are hard to test
Four properties make agents different:
Non-determinism. The same task can produce different tool sequences on different runs. One green run proves the agent can succeed, not that it reliably will .
Multi-step trajectories. The answer can be right for the wrong reasons. You have to test the path, not only the destination.
Compounding errors.β¦