Skip to content
Back to Blog

Agent Harness: An Architectural Framework for Production AI Agents

Published Updated Editorial policy & corrections

Share:XBSMRedditHNEmail
Agent Harness: An Architectural Framework for Production AI Agents illustration

TL;DR

Many important agent failure modes arise at the harness boundary: missing task contracts, overbroad context, unsafe tool exposure, weak policy gates, absent observation checks, invisible memory writes, and no retained trace. This is an architectural argument, not a measured claim that these causes account for a majority of production incidents.

An Agent Harness is the deterministic runtime envelope around a model-driven worker. It controls what the agent can see, call, mutate, remember, return, and learn from. The model may propose; the harness decides what is admissible.

Three claims drive the argument: frameworks are useful primitives but not production control planes; autonomy budgets should be treated like reliability budgets; and self-improving agents are unsafe until evaluation and release gates catch up.

The core runtime idea is a composition: every model action passes through Plan -> VerifyPlan -> Authorize -> Execute -> VerifyObservation -> UpdateState -> Trace, in that order.

This whitepaper defines the harness pattern, shows a reference architecture, gives a fifteen-step execution protocol, proposes a twelve-facet audit checklist, and lays out a practical path from prompt wrappers to governed production agents.

How to read this: Executives can read the TL;DR, §4, §15, §18, and Appendix A. Architects should focus on §5-9 and §12-14. Engineering leads should start with §6, §7, §16, §20, and the schemas.

Contract revision, October 16, 2026: the original publication date and URL are retained. This revision replaces unsafe dispatch pseudocode and an ordinal side-effect ladder, distinguishes conceptual artifacts from canonical envelopes, and removes readiness claims based on summed scores. ContextOS publishes schemas and deterministic reference checks; it does not provide a production sandbox, scheduler, identity broker, atomic store or certification. The execution contract, control profiles and conformance requirements define the current implementation boundary.


1. Introduction

AI agents are moving from demonstrations to production workloads. The shift is not merely about giving a language model access to tools. In production, an agent must interpret intent, select tools, manage context, plan under uncertainty, execute actions, verify results, recover from failures, interact with humans, and leave behind an auditable trace. Without a harness, each of these steps becomes an informal prompt convention.

The problem is simple: LLMs are probabilistic; enterprise execution is contractual.
The Agent Harness is the bridge between these two worlds.

In software engineering terms, a harness is not the algorithm itself. It is the structure that allows a volatile or complex component to be tested, constrained, monitored, and safely connected to the rest of the system. In agent engineering, the harness is the surrounding system that makes an agent trustworthy enough to operate in production.

Agent literature and production guidance increasingly converge on a few principles:

  • Keep agentic systems simple until complexity is justified.
  • Prefer workflows when the path is known and agents when the path is open-ended.
  • Treat tools as a first-class interface, not a prompt afterthought.
  • Maintain ground truth from the environment at each step.
  • Introduce guardrails, checkpoints, observability, and evaluation before granting autonomy.
  • Use human oversight for irreversible or high-risk decisions.
  • Make agent execution replayable, explainable, measurable, and governable.

This whitepaper turns those principles into an architectural discipline: Agent Harness Engineering.


2. Definition

2.1 What is an Agent Harness?

An Agent Harness is the deterministic runtime envelope around a model-driven agent that controls how the agent receives intent, compiles context, plans, uses tools, executes actions, verifies outcomes, interacts with humans, writes memory, observes itself, and improves over time.

A concise definition:

Agent Harness = Agent Loop + Context Compiler + Tool Gateway + Policy Engine + Verification Layer + Human Approval + Runtime State + Evaluation + Observability + Recovery + Release Control

The agent may reason and choose.
The harness decides what the agent is allowed to see, call, mutate, remember, return, and learn from.

The “task contract” part of that definition is not a prompt template. It is the agent-runtime version of Design by Contract: preconditions for what must be known before work begins, postconditions for what counts as success, and invariants that must hold across every tool call, memory write, approval, and response.

2.2 What the Harness is not

ComponentWhat it doesWhy it is not enough
LLM APIGenerates text, tool calls, structured outputsDoes not provide business policy, durable state, audit, rollback, or eval governance
Agent frameworkProvides abstractions for tools, agents, memory, loopsOften optimizes developer convenience, not full production control
Workflow engineExecutes predefined flowsMay not handle model-driven planning, semantic context, and LLM evaluation
Tool registryLists callable toolsDoes not decide authorization, side-effect boundaries, or recovery
Guardrail libraryChecks inputs/outputsDoes not govern the whole lifecycle or runtime state
Observability dashboardShows traces and metricsDoes not enforce contracts or prevent bad execution
Evaluation suiteScores outputs offlineDoes not automatically make execution safe in real time

The harness may use all of these, but it is broader than any one of them.


3. Background: From Tool-Using LLMs to Governed Agentic Systems

3.1 Tool-using LLMs

Tool use extended the role of LLMs from content generation to environment interaction. Research such as ReAct combined reasoning and acting so that the model could interleave thought, action, and observation. Toolformer explored how models could learn to use external tools. Reflexion explored verbal feedback loops for self-improvement. These ideas showed that LLMs can be more than answer engines: they can become task executors when connected to external actions and feedback.

Subsequent work shifted from showing that tool use works to asking how agents should be structured to use tools reliably. SWE-agent showed that the interface between an agent and its computer can determine task performance. MetaGPT encoded standardized operating procedures into multi-agent collaboration. Voyager and Generative Agents made memory, reflection, and skill reuse central architectural concerns. AgentBench and τ-bench shifted evaluation away from single-turn answers toward multi-turn, tool-using, rule-constrained behavior. Those results all point in the same direction: agent quality depends on the environment, contracts, tools, memory, and evaluation loop around the model.

3.2 Workflows vs agents

A key architectural distinction is between workflows and agents.

  • Workflow: the path is mostly predefined. The LLM may classify, generate, summarize, or validate within a controlled graph.
  • Agent: the path is not fully known in advance. The model dynamically decides what to do next based on intent, state, tools, and observations.

The harness must support both. Most production systems should begin with workflow-like control and progressively introduce agentic flexibility only where the incremental value is measurable.

3.3 Why the harness emerged as a separate concern

Frameworks made it easier to build agents, but production teams quickly discovered missing layers:

  • Who decides whether an agent can call a payment, refund, booking, deletion, or notification tool?
  • How do we keep the agent from seeing excessive personal or confidential context?
  • How do we prevent a tool hallucination from becoming a real side effect?
  • How do we evaluate not only the final answer but the whole decision path?
  • How do we reproduce an incident after model versions, prompts, and tool schemas changed?
  • How do we roll back, compensate, or escalate after partial execution?
  • How do we control cost and latency under multi-step loops?
  • How do we continuously improve without creating self-reinforcing errors?

