# Test which agent does best

> Run your own tasks with each agent, set up each way, and end with a scoreboard that says which one does them right.

9 steps. Checked 2026-12-06. Page for people: https://app.makeaguide.guides.hopperlabs.ai/guides/test-agents

You start with: A connector or a skill; Five or more things people really ask.

You end up with: Tasks (each with an answer you can check); Runs (one for each agent and way); Grades (one for each run); A scoreboard (who did it right).

## Steps

### 1. Write real tasks

Collect five or more requests people really make, in their own words.

#### What makes a task real?

A person asked it, in their own words. "Which notes mention the lease?" is a task. "Call search with the query lease" is not. It only shows the agent can copy.

Start with five or more. Take them from requests that went wrong before. Anthropic's article on testing agents says 20 to 50 simple tasks drawn from real failures is a great start.

#### Should every task need my product?

No. Add a few requests your product should leave alone. Anthropic's advice is to test both the cases where something should happen and the cases where it should not. If the agent calls your tool for one of those, that run failed.

#### How do I know a task is good?

It has one right answer that you could look up yourself. "Help me with my notes" has none. "How many notes mention the lease?" has one.

From `evals.yaml`:

```yaml
- id: find-guide
  kind: agent-task
  prompt: "I want to write a how-to that my team's agents can use too. Is there a guide for that? Give me its id."
```

### 2. Say what must be true

Beside each task, name the tool you expect and the facts that must hold in the result.

#### What goes beside each task?

The tool you expect, the facts it must be given, and facts that must hold in the result. Each one is either so or not. A task with these beside it is a test.

A fact about the result has three parts:

- `path`: where to look in the result, such as `/ready` or `/items`.
- `operator`: `equals`, `nonempty`, `object_contains` or `some_object_contains`.
- `value`: what to compare with, when the operator needs one.

#### How strict should a fact be?

Strict about the answer, loose about its wording. Anthropic warns against tests that reject a correct answer over formatting, punctuation or another valid phrasing. Compare one field with one value. Do not compare whole sentences.

#### What cannot be checked?

"The answer is helpful." Nobody can say yes or no to that, so it is not a fact. Rewrite it as something you can find in the result.

From `evals.yaml`:

```yaml
- id: read-steps
  kind: agent-task
  prompt: "Open the guide on making a guide and list its steps in order."
  expected:
    tool: get_guide
    arguments: {id: makeaguide}
    assertions:
      - {path: "/id", operator: equals, value: makeaguide}
      - {path: "/steps", operator: nonempty}
```

### 3. Choose what to compare

Pick the agents and the ways to compare, and change one thing between any two.

#### What is a way?

One setup for giving the agent your product. This site compares three: the connector with every guide's tools, the connector of one guide, which holds fewer tools, and only the site's address pasted into the request with no connector at all.

#### What does the address way measure?

Whether an agent given only a link finds your connector and uses it. On this site's runs, both agents read the pages and answered from them, often correctly, but almost never reached the connector. That is the case for handing agents the connector or the plugin, not only a link.

#### How many times should each test run?

More than once. Claude Code's own test runner for plugins runs each case three times by default, because one run of an agent tells you little. Three is a fair place to start.

So the number of runs is tests, times agents, times ways, times three.

#### How do I keep the comparison fair?

Change one thing. To compare two ways, keep the tests and the agent the same. To compare two agents, keep the tests and the way the same. OpenAI's guide on testing agents says to run the same cases before and after a change.

### 4. Start every run clean

Give every run an empty folder and only the connectors its way allows.

#### What does clean mean?

Nothing is left over from an earlier run or from your own setup. No earlier conversation, no extra connectors, no files another run wrote. Anthropic's advice is that each run starts from a clean place, so one run cannot help or hurt the next.

#### How do I keep my own connectors out?

Tell the agent to leave your settings alone for this run.

