Skip to content

Running evals

Terminal window
uv run honest-agent run

run asks every eval’s question, grades each answer, and stores the results. It prints a line for each eval as it finishes, with its scores and how long it took, then which ones fell below their thresholds:

Target: sales-agent (honest_agent_config.yml)
No --grading-model given; using claude-sonnet-5-5 (low effort), the default for Anthropic agents.
Starting eval run 7d2e41a0-3c55-4f0b-9a61-2b8e5d90c417 (4 evals)...
Evaluating agent: sales-agent
Model: claude-haiku-5-5 · grading model: claude-sonnet-5-5 (low effort)
[1/4] revenue_q4 .............. FAIL accuracy 0.00 · provenance 0.50 [14.9s]
[2/4] order_total_2026 ........ FAIL accuracy 1.00 · provenance 0.50 [9.3s]
[3/4] top_segment ............. PASS accuracy 1.00 · provenance — [6.1s]
[4/4] top_nations_last_year ... PASS accuracy 1.00 · provenance 1.00 [21.4s]
Wrote 4 result(s) to ./honest_agent_results/results.duckdb
Estimated cost: $0.025 (agent $0.008 · grading $0.018)
2/4 eval(s) below threshold this run:
- revenue_q4: accuracy 0.00 < 0.8, provenance 0.50 < 0.7
- order_total_2026: provenance 0.50 < 0.7
Run 7d2e41a0-3c55-4f0b-9a61-2b8e5d90c417 complete. Next: `honest-agent report` / `honest-agent notify`.
  • The progress bar: in a terminal, the bottom line shows a bar with how many evals are done, the run’s time so far, and the eval running now with its time. It isn’t drawn in CI, pipes or log files, so those get only the lines above.
  • Which agent: run evaluates the config’s default_target. --target <name> picks another one.
  • Which model: the target’s model, or --model for one run. --grading-model sets the grading model, and --effort and --grading-effort how much each thinks. See Models.
  • The exit code: run exits with 0 when every eval meets its thresholds, and 1 when any falls below or stops with an error, like a failing test. It also exits with 1 when the run itself fails, for example when the MCP server can’t be reached. In CI, the job fails on a regression; Run it in GitHub Actions shows how to still publish the report and send the alert.
  • When an eval errors: if a model call fails (the provider is overloaded, rate-limits the run, or rejects the API key) or the MCP connection drops, that eval’s line says ERROR with the reason, and the run goes on to the next eval. The eval is stored without scores, so it doesn’t pull the run’s averages down, and the summary at the end lists it before the evals below threshold. A wrong query isn’t an error: the agent sees the database’s message and can try again.
  • Step limit: an agent gets 5 steps per question by default (a step is one model call and the tool calls it asks for). An eval that runs out fails with “hit the step limit without a final answer”. Raise it with max_tool_steps in the config, at the top level or on a target, or with --max-tool-steps for one run (see Other target settings).
  • Tool timeout: a tool call that takes longer than 120 seconds is stopped. The agent gets an error result saying so, like a failed query, and can try again or answer; the eval goes on, and a warning under its line says a call was stopped. Raise it with tool_timeout, or --tool-timeout for one run. honest-agent also asks the server to stop the query, but whether it does is up to the server: one that doesn’t lets the query finish in the warehouse. On Snowflake, see Long-running queries.

After the results are written, run prints an estimate of what the run cost, with the agent and grading apart:

Estimated cost: $0.025 (agent $0.008 · grading $0.018)

It’s an estimate: the token counts each call reports, times the provider’s published prices. Your provider’s bill is the real figure.

  • The prices come from a table in honest-agent, checked against Claude’s and OpenAI’s pricing pages for each release. Nothing is downloaded during a run.

  • Each kind of token has its own price: input, input read from the cache, input written to it, and output, which includes thinking. Each call is priced on its own, so a call over a model’s long-prompt threshold (Claude Haiku 5.5 above 100k tokens) gets the higher rate.

  • Each result keeps its cost at the prices of the day it ran, in the agent_cost_usd and grading_cost_usd columns. A later price change, or a rebuild, doesn’t change it.

  • A model with no price is named instead of counted as $0, for example a model behind a proxy or one newer than your honest-agent:

    Estimated cost: $0.008 for the agent · no price for the grading model my-proxy-model; add it under prices: in honest_agent_config.yml

Add a model, or override a built-in price (a negotiated rate, say), under prices: at the top level of honest_agent_config.yml, in USD per million tokens:

prices:
my-proxy-model:
input: 3.00
output: 15.00
cache_read: 0.30 # optional; without it, priced as input
cache_write: 3.75 # optional; without it, priced as input
claude-sonnet-5-5:
input: 1.80
output: 9.00
  • Each entry applies to the model with that name, as the agent or as the grading model, so one file can list every model you switch between. An entry no run uses does nothing.

  • The name must match the model’s, ignoring case. A model id with a date on the end (claude-sonnet-5-5-20261001) also matches an entry without it.

  • Your entries come first, then the built-in table. An entry has one flat rate, with no long-prompt rate.

  • To check which price applies, run honest-agent debug. Its Prices line says where each model’s price comes from, so a typo shows up before you spend anything:

    Prices OK claude-haiku-5-5 built-in (as of 2026-10-28) · my-proxy-model from honest_agent_config.yml

honest-agent debug checks the config, the variables, the prices, the evals, the MCP server and the results store, without calling a model or running a query. Run it after changing your setup, before a run that costs money. If it reports a problem, see Troubleshooting.

--select picks evals, the way dbt does:

Terminal window
uv run honest-agent run --select revenue_q4 # one eval, by id
uv run honest-agent run --select tag:critical # every eval tagged critical
uv run honest-agent run --select category:sales # every eval in a category
uv run honest-agent run --select "revenue_q4 top_segment" # either one: a space means OR
uv run honest-agent run --select "category:sales,tag:critical" # both: a comma means AND
uv run honest-agent run --exclude tag:slow # all but these

--exclude takes the same syntax and is applied after --select. A selector that matches no eval is an error that names it, so a typo doesn’t silently run nothing.

honest-agent ls takes the same options and lists what would run, with each eval’s id, category and tags, without running anything:

Terminal window
uv run honest-agent ls --select category:sales
Terminal window
uv run honest-agent logs --eval-id revenue_q4

logs prints everything an eval sent and received, call by call: each model call, each tool call with its SQL and what the warehouse returned, and each grading call, with its timing. Use it to see where the agent went wrong.

  • --run-id <id> shows one run only; without it, you get every run of that eval.
  • --json prints the records exactly as stored, for scripts.

The report shows the same run more readably, with scores and the SQL the agent ran.

When an eval fails, it’s usually one of these:

  1. The agent got it wrong. That’s a real finding: keep the eval, and fix the agent.
  2. The eval is off: a wrong expected answer, or a grading method that doesn’t fit the answer. Fix the eval.
  3. Provenance is too strict: expected_sources lists a table the answer doesn’t need. Remove it.
  4. Provenance can’t see the tool: the agent answered through a tool without SQL, so provenance scores 0. Remove expected_sources from that eval (see Provenance only sees SQL).
Terminal window
uv run honest-agent rebuild

Every run keeps a full record of what was sent and received. After an upgrade that changes how honest-agent scores or reads runs, rebuild re-scores your past runs from those records. It calls no model, so it costs nothing. --run-id <id> rebuilds one run.

By default, in a DuckDB file in your project, honest_agent_results/results.duckdb. They can also live in MotherDuck or in cloud storage: Storing results compares the options.

Made by Jose CotoLinkedInSubstackPrivacy