These are not prompt-engineering problems. They are harness-engineering problems.

3.4 Engineering lineage

The harness pattern is new in its application to LLM agents, but not in its engineering instincts. It borrows from older disciplines:

  • Cognitive architectures such as Soar and ACT-R separated memory, goals, production rules, and action selection long before LLM agents made loops fashionable.
  • Design by Contract treated preconditions, postconditions, and invariants as first-class software design tools. Task contracts and tool envelopes are the agent-runtime version of the same idea.
  • Service meshes such as Istio and Linkerd moved traffic policy, identity, retries, telemetry, and access control outside individual services. Agent harnesses do something similar for model-driven tool use.
  • SRE error budgets show how reliability can become an explicit release constraint rather than a vague aspiration. Autonomy budgets should play the same role for agentic systems.
  • DORA/CALMS-style maturity models remind us that production quality is organizational as much as technical: teams need delivery discipline, measurement, learning loops, and ownership.

4. Core Thesis

The core thesis:

The reliability of an AI agent is determined less by the agent loop itself and more by the quality of the harness around it.

A model can plan, select tools, and respond. Production quality comes from the deterministic layers around it:

  • typed input contracts
  • constrained context
  • verified tool schemas
  • policy gates
  • explicit state machines
  • human approval checkpoints
  • ground-truth observations
  • response verification
  • memory write controls
  • replayable traces
  • offline and online evaluation
  • release gates
  • continuous monitoring
  • rollback and compensation mechanisms

The harness converts stochastic model behavior into controlled business execution.

Three claims follow from that thesis:

  1. Model quality alone cannot establish runtime control. A better model can reduce error rates, but it will not create least-privilege context, enforce approval policy, validate tool side effects, or preserve audit records by itself. If an agent sends a misleading customer-visible campaign after an offer API returned 200 OK with zero eligible users, the deployment must investigate both model behavior and the boundary that admitted the action. Transport success does not establish business success.

  2. Framework primitives need workflow-specific integration evidence. Stateful graphs, checkpoints, tools, tracing, guardrails and human-review mechanisms can implement parts of a harness. A deployment still needs to show how its chosen versions enforce its business policy, exact approval, current owner authority, data rules and recovery contract. MCP transport authorization and tool descriptions cannot establish every application-specific entitlement for a complete proposed action. Evaluate the reachable paths and actual enforcers rather than inferring safety or a missing feature from a product category.

  3. Self-improving production agents are an anti-pattern until evaluation catches up. Improvement proposals are valuable. Ungated self-mutation of prompts, tools, policies, memory rules, or autonomy budgets is not. The autonomy budget is the agent equivalent of an SRE error budget: it says how much uncertainty, cost, latency, and side-effect risk the system is allowed to consume before it must stop, degrade, or ask for help.


5. Reference Architecture

5.1 Logical architecture

This diagram describes the boundary between probabilistic reasoning and deterministic runtime control. The agent loop sits inside the harness; context compilation, policy evaluation, tool admission, trace capture, evaluation, and release control remain owned by the runtime.

The arrows show logical responsibilities, not a complete dispatch protocol. Approval must bind the final complete action; authorization and required controls are rechecked at dispatch and resume. Capture durable intent before the external effect and retain failures throughout execution rather than logging only after a successful answer. Those requirements also apply to reads, inference routing, browser/computer interaction and memory operations that move protected data.

Approved Needs human Allowed Denied Pass Repair Escalate User / System TriggerIntent & Task ContractContext CompilerPlanner / RouterPlan VerifierTool GatewayHuman ApprovalPolicy EngineExecutorSafe Response /EscalationEnvironmentObservationVerifier / CriticResponse ComposerOutput GuardrailMemory WriteControllerTrace / Audit LedgerEvaluation &SimulationRelease / AutotuneControl
Reference architecture for the Agent Harness runtime, showing context compilation, plan verification, policy, tool execution, observation, response, memory, trace, evaluation, and release control.

5.2 Physical components

LayerComponentResponsibility
InterfaceChannel adapterWeb, app, WhatsApp, API, voice, internal trigger
Task contractIntent schemaConverts vague requests into typed objectives, constraints, risks, and success criteria
ContextContext compilerSelects minimal, relevant, policy-safe context
MemoryMemory gatewayRetrieves and writes short-term, episodic, and long-term memory under policy
PlanningPlanner/routerSelects workflow, model, tool path, and autonomy budget
ControlPolicy engineChecks authorization, privacy, cost, side effects, and escalation rules
ToolsTool gatewayMediates typed calls, current credentials/data routes and provider-specific retry/reconciliation contracts
ExecutionRuntime engineOwns revisions and worker generations, stable operations, shared reservations, checkpoints and cancellation
ContainmentBoundary enforcersEstablish actual filesystem, process, resource and egress restrictions; broker credentials outside model state
VerificationCritic/verifierValidates plan, tool inputs, observations, and final answer
Human oversightApproval gatePauses execution for high-risk, ambiguous, or irreversible actions
ObservabilityTrace ledgerRetains eligible minimized artifacts, refs and decisions under access, processor and retention policy
EvaluationEvals platformRuns golden sets, simulations, judges, adversarial tests, regression gates
ImprovementAutotune loopProposes prompt/tool/policy changes but deploys only through gated release control

The Policy Engine plays the same architectural role for agents that service-mesh policy plays for microservices: it moves authorization, identity, routing constraints, telemetry, and safety checks out of individual business logic. The difference is that agent policy must also reason about model uncertainty, prompt-derived plans, tool arguments, memory writes, and human approval state.


6. The Agent Harness Execution Protocol

A production harness should not let the model simply “think and act.” It should enforce an execution protocol.

The protocol is also where autonomy budgets become operational. Like SRE error budgets, they are release and runtime constraints. A run must reserve capacity before starting work and stop admitting work when its applicable limits or required controls cannot be established. It may pause, escalate or use an explicitly permitted restricted path; it cannot silently weaken a mandatory control. Confidence is an evaluation signal, not authority.

6.1 Canonical execution steps