- Claude Code: `--strict-mcp-config` uses only the connectors in the file you pass with `--mcp-config`.
- Codex: `--ignore-user-config` does not load your `config.toml`. You stay signed in.

#### Why start in an empty folder?

Because an agent reads the folder it starts in. A `claude -p` run connects the connectors in that folder's `.mcp.json` without asking. When a person is typing, Claude Code asks first. Make a new empty folder for each run and start the agent there.

### 5. Run without a person

Start each agent from a command, with the task as its request and nobody typing.

#### How do I run an agent with nobody typing?

Use the agent's own command for one request. It takes the task, does the work, prints what happened and stops. Claude Code has `claude -p`, Codex has `codex exec` and Gemini CLI has `-p`.

The Claude Code command is at the end of this step. `notes.json` is the file that names your connector.

#### What is the command for Codex?

`codex exec`, with `--json` so it prints each event as a line a program can read. Give it the connector for this one run with `-c`:

```sh
codex exec --json --ignore-user-config -c 'approval_policy="never"' -c 'mcp_servers.notes.url="https://example.com/mcp"' -c 'mcp_servers.notes.required=true' "Which notes mention the lease?"
```

#### Why the two extra settings for Codex?

We ran it without them first, with Codex 0.174.0, and the agent never saw the connector.

- `mcp_servers.notes.required=true` makes Codex wait for the connector before it starts. Without it Codex warned "startup still pending; omitted from this turn" and answered with no tools.
- `approval_policy="never"` stops Codex asking a person. With nobody typing, `codex exec` rejects every request for approval.

#### How do I let the agent use my tool?

In Claude Code, name it with `--allowedTools`. A connector's tool has a longer name there. The tool `search` on a connector named `notes` is `mcp__notes__search`.

Run:

```shell
claude -p "Which notes mention the lease?" --mcp-config notes.json --strict-mcp-config --output-format json
```

### 6. Record every call

Save what each run printed, then list every tool call with what it was given and what came back.

#### What do I keep from each run?

Everything the command printed, saved to its own file. That file is the transcript. From it, list every tool call: the tool chosen, the facts it was given, what came back and any error. Keep the seconds the run took too.

Anthropic's article on tools says to record more than pass or fail: how long each run took, how many tool calls it made, and the tool errors.

#### What does one recorded call look like?

One line per call, in the order they happened. A call that failed has `error` with the message and no `result`.

```json
{"tool": "mcp__notes__search", "arguments": {"query": "lease"}, "result": {"items": [{"id": "n1"}]}}
```

#### Why keep the calls when the answer was right?

Because two runs can both pass and still differ. One used a single call. The other needed several and hit errors first. The scoreboard should show that.

From `tasks.yaml`:

```yaml
        calls:
          type: array
          description: "Every tool call the agent made, in order. An empty list means it called nothing."
          items:
            type: object
            properties:
              tool: {type: string, description: "The tool's name as the transcript gives it, such as search or mcp__notes__search."}
              arguments: {type: object, description: "The facts the agent gave the tool."}
              result: {description: "What the tool gave back. Leave it out when the call failed."}
              error: {type: string, description: "The error message, when the call failed."}
            required: [tool]
```

### 7. Grade the result

Hold each run against what you said must be true. The path it took does not count.

#### What decides pass or fail?

What the agent produced, held against what you said must be true. Anthropic's advice is to grade what the agent produced, not the path it took. A run that made an extra call and still got the right result passes.

#### What does the grader look at?

Four things, in this order. A run passes when all of them hold.

- `correct_tool`: some call used the tool you expected.
- `arguments`: that call was given the facts you named. Looked at only if you named some.
- `answer_returned`: that call has a result and no error.
- `assertion_1`, `assertion_2` and so on: each fact you wrote holds in that result.

#### What if the agent renames my tool?

The grader compares the last part of the name. Claude Code calls `search` on `notes` `mcp__notes__search`. Gemini CLI calls it `mcp_notes_search`. Both count as `search`.

