KULDEEP LUVANI

The Harness · Part 06

Operating the Harness

A program owner's guide, for the people who staff, fund, govern and measure agent programs.

~14 MIN READUPDATED OCT 20261 LIVE INSTRUMENT

Of 1,340 teams LangChain surveyed at the end of 2025, 89% had observability on their agents. Only 52.4% ran offline evals, and 37.3% scored live traffic.1 Most programs can see what their agents did; far fewer can say whether it was right. That is an operating problem, and it belongs to whoever owns the budget, the team and the sign-off.

Buy the inner harness, own the outer one

The number budget owners quote is MIT NANDA's: external partnerships reached deployment about 67% of the time, internally built tools about 33%.2 Read it before you quote it: it rests on 52 organization interviews, 153 surveyed leaders and a review of 300+ public initiatives. The authors call the rates “self-reported” and warn that the correlation “does not necessarily prove causation”.2 Teams that buy may simply pick narrower problems.

The counter-signal is real too. Per The Register, nearly a third of McKinsey's 2026 respondents had skipped buying at least one software product because agentic coding tools let them build it.3 And a16z found CIOs shifting toward buying, with 37% now using five or more models.4

Build vs buy is the wrong unit; ask it per subsystem. MIT's own diagnosis of the failures is a “learning gap”: tools that do not learn, integrate poorly, or do not match the workflow.2 Those are outer-harness properties, in Böckeler's sense: the instruction files, tools and checks you add around the vendor's agent.5 The 33% are, plausibly, teams that tried to build both layers.

SubsystemBuyOwnWhy
Modelyesrouting rulesCommodity; keep two providers swappable
Agent loopyesstop checks, capsVendor loops are mature; the definition of done is yours
Sandboxyesegress allowlistIsolation is hard engineering; the network policy is your data
Tracingyesattribute schemaEmit a standard, store anywhere
ContextnoyesInstruction files, retrieval and memory encode your workflow
Tool contractsnoyesYour systems of record, your risk ratings
Permission policyenginerulesWho may do what is a business decision
Eval suiterunnertasks, gradersFailure-derived tasks cannot be bought

The rule in one line: buy the parts that are the same for every customer, own the parts that are your business. Ask every vendor of a bought part six questions:

  1. Are our prompts, tool results and traces retained, for how long, where, and are they used for training?
  2. Can we export full traces, in OpenTelemetry GenAI form, to our own store? (Ch 5)
  3. Can our policy engine decide every tool call before it runs? (Ch 4)
  4. Is sandbox egress default-deny, with an allowlist we control? (Ch 3)
  5. Can we swap the model behind it, and prove it with our regression set? (Ch 5)
  6. What does leaving cost, and which of our skills, tools and evals keep working without you?

Who owns what

Two failure shapes recur: every team builds its own sandbox, tracing and policy engine, badly and five times, or a central team builds a grand platform nobody adopts. Team Topologies names the middle path, the thinnest viable platform.6

“That might just be a wiki page - that might be your platform.”— Matthew Skelton, Team Topologies

For agents, the thin platform owns the inner-harness primitives: the sandbox image, the permission-policy engine, tracing, the eval runner, and a shared registry of skills and tools. Embedded engineers own each use case's outer harness: context, tool contracts, policy rules and eval tasks. This is the internal forward-deployed engineer, with the same test: does a field fix become a reusable artifact?

AGENT PLATFORM TEAM · INNER-HARNESS PRIMITIVES sandbox image · policy engine (PDP) · tracing eval runner · skills & tool registry · budget caps paved road field failures USE CASE AUSE CASE BUSE CASE C embedded engineerembedded engineerembedded engineer context · tool contractscontext · tool contractscontext · tool contracts policy rules · eval taskspolicy rules · eval taskspolicy rules · eval tasks
Solid lines: primitives the platform provides. Dashed: failures and fixes that flow back in a monthly review. Anything two use cases fixed the same way moves up a layer.

Staff evals first. The first of OpenAI's lessons from seven frontier companies is “Start with evals”; Morgan Stanley ran them for every use case before rollout.7 Thoughtworks' CTO makes the staffing case.8

“…a significant need for humans to proactively implement appropriate practices and technical harnesses…”— Rachel Laycock, Thoughtworks (2026)

When to form the platform team. My rule of thumb, not a published standard: start embedded, and form the platform team at the second or third use case, once a primitive has been built twice. Size it at roughly one platform engineer per three or four embedded ones. Its first deliverables, in order: tracing tagged with the harness version, the eval runner, the policy engine, the sandbox image. Nothing climbs the ladder without the first two.