StepNameContract
1ReceiveCapture user/system input, channel metadata, actor identity, consent state
2NormalizeConvert raw input into canonical task format
3ClassifyDetermine intent, risk class, domain, allowed autonomy level
4Compile contextAdmit eligible evidence/memory from trusted loaders; compile supplied inputs without claiming the compiler performs retrieval or redaction
5PlanGenerate a typed plan with steps, tools, expected observations, and stop conditions
6Verify planCheck feasibility, policy, missing data, side effects, and cost
7ExecuteRequire current conjunctive authorization, atomic reservation/ownership/redemption, active boundary and provider preconditions before mediated dispatch
8ObserveVerify trusted external observations; retain unknown or partial outcomes rather than treating every response as ground truth
9RepairRe-plan when observations contradict assumptions
10ComposeProduce a response with evidence, choices, or next action
11Guard outputCheck safety, privacy, compliance, hallucination, and tone
12Write memoryPersist only approved facts, preferences, and events
13TraceRetain governed transition facts throughout execution, including pre-dispatch intent, refusal, crash and uncertainty
14EvaluateScore the turn and feed offline/online evaluation
15Learn safelySuggest improvements; never self-modify production behavior without release gates

6.2 Minimal pseudocode

This is integration pseudocode, not runnable Python or a complete transactional implementation. The tested TypeScript helpers and their external enforcement owners are mapped in the execution guide.

admit authenticated task, owner/trigger mandate and pinned release/profiles
open the original shared budget and durable run under current store ownership
 
for each proposed action:
  validate current run revision, worker generation, deadline and cancellation
  bind complete action, stable operation, native risk, evidence and policy pins
  load trusted current grant, approval, boundary, data and external-state facts
  evaluate all required controls; surface applicable policy errors structurally
  on deny, missing control or required approval: block/pause/escalate visibly
  do not spin or fall back to a less protected execution path
 
  atomically coordinate operation claim, approval redemption and reservation
  enforce the owned worker fence and current provider preconditions at dispatch
  invoke only the mediated bound action; persist receipt or an unknown outcome
  verify required postconditions before marking the effect confirmed
  reconcile partial/unknown effects under the pinned provider contract
  preserve stable intent and original accounting across retry/resume/children
  settle trusted cumulative usage; retain uncertain reservations
  record permitted artifacts, refusals and failures throughout the transition
 
complete only when required effects and child obligations are resolved
apply output/data policy and independently authorized memory lifecycle checks
retain the correlated decision and evaluation evidence under retention policy
propose improvements through review and release control

An applicable compiler predicate exception stops compilation with sanitized ContextCompileError; no successful context is returned. A business allow cannot override an independent deny, required approval or escalation. The pure reference returns intended compare-and-swap transitions and validates trusted observations. Production identity/signature verification, atomic persistence, metering, fencing, containment and provider semantics must be supplied and tested by the deployment.


7. Conceptual Model

An agent harness can be modeled as a stateful transition system.

7.1 State tuple

Let the runtime state be:

S = {
  actor,
  task,
  context,
  memory_view,
  plan,
  tool_state,
  policy_state,
  observations,
  approvals,
  budgets,
  trace,
  eval_scores
}

7.2 Transition function

Each agent step is a transition:

T(S_t, A_t) -> S_t+1

Where:

  • S_t is the current state.
  • A_t is a candidate action proposed by the model, workflow, or planner.
  • S_t+1 is the new state after policy checks, execution, observation, and verification.

The important point is composition. In a harness, the raw model action is never executed directly. A simplified transition is:

T = Trace ∘ UpdateState ∘ VerifyObservation ∘ Execute ∘ Authorize ∘ VerifyPlan ∘ Plan
Plan typed actionVerify planAuthorize actionExecute envelopeVerify observationUpdate stateTrace transition
Agent Harness transition composition: a proposed action becomes durable state only after planning, verification, authorization, execution, observation verification, state update, and tracing.

Read right to left:

  1. Plan turns a model or workflow proposal into a typed candidate action.
  2. VerifyPlan checks schema validity, missing evidence, stop conditions, and budget fit.
  3. Authorize checks the complete action against current actor/owner scope, native risk, policy, exact approval, active boundary, actual data route and reserved capacity.
  4. Execute can only consume an authorized action envelope.
  5. VerifyObservation decides whether the environment result proves success, failure, or uncertainty.
  6. UpdateState advances runtime state, including repair, escalation, memory eligibility, and completion.
  7. Trace persists the transition facts needed for replay and audit.

In other words:

S_t+1 = Trace(UpdateState(VerifyObservation(Execute(Authorize(VerifyPlan(Plan(S_t, A_t)))))))

7.3 Harness invariants

A mature implementation must establish these invariants with actual enforcers and evidence. The transition ordering or a diagram alone cannot prove them:

  1. No protected operation without current authorization. Mediate reads, inference, writes and delegated paths; do not accept raw model text or a stale historical allow as authority.
  2. No bypass of a required approval. Policy selects the exact obligation. Approved decisions bind the complete stored proposal, entitled approvers, validity and quorum; standing grants can cover bounded actions where allowed.
  3. No memory write without provenance and classification. Memory writes are state transitions, so UpdateState must attach source, scope, TTL, and policy classification.
  4. No final answer without output verification. Response composition is a transition with the same verification and guardrail path as tool execution.
  5. No tool result treated as success unless observation confirms it. VerifyObservation separates transport success from business success.
  6. No promotion of retrieved instructions into authority. Eligible compiled evidence can still contain malicious instructions. Enforce scope, tool mediation and data boundaries independently of model compliance.
  7. No production change without evaluation gate. Improvement proposals can update the backlog, but release requires the eval and promotion path.
  8. No hidden gaps in incident evidence. Record proposals, decisions, envelopes, observations and state changes where retention permits. Missing artifacts, outages and incomplete capture must remain visible; a trace cannot guarantee full replay of a changed world.

8. The Twelve-Facet Agent Harness Audit

This is the practical checklist for evaluating whether a system has a true harness or only an agent wrapper.

The twelve facets are not a magic number. They cover the lifecycle of one governed agent run end to end: task definition, context and memory admission, planning, tool use, policy, verification, human oversight, runtime recovery, observability, evaluation, and improvement. Each facet corresponds to a distinct failure mode that recurs when teams move from demos to production.

