All insights

Agents

Agent runtimes and meta-harnesses: where the control belongs

Peak AI Engineering6 min read

Prompts are not policy. Between the model and the business sit the harness, the runtime and the meta-harness: what belongs in each layer, and why.

Ask where an agent's rules live, and the honest answer is often: in the prompt. That works in a demo. In production, a prompt is a request the model usually honors, and the cost of "usually" grows with every tool the agent can call.

Control belongs in the software around the model. We think about that software in three layers.

Three layers around the model

  • The harness runs one agent's loop: planning, tool calls, context, sessions and permission modes. A coding assistant in a terminal is a harness, and so is the loop inside an agent you build into your product.
  • The runtime is the execution layer around the agents of an organization. It decides which tools an agent may use, what context it receives, which actions need a person and what gets traced, the same way for every agent.
  • The meta-harness, or orchestrator, sits above several agents and harnesses. It routes work between them, keeps their state and collects approvals and questions in one place.

Each layer answers a different question. The harness: how does this agent work? The runtime: what is any agent allowed to do here? The meta-harness: which agent does this work, and who signs it off?

The runtime: set the rules once

The runtime separates what an agent reasons about from what it is allowed to do. It mediates tools, permissions and policies, injects context and memory, places human checkpoints, and logs and traces every run. Overlays add a capability or a constraint around an agent without rewriting it.

The concerns are deliberately mundane:

  • tool availability, permission boundaries and policy enforcement;
  • context injection and long-term memory;
  • human-in-the-loop checkpoints;
  • logging, tracing and error handling.

Built agent by agent, each of these drifts. Built once, a new policy or a new memory capability reaches every agent at the same time. In enterprise agent-platform research our engineers took part in, shared runtime and overlay patterns were estimated to cut duplicated integration and governance engineering by approximately 25–35% for organizations running many agents.

Memory shows why. A long-term memory layer that brings only task-relevant memories into the context cut repeated information gathering and context rebuilding by approximately 25–30% in recurring workflows. That is a runtime capability, not something each agent should reinvent.

Let the agent propose and the application act

The safest pattern we know is to give the agent judgment and keep the side effects in code. The agent returns a structured proposal; the application checks it against the current state and the rules, acts on it, and verifies the result.

Two examples from our engineers' work:

  • Effort estimation. Agents turn a product specification into a backlog and estimate it, but every agent output is validated against a schema, a person reviews the backlog before estimation, and all the arithmetic runs in application code. The estimate is reproducible and auditable because the model never does the sums.
  • Sales preparation. An assistant prepares the account analysis, the documents and a customized offer before a field sales visit. The representative validates what it prepared and decides what to act on.

The model is free to be wrong in a draft. It should never be free to be wrong in what happens next, because acting is not its job. When an outcome is uncertain, the system stops and asks a person instead of trying again.

The meta-harness: work, state and sign-off

Above the harnesses sits what has to survive a change of harness: the tasks and their state, the isolated workspaces that keep parallel agents apart, the hand-offs between agents and the queue of decisions waiting for a person. It also brings work in from the places people already use, and keeps the rules about who may ask for what out of the model's reach.

This is also the layer where you see the system whole, and where quality and cost are decided. An evaluation suite that compares models, prompts, retrieval strategies and agent graphs before each release belongs here, next to the traces, so a change of model is a measured decision rather than a hope.

A checklist for your own agents

  1. List the actions that have side effects, and move each of them out of the model's tools into code that checks before it acts.
  2. Put permissions, approvals and allowed data in the runtime, shared by all agents, not in each prompt.
  3. Keep state outside the harness, so work can change harness or model without losing its context.
  4. Give agents a way to ask, and people one place to answer.
  5. Trace every run, and record failures by kind, never by content.
  6. Evaluate before release, against a set that includes the cases you are most afraid of.

The model will keep changing. The layers around it are what you actually operate, and they are what we build in agent harnesses and runtimes. The principles behind them are in harness-agnostic agents.

Working on something like this?

We take AI from a promising proof of concept to a system that ships and holds up.

Book a discovery call

Have a POC that needs to become a product?

Tell us what you are shipping. You will talk to the engineers who would build it.