Adoption is a harness job too. The reviewer is part of the harness. Redesign the workflow around the agent instead of bolting it onto the old one, train reviewers on what a bad output looks like, and watch their approve rate: one who approves everything has stopped reviewing (Ch 4). Give each team a named adoption owner, measured on the dashboard's adoption row.

The maturity ladder

Autonomy is a setting you choose, not a property the model has. The Knight Institute's levels define it by the user's role: Operator, Collaborator, Consultant, Approver, Observer.9 In their words, autonomy “can instead be a deliberate design decision made by agent developers.”9 The Cloud Security Alliance's Agentic Trust Framework adds what most ladders lack: promotion gates. An agent observes for at least two weeks; recommends with approval for at least four, at over 95% recommendation acceptance, before it may act with notification; and acts with notification for at least eight, with zero critical incidents and over 99% action accuracy, before it is autonomous within a domain. There, any significant incident triggers automatic demotion.10

METR's data explains why gates must use measured reliability. The task length models finish 50% of the time doubles about every seven months, and the 80%-reliability horizon is much shorter.11 Demos show the 50% horizon. Production runs on the other one.

StageUser rolePermission tier (Ch 4)Gate to enterChapters
0 AssistedOperatorread-onlyNamed sponsor, inventory entry1, 2
1 SupervisedCollaboratorask on every writeCaps, tool risk ratings, trifecta documented, ≥2 weeks observed at stage 01, 4
2 Sandboxed autoConsultantauto inside sandbox, hooks enforce the neversRegression set in CI, approval pack signed, ≥4 weeks at stage 1 with >95% recommendation acceptance3, 4, 5
3 Unattended loopsApproverapproval only for high-risk actionspass^k gate, exec dashboard, ≥8 weeks at stage 2 with zero critical incidents and >99% action accuracy1, 5
4 Self-improvingObserveras 3, changes behind the gateRegression control on every change, automatic demotion5

Full trust (bypass modes) is not a stage. It belongs only in disposable containers, at any stage.

Harness readiness checklistrubric · [9] [10] [11] [12] [13] [14] [15] · illustrative presets
Qualifies for
STAGE —
No stage yet

load the Production example, then untick the sponsor gate under Operations

Examples
STAGE —No stage yet
Next: tick a Stage-0 gate

Sn gate needed for stage n · dated record a tick alone does not count: it needs an evidence note and a date

Gates are drawn from this book's chapters and from Anthropic's stopping-condition guidance [12], OpenAI's tool risk ratings and escalation triggers [13], the Knight Institute autonomy levels [9], the CSA Agentic Trust Framework promotion gates and kill-switch controls [10], METR's reliability horizons [11], NIST AI RMF [14] and the OWASP agentic Top 10 [15]. The assignment of gates to stages and the scoring are the author's rubric, not a published standard.
Field note · for leadersBefore you approve a promotion up the ladder, ask for the current stage and the dated evidence for the next gate (weeks at this stage, acceptance or accuracy rate, incidents), the permission tier it will run under, and who gets paged. If any answer is a promise rather than a dated record, the agent stays where it is.

Cost and routing

An agent's bill is a loop, so model it as one. Per task: cost ≈ Σ over turns of (prefixt × cache-read price + new tokenst × cache-write price + outputt × output price). The prefix is not constant: in an append-only loop it grows by every earlier turn's tool results and output, so read cost rises faster than linearly with turns. As of October 2026, Anthropic bills cache writes at 1.25× base input (five minutes) or 2× (an hour) and reads at 0.1×, newer models 0.025× to 0.05×.16 Ch 2 covers why the hit rate matters, Manus's numbers included.

A worked task, with illustrative inputs and Sonnet 5.5 list prices as of October 2026 ($2 per million input tokens, $2.50 cache write, $0.10 cache read, $10 output):17 a 20,000-token prefix, 30 turns, each adding 3,000 tokens of tool results and 500 of output. Reads total 2.1 million tokens ($0.21), cache writes 110,000 ($0.28), output 15,000 ($0.15): about $0.64 a task. Over 70% of those reads are the growing history, not the fixed prefix. Without caching, the same task costs about $4.60. Turns dominate, so fan-out, which multiplies them, buys quality with money (Ch 1). Decide that on purpose.

Three levers move the number. Route by job: small, fast models for classifiers, summarizers, compaction and well-specified subagents; the frontier model for planning and for the step whose error is expensive. Cursor screens commands with a small classifier model.18 Set the effort: Anthropic's effort setting (low, medium, high, xhigh, max) governs the tokens spent on thinking, text and tool calls (“fewer and terser tool calls” when lower). It is “a behavioral signal, not a strict token budget”; the docs advise an effort sweep on your own evals.19 Cap it: Anthropic recommends stopping conditions such as a maximum number of iterations;12 make that a per-task hard budget in tokens and dollars that the harness enforces. A cap the model can talk past is a suggestion.

