How prompts, context, execution loops and orchestration turn language models into systems that can act, observe and verify.
Consider a question a category manager might ask on a Monday morning: “Why did our seasonal chocolate SKU go out of stock at a key retail account last week, and what should we do about it?” A large language model (LLM) can describe a sensible investigation: compare sell-through with shipments, check the forecast, look for a promotion that lifted demand. Answering the question takes more. Someone has to query point-of-sale, shipment and forecast data, reconcile the figures to governed definitions, test a hypothesis against the evidence and route any replenishment change to a planner for approval.
That is the difference between a model that describes what should be done and a system that can actually do it. LLMs can interpret instructions, reason through problems and propose actions, but on their own they cannot run a query, check a result or change a plan.
The model provides much of the intelligence for these decisions. The software environment that enables controlled execution is the agentic AI harness. It connects model-generated proposals to tools, task state and feedback, allowing an AI system to perform work, observe results and verify progress.
The model proposes what to do. The harness makes controlled execution, observation and verification possible.
My earlier blog post, Modern AI Fundamentals: From Models to Agentic Systems, introduced the broader AI building blocks. This blog post focuses on the engineering environment that connects those building blocks to action.
What Is an Agentic AI Harness?
An agentic AI harness is the software surrounding a language model that supplies relevant information and capabilities, executes permitted actions, returns observations and supports iterative progress toward a goal. A model on its own does not open data sources, run queries, modify records or establish that a recommendation is supported by evidence. Those functions require software beyond the model. A useful architectural shorthand is Agentic System = Model + Harness: the model contributes intelligence and proposes actions; the harness provides the context, tools, execution environment and controls.
A harness commonly supplies instructions and context; exposes tools such as databases, semantic models, files, searches and APIs; executes permitted requests; returns errors and results; maintains task continuity; and enforces stopping and verification conditions. Implementations differ between coding environments and runtime business applications, but the responsibilities are the same.

Model, harness and environment
| Component | Primary responsibility |
|---|---|
| Language model | Interprets inputs and proposes responses or next steps |
| Agentic harness | Supplies context, exposes tools, manages permitted execution and returns observations |
| Tools and environment | Perform operations: queries, files, code, searches and APIs |
| Application state | Records progress and durable workflow information |
| Human or evaluator | Defines acceptable behavior and judges consequential outcomes |
In the out-of-stock investigation, the model might propose querying shipments to the retailer’s distribution centers for the past four weeks. The harness checks that the user is allowed to see that data, runs the query against the governed semantic model and returns a summary. The model then considers the evidence and selects another step or reports its finding. The crucial design question is how much control should be delegated to the model.
Why the Harness Matters
The same underlying model can produce very different results depending on its execution environment. Ask a model to fix a faulty promotion-lift calculation in a plain chat window and it can only propose a correction to whatever code is pasted in; it cannot see the rest of the pipeline or run the tests. Place the same model inside a coding harness and file access can expose the missing context, while a test run can reveal a mistaken assumption. The model has not changed. The evidence available to it has.
Industry research points the same way. NVIDIA’s research on agent harness capabilities found that harness design alone can account for double-digit swings in benchmark results, and significant differences in token cost, with the same underlying model. The practical lesson is to evaluate the model and the harness together: hold the tasks and acceptance criteria fixed, then compare completion quality, cost and time across pairings. Better tools improve the evidence; they do not guarantee that a weaker model will solve a harder problem.
One particularly important failure is false success: an agent confidently reports completion even though the intended work remains unfinished. This can happen when a tool returns a success status but the business acceptance criteria have not been checked. Stopping is not the same as succeeding, and a model’s statement that it saved a record is not evidence that the record was written. Verification must examine evidence of the actual outcome, not merely whether an action was attempted.
For business leaders, this changes the question. When an agent underperforms, the instinct is to ask for a better model. Often the better question is what the harness failed to provide.
Four Control Surfaces of the Harness
A practical way to design a harness, drawn from IISc’s Agentic AI Coding program, is to think in terms of four control surfaces: Prompt, Context, Loop and Graph. A control surface is a part of the system we can configure to influence its behavior. These are not four sequential stages, and they overlap. Their value is diagnostic: when an agent goes wrong, they help locate the control that was missing.