From `evals.yaml`:

```yaml
- id: wrong-answer
  kind: agent-task
  prompt: "Grade this run. The test expects the tool search and says the items list in the result must not be empty. The agent called mcp__notes__search with query lease and got back an empty items list. Did it pass, and if not, why?"
  expected:
    tool: score_run
    assertions:
      - {path: "/passed", operator: equals, value: false}
      - {path: "/checks", operator: some_object_contains, value: {check: correct_tool, passed: true}}
      - {path: "/checks", operator: some_object_contains, value: {check: assertion_1, passed: false}}
```

### 8. Read the transcripts

Open every failure and some passes, and find what the agent did before it went wrong.

#### Why read them when I have grades?

Because a grade can be wrong. Anthropic's article says you will not know whether your graders work unless you read the transcripts and grades from many runs. Read every failure, and some passes too.

#### What do I look for in a failure?

The last thing the agent did before it went wrong.

- It chose another tool. Two tools sound alike, or yours is described vaguely.
- It sent the wrong facts. The tool did not say what it needs.
- It got an error. Read the message the agent was given. Did it say what to do next?

Most of these are fixed in your product, not in the agent.

#### How do I avoid fixing only the tests?

Keep some tests held out. Do not open them while you fix things. Run them at the end. Anthropic's team used held-out tests so their fixes did not fit only the tests they had been reading.

### 9. Publish the scoreboard

Show passed out of run for every agent and way, failures included, with the date and versions.

#### What goes on the scoreboard?

One row for each agent and one column for each way. Each cell says how many runs passed out of how many were run. Failures stay on it. A cell with no runs says "not run".

This site's results page is built like that, with the usual seconds and tool calls of a run in each cell. Under it, each guide has one row for each test and agent. The row says how many of that test's runs passed each way and, where one failed, what the grader found first.

#### What must sit beside the numbers?

The date of the runs, each agent's name and version, and one sentence that says what each way was. Without these nobody can repeat the runs.

#### When do I run it again?

After every change to a tool, a description or a skill. Run the same tests as before and compare the two scoreboards. Publish the new one, whichever direction it moved.

## What you keep

- Tests in people's own words, with some held out
- A transcript and a grade for every run
- A scoreboard by agent and way, failures included
- The commands that run it all again after a change

## Words used here

- **Agent**: A program that uses an AI model to do a job for someone, reading pages and calling tools as it goes. Claude, ChatGPT, Codex and Gemini are agents.
- **Connector**: An address an agent connects to that offers tools, using the Model Context Protocol (MCP). Often called an MCP server.
- **Grader**: The part that holds one run against what its test says must be true and answers passed or not.
- **Held-out test**: A test you set aside and do not look at while you fix things, so a pass on it shows the fix works beyond the tests you were reading.
- **Plugin**: A folder that carries skills, and sometimes connectors and commands, so that someone installs them together with one command.
- **Run**: One agent doing one test once, set up one way, from the request to the last thing it prints.
- **Scoreboard**: A table with a row for each agent and a column for each way, where each cell says how many runs passed out of how many were run.
- **Skill**: A folder with a SKILL.md file that tells an agent when and how to do one kind of work. The agent loads it only when the work comes up.
- **Test**: A request in a person's words, the tool an agent should reach for, and facts that must be true of the result.
- **Tool**: One named thing an agent can ask a connector to do, with the facts it needs described well enough for the agent to supply them.
- **Tool call**: One use of a tool by an agent, kept as the tool's name, the facts it was given and what came back.
- **Transcript**: Everything one run printed, kept in a file, so you can read what the agent did and in what order.
- **Way**: One setup for giving an agent your product, such as the connector added, only an address pasted into the request, or nothing.

## Questions

**How many tasks do I need?**

Five is enough to begin. Anthropic's article on testing agents says 20 to 50 simple tasks drawn from real failures is a great start. Add a task each time a real request goes wrong.