A route or effort change is a harness change: it passes the same paired regression gate as any other (Ch 5), and cost may fall only while pass^k holds.

Getting it past the risk review

Risk reviewers want a page in their vocabulary, not a demo. NIST's AI Risk Management Framework supplies it: four functions, Govern, Map, Measure and Manage, with a generative-AI profile, NIST AI 600-1, published in July 2024; the framework is being revised.14 NIST's agent standards initiative (February 2026) covers agent identity and authorization; no final standard exists yet.20 ISO/IEC 42001 is the certifiable management-system standard, sharing the ISO management-system structure used by ISO 27001.21

EU AI Act dates moved this year. Per the Future of Life Institute's tracker, the Digital Omnibus, Regulation (EU) 2026/1744, in force since 27 July 2026, pushes Annex III high-risk obligations to 2 December 2027 and Annex I product obligations to 2 August 2028. Article 50 transparency duties stayed on 2 August 2026, with one transition: generative systems already on the market before that date have until 2 December 2026 to meet Article 50(2), the duty to mark synthetic output as machine-readable and detectable.22 For anyone shipping generated content in the EU, that is weeks away. Check the primary text before you plan against it.23

The pack maps cleanly: inventory and trifecta are Map, eval evidence is Measure, kill switch and rollback are Manage, the sponsor is Govern. Threat-model it against the OWASP agentic Top 10, from goal hijack (ASI01) and tool misuse (ASI02) to rogue agents (ASI10).15

The data owner will ask about traces first. They hold prompts, tool results and customer data, and this book feeds them into evals and the dashboard. Decide before the first trace is stored: who may read raw traces (a named role), how long they are kept, what is redacted at capture rather than at query time, and whether production data may enter eval sets, scrubbed how. OpenTelemetry's GenAI conventions keep message content capture opt-in for this reason.24

Copy thisA minimal one-page approval pack. Fill every angle-bracket field; an empty field is a finding.

# Agent approval pack · <agent name> · harness v<version>
Sponsor (accountable human): <name, role>          # NIST Govern
Use case / systems touched:  <one line>
Inventory ID / risk class:   <id> / <class>; EU AI Act check: <date>
Trace data: readers <roles>; retention <days>; redaction <method>;
            prod data in evals <y/n, how scrubbed>

## 1. Lethal trifecta (Ch 4)                          # NIST Map
Private data:      <which>
Untrusted content: <which sources>
External comms:    <which channels>
Leg cut by:        <control>

## 2. Permission tier: <ask-on-write | sandboxed auto | high-risk approval>
Tool               access   reversible  $ impact  rating
<name>             <r/w>    <y/n>       <none/$>  <low/med/high>

## 3. Hard controls (enforced outside the model)
- <rule> -> enforced by <hook/policy/sandbox> -> proven by <test id>

## 4. Eval evidence                                   # NIST Measure
Regression set: <N> failure-derived tasks; pass^<k> = <x%>; baseline run <id>
Security cases: <injection + incident replays>; attack success <x%>

## 5. Kill switch and rollback                        # NIST Manage
Kill switch: <how, who>, last tested <date>; breaker trips on <rule>
Revoke all sessions/credentials: <one action, owner>
Rollback to: harness v<previous>; comms owner: <name>

## 6. Rollout
Stage <n> -> <n+1>; gate evidence: <weeks, acceptance %, incidents, dated>
KPIs and alert thresholds: <list>; next review: <date>
Field note · for leadersRead section 3 of the pack first. Every line should name a test that proves the control holds. A control that lives only in the system prompt is a request to the model; treat it as missing.

What goes on the exec dashboard

Define the metric before you compare. Klarna's first month, February 2024: 2.3 million conversations, two-thirds of service chats, the work of 700 full-time agents, resolution down from 11 minutes to under 2, a projected $40 million profit gain.25 In May 2025, Fortune reported from a Bloomberg interview that quality had suffered and Klarna was hiring humans again.26

“As cost unfortunately seems to have been a too predominant evaluation factor when organizing this, what you end up having is lower quality.”— Sebastian Siemiatkowski, via Fortune (2025)

Intercom reports a 76% average resolution rate for Fin and is moving to counting outcomes, which include correct handoffs to humans.27 Same agent, new definition, different number.