#Harness facetCore questionEvidence to inspectFailure symptom
1Task contractIs the user request converted into typed objective, constraints, risk, and success criteria?Intent schema, task envelope, required slots, risk classAgent answers vague requests with unbounded autonomy
2Context compilerIs context selected, compressed, ranked, and policy-filtered before entering the prompt?ContextPack, retrieval logs, source attribution, PII filtersPrompt stuffed with irrelevant or sensitive data
3Memory governanceAre reads, promotion, correction, retention and deletion scoped and evidenced?Owned namespace, provenance, current readers, retention and derived-copy receiptsIneligible facts persist or deletion is claimed before propagation completes
4Planning controlDoes the system create a plan with tools, assumptions, stop conditions, and budgets?Plan object, state graph, max iterationsAgent loops, skips steps, or uses tools opportunistically
5Tool governanceAre tools typed, documented, versioned, authenticated, idempotent, and least-privilege?Tool registry, schema tests, examples, auth scopesWrong tool calls, malformed params, unsafe mutations
6Policy and permissionsAre actions checked against actor, domain, data, risk, and side-effect policies?OPA/Cedar/Rego rules, policy decisions, deny logsAgent can perform actions a human/user is not allowed to do
7VerificationAre plans, tool inputs, observations, and outputs validated before continuation?Verifier logs, assertions, validators, business rulesConfident wrong answers, silent business-rule violations
8Human oversightAre high-risk or ambiguous actions paused for approval with clear context?Approval workflows, escalation rules, audit recordsAgent executes irreversible actions without user confirmation
9Runtime resilienceDoes recovery preserve stable effects, current fenced ownership and original shared accounting?Operation ledger, trusted provider contract, checkpoints, reservations and reconciliationStale workers, duplicate effects or budget reset after restart
10ObservabilityCan every run be replayed across model, prompt, context, tools, policy, and outputs?Trace IDs, spans, token/cost/latency, prompt versionsIncidents cannot be debugged or reproduced
11EvaluationAre offline, online, adversarial, regression, and scenario evals tied to release gates?Golden sets, simulation runs, scorecards, CI gatesModel/prompt changes regress silently
12Improvement loopDoes autotuning propose improvements under governance rather than self-mutate blindly?Experiment registry, approval gates, rollback planThe system “learns” from noise and degrades over time
Review the reachable boundaries and evidence
The Agent Harness Audit inspects repository and runtime evidence with source locations. Keep declared controls, observed enforcement, useful behavior and unverified gaps separate. A source checklist cannot substitute for deployed control tests.
Run the harness audit →

9. Design Principles

9.1 Start with a workflow; earn autonomy

Do not begin with a fully autonomous agent. Begin with a typed workflow. Add autonomy only at points where:

  • the path cannot be predetermined,
  • the model can use environmental feedback,
  • success is measurable,
  • failures are recoverable,
  • and the business value justifies cost and risk.

9.2 Put tools behind a gateway, not directly in the prompt

The model should not call raw internal APIs. It should call tools exposed through a gateway that provides:

  • schema validation
  • examples
  • auth scopes
  • idempotency
  • rate limits
  • timeouts
  • retries
  • policy hooks
  • output normalization
  • version control
  • mock/sandbox modes

9.3 Treat context as compiled software

Context should be built, not dumped. A context compiler should perform:

  • source selection
  • ranking
  • compression
  • deduplication
  • sensitivity filtering
  • freshness checks
  • conflict detection
  • token budgeting
  • citation/provenance binding
  • policy enforcement

9.4 Separate decision from execution

The model may recommend an action. The harness authorizes execution.

Example:

Model: "Issue refund"
Harness: Checks order status, policy, user identity, refund limits, fraud risk, approval requirement
Tool Gateway: Calls refund API only after policy passes
Verifier: Confirms refund status from source system

9.5 Verify observations, not just outputs

The final answer is only one artifact. Production systems must verify:

  • the plan
  • the selected tools
  • tool arguments
  • tool observations
  • intermediate decisions
  • final response
  • memory writes
  • side effects

9.6 Prefer explicit state machines for high-risk flows

For regulated, financial, booking, healthcare, legal, or high-value actions, use state graphs and policies. Let the model fill semantic gaps, not control the full state machine.

9.7 Never allow self-improvement without release control

Autotuning is useful; uncontrolled self-modification is dangerous. A safe improvement loop should be:

observe -> diagnose -> propose mutation -> simulate -> evaluate -> approve -> canary -> monitor -> promote/rollback

The agent can suggest changes. The release system decides whether they ship.

9.8 Preserve owner authority and containment across time

Personal agents need a current owner mandate and eligible trigger for scheduled or event-driven work. Delegation intersects the parent’s scope and uses shared root reservations; more workers cannot create more authority or capacity. Resume revalidates authority, required approval, boundary, external preconditions, budget and contract support under current store ownership. A checkpoint restores historical state, not permission to dispatch.

Arbitrary code needs an active boundary appropriate to the threat model. A container, working directory or SDK flag alone proves no process/filesystem/egress isolation. Keep credentials outside model-visible state, constrain actual recipients and processors across all data stages, and fail visibly when required observations are missing or stale. The reference checks normalized trusted facts; deployments own the broker, OS/network enforcement and transaction guarantees.


10. Pattern Catalog

10.1 Prompt-chain harness

Use when: The task decomposes into fixed steps.

Example:

Generate campaign brief -> check brand policy -> generate variants -> localize -> compliance check -> publish draft

Harness controls:

  • schema at every stage
  • gate between stages
  • evaluator for each intermediate artifact
  • rollback to previous stage

10.2 Router harness

Use when: Inputs fall into distinct categories.

Example:

Refund query -> refund workflow
Booking query -> booking workflow
General FAQ -> retrieval answer
Complaint -> escalation path

Harness controls:

  • classifier confidence threshold
  • fallback to human or safe generic path
  • route-specific tool permissions

10.3 Orchestrator-worker harness

Use when: The subtasks are not known upfront.

Example:

Research competitor campaigns -> analyze audience -> generate strategy -> create assets -> evaluate

Harness controls:

  • worker capabilities
  • per-worker budget
  • evidence requirements
  • aggregation logic
  • conflict resolution

Worker grants must attenuate the parent’s purpose, arguments, resources, destinations and data permissions. Reserve child capacity from the original pool before work; cancellation retains uncertain usage and does not undo in-flight effects.

10.4 Evaluator-optimizer harness

Use when: Iterative improvement is measurable.

Example:

Draft campaign copy -> critique against brand + compliance + conversion criteria -> revise -> score

Harness controls:

  • maximum improvement loops
  • independent evaluator
  • pass/fail criteria
  • regression logging

10.5 Autonomous harness

Use when: The agent must handle open-ended work across many steps.

Example:

Investigate why a campaign underperformed and propose corrective actions

Harness controls:

  • autonomy budget
  • sandboxed tools
  • human checkpoints
  • strict trace and replay
  • high-confidence success criteria

11. Agent Harness for a Marketing Agent: Concrete Example

11.1 Failure path

The harness becomes visible when the run is not clean.

