AI agents that answer customers or update records add a new kind of risk. The output is not fixed, so tests have to judge quality rather than compare exact strings.
Start with the boundaries: what data can the agent read, what actions can it take, and what happens when a user asks for something outside its remit. Test permissions as carefully as you test prompts.
Next, build a library of realistic conversations, including messy, ambiguous and adversarial ones. Score responses on accuracy, tone and safety, and re-run the library whenever the prompt, model or underlying data changes.
Finally, monitor in production. Even a well-tested agent drifts as data and customer behaviour evolve, so sample live conversations and feed what you find back into your test set.