Case studies / How we test AI agents
SaaSHow we approach it

AI agent testing that checks every step, not just the final answer

An agent that takes actions needs more than answer checks. We test the tools it calls, the limits it respects and the actions it must never take alone.

Repeat runsper task to measure consistency
Tool callschecked for order and arguments
Guardrailstested against out-of-policy actions
Costper task tracked as a check
In 60 seconds

The whole story, short

The problem

The agent completes a task once, then fails the same task on the next run.

What we did

  • Build task-completion suites
  • Validate tool-call traces
  • Detect loops and timeouts
  • Test permissions and guardrails
  • Monitor cost per task
  • Test connectors

The outcome

Every step of the agent trajectory checked

The problem

What goes wrong

  • The agent completes a task once, then fails the same task on the next run.
  • It calls the wrong tool, or the right tool with the wrong arguments.
  • It loops on unclear tool errors and burns time and tokens.
  • It can be talked into actions outside its permissions.

Why the usual fix falls short

Checking only the final answer misses an unsafe step in the middle. Agents need trace-level tests and repeat runs, because one successful run proves little.

What we did

How we tested it

  1. Build task-completion suites

    Define tasks with clear success criteria and run each one repeatedly to measure consistency.

  2. Validate tool-call traces

    Inspect traces to check which tools were called, in what order and with which arguments.

  3. Detect loops and timeouts

    Set step and time limits, flag runs that exceed them and trace the cause.

  4. Test permissions and guardrails

    Attempt out-of-policy actions, access to other accounts and hidden instructions, and confirm high-risk actions need human approval.

  5. Monitor cost per task

    Track tokens and spend per task, so an expensive path shows up as a failed check.

  6. Test connectors

    Test tool and MCP connectors against timeouts, malformed responses and missing permissions.

FAQ

Questions buyers ask

How is AI agent testing different from chatbot testing?

A chatbot mainly produces text, while an agent takes actions through tools. Agent testing therefore checks every step of a task as well as the final answer. That includes which tools were called, whether permissions held, whether the agent stopped appropriately, and what each run cost.

How do you stop an AI agent from taking unsafe actions?

Limit its permissions to what each task requires, require human approval for high-risk actions, and test those controls deliberately with requests it should refuse. Testing should confirm that guardrails hold under pressure, including when instructions arrive through documents or tool results rather than directly from users.

Which metrics matter for AI agents?

Task success rate shows whether the agent finishes the job. Wrong-tool-call rate and average steps show how efficiently it gets there, while cost per task shows whether it is affordable. Unsafe actions blocked shows whether the guardrails work. Review these together, because any one alone can mislead.

Want this level of testing on your product?