Prompt — What do we want?
The prompt is the current instruction: the task, its scope and the changes that are excluded. “Analyze last quarter’s promotions” leaves undefined which retailers, which measure of lift, which baseline and whether the agent may change anything. When requirements are unstated, the agent fills the gaps with defaults that may look reasonable and still be wrong for the business. Instructions shape the model, but executable permissions and validation must still be enforced outside it.
Context — What can the model see?
Context is the information available to the model now: the maintained specification, governed business definitions, relevant data, tool descriptions, tool results, conversation history and task state. This is where specification-driven development earns its place. A reviewed specification, written before implementation, records intended behavior and acceptance criteria, so later work has a durable reference rather than a remembered conversation.
More context is not automatically better. An investigation into one retailer’s out-of-stock needs that account’s shipments, forecast and promotion calendar, not every sales table in the enterprise. Instructions, tool descriptions, retrieved material and history all compete for the same limited capacity, so the harness may summarize, drop or selectively load material as work proceeds. Context engineering selects and structures the information relevant to the next decision.
Context is information currently supplied to the model. Memory is information retained for later use. State is the recorded condition or progress of a workflow. The context window is not a durable database; long-running work may require persistence to resume safely or to determine whether an external action, such as a replenishment request, was already submitted.
Loop — What happens next?
The loop owns execution, checking, recovery and stopping rules. It allows the system to inspect, act, observe, revise and verify rather than ending after one model response. It also needs boundaries: successful acceptance checks, permissions, iteration and cost limits, unresolved uncertainty or required human approval. Attempting a tool operation is not the same as achieving the user’s goal.
Graph — How is work combined?
Some tasks need one iterative loop; others need conditional branches, dependencies or specialized workers. An implementation can be followed by independent review; a retailer’s trade-promotion claim may require extraction, validation against agreed terms, approval and settlement. The graph expresses those handoffs, along with ownership and the state that passes between steps. Complexity should be justified by the task rather than by a desire to maximize autonomy.
In short, the Loop governs how an execution cycle continues and stops; the Graph governs how steps, dependencies, branches and specialized workers are connected.
Putting the Four Surfaces to Work: CPG Promotion Intelligence
Consider an assistant investigating why a retailer promotion delivered lower-than-expected incremental volume. Prompt defines the task and forbids changing commercial plans. Context supplies governed net-sales and volume measures, retailer and SKU hierarchies, the promotion calendar and approved baseline definitions. Loop runs a bounded sequence of query, compare, validate and revise. Graph connects pricing analysis, availability checks and a final reviewer approval when those steps are needed. A credible finding might show that reduced on-shelf availability contributed to weak promotion performance, but that explanation must be supported by data, not merely inferred from the sales decline.
Inside the Agentic Execution Loop
The loop has five functions. The system perceives the goal and relevant task information, reasons about an appropriate next step, acts by requesting a permitted tool operation through the harness, observes the actual result, error or changed environment, and verifies that evidence against the requirements. When verification shows unfinished work, the sequence repeats; the infographic in the earlier blog post labels that repetition Iterate. These are functions rather than five mandatory software stages, and a limit, an error or a request for clarification can interrupt the cycle at any point.