A marketing user asks:

Create a weekend getaway campaign for families in North India, focusing on hill stations, with WhatsApp and push copy, personalized by budget and past travel behavior.

The model proposes a segment named north_family_premium_weekenders because it sounds consistent with the brief. The audience taxonomy tool returns segment_not_found; a weaker agent would silently approximate with a nearby high-value audience and keep drafting.

The harness stops that path:

  1. The observation verifier marks the segment as invalid because it was not returned by the taxonomy source of truth.
  2. The planner repairs the plan by asking the audience insights tool for eligible family-travel segments in North India.
  3. The policy engine blocks launch until the repaired segment is shown to the marketer with evidence and estimated reach.

Now add a second fault: the offer eligibility tool returns 200 OK, but the response says eligible_count: 0 and inventory_freshness_minutes: 97. The tool call succeeded; the business condition did not. The harness treats that as a failed observation, not a successful action. It removes the offer from generated copy, asks for a fresh inventory check, and records the failed assumption in the trace.

That is the practical difference between an agent that “completed the task” and a harnessed agent that refused to publish a misleading campaign.

11.2 Without a harness

A weaker marketing agent may hallucinate audience segments, use stale inventory, violate brand tone, expose sensitive user attributes, create misleading offers, send notifications without approval, ignore frequency caps, use unsafe personalization logic, fail to track why a variant was chosen, and be impossible to debug after campaign launch.

11.3 What the harness controls

The task contract declares the campaign objective, audience, channels, risk class, approval requirement, allowed personalization features, and success criteria. The context compiler admits only campaign guidelines, approved audience taxonomy, active offers, inventory constraints, brand voice, compliance rules, frequency caps, and historical performance.

The planner can generate a campaign brief and variants, but every consequential step passes through the harness. Audience lookup, offer eligibility, inventory freshness, compliance checks, image-brief generation, copy generation, and campaign draft creation all go through typed tools. Verification checks for false claims, sensitive targeting, offer validity, freshness, channel length, and brand score. Launch requires explicit human approval with the campaign brief, segments, variants, expected impact, and risks visible to the marketer.

The trace includes context sources, tool calls, variants, evaluator scores, approvals, and the final campaign ID. Post-campaign metrics feed evaluation, but mutations to prompts or segment rules are proposed and tested before promotion.

11.4 Example task contract

This is a domain-specific illustrative object, not a canonical ContextOS envelope. Its role string and approval_required flag establish no authenticated entitlement. Production binds the exact segment, content bytes, recipients, channels, source/policy revisions and release into the complete proposal; changed targeting or content needs a new binding and any required approval. Dispatch rechecks suppression lists, frequency caps and current provider preconditions, with stable effect identity and honest delivery/reconciliation status.

{
  "task_id": "campaign_2026_05_001",
  "task_type": "marketing_campaign_generation",
  "actor": {
    "user_id": "business_user_123",
    "role": "marketing_manager"
  },
  "objective": "Create a personalized weekend getaway campaign",
  "channels": ["whatsapp", "push"],
  "audience_constraints": {
    "region": "North India",
    "companion_type": "family",
    "exclusions": ["do_not_contact", "frequency_cap_reached"]
  },
  "personalization_policy": {
    "allowed_features": ["travel_history_bucket", "budget_band", "destination_affinity"],
    "disallowed_features": ["sensitive_personal_attributes", "health", "religion", "exact_income"]
  },
  "risk_class": "customer_communication_high_reach",
  "approval_required": true,
  "success_criteria": {
    "brand_score_min": 0.85,
    "compliance_pass": true,
    "offer_validity_required": true,
    "inventory_freshness_minutes": 30
  }
}

12. Evaluation Framework

A harness is incomplete without evaluation. Evaluation must cover the entire run, not only the answer.

AgentBench and τ-bench are useful references here because they evaluate agents in interactive environments, not just final text. τ-bench is especially aligned with production harness thinking: it tests whether a tool-using agent can follow domain policy across a dynamic user conversation and leave the backing database in the right final state.

12.1 Evaluation layers

LayerEvaluation questionExample metric
IntentDid the agent understand the task?Intent accuracy, slot completeness
ContextDid it use the right evidence?Context precision, recall, freshness
PlanWas the plan feasible and policy-compliant?Plan validity, missing-step rate
Tool useDid it call the right tool with correct arguments?Tool-call accuracy, schema error rate
ObservationDid it interpret tool results correctly?Observation grounding score
PolicyWere risky actions blocked/escalated?Policy pass rate, false allow/deny
OutputIs the response correct, useful, safe, and grounded?Task success, hallucination rate
MemoryWere memory writes valid and useful?Memory precision, stale-memory rate
RuntimeDid it meet latency/cost/reliability budgets?p95 latency, cost per task, retry rate
User outcomeDid the task achieve business/user value?Conversion, resolution, CSAT, attach rate
RobustnessDoes it resist adversarial inputs?Prompt-injection success rate
RegressionDid a change break previous scenarios?Golden-set pass rate

12.2 Scenario simulation

Agent evaluation should include scenario benches:

  • happy path
  • missing information
  • ambiguous user intent
  • conflicting context
  • stale inventory
  • tool timeout
  • policy denial
  • approval rejection
  • malicious prompt injection
  • unsafe personalization request
  • hallucinated tool output
  • partial execution failure
  • budget exhaustion
  • model fallback
  • downstream API schema change

12.3 Autotune loop

The harness should support self-improvement, but only through release control:

StageDescriptionGate
ObserveDetect poor runs, high cost, failed evalsTrace + metrics
DiagnoseIdentify prompt/tool/context/policy issueRoot-cause classifier
ProposeGenerate mutation candidateHuman-readable diff
SimulateRun against historical and adversarial casesOffline eval
CompareCheck quality/cost/safety deltaStatistical threshold
ApproveHuman or governance approvalRelease ticket
CanaryDeploy to small trafficOnline metrics
PromoteRoll out graduallySLO + eval pass
RollbackRevert on regressionAutomated rollback trigger

13. Security Model

Agent harness security must assume that the model is not a trusted execution engine. The model proposes actions; the harness enforces permissions.

13.1 Core risks

