# AI agent testing and LLM evaluation: task success, tool calls, regressions

> AI Agent Testing and LLM Evaluation | Zapple.Tech. Canonical page: <https://zapple.tech/services/ai-agent-testing/>

An agent can pick the right tool, pass the wrong argument and still write a confident summary. You get a task set with written success criteria, a measured baseline of how your agent performs today, and a suite that turns every model, prompt or tool change into scores you can compare.

## What you can order

- **Task success scoring**: Does the agent finish the job the user asked for? Success is defined per task type with your product owner and checked on the end state, not on the wording of the reply.
- **Tool calls and planning**: The calls an agent makes matter as much as the text it returns. Each step is compared with what the task needs.
- **Trajectory checks**: A mistake in step two shapes steps three to eight, so the path is scored as well as the destination.
- **Sandboxed tools and permissions**: An agent under test must not refund a real customer. Tools with side effects are stubbed or pointed at test accounts, and permission boundaries are tested on purpose.

## Why an agent needs more than a prompt test

A chatbot answers. An agent acts: it chooses a tool, fills in arguments, reads the result and decides what to do
next. That adds failure modes a single-prompt test never sees.

- **Right answer, wrong action.** The reply reads well while the call behind it used the wrong customer id or
  skipped a required confirmation.
- **Errors compound.** A bad choice in step two changes everything after it. The final answer may look fine
  or may be wrong in a way that is hard to trace without the step log.
- **Testing can cause damage.** An agent that can send email, issue refunds or edit records will do so during a
  test unless the harness stops it.

So the unit of testing is the task: a goal, a starting state, the tools available, and a definition of done.

## What one task case records

| Field | Example |
|:------|:--------|
| Goal | Move the customer's booking to the next available date |
| Starting state | Test account with one confirmed booking and one cancelled booking |
| Tools available | Booking search, booking update, email (stubbed) |
| Done when | One booking exists on the new date, the old one is released, one email is queued |
| Must not | Touch the cancelled booking; send more than one email; change the price without asking |
| Failure handling | If booking update returns an error, retry once and then tell the user |

Every run of the case is scored against those fields, and the step log shows where a failed run went wrong.

## Where it runs

The task set, the stubs and the scoring code live in your repository next to the agent. A CI job runs them when
the model, the prompt or a tool definition changes, and on a schedule. The tools themselves and their API
contracts are deterministic and get ordinary automated tests. If your agent is customer-facing,
[AI chatbot testing](/services/ai-chatbot-testing/) covers the conversation side; for the wider area, see
[AI testing services](/services/ai-testing/).

## What agent testing does not solve

Evaluation turns an agent's behaviour into numbers you can compare. It does not make the agent safe or correct by itself.

- Agent runs vary, so a score is a range, not a point. A change of a few points can be noise, and the report says when it is.
- A sandbox is not production. Real tools have rate limits, stale data and permissions a stub does not copy, so some failures appear only after release.
- It does not decide which actions the agent should be allowed to take. That is a product and security decision; testing checks that the limits you set hold.
- It does not tell you whether a weak result comes from the model, the prompt or the tool design until the failure log is read by a person. The report points to the likely cause; your team makes the fix.

## A check on the reply alone compared with a task test for an AI agent.

| Aspect | Judging the reply alone | Agent task test |
| --- | --- | --- |
| What is tested | A reply to a prompt | A task: a goal, a starting state, the tools available and a definition of done |
| How success is judged | The wording of the reply | The end state, for example the record that should exist |
| What a wrong action looks like | Hidden when the reply reads well but the call behind it was wrong | Seen in the step log: tool name, arguments and order are checked |

## How the work runs

1. **Agent evaluation baseline** (About one week): One agent or one LLM workflow. We list its task types and tools, write success criteria with your product owner, set up a safe test harness and run a first task set several times.
2. **Evaluation pilot** (Two to six weeks): The task set becomes an automated suite that scores outcomes, tool calls and trajectories on every change to the model, the prompt or a tool definition.
3. **Ongoing evaluation** (Monthly): As the agent gains tools and users, Zapple.Tech engineers add task types, keep the stubs in step with the real tools and read the results before each release.

## FAQ

### What do you need from us to start the baseline?

Access to the agent in a test environment, the list of tools it can call, test accounts for those tools, and a person who can say what a successful task looks like. Examples of real tasks with personal data removed help, but a first set can be written with you if you have none.

### Will the tests trigger real actions in our systems?

Only the ones you agree to. Tools with side effects, such as payments, emails or bookings, are stubbed or run against test accounts. The list of actions allowed to run for real is written down before the first run.

### How do you test an agent whose behaviour changes on every run?

Each case runs several times. Where the task has a checkable end state, such as a record created or a message sent once, that state is checked directly. Free-text parts are scored against written criteria, and the scoring is checked against cases a person has labelled.

### We already run evals in-house. What would you add?

The suite can be built in the evaluation tooling you already use. What this adds is a task set with written success criteria, step-level tool checks, side-effect isolation, and a reviewer who did not build the agent.

### How long does it take?

The baseline takes about a week for one agent. The pilot runs two to six weeks; agents with many tools, or tools that are hard to stub, take the longer end.

### Who does the work?

Zapple.Tech test automation engineers. Most of an agent harness is ordinary test engineering, such as stubs, fixtures, test accounts and CI jobs, with the scoring built on top.

### What happens when the provider updates the model?

The suite runs on a schedule as well as on your own changes, so a provider-side update shows up as tasks that moved. You see which ones before you decide whether to accept the new version.

### How much does it cost?

Prices are not published. The quote depends mostly on the number of task types and tools, and on how much of the tool layer has to be stubbed. Send the list and you get a scoped quote within one business day.

[Request a baseline quote](https://zapple.tech/services/ai-agent-testing/#start)
