Test cases for an agent
Generate tests from the prompt, run them before every change and see where the agent answers wrong.
Why
Prompts change often and checking an agent by hand takes time. A test case pins the expected behaviour: "asked about delivery, the agent quotes the terms from the knowledge base". A run shows what broke before customers see it.
Generate cases
Open the agent, Test tab, click Suggest (AI) and Generate. Happ reads the prompt, tools and knowledge base and proposes cases. Keep the ones you need and click Save selected.
Mock the actions
Tools run for real in tests. For actions that change something (creating an order, writing to a CRM) set mocks in the case or in the shared test settings.
Run them
Click ▶ on a case or Run all. Before the run Happ shows the number of cases and a cost estimate; runs spend the LLM balance.
Read the result
Open the run: each case has a transcript, the judge verdict and the reason. For a red case click Suggest prompt fix.
A habit that pays off
Run all cases after every prompt edit. If the agent ever got a customer wrong, turn that conversation into a new case.
Next
- Agent versions: roll back to a version where every test was green.
Help me solve it
Happ answers right away and hands over to a manager when needed.
Did this help?