RiskDescriptionHarness mitigation
Prompt injectionUser or retrieved content manipulates the agentinstruction hierarchy, input filters, untrusted-context labeling, tool policy
Excessive agencyAgent gets too much authority or too many toolsleast privilege, scoped tools, approval gates
Tool misuseWrong or unsafe tool callschema validation, examples, policy pre-checks, sandbox
Data leakageProtected data crosses an ineligible inference/tool/telemetry/memory routeactual data-flow enforcement, approved transformations and current recipient/processor observations
Memory poisoningBad data persists into future runsmemory write policy, provenance, TTL, review
Supply-chain tool riskExternal tool/API behaves unexpectedlycontracts, allowlists, isolation, monitoring
Partial side effectsMulti-step action fails mid-waydurable intent/ownership, verified provider semantics, reconciliation and separately governed compensation
Trace leakageLogs store sensitive prompts/datasecure trace storage, redaction, access control
Evaluation gamingAgent optimizes for metric not outcomediverse evals, human review, outcome metrics
Runaway costConcurrent workers, retries or restart multiply usageatomic shared reservations, cumulative trusted settlement and original ceiling conservation

13.2 Side-effect tiers

The earlier edition used six numbered tiers. That local ladder is retired: it conflicts with the independent native ActionRisk dimensions and must not be mapped into a new canonical approval enum. The v1 ApprovalMode values remain read_only, local_write, network, delegated and destructive as compatibility projections.

Native dimensionIllustrative questionRequired boundary
EffectDoes the action read, alter local/external state or affect the physical world?Constrain the actual target and verify required postconditions.
AuthorityIs the actor an agent, service, user delegate or human-approved actor?Verify current authenticated scope, owner mandate and revocation.
ReversibilityIs the effect read-only, reversible, compensatable or irreversible?Retain uncertainty; compensation is a new governed action and can fail.
InteractionIs the path API, browser, computer, agent-to-agent or human handoff?Mediate every reachable path with actual credential and execution controls.
Data scopeWhich classifications, recipients, processors and purposes are involved?Enforce permitted flow across inference, tools, telemetry, cache, memory and delegation.

A read can expose sensitive data and require approval. A bounded standing grant can permit an eligible effect without a fresh click when policy allows. A required human approval still binds the complete proposal, current entitlement, stored validity and distinct-principal quorum. Break-glass is an explicitly governed exceptional path, not an automatic response to a denied action.

14. Observability and Audit

A harness must make agent behavior debuggable and replayable.

14.1 Required trace fields

This is an artifact inventory, not permission to log raw inputs, prompts or tool data indiscriminately. Apply purpose, reader, processor, residency and retention rules to telemetry; prefer immutable refs or minimized protected artifacts where sufficient. Record unavailable evidence and deletion propagation honestly.

CategoryFields
Identityactor, role, tenant, session, channel
Requestraw input, normalized task, risk class
Modelprovider, model, version, temperature, seed if available
Promptsystem prompt version, developer prompt version, dynamic prompt segments
Contextretrieved chunks, memory items, scores, filters, redactions
Plansteps, tools, assumptions, stop conditions
Policypolicy version, allow/deny decisions, approval requirements
Toolstool name, version, arguments, latency, status, output hash
Verificationvalidators run, scores, pass/fail reasons
Humanapprovals, rejection reasons, approver role
Outputfinal response, citations/evidence, guardrail result
Memorywrites attempted, writes approved, TTL, provenance
Costtokens, tool cost, total cost, budget remaining
Runtimeretries, timeouts, failures, repair loops
Evaluationonline scores, judge outputs, user feedback
Releaseprompt/model/tool/policy version, experiment cohort

14.2 Decision record

Every important decision should create a record:

The small example below is a local audit event, not the canonical DecisionRecord shape. Its actor string and evidence labels are illustrative. Use the actual DecisionRecord contract and correlate controlled action, approval, operation and budget records rather than treating this sketch as dispatch authority.

{
  "decision_id": "dec_123",
  "trace_id": "trace_abc",
  "decision_type": "tool_authorization",
  "candidate_action": "send_campaign",
  "policy_result": "requires_approval",
  "reason": "customer_visible_high_reach_action",
  "evidence": ["campaign_policy_v5", "frequency_cap_check_passed"],
  "actor": "marketing_manager",
  "timestamp": "2026-05-19T10:00:00Z"
}

15. Maturity Model

This model uses seven levels because the jump from “has tools” to “enterprise platform” hides several operational steps. The levels are not a replacement for CMMI, DORA, or internal risk frameworks; they are a migration map for agent runtime control.

These are planning categories, not conformance profiles or readiness verdicts. A sophisticated architecture can still have a bypass or an unevaluated control; acceptance needs current evidence for the exact workflow and environment.

LevelNameCharacteristicsRisk
0Prompt wrapperPrompt + model responsehigh hallucination, no control
1Tool-calling assistantModel can call toolstool misuse, weak audit
2Guarded workflowFixed graph, input/output checkslimited flexibility
3Stateful harnessruntime state, tool gateway, policy checks, tracescurrent enforcement and recovery still require evidence
4Verified harnessplan verification, observation checks, eval gates, HITLworkflow-specific assurance remains necessary
5Adaptive harnessautotune proposals, simulation, canary, rollbackcontinuous improvement with governance
6Enterprise cognitive runtimeshared context, memory, policy, evals, observability across agentsplatform-grade agentic operating model

16. Implementation Blueprint

Phase 0: Decide whether an agent is needed

Do not use an agent because it is fashionable. Use this decision table.

ConditionBetter choice
Fixed deterministic processWorkflow / rules engine
Single knowledge answerRAG + grounded response
Simple classificationClassifier
High-risk action with exact rulesTraditional service + approval UI
Open-ended task with tool use and feedbackAgent harness

Phase 1: Define the task contract

Deliverables:

  • intent taxonomy
  • task schema
  • risk classes
  • success criteria
  • refusal/escalation policy
  • allowed autonomy budget

Phase 2: Build the context compiler

Deliverables:

  • retrieval sources
  • memory APIs
  • ranking/compression logic
  • provenance
  • privacy filters
  • token budget strategy

Phase 3: Build the tool gateway

Deliverables:

  • tool schema registry
  • versioned tool definitions
  • auth scope mapping
  • idempotency and retry design
  • mock/sandbox mode
  • tool examples and negative examples

Phase 4: Build policy gates

Deliverables:

  • actor/action/resource policy matrix
  • native action-risk dimensions and exact compatibility projections
  • human approval rules
  • budget rules
  • privacy rules
  • escalation paths

Phase 5: Build runtime state

Deliverables:

  • state model
  • checkpoints with current revalidation and owned revision/generation fencing
  • trace IDs
  • stable operation identities, provider reconciliation and original shared reservation/settlement accounting
  • compensation patterns
  • max-iteration controls

Phase 6: Add verifiers

Deliverables:

  • plan verifier
  • tool-input validator
  • observation validator
  • output guardrail
  • memory-write validator
  • domain-specific business-rule checks