KPIComputed from the traceGates
Task success rateOutcome score on the session span (a custom attribute; OTel defines none)1 → 2
pass^kEval runs grouped by task and harness version2 → 3
Human intervention rateApproval and escalation events per session2 → 3
Cost per resolved taskgen_ai.usage.input_tokens and output_tokens summed per session, priced, plus review time, ÷ successesall
Time to resolutionSession span duration, including time waiting on approvals2 → 3
Incident / rollback rateKill-switch, breaker and policy-deny events; harness version reverts3 → 4
AdoptionSessions by gen_ai.agent.name per team; share of eligible tasks routed to the agent3 → 4

The gen_ai.* names come from the OpenTelemetry GenAI conventions.24 Tag every span with the harness version, or no number on this board can be tied to a change.

ROI follows from the board. Value = tasks × success rate × value per task − (tokens + engineering + review) − escaped failures × cost per failure (rework, refunds, churn, incidents), where escaped failures = tasks × failure rate × (1 − review sampling rate). Reliability is what most business cases miss. τ-bench defines pass^k, the chance that all k tries at a task succeed.28 My reasoning from there: unmeasured, every output needs a human; only measured and high can review drop to a sample.

An illustrative month (made-up inputs): 10,000 tasks at $15 of avoided work, $4,000 of tokens, $30,000 of engineering, $3 to review a task, $20 per escaped failure. At 80% success, full review leaves $56,000. Sampling 10% saves $27,000 of review but lets 1,800 failures through at $36,000: $47,000 (break-even, $15 a failure). At 97% success, full review leaves $81,500 and sampling about $103,000, since only 270 escape. The difference is the eval suite.

Tie the board to the P&L, not to anecdotes. McKinsey's 2026 survey, per The Register, found 80% of AI users reporting better personal productivity while the share attributing EBIT impact to AI stayed flat at 37%.3

When it fires anyway

An agent with write access will eventually do something nobody approved. This is the book's incident runbook (Ch 4 points here). The CSA framework lists the controls to have first: a manual kill switch that acts in under a second, a circuit breaker that halts on repeated failures, revocation of every agent session, and state rollback.10

Runbook · agent incident
  1. Stop. Hit the kill switch for the agent, not the whole platform. Confirm no session is still dispatching tools.
  2. Revoke. Rotate the agent's credentials and tokens in one action. It has its own identity, so humans keep working.
  3. Roll back. Return to the last harness version that passed the gate, and undo the agent's actions where state rollback allows.
  4. Replay. Pull the trace and the policy decision log for the session. Find the first tool call that should have been denied.
  5. Tell. The named comms owner updates affected users and the sponsor.
  6. Encode. Turn the failure into an eval case in the regression set and a hard control in the pack. The agent goes down one stage until it passes.

The whole harness, on one page

Take this into the design review; every box links to its evidence.

CH 1Loop CH 2Context assembler BOUGHTModel CH 3 · PEPTool dispatcher CH 4 · PDPPolicy engine CH 3Sandbox CH 2 · CH 3Memory & files CH 5Trace pipeline (OTel GenAI) CH 5Eval gate (pass^k, cost) gates changes
Solid: the runtime path of one tool call. Dashed amber: decisions and traces feeding the eval gate, which controls what reaches the loop next. Every labelled box links to its chapter.

The book started from Vivek Trivedy's equation, Agent = Model + Harness, the harness being “every piece of code, configuration, and execution logic that isn't the model itself.”29 Five chapters took the harness apart; Part 06 added the people and paperwork that let it run on a Tuesday with nobody watching. You rent the model and own the harness, and operating it takes a thin platform, embedded owners, autonomy earned by measured gates, a pack reviewers can sign, and a board that ties reliability to money.

If you're taking an agent to production and want to compare notes on the harness, get in touch.