Imagine a coding agent fixing a promotion-analytics pipeline that double-counts sales when two promotions overlap for the same SKU and week. It inspects the failing test and the join logic, proposes a change, invokes a file tool, reruns the tests and examines the result. Even a green test does not necessarily prove every overlap case is handled, such as a multi-buy offer running alongside a temporary price reduction. Verification depends on agreed acceptance criteria and sufficient evidence.
Every loop needs explicit exits: the acceptance criteria are met; a step, time or cost limit is reached; an error cannot be recovered safely; a consequential action needs approval; or the request needs clarification. Only the first exit supports a completion claim. The others should be reported as gaps, not as finished work.
The agentic loop is therefore not merely repeated prompting. It is structured interaction between decisions, actions, observations and verification.
From Model Calls to Autonomous Agents
Not every AI application with retrieval or tools is an autonomous agent. The earlier blog post introduced a spectrum of delegated control; it matters here because it determines how much the harness must do.
| Agency category | Architecture | Who decides what happens next? |
|---|---|---|
| None (L0) | Fixed prompt and model call | Application |
| Level 1: Augmented Interaction | Bounded interaction with retrieval, tools or memory | Primarily application |
| Level 2: Workflow | Engineer-defined multi-step coordination | Workflow with selected model decisions |
| Level 3: Autonomous Agent | Model chooses successive steps and tools | Model within harness constraints |
The defining question is who selects the next action, not how many model calls or tools are present. A program that always fetches shipments and then asks a model to summarize them is not autonomous, however many tools it calls. A fixed workflow for matching retailer deductions to promotion terms may be more reliable than an autonomous agent when those terms are stable. Use the least complex system that meets the requirement: each added degree of autonomy introduces decisions that must be tested and controlled, so compare quality, cost and time on representative tasks before adding a more elaborate loop.
Autonomy and consequence are separate axes
Autonomy describes who decides the next step. It says nothing about how much damage a wrong decision can cause. That is a second axis, defined by reversibility, how easily an action can be undone, and blast radius, how widely an error can spread across data, users or services. A read-only out-of-stock investigation and an agent that expedites replenishment orders may sit at the same agency level, yet only one of them can create a duplicate order or move inventory. Read-only access is not automatically safe either: it can still expose sensitive commercial data.

Tools, Tool Calling and MCP
Several terms describe different responsibilities, and they need not map to separate software products. A language model generates responses and proposes next steps; an agent pursues a goal through model-directed decisions; a harness supplies the execution environment and controls; an orchestrator coordinates dependencies and handoffs, often inside the harness; and MCP standardizes how applications reach external tools and resources.
The harness point is the separation of duties. The model requests a structured operation, such as a query for shipments to one retailer. The harness checks the operation and its arguments, dispatches it if permitted and returns the result as the next observation. A tool request in model output is therefore not evidence that anything happened. That separation is what allows access controls, argument checks, approval gates and error handling to live outside the model, and it means the harness must handle each possible outcome deliberately:
| What the model returns | How the harness responds |
|---|---|
| A tool request | Check permissions and arguments, execute if permitted and return the actual result |
| A completed turn | Report the result without assuming every acceptance criterion was met |
| A limit or an error | Record the incomplete state, then recover or stop according to policy |
The Model Context Protocol (MCP) addresses a different problem. Without a shared interface, connecting several applications to several tools can require a custom adapter for every pair; with a shared protocol, each application and each tool implements the interface once. That reduces integration work, but authentication, permissions and failure behavior still have to be defined, and the protocol does not set goals, run loops or guarantee safe execution. MCP addresses the integration boundary; the harness determines how those capabilities are used.
Harness Architecture and Multi-Agent Coordination
A single model-and-tool loop is often sufficient. More complex tasks may benefit from specialized workers or independent review. In an implementer–reviewer arrangement, one worker produces code while another evaluates the artifact against requirements. A separate review context reduces the risk of reproducing the implementer’s assumptions, though it does not remove every source of error.
Common coordination patterns include hierarchical designs, where an orchestrator assigns work to workers; peer-to-peer designs, where agents interact as equals; adversarial designs, where a generator and a critic refine each other’s output; and assembly lines, where agents run in a fixed sequence. An order-to-cash process might coordinate order capture, inventory allocation and invoicing as an assembly line with typed shared state and explicit handoffs.
Coordination has costs. Multiple agents editing tightly coupled logic or mutable state can create conflicts and duplicated work, and token use rises quickly: Anthropic reported that its multi-agent research system used about 15 times the tokens of a chat interaction for that workload. Multi-agent design is a coordination choice, not a maturity badge. Its value should come from specialization, isolation, independent review or genuinely parallel tasks, such as researching several competitors independently.
A Harness at Work: Building and Running a Promotion Analytics Application
Consider an analytics team asked to build a trade-promotion performance application. It should combine point-of-sale, shipment and promotion-calendar data, estimate incremental volume for each event and let category managers review results before they are shared with a retailer. The developers supply a specification and acceptance criteria, such as lift calculated against an agreed baseline and totals that reconcile to finance figures. The coding harness exposes the repository, terminal, test suite and a sandboxed copy of the data.
The model interprets the requirements and proposes an implementation sequence, which the team reviews before any code changes. The harness exposes only the permitted files and data, performs approved file and terminal operations, and returns test results and failure evidence. The model reads that evidence and proposes the next change, and the cycle continues until the results meet the acceptance criteria or the remaining gaps are reported.
Each control surface plays its part. The Prompt sets the objective, Context supplies the specification and the data model, the Loop enables repeated test-and-fix cycles, and the Graph may add an independent reviewer that checks the lift logic before anything is merged.
Coding agent versus runtime agent
The coding agent that builds the application is not the same as an agent operating inside the finished application. The product may remain a deterministic pipeline and dashboard, include one AI-assisted step that drafts commentary on each promotion, or use a runtime agent that category managers can ask why an event underperformed. Choosing to build software with an agent does not imply that the software itself should be autonomous.

