Your Agent Is Not Done Until the Eval Harness Exists
The demo is not the test.
I know that sounds obvious. But agent teams still ship based on a handful of happy-path prompts.
That is not enough.
If an agent can use tools, read company data, post messages, open tickets, review code, or touch browser sessions, it needs an eval harness. Not later. Before production.
What the harness should answer#
An eval harness should answer:
- Did the agent choose the right workflow?
- Did it use allowed tools?
- Did it cite sources when making factual claims?
- Did it refuse unsafe actions?
- Did it ask for approval at the right time?
- Did it leak private data?
- Did it recover from tool errors?
- Did it produce the output format we need?
This is the difference between "it worked once" and "we trust it enough to run."
Evals by workflow#
For a Slack triage agent:
- Correct request category.
- Correct owner route.
- Evidence pack includes source links.
- Incident claims require approval.
- High-risk actions are blocked.
For a PR review agent:
- Critical path files are noticed.
- Security issues are not missed.
- Low-value comments are suppressed.
- Secrets are redacted.
- Blocking comments have evidence.
For a browser agent:
- Wrong-account cases fail safely.
- Expired sessions stop the run.
- Form submits require approval.
- Screenshots are captured before and after action.
Generic evals are weak. Match the test to the job.
Harness types#
I like a few harnesses:
Replay harness
Run the agent against saved Slack threads, tickets, PRs, or browser tasks.
Policy harness
Red-team permission boundaries, private data, billing changes, deploy actions, and external messages.
Prompt regression harness
Make sure prompt edits do not break known-good behavior.
Approval harness
Verify that risky actions stop and produce a human-readable approval request.
Observability harness
Check logs, traces, latency, cost, and fallback behavior.
The release gate#
Do not make evals a dashboard nobody checks.
Tie them to release.
If unsafe action rejection drops, block release. If source citation drops, block release. If the model route changes, rerun the relevant suite.
Agents change when prompts, models, tools, context, or data change. The harness has to treat all of those as release inputs.
Build it in Codelit#
Try this:
Design an eval harness for a Slack engineering triage agent. Include replay tests, red-team policy cases, approval checks, grounded response scoring, model fallback tests, and release gates.
If the agent cannot be tested, it cannot be trusted.
Continue learning
Go deeper on AI agents and LLM systems
As an Amazon Associate I earn from qualifying purchases. Codelit may receive a commission at no extra cost to you.
From Prompt to Proof
How to Use AI to Think Clearly, Finish Real Work, and Verify What Matters
A proof-first method for turning AI output into finished work with evidence, judgment, and clear stopping rules.
View on AmazonThis book is written by Codelit founder Mo Sharif. Its Amazon link is a paid affiliate link.
AI Engineering
Chip Huyen · 2025
Book-length treatment of evals, prompts and deployment tradeoffs for foundation-model apps.
AI Agents in Action, Second Edition
Micheal Lanham · 2026
Working code for agent memory, tools, MCP and A2A, in the July 2026 second edition.
4.8 (29)Kindle editionModel Context Protocol for LLMs
Naveen Krishnan · 2026
436 pages on MCP servers, gateways and auth patterns, past what the spec docs explain.
4.4 (12)