Phase 7: Add evaluation

Deliverables:

  • golden datasets
  • scenario simulator
  • LLM-as-judge rubrics
  • deterministic validators
  • adversarial tests
  • regression gates
  • online scorecards

Phase 8: Add observability

Deliverables:

  • trace schema
  • spans for model/tool/policy/verifier/human steps
  • dashboards
  • alerting
  • replay UI
  • incident analysis workflow

Phase 9: Add improvement loop

Deliverables:

  • failure clustering
  • mutation proposals
  • experiment registry
  • simulation before release
  • canary and rollback
  • human approval for policy/prompt/tool changes

17. Stack Choices

Do not choose the stack as a shopping list. Choose the control boundaries first.

Use an agent SDK or graph framework where it accelerates model calls, handoffs, state graphs, streaming, and developer ergonomics. Use workflow infrastructure where durability, retries, and long-running execution matter. Use MCP, OpenAPI, gRPC, or internal adapters to expose tools. Use OPA, Cedar, or a custom policy service when authorization and risk rules must be inspectable outside application code.

The pieces that should remain yours are the contracts between those tools: the task envelope, compiled context, tool envelope, policy decision, approval packet, observation verifier, trace schema, evaluation gate, and release process. Those are the harness. Everything else is replaceable plumbing.


18. Build vs Buy Decision

DimensionBuy/frameworkBuild/custom harness
SpeedFaster initial deliverySlower initial delivery
ControlInspect supported hooks and bypass pathsInspect actual implemented boundaries and bypass paths
AuditDepends on vendor/frameworkDesigned for enterprise trace needs
PolicyOften partialCan match exact business rules
ToolingEasier integrationsMore integration work
Lock-inAssess export, versioning and integration costsAssess internal coupling, maintenance and migration costs
DifferentiationDepends on the integrationDepends on the implementation
Best fitDetermined by required controls and evidenceDetermined by required controls and evidence

Recommended approach:

  1. Use frameworks for primitives and developer velocity.
  2. Build the harness control plane yourself where it touches policy, context, memory, side effects, and evaluation.
  3. Keep the model/provider layer swappable.
  4. Keep tool contracts stable even when models change.

19. Failure Modes and Countermeasures

Failure modeExampleHarness countermeasure
Hallucinated actionAgent claims booking/refund completed when tool failedobservation verifier
Tool overreachAgent calls an ineligible API/browser/computer pathnative risk, current authority and mediated boundary
Context overloadAgent receives irrelevant/conflicting memorycontext compiler
Stale evidenceAgent uses expired inventory/pricefreshness policy
Infinite loopAgent keeps retryingmax iterations + stop conditions
Silent regressionprompt update breaks edge casesCI eval gate
Prompt injectionretrieved content says “ignore prior instructions”untrusted-context labeling + policy
Wrong personalizationsensitive inferred attribute usedpersonalization policy + feature allowlist
Memory poisoningone bad interaction alters future behaviormemory write validator + TTL
Cost explosionorchestrator spawns too many workersautonomy budget
Incident opacityno one can explain why action happenedtrace ledger + decision records

20. Practical Release Checklist

Before production launch:

AreaMust pass
Task contractAll supported intents have schemas and success criteria
RiskEvery intent has risk class and autonomy budget
ToolsAll tools versioned, typed, documented, tested
PolicySide-effect tools protected by authorization and approval
ContextRetrieval has source attribution and PII filtering
MemoryMemory write policy exists and is tested
VerificationPlan, tool, observation, output, and memory validators exist
EvalsGolden + adversarial + simulation suites pass
ObservabilityEnd-to-end traces and dashboards available
ReplayRetained eligible artifacts reproduce the declared offline scope; missing data and changed dependencies are visible
HITLHuman approval and escalation flows tested
RollbackRelease rollback tested separately from governed effect reconciliation/compensation
CostOriginal aggregate token/tool/replan/cost ceilings conserved across retries, children and resume
ContainmentRequired active boundary, credential route and actual data processors observed and tested
RecoveryConcurrent/stale workers, lost acknowledgement, cancellation and partial effects tested with honest unknown outcomes
SecurityPrompt injection and data leakage tests pass
Legal/complianceApplicable compliance review complete
RunbookIncident response and ownership documented

21. Conclusion

Upgrading a model cannot establish current authority, containment or correct external effects. Teams need evidence that the integrated control plane enforces those boundaries on every reachable path. Evaluation and release gates let teams test proposed improvements while preserving the admitted authority and safety requirements.

The practical lesson is clear:

Do not ship agents. Ship harnessed agents.


22. How ContextOS Uses This Framework

ContextOS expresses this whitepaper’s harness pattern as a portable decision-control, evidence, and conformance specification. In ContextOS vocabulary, a conforming runtime spans the Context Compiler, Tool Gateway, Policy Engine, DecisionRecord, Evaluation and Observability layer, and release controls around model or framework execution. ContextOS itself is not a hosted production runtime.

That placement is deliberate. ContextOS does not replace agent frameworks, model SDKs, workflow engines, or MCP servers. It defines the production contract around them: which context is admissible, which tools are exposed, which native ActionRisk applies, which v1 compatibility projection is required, which observations count as evidence, which memory writes can persist, and which traces are durable enough for replay.

The decision artifact makes those responsibilities inspectable. The compatible ToolCallEnvelope names the run/trace, principal chain, capability, arguments, v1 projection and evidence refs; policy and idempotency references have their existing optionality. Mutation receipts and additive profile records are correlated artifacts, not newly required base-call fields. A retained DecisionRecord supports investigation and scoped offline replay; neither its presence nor a matching hash proves complete capture, authenticity, current authority or provider completion.

The current registry defines exact revisions of contextos.core, contextos.personal-proactive, contextos.enterprise, contextos.durable-delegated and contextos.high-assurance. Select the union and feature-dependent controls needed by the workflow. These profiles describe obligations rather than product tiers. Reference tests can pass while deployed runtime controls remain not_evaluated; conformance requires useful positive cases, required denials and current independently verified workflow/release/environment evidence. No profile certifies every mission-critical use case or establishes legal compliance.

The general framework above should stand on its own. ContextOS is one concrete operating model for teams that want those harness concerns to be explicit instead of scattered across prompts, callbacks, dashboards, and tribal process.