If the team does add a runtime agent, its harness has a different job. Return to the out-of-stock question that opened this blog post. The harness loads the category manager’s permissions, the governed definition of out-of-stock and the retailer hierarchy from the application it runs inside. It validates each query against the semantic model and runs it read-only, and it compacts earlier steps so the context holds the evidence that matters. It checks that every figure reconciles to its source before accepting a finding. An expedited replenishment recommendation remains a proposal until a planner approves it. The model reasons; the harness decides what it sees, what it may touch and when a human must step in.
Verification, Observability and Evaluation
A polished final answer may conceal missing steps, inappropriate tool use or unverified claims. Imagine a promotion-review agent that reports strong lift for an event but quietly used the wrong baseline weeks. The failure might stem from misunderstanding the request, an incomplete specification, lost context or a weak verification check. Evaluating only the final response is insufficient.
Observability means using recorded evidence to understand a running system. A trace connects one execution; spans record its individual steps, including model calls, queries, validations, errors, time taken and token use. Together they show what the system actually did. Hamel Husain and Shreya Shankar’s three gulfs then help locate the cause: a comprehension gulf, where the team does not yet understand the range of real requests and outcomes; a specification gulf, where intended behavior was never expressed clearly; or a generalization gulf, where behavior that holds for familiar cases fails elsewhere. These distinctions prevent every defect from being labeled a model problem.
From observations to evaluators
Modern AI Fundamentals introduced evaluation as a foundational layer; here it becomes operational, through three moves: analyze, measure and improve. Reviewers first read individual traces and write specific notes, a practice called open coding. “Lift calculated against the wrong baseline weeks” is a useful note; “bad answer” is not. Related notes are then grouped into failure categories, called axial coding, each with a definition, a clear failure, a clear non-failure and a borderline example.
A principal domain expert, someone with authority over acceptable business behavior, approves those definitions before anything is automated. In a CPG setting, that might be the revenue growth management lead who owns promotion analytics. The expert approves the rule; the coding agent can implement the checks.
Each approved criterion then gets the narrowest check that can decide it. Deterministic code checks suit permissions, required fields, reconciliation totals and prohibited writes. Semantic criteria, such as whether a finding’s explanation is supported by the evidence, may need an LLM-as-a-Judge, but the judge must be calibrated against expert-labeled cases before its scores are trusted. Calibration looks at two kinds of error: false alarms, which waste review time, and missed failures, which leave business risk in place. Every verdict also needs a denominator: report failures against the cases actually assessed, and list the cases that could not be assessed separately.

Three collections serve different purposes. A golden regression set protects behavior already agreed. Judge-calibration examples test whether the evaluator agrees with the expert. Fresh production traces reveal what users are doing now and which failures the suite misses. A high golden-set pass rate does not establish universal reliability.
When a fix is proposed, change one thing at a time, rerun the affected cases and the relevant older ones, and confirm the result on cases that were not used to tune it; an unchanged overall score can hide a fix in one place and a regression in another. The same discipline applies to choosing a model or a reasoning-effort setting: keep the evaluator fixed and choose the lowest-cost configuration that meets the agreed quality, response-time and permission requirements.
Finally, evaluation should distinguish execution correctness (were tool calls, permissions and state transitions valid?), evidence correctness (were the figures grounded in the right source data and governed definitions?) and outcome correctness (did the result satisfy the actual business requirement?). A run can pass the first two and still fail the third.
Designing for Control Before Autonomy
Architects must decide what information the model may see, which tools it can invoke, how state persists, when execution stops, and which actions require approval. A bounded process may need only a deterministic workflow with a model call. Open-ended exploration may justify a more autonomous agent. Neither choice removes the need for validation and evidence.
Consequential actions, such as changing a supply plan, issuing a retailer credit, modifying master data or changing production infrastructure, may require scoped permissions, confirmation, rollback and human oversight. Assess each action for reversibility and blast radius, together with the sensitivity of the data involved, and place approval gates in the harness before consequential tools run. Approving a plan at the start of a task does not automatically authorize a changed action later.
The design question is not “How autonomous can this be?” but “What decisions should the model make, what actions should the system permit, and what evidence is needed to trust the result?”
When the Harness Fails: Recovery Matters
Suppose a CPG sales agent investigates a retailer stockout and proposes an expedited replenishment request. The planner approves it, and the harness sends the request to a supply-planning service, but the connection times out before the harness receives confirmation. A timeout does not mean the request failed: the action may have succeeded even though the response was lost, and blindly retrying could create a duplicate order.
A resilient harness records an operation identifier before sending, checks the external system for the prior outcome and uses idempotent operations where supported, so that a retry with the same identifier cannot create a second order. If the status remains uncertain, it pauses and escalates rather than claiming success or repeating a consequential action.

The difference is not better prose from the model. It is explicit execution state, safe retry behavior, evidence-based verification and a defined human decision boundary.
Five Principles for Designing an Effective Agentic Harness
1. Specify before executing. Define intended behavior, acceptance criteria and permitted actions before delegating work.
2. Provide relevant context, not maximum context. Retrieve and retain the evidence needed for the next decision, including governed business definitions.
3. Separate proposals from authority. Validate tool requests and enforce permissions and approval boundaries outside the model.
4. Make state and actions recoverable. Persist task progress and handle retries, partial failures and uncertain completion safely.
5. Verify outcomes, not tool-call success. Compare observable execution and business evidence against explicit acceptance criteria.
Conclusion — Intelligence Needs an Execution System
LLMs can interpret instructions and propose increasingly sophisticated work. Turning those proposals into reliable action requires a surrounding system that supplies context, connects tools, manages state, controls execution and returns observations. The four control surfaces of Prompt, Context, Loop and Graph provide a practical way to design that system.
The agency spectrum clarifies how much control is delegated, and the consequence of each action decides how much oversight it needs. Specification-driven development establishes intended behavior. Verification and evaluation establish whether the work achieved its goal. The future of agentic AI will not be determined by model intelligence alone. The model provides intelligence; the harness enables controlled execution; evidence establishes whether the intended outcome was achieved.
Agentic AI is therefore not simply a more capable LLM. It is a model operating within an engineered system designed to turn intelligence into useful, controlled and trustworthy work. The harness is where intelligence meets engineering discipline.
Further Reading
Modern AI Fundamentals: From Models to Agentic Systems, AmitNotes
Beyond the LLM: What It Takes to Build Enterprise-Grade Agentic AI, AmitNotes
Six agent harness capabilities for higher model performance, NVIDIA Technical Blog
Effective harnesses for long-running agents, Anthropic Engineering
How we built our multi-agent research system, Anthropic Engineering



Leave a Reply