# How to tell whether an AI agent really works.

Jaro Rais · 7 min read · 2026-11-20 · Skills and agents
Source: https://itashu.co/en/know-how/how-to-test-an-ai-agent

An agent that writes “done” is not necessarily done. Anthropic repeats this in all its materials: without good checks, every agent is just a faster way to make mistakes. The last part of the series is about how to test an agent.

![Two circles with a ticked document between them: the result only passes through a check](https://itashu.co/img/art-45-hero-1280.webp)

## An agent grades itself too leniently

While building applications, Anthropic found that agents consistently **overrate** their own work, especially on subjective things like design. The author even wrote that out of the box, Claude is a poor tester.

The solution was to **[separate the author](https://itashu.co/en/know-how/five-patterns-for-ai-workflows)** from the evaluator. A separate evaluator is much easier to tune to be strict than to convince the author to be critical of itself. The evaluator actually ran the application in a browser, and before each round it agreed with the author on what “done” means.

But it comes at a price. The same game built by one agent took 20 minutes and cost 9 USD, but the core feature didn’t work. With a planner, an author and an evaluator it took 6 hours, cost **200 USD** and was playable.

## Basic terms of AI agent testing

| TERM | WHAT IT MEANS |
| --- | --- |
| Task | One test with a task description and a success criterion |
| Trial | One run of a task. The agent answers a little differently each time, so you need several |
| Grader | A rule, model or person that scores the result |
| Outcome | The actual state after a trial: a booking exists in the system, not just the agent’s claim that it created one |

Anthropic advises grading **the outcome, not the path** the agent took. And preferring rules that can be verified by code. A model as a grader only where a rule is not enough, and a person for calibration.

![A machine sorting results into trays according to checklists](https://itashu.co/img/art-45-tests-1280.webp)

## Succeeding once is not enough

What matters is whether you need one success or success every time. If an agent succeeds in 75% of trials, the probability that it succeeds three times in a row is only about **42%**. For an agent that answers customers, it is the second number that counts.

## Start with a small set of tests

[You don’t need hundreds of tests.](https://itashu.co/en/know-how/how-to-test-an-ai-model) According to Anthropic, **20 to 50** simple tasks drawn from real failures are a good start. Early on, changes have a large, visible impact, so even a small set catches them. A good task is one where two experts would independently give the same yes or no.

> **What it can look like:** An agent that sorts inquiries from the website has a set of 30 old emails with the correct category. Before every prompt change, the set runs three times. A change passes only if none of the tasks that worked before gets worse.

![Diagram: 30 old emails · with the correct · category · Prompt · change · run 1 · run 2 · run 3 · Nothing got worse: · change passes · Something got worse: · change fails](https://itashu.co/img/diagrams/art-45-diagram-en.svg)

## With every new model, review what the agent needs

Anthropic writes that every part of the harness around the model, meaning prompts, checks and handoffs, is **an assumption** about what the model can’t do on its own. With a new model, some assumptions become invalid. Example: an older model ended work prematurely as it approached the end of its context and needed restarts. A newer one no longer does, so the restarts were dropped. That is why tests are not a one-off. They are a tool that shows you, with every new model, what you can simplify.

## Try it: your first 20 tests

- Collect 20 situations where AI made a mistake in your company or where you weren’t sure.
- For each, write in one sentence what a correct result looks like.
- After every prompt or model change, run them again and watch what improved and what broke.

Sources: Anthropic, Demystifying evals for AI agents (January 2026); Harness design for long-running application development (March 2026); Scaling Managed Agents (April 2026).

**Ask yourself:** How do you find out today that your agent didn’t get worse after a prompt change?

---

Want to know whether your chatbot or agent answers correctly? We prepare a set of tests and set up regular checks. https://itashu.co/en/consultation