References

  1. Anthropic. “Building Effective Agents.” Published Dec 19, 2024. https://www.anthropic.com/engineering/building-effective-agents
  2. OpenAI. “OpenAI Agents SDK — Guardrails.” https://openai.github.io/openai-agents-python/guardrails/
  3. OpenAI. “OpenAI Agents SDK — Tracing.” https://openai.github.io/openai-agents-python/tracing/
  4. OpenAI. “OpenAI Agents SDK — Tools.” https://openai.github.io/openai-agents-python/tools/
  5. LangChain. “LangGraph Overview.” https://docs.langchain.com/oss/python/langgraph/overview
  6. Model Context Protocol. “Architecture Overview.” https://modelcontextprotocol.io/docs/learn/architecture
  7. NIST. “AI Risk Management Framework.” https://www.nist.gov/itl/ai-risk-management-framework
  8. OWASP. “OWASP Top 10 for LLM Applications 2025.” https://genai.owasp.org/resource/owasp-top-10-for-llm-applications-2025/
  9. Yao et al. “ReAct: Synergizing Reasoning and Acting in Language Models.” arXiv:2210.03629. https://arxiv.org/abs/2210.03629
  10. Schick et al. “Toolformer: Language Models Can Teach Themselves to Use Tools.” arXiv:2302.04761. https://arxiv.org/abs/2302.04761
  11. Shinn et al. “Reflexion: Language Agents with Verbal Reinforcement Learning.” arXiv:2303.11366. https://arxiv.org/abs/2303.11366
  12. Microsoft. “Microsoft Agent Framework Overview.” https://learn.microsoft.com/en-us/agent-framework/overview/
  13. Soar Project. “Soar Cognitive Architecture.” https://soar.eecs.umich.edu/
  14. Carnegie Mellon University. “ACT-R.” https://act-r.psy.cmu.edu/
  15. Meyer, Bertrand. “Applying Design by Contract.” IEEE Computer, 1992. https://se.inf.ethz.ch/~meyer/publications/old/dbc_chapter.pdf
  16. Istio. “Observability.” https://istio.io/latest/docs/concepts/observability/
  17. Linkerd. “Overview.” https://linkerd.io/2.17/overview/
  18. Google SRE Workbook. “Error Budget Policy for Service Reliability.” https://sre.google/workbook/error-budget-policy/
  19. Google Cloud. “DevOps capabilities.” https://cloud.google.com/architecture/devops
  20. Yang et al. “SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering.” NeurIPS 2024. https://proceedings.neurips.cc/paper_files/paper/2024/hash/5a7c947568c1b1328ccc5230172e1e7c-Abstract-Conference.html
  21. Liu et al. “AgentBench: Evaluating LLMs as Agents.” arXiv:2308.03688. https://arxiv.org/abs/2308.03688
  22. Yao et al. “τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains.” arXiv:2406.12045. https://arxiv.org/abs/2406.12045
  23. Hong et al. “MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework.” arXiv:2308.00352. https://arxiv.org/abs/2308.00352
  24. Wang et al. “Voyager: An Open-Ended Embodied Agent with Large Language Models.” arXiv:2305.16291. https://arxiv.org/abs/2305.16291
  25. Park et al. “Generative Agents: Interactive Simulacra of Human Behavior.” arXiv:2304.03442. https://arxiv.org/abs/2304.03442

Appendix A: One-Page Executive Summary

Problem: LLM agents are powerful but non-deterministic. Production systems require deterministic control, audit, safety, policy, reliability, and measurable quality.

Solution: Build an Agent Harness around every production agent.

Agent Harness: A deterministic runtime envelope that controls task interpretation, context, tools, policies, verification, human approval, memory, evaluation, observability, and improvement.

Why it matters:

  • prevents unsafe tool use,
  • reduces hallucinated actions,
  • enables replay and audit,
  • controls cost and latency,
  • supports human approval,
  • allows safe continuous improvement,
  • turns agent demos into production systems.

Core architecture:

Intent -> Context -> Plan -> Verify -> Policy -> Tool -> Observe -> Repair -> Respond -> Memory -> Trace -> Evaluate -> Improve

Appendix B: Minimal JSON Schemas

The earlier edition’s four small JSON sketches were conceptual application artifacts. They were not ContextOS schemas and omitted critical identity, policy, approval, effect and validation semantics. Implementations should import the canonical types and public schemas rather than copying those sketches.

B.1 TaskContract

A domain-specific task contract can describe objectives, constraints and success criteria. It maps into the admitted request, RunContext and Context Pack decision/task configuration; it does not replace them. Profile-aware work attaches ExecutionContractEnvelope without changing the existing base envelope versions or required fields.

B.2 ToolInvocation

Use ToolCallEnvelope and ToolResultEnvelope. The call identifies tool_call_id, run/trace, capability, args, principal chain, v1 projection fields and evidence refs. Attempt IDs differ from stable operation identity. Where profiles require it, correlate the exact ActionBinding, controlled approval/redemption and operation/budget records. An idempotency key alone establishes no provider guarantee.

B.3 PolicyDecision

Use the canonical policy/decision artifacts and additive NormalizedPolicyOutcome / AuthorizationOutcome where applicable. Business outcomes use highest applicable priority with deny on equal-priority ties; independent mandatory constraints and all applicable obligations remain. The compiler’s cumulative tool prohibitions are a separate algorithm. Applicable predicate errors produce structured non-success.

B.4 TraceEvent

Use the canonical correlated runtime artifacts, DecisionRecord, tool envelopes and ReplayPacket, with governed telemetry. A trace event or hash cannot prove complete capture, authenticity or a current external effect. Retain only eligible minimized artifacts and record redaction, missing evidence, retention and replay limitations explicitly. New profile artifacts use the additive execution-contract schema.


Appendix C: Agent Harness Readiness Score

The earlier edition summed these areas into a readiness score. That interpretation is withdrawn: a strong total can hide a single missing mandatory control. Use the per-area scale only to track evidence gaps, and record unknown or not-evaluated status explicitly rather than inventing a score.

ScoreMeaning
0Missing
1Ad hoc
2Implemented but not consistently enforced
3Enforced, measured, and audited
AreaScore
Task contracts0-3
Context compiler0-3
Memory governance0-3
Tool gateway0-3
Policy engine0-3
Runtime state0-3
Verification0-3
Human approval0-3
Observability0-3
Evaluation0-3
Security0-3
Improvement loop0-3

Do not compute a production-readiness threshold from these rows. A missing, failed, stale or unverified mandatory control blocks the protected workflow regardless of other scores. Review the exact required controls, useful cases, denials and bound evidence under Conformance, with explicit limitations for untested runtime owners.


Found this useful? Share it.

Share:XBSMRedditHNEmail

Continue through the same topic without returning to the index.

View the series