Eight Design Axioms for AI Agent Harnesses: Building Reliable Agent Systems
This article presents eight design axioms for general-purpose AI agent harnesses, derived from a five-layer architecture that keeps model behavior within a controlled flow. It explains why reliability comes from the harness rather than the model, covers context budgeting, minimal tool surfaces, settlement semantics, hard resource limits, state machines, evidence-driven verification, and prefix stability, and offers a failure-mode-first approach for teams building agent platforms.
Introduction: Why Agents Need a Harness
When developers connect large language models to real business workflows, the most common mistake is treating an agent as “a loop plus a few tools.” Real systems deal with long-running processes, multiple branches, limited resources, and results that must be verifiable. What determines success is not whether a single inference looks impressive, but whether the harness built around the model is robust enough.
This article focuses on a general-purpose agent harness and abstracts eight design axioms from it. They do not depend on any specific product or tool, and they apply to coding assistants, automated operations, data processing pipelines, and similar scenarios. They can also serve as a design checklist for enterprises building their own agent platforms.
Three upfront conclusions are worth emphasizing:
- The model is responsible for “a single judgment”; the harness is responsible for “turning N judgments into a deliverable system.” Context, the tool surface, settlement semantics, resource budgets, and result verification are the model’s five external organs.
- The eight axioms are essentially a list of eight failure modes. The right design order is to list failure modes first, then design mechanisms, rather than piling up features first.
- The engineering barrier lies not in prompts, but in three rather unglamorous things: prefixes, state machines, and evidence chains.
Part 1: A Five-Layer Structure That Confines the Model to a Controlled Flow
A mature harness typically has a layered structure, where each layer guards against model errors:
- Human-machine layer: task lists, execution panels, and resumable run records that let a person take over at any time.
- Orchestration layer: a flow engine that supports fan-out and aggregation, with the model describing multi-step plans in a scripted way.
- Tool layer: exposes only the minimal tool set the model currently needs.
- Managed services layer: handles sub-agent lifecycle, capacity, nesting depth, and resource settlement.
- Provider layer: in-process spawning, out-of-process communication, external coding tools, and more, registered through a unified interface.
The most valuable lesson is not the number of layers, but the design philosophy at the bottom: treat built-in sub-agents and external tools as the same kind of “named backend,” routed by name. To judge whether a harness is mature, first see whether it dares to hand over its most core loop.
Part 2: The Eight Design Axioms
Axiom 1: The Model Makes Only One Judgment
Break complex tasks into small judgments that can be evaluated independently, and ask only one question at a time. The harness handles chaining, retries, and aggregation. This reduces the burden of each inference and makes it easier to locate the source of errors.
Axiom 2: Context Is a Limited Budget
More context is not always better. Organize it around the principle of “necessary information first, retrievable content as a supplement,” combined with summarization and segmented loading, to avoid irrelevant content diluting attention.
Axiom 3: Minimize the Tool Surface
The more tools there are, the higher the probability of wrong selection. Dynamically trimming the tool list by stage and clearly documenting when each tool does and does not apply is key to reducing the cost of ineffective calls.
Axiom 4: Settlement Semantics Must Be Explicit
Every subtask needs a clear definition of “input-output-cost.” Without settlement semantics, you cannot do capacity control, nor compare the cost-effectiveness of different execution paths.
Axiom 5: Resource Budgets Are Hard Constraints
Set upper limits on total steps, concurrency, nesting depth, and runtime, and proactively degrade or request human intervention when approaching thresholds, to prevent infinite loops and runaway resource usage.
Axiom 6: Manage Flow with a State Machine
A flow is not a straight line, but a state graph with guard conditions and fallback edges. A state machine makes “where we are now, where to go next, and how to fall back on failure” observable and recoverable.
Illustrative description:
state = PLAN -> EXEC -> VERIFY -> DONEon FAIL: EXEC -> PLAN (with evidence)on TIMEOUT: EXEC -> HUMAN_TAKEOVER
Axiom 7: Evidence Chains Drive Verification
Every conclusion must be traceable to an original artifact: command output, file diffs, API responses, or log fragments. The verification step accepts only evidence, not natural-language self-reports.
Axiom 8: Prefix Stability Is a Performance and Cost Advantage
Stable system prompts and tool descriptions allow cached prefixes to be reused, reducing repeated computation. Frequently changing the prefix breaks cache hits and drives up latency and cost. Putting volatile content last is a general and effective engineering habit.
Part 3: Implementation Advice: Start from Failure Modes
Teams are advised to build in the following steps:
- List failure modes: wrong tool selection, context overflow, infinite loops, conclusions without evidence, budget overruns, and so on.
- Design a corresponding mechanism for each failure mode, forming a mapping table from axioms to mechanisms.
- Measure mechanism effectiveness with general observability capabilities (logging services, monitoring alerts, distributed tracing).
- Persist state and evidence to object storage or a database to support resume-from-breakpoint and auditing.
Conclusion
An agent’s reliability does not come from longer prompts, but from systematic defense against failure modes. Confining the model to “a single judgment,” constraining the flow with a five-layer structure, unifying resources with named backends, and ensuring deliverability with state machines and evidence chains is the sustainable engineering path.
