For conventional software, I would start with unit tests, integration tests, logging, staging data, and possibly chaos testing. With an LLM agent that can call tools, the risks seem broader than whether the final response sounds correct. It might read the wrong input, select the wrong tool, rely on stale context, pass subtly incorrect arguments, or take an action the user never clearly requested. If you have shipped an agent like this, what did you test before trusting it with real permissions, and how did you verify that it would refuse or ask for clarification when appropriate?
3 Answers
The most useful tests focus on tool calls rather than exact wording. For fixed inputs, assert which tool was selected and verify the arguments it received. The response text can vary between runs, but the action and its parameters should stay within clear expectations. Test ambiguous and out-of-scope requests just as aggressively as normal happy paths, making sure the agent asks for clarification or does nothing instead of guessing. Use reversible tools or realistic mocks, and deliberately return empty results, errors, malformed data, and stale information to see whether the agent incorrectly pretends the operation succeeded. In production, log every tool call along with its inputs and outputs, then keep representative real runs as regression cases to replay whenever the model, prompt, or tool definitions change.
Also test the tool layer itself as a safety boundary. If the model repeatedly requests a command or capability that does not exist, the wrapper should reject it clearly, avoid retrying forever, and guide the agent toward the supported alternative. That kind of failure may not look catastrophic in the final chat, but it can waste time or cause an agent to loop indefinitely.
People often use “evals” as the umbrella term, but for a tool-using agent they should be concrete benchmarks: fixed scenarios, expected tool choices, argument checks, refusal cases, and assertions about how errors are handled. The same approach applies to retrieval or summarization features too—build a representative test set, run it consistently, and compare results whenever the underlying model or orchestration changes.

That missing-tool loop is exactly the sort of failure I worry about. It is easy to overlook because nothing dramatic happens, but the system should fail closed and stop retrying unsupported actions.