This guide is for CTOs, engineering leads and delivery or QA leads who own the decision to let a mid-market company's AI agent touch a CRM, an ERP, a mailbox or a payment system. Our AI automation guide for business operations decides how much autonomy a process gets; this page is about proving the agent deserves that autonomy before it goes live. Once it passes, AI agent security and human approval controls covers the controls that keep it safe while it runs, and the agentic AI automation service covers delivery. The first-90-days operating plan places this harness gate inside the wider 90-day pilot sequence.
In this guide
- Why unit tests are not enough for an agent
- Impact tier x grader type: the harness framework
- Building the harness
- The go/no-go gate: where production data access starts
- Where AI fits
- Alternatives and selection criteria
- What delivery record exists, and what does not
- Limits of this guide
- Frequently asked questions
- Next step
Why unit tests are not enough for an agent
A conventional test suite checks one function against one expected output. An agent chains several model calls, chooses which tools to call in what order, and reacts to whatever a tool returns, including a stack trace, an empty result or a page of text it was not expecting. Two runs of the same input can produce different tool sequences and still both be correct, or both be wrong in different ways. NIST's Generative AI Profile calls this out directly: organizations should run test, evaluation, validation and verification (TEVV) to understand a generative AI system's capabilities before deployment, not assume that a passing demo generalizes. For an agent the thing under test is the whole trajectory, not a single answer: which tools it called, with what arguments, in what order, and what it did with what came back.
The OWASP Top 10 for Agentic Applications frames the same gap from the attacker's side: an agent that behaves correctly on the cases its builders imagined can still be hijacked by a poisoned document, misuse a legitimate tool in an unsafe way, or cascade one bad input into a multi-step failure. A harness exists to catch both kinds of failure, ordinary and adversarial, before the agent is trusted with data a customer or the business cannot afford to lose.
Impact tier x grader type: the harness framework
Classify every test case by what the agent is allowed to do, the same impact tiers used to decide which actions need human approval, and pair each tier with the grading method that actually catches its failures. Deterministic checks are cheap, exact and good at catching format and tool-selection errors; a model grading another model's output (LLM-as-judge) is slower and needs its own calibration, but it is the only practical way to score an open-ended answer for groundedness or tone.
| Impact tier | What the agent does | Primary grader | What it must prove before promotion |
|---|---|---|---|
| Read-only | Looks up records, drafts a summary nobody acts on automatically | Deterministic (schema and field checks) | Correct record retrieved; no field invented |
| Reversible write | Updates a status, tags a record, drafts a message for review | Deterministic plus LLM-as-judge on drafted text | Tool call matches the task; draft is accurate and on-brand |
| Irreversible or external | Sends a customer message, issues a refund, deletes a record | Deterministic, LLM-as-judge, and a held-out adversarial set | Zero tolerance on the deterministic checks; adversarial set passes before any live run |
A case that only checks the final answer misses most agent failures. Score the trajectory: which tools were called, with which arguments, in which order, compared against an approved reference path, as well as the end state the test asserts on (the record, the message, the ledger), not a summary the model wrote about itself.
Building the harness
-
Write the production contract first
Before any test case, state in writing what observable state proves success, which tools the agent may use, which argument values and ranges are allowed, and what it must never attempt. Everything below tests against this contract, not against what the agent happened to do on a good day.
-
Collect real and synthetic cases per tier
Pull representative cases from the process the pillar guide helped you pick, add edge cases (empty results, ambiguous requests, conflicting records), and add adversarial cases deliberately: a document with hidden instructions, a request that resembles a legitimate one but crosses a permission boundary.
-
Run the agent in a sandbox, not production
The sandbox uses the same orchestration and the same tool interfaces as staging, pointed at synthetic or masked data, so a failure never touches a real customer record. This is also where the human-in-the-loop checkpoint design gets its own dry run.
-
Score every case with the matching grader, against a baseline
Deterministic checks for tool selection, arguments and output schema; an LLM-as-judge for groundedness, tone and goal alignment; both compared to a frozen baseline run so a change in the model, the prompt or a tool is measured as a delta, not read in isolation.
-
Set a pass/fail threshold per tier, not one global score
An 95% pass rate on read-only lookups says nothing about whether the one irreversible-tier case that matters is reliable. Irreversible or external actions need their adversarial set at or near 100% before the gate opens.
-
Turn every production failure into a new case
A harness that only grows from an incident, never from imagination alone, is the one that actually improves; wire it into the same change process as the prompt, model and tool versions it protects.
The go/no-go gate: where production data access starts
The harness answers a yes/no question for one specific change (a new agent, a new tool, a new model, a new prompt version): does it clear every irreversible-tier threshold on the current adversarial and regression set, measured against the frozen baseline? If yes, a named person signs off and the agent's credentials are widened from the sandbox scope to the real system, following the least-privilege identity design in our AI agent security guide. If no, the change stays in the sandbox regardless of how well it performed on read-only cases. The gate is enforced in the deployment pipeline, the same way a code reviewer gates a pull request, not left to the agent or a single engineer's judgment call on launch day.
Re-run the full suite on every prompt, model or tool change, not only at first launch: OWASP's Agentic Security Initiative treats a changed prompt template or a swapped model as a new attack surface, and NIST's profile treats measurement as continuous, not a one-time pre-deployment stamp.
Where AI fits
An LLM-as-judge is itself a model that can be wrong, so it never replaces the deterministic checks and the human sign-off on the irreversible tier; it only reduces how many open-ended cases a person has to read by hand. Netbase works with the major commercial and open-source AI tools and models, chosen per project, and designs test harnesses so that a model, prompt or tool can change without losing the evidence a go/no-go decision needs.
-
In delivered work
AI content moderation on a classifieds marketplace
A testing and optimisation phase ran before the flagging model reached the admin review dashboard, delivered for a client that is not named.
-
In delivered work
WhatsApp AI chatbot with CRM integration
Milestones name NLP tuning, testing and optimisation ahead of go-live, delivered for a client that is not named.
-
Available capability
Agent evaluation harnesses
Test-case design, sandboxing, grading and the go/no-go gate described above, as part of agent delivery, and for a shared runtime across departments the enterprise AI agent platform; not yet tied to a published case that names this harness.
Alternatives and selection criteria
| Approach | Strength | Weakness | Choose it when |
|---|---|---|---|
| Manual spot-check before launch | Fast, no tooling to build | Misses rare and adversarial cases; does not scale past one launch | Low-volume, reversible, internal-only agent with a short pilot |
| Deterministic checks only | Cheap, exact, easy to run in CI | Cannot score open-ended text quality or intent | Tool-calling agents with narrow, structured outputs |
| Deterministic plus LLM-as-judge | Covers both structured and open-ended failures | Judge model needs its own calibration and occasional human audit | Any agent that drafts customer-facing text or judges ambiguous cases |
| Full harness with adversarial set and go/no-go gate | Closest to proof the agent is ready for real data | Takes real engineering time to build and maintain | Any agent reaching the irreversible or external tier |
Four factors decide how far up this table to go: how reversible the worst action is, how much of the input comes from outside the company (email, uploaded files, web pages), how many cases run per day, and whether a wrong answer reaches a customer directly or a person first. A read-only internal agent used by one team can often stop at manual spot-checks for its first quarter; an agent that sends money or messages a customer cannot.
What delivery record exists, and what does not
- What exists. Netbase has delivered AI projects for clients that are not named, where a testing and optimisation phase is part of the recorded milestones before the system reached its review dashboard or went live, including the moderation and chatbot records above and anonymised RAG, document AI and MLOps pipelines. Netbase follows its published security practices: secure code review, TLS in transit and AES at rest, role-based access control, MFA for admin dashboards, vulnerability scanning and penetration testing. Netbase holds ISO 27001 certification and a SOC 2 Type II attestation for its own operations.
- What does not. No published Netbase record names a standalone evaluation harness product, a test-case count, a pass rate, an adversarial-test result or an incident count for an agent. No record describes an autonomous agent with unattended write access to a payment or ERP system. Netbase's certifications cover Netbase's own operations; they do not certify a client's agent or its evaluation results.
Limits of this guide
- This is general engineering guidance, not a certification, an audit or a guarantee that a specific agent is safe; the thresholds and tiers above are a starting structure to adapt to the actual actions an agent can take.
- Evaluation methods for generative AI are still an immature field: NIST's own profile notes that many useful tests do not yet have agreed, published benchmarks, so expect to revise test cases as new failure modes appear in production.
Plan the next step with a Netbase consultant
Frequently asked questions
Enough to cover every impact tier at least once, plus edge cases and adversarial cases for anything reversible or external. There is no fixed number; irreversible-tier coverage matters more than total count.
No. It reduces how many open-ended cases a person reads by hand, but the go/no-go sign-off for an irreversible-tier change stays with a named person, and the judge model itself needs periodic human-audited calibration.
No. The harness proves the agent behaves correctly and safely on a fixed set of cases before launch; identity, least-privilege tools, prompt-injection defences and approval gates keep it safe once it is live and facing inputs the harness never saw. See AI agent security and human approval controls.
Next step
Share the agent you are about to build or extend and the systems it will eventually touch, and we will book a solution review to design its test-case tiers, sandbox and go/no-go gate before it goes near production data. You can also see AI automation and agents or more Netbase insights.
Related services and solutions
AI automation and agents that keep people in charge
Netbase provides AI automation and agent development for operations teams that want repetitive, multi-step work done by software while people keep approval over the decisions that matter. We combine rule-based automation with AI steps where they add value, design in human approval, and measure return against a baseline.
Learn More
Enterprise AI agent platform: run AI agents with approvals, audit logs and cost limits
An enterprise AI agent platform is a governed runtime where AI agents plan and carry out multi-step work through approved tools, while approvals, audit logs, access rules and cost limits keep every action accountable. Netbase offers it as a forward-looking solution, built inside your own environment rather than licensed as a product.
Learn More
Discuss a project
Netbase JSC helps organizations design, build, modernize, and operate digital products and AI-enabled business systems.project@netbasejsc.com
+84 937 869 689
91 Nguyen Chi Thanh, Dong Da, Hanoi, Vietnam
Get in touch
Tell us what you want to build, modernize, or operate.