**Why run each test more than once?**

Because an agent does not do the same thing every time. Claude Code's test runner for plugins runs each case three times by default, and its documentation says one run tells you little. Report how many runs passed out of how many were run, not one yes or no.

**What goes in the file I give to --mcp-config?**

The connectors that run may use. The help text says the option loads them from JSON files or strings. Claude Code documents one form for a project's .mcp.json file. It has mcpServers, then your connector's name, then type http and the url. That the same form works in this file was not confirmed for this guide, so try it once.

**Were the commands on this page run?**

The Claude Code and Codex commands were, on 2026-12-06, with Claude Code 2.1.337 and Codex 0.174.0. This site's own results come from them. Gemini CLI was not installed. Its documentation gives -p with --output-format json, and that one was not run. Try each command once by hand before you build on it.

**Does a run fail if the agent made extra calls?**

No. The grade is about the result. Anthropic's advice is to grade what the agent produced, not the path it took. Record the number of calls and show it beside the grade, so a slow pass can be told from a quick one.

**So which agent does best?**

That depends on your tools and your tasks, which is why you run your own. This site publishes what agents did with its own guides on its results page, failures included.

## Sources

- [Writing effective tools for AI agents](https://www.anthropic.com/research/writing-tools-for-agents), read 2026-12-06, sha256 6299c1baa75efaa605f8f13480941da26eff309c6343e2d891e23f245b51c962
- [Demystifying evals for AI agents](https://www.anthropic.com/research/demystifying-evals-for-ai-agents), read 2026-12-06, sha256 1cb49e4cb8a868c554a1f130162865ca6c110db57d4807ae917f40ddbc4dae5b
- [Test plugins with evals](https://code.claude.com/docs/en/plugin-evals.md), read 2026-12-06, sha256 354331813e032fbf965e21a394236ee1e0ae212c5fb744119f05d4b0df6406dd
- [Run Claude Code programmatically](https://code.claude.com/docs/en/headless.md), read 2026-12-06, sha256 8ae2bae379081075de911ee56c486ee63c26dadc49255008129381c1ed4234f8
- [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp.md), read 2026-12-06, sha256 6c49c6d48f5e5e07051968231c9526958f75428cca8d217b4a4fb5279d90ae1f
- [Evaluate agent workflows](https://developers.openai.com/api/docs/guides/agent-evals.md), read 2026-12-06, sha256 a668a1f0d4f079275d63a172ec1967a1dc6423b512d7681d3c12827f58765ff3
- [Non-interactive mode](https://learn.chatgpt.com/docs/non-interactive-mode.md), read 2026-12-06, sha256 abd065b7e93ac739c6f84d51ff0744a760ea5aadcf50c06d459a3800e20d1877
- [Headless mode reference](https://raw.githubusercontent.com/google-gemini/gemini-cli/main/docs/cli/headless.md), read 2026-12-06, sha256 42718e00f5acac2ab039091fab282ed9b3d992ae9f49afc64ec7636fbf6fa6ec
- [Gemini CLI cheatsheet](https://raw.githubusercontent.com/google-gemini/gemini-cli/main/docs/cli/cli-reference.md), read 2026-12-06, sha256 ec376db5857fe8dda715ce38575370c33aa03390925b2d7024f0642021525545

Written from the primary pages listed as sources, read on 2026-12-06, and from this site's own files. No outside reviewer.

## For agents

- Connector for this guide: https://app.makeaguide.guides.hopperlabs.ai/api/mcp/test-agents (tools: list_guides, search, get_guide, fetch, define_word, score_run)
- Connector for every guide: https://app.guides.hopperlabs.ai/api/mcp
- Skill: https://app.makeaguide.guides.hopperlabs.ai/skills/hopper-test-agents/SKILL.md
- Tests written: 6. What agents did with them: https://app.makeaguide.guides.hopperlabs.ai/results