References
  1. LangChain, “State of Agent Engineering,” LangChain, survey Nov–Dec 2025 (page dated June 2026). langchain.com/state-of-agent-engineering
  2. Challapally, Pease, Raskar (MIT NANDA), “The GenAI Divide: State of AI in Business 2025,” MIT NANDA, July 2025. mlq.ai/media/quarterly_decks/…State_of_AI_in_Business_2025…
  3. The Register, “McKinsey says enterprise AI is finally ‘on the road to ROI’,” The Register, August 2026 (secondary report of McKinsey, The State of AI in 2026). theregister.com/ai-and-ml/2026/08/25/mckinsey…
  4. Wang, Xu, Kahl, Erten (a16z), “How 100 Enterprise CIOs Are Building and Buying Gen AI in 2025,” Andreessen Horowitz, June 2025. a16z.com/ai-enterprise-2025
  5. Birgitta Böckeler, “Harness Engineering for Coding Agent Users,” Thoughtworks / martinfowler.com, April 2026. martinfowler.com/articles/exploring-gen-ai/harness-engineering
  6. Matthew Skelton, “What is a Thinnest Viable Platform?,” Team Topologies, accessed October 2026. teamtopologies.com/key-concepts-content/what-is-a-thinnest-viable-platform-tvp
  7. OpenAI, “AI in the Enterprise: Lessons from seven frontier companies,” OpenAI, 2025. cdn.openai.com/…/ai-in-the-enterprise.pdf
  8. Thoughtworks, “Technology Radar Vol. 34” (press release), Thoughtworks, April 2026. thoughtworks.com/about-us/news/2026/combat-ai-cognitive-debt-radar-v34
  9. Feng, McDonald, Zhang, “Levels of Autonomy for AI Agents,” Knight First Amendment Institute, July 2025. knightcolumbia.org/content/levels-of-autonomy-for-ai-agents-1
  10. Josh Woodruff, “The Agentic Trust Framework: Zero Trust Governance for AI Agents,” Cloud Security Alliance, February 2026. cloudsecurityalliance.org/blog/2026/02/02/the-agentic-trust-framework…
  11. METR, “Measuring AI Ability to Complete Long Tasks,” METR, March 2025. metr.org/blog/2025-03-19-measuring-ai-ability…
  12. Erik Schluntz, Barry Zhang, “Building effective agents,” Anthropic, December 2024. anthropic.com/engineering/building-effective-agents
  13. OpenAI, “A practical guide to building agents,” OpenAI, April 2025. cdn.openai.com/…/a-practical-guide-to-building-agents.pdf
  14. NIST, “AI Risk Management Framework,” National Institute of Standards and Technology, accessed October 2026. nist.gov/itl/ai-risk-management-framework
  15. OWASP GenAI Security Project, “OWASP Top 10 for Agentic Applications (2026),” OWASP, December 2025. genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications…
  16. Anthropic, “Prompt caching,” Claude Developer Platform docs, accessed October 2026. platform.claude.com/docs/en/build-with-claude/prompt-caching
  17. Anthropic, “Pricing,” Claude Developer Platform docs, accessed October 2026. platform.claude.com/docs/en/about-claude/pricing
  18. Cursor, “Run Modes,” Cursor docs, accessed October 2026. cursor.com/docs/agent/security/run-modes
  19. Anthropic, “Effort,” Claude Developer Platform docs, accessed October 2026. platform.claude.com/docs/en/build-with-claude/effort
  20. NIST CAISI, “Announcing the AI Agent Standards Initiative,” NIST, February 2026. nist.gov/news-events/news/2026/02/announcing-ai-agent-standards-initiative…
  21. ISO, “ISO/IEC 42001:2023 AI management systems,” ISO, December 2023 (details confirmed from ISO and KPMG summaries). iso.org/standard/42001
  22. Future of Life Institute, “Digital Omnibus on AI,” AI Act Explorer, artificialintelligenceact.eu, accessed October 2026 (secondary tracker). artificialintelligenceact.eu/ai-act-explorer/digital-omnibus
  23. European Union, “Regulation (EU) 2026/1744 (Digital Omnibus on AI),” Official Journal of the EU, EUR-Lex, July 2026. eur-lex.europa.eu/legal-content/EN/TXT/?uri=OJ:L_202601744
  24. OpenTelemetry, “Semantic conventions for generative AI,” GitHub, accessed October 2026. github.com/open-telemetry/semantic-conventions-genai
  25. Klarna, “Klarna AI assistant handles two-thirds of customer service chats in its first month,” Klarna press release, February 2024. klarna.com/international/press/klarna-ai-assistant…
  26. Irina Ivanova, “As Klarna flips from AI-first to hiring people again, a new landmark survey reveals most AI projects fail to deliver,” Fortune, May 2025 (secondary; quotes a Bloomberg interview). fortune.com/2025/05/09/klarna-ai-humans-return-on-investment
  27. Intercom, “From resolutions to outcomes: Evolving how Fin delivers value,” Intercom blog, 2026. intercom.com/blog/from-resolutions-to-outcomes…
  28. Yao, Shinn, Razavi, Narasimhan (Sierra), “τ-bench: A Benchmark for Tool-Agent-User Interaction,” arXiv, June 2024. arxiv.org/abs/2406.12045
  29. Vivek Trivedy, “The Anatomy of an Agent Harness,” LangChain blog, March 2026. langchain.com/blog/the-anatomy-of-an-agent-harness