Agent Architecture
Agent architecture is the discipline of building the machinery around a stateless model. The theme's sources converge on one starting observation — the model is a text-to-text function, and everything a user experiences as an agent is the harness around it: the control loop, the context it assembles, the tools it exposes, the state it persists, and the checks it runs on its own output. Because off-the-shelf models have converged in raw capability, the harness is now where reliability, capability, and cost are actually decided — a shift the field's own tooling reflects, with Open Source Agent Toolkit 2026 framing the stack as seven independent layers rather than one vertical whole. The evidence cuts two ways on how much harness is enough: one camp shows a two-tool agent beating an elaborate one, the other shows a re-engineered scaffold more than doubling a weak model's pass rate. The resolution that survives both is that harness complexity should track the gap between the model and the task — thin in the middle, heavy at the edges where models are weak, horizons are long, or failure is expensive.
The Argument
The model is not the agent
The cleanest statement of the foundation is Elements of Agentic Systems Design: "The model is a stateless text-to-text function. Everything else is architecture you build around it." Components of a Coding Agent makes the same point as an empirical claim — because vanilla LLMs now have very similar raw capability, the harness "can often be the distinguishing factor that makes one LLM work better than another." The crispest formulation of the split is Tau (τ) — Educational Coding Agent's "separate the brain, the environment, and the face" — provider adapter, agent harness, and UI as three layers with dependency flowing one way.
The strongest single proof is Honey I Shrunk the Coding Agent: holding a 9B-parameter quantized model constant and redesigning the scaffold around its behavioural profile raised Aider Polyglot pass rates from 19.11% to 45.56% — a sub-10B model outperforming 10× larger ones on the same benchmark. Oh My Pi (omp) reaches the same conclusion from the other side, citing an edit-format fix that took a model from 6.7% to 68.3% without touching the weights. Two consequences follow. First, the harness deserves to be a discipline in its own right — the thesis of Harness Engineering for Self-Improvement, which argues that near-term recursive self-improvement will come from improving the machinery for getting answers, not from models rewriting their weights. Second, harness design becomes a search problem: that same source surveys systems (ADAS, AFlow) that optimise workflow code directly and beat hand-designed workflows. Agent-Building Playbook (Ramparte) and Agentic Design (Pattern Catalog) are the two attempts to make the discipline teachable as a pattern language.
The control loop and its limits
The basic unit is the loop: observe, decide, act, repeat until done. AI Agents In-Depth — Function Calling, MCP and Tool Use Under the Hood grounds it in a correction that matters to builders — the LLM doesn't call tools; it selects a tool and its parameters, and the application makes the call. That division of labour is exactly where validation, permissions, and retries belong. Components of a Coding Agent defines the agent as "a control loop around the model" and the harness as the scaffold around that.
The plain loop fails in two well-documented ways. Building Autonomous Goal Loops That Deliver argues that first-generation loops — give the agent a plan, run until tests pass, return failures — only deliver when the tests fully describe the job, and break when the job is to grow a capability nobody understands yet; its fix is not a better retry prompt but a harness that exposes a real failure, locates the missing capability, and preserves the lesson. Slate identifies the second failure: long-horizon tasks are path-dependent and exceed what a "minimal harness" can do, and the real bottleneck is context management rather than model intelligence — a "knowledge overhang" the model cannot reach tactically.
The responses split into three families. LongHorizon-Harness wraps an existing CLI in a Manage → Execute → Audit loop where each role runs in a fresh context and only independently-verified results become trusted state — reported as a 3× gain on OSWorld completion against the same model. Building Autonomous Goal Loops That Deliver separates a deterministic floor (tests, validators, schemas) from the direction-finding loop, and treats the scorer as part of the threat model. Causal Inference Agentic Workflow shows the same actor-critic shape inside one domain: a Principal (human), an Actor (executor), and a Critic (evaluator) in a loop, where scaffolding forces the LLM through rigorous templates and beats one-shot prompting on the same model. Prime Agent (RLM Harness) and Slate go further, giving the model a programmable substrate — an IPython REPL where sub-agents are function calls, or a thread-and-episode model — so the model programmes its own orchestration rather than emitting fixed tool calls.
Context is the harness's job
The most repeated claim in the theme is that the model is stateless and all continuity is the runtime's to provide — MiMo Code states it outright. As tasks grow, two problems follow: windows fill, and instruction-following dilutes. The convergent mechanics are worth naming even where the strategy differs.
Compaction, done deliberately, works: CodeAlta runs summarisation as an ordinary provider turn through a structured template, replayable like any other turn, with skills rehydrated afterwards. Headlong — Persistent Agent Microharness takes tiered compaction to an extreme, holding a whole trajectory at exponentially decaying resolution. The deeper move, argued by MiMo Code and Slate, is to stop compressing and start externalising. MiMo Code checkpoints at 20/45/70% of budget rather than when the window is nearly full — which it calls "exactly backwards" — and has an independent writer subagent maintain structured state files; the main agent never maintains its own memory. Slate rejects compaction as "not deterministically lossy" and isolates work in threads whose return value is a compressed episode, making retention a decision rather than an accident.
Context is also shaped by what you refuse to put into it. Layer-First Pattern — Keep Data Out of the LLM Context argues that if the LLM isn't making a decision about content, it shouldn't hold that content — tools store results server-side and return acknowledgments, shrinking a wildfire GeoJSON payload from roughly 125,000 tokens to about 150. Mirage (VFS) makes the same bet from the interface side: bash and filesystem semantics as the universal tool interface, because models already know them. DeerFlow shows the cache-side trick — a fully static system prompt with per-turn dynamic content injected as a reminder so providers can cache the expensive prefix — plus a durable-context channel that survives summarisation. Inside OpenAI's In-House Data Agent supplies the production corollary: rich, layered context is what lets a strong model give correct answers, and "less is more" applies to tools as much as to context.
Tools: primitives, parity, and a lean surface
Agent-Native Architectures (Every) gives the clearest normative framework: parity (the agent can do anything the UI can), granularity (tools are atomic primitives; features are outcomes achieved in a loop), composability (new features are new prompts), and emergent capability. Its rule is that domain tools are shortcuts, not gates — judgment stays in the prompt, and the default is open.
Production evidence pushes the same direction, sometimes surprisingly. Lessons from Building Vercel v0 and the d0 Agent rebuilt a many-tool agent as a two-tool one and found that as models improve, simpler agents work better. What I learned building an opinionated and minimal coding agent goes furthest: four tools, no MCP (popular MCP servers consume 7–9% of context before work begins), no sub-agents. Microsoft's account of how coding agents actually use your technology spells out the mechanism: tool descriptions compete for finite context before the model ever sees them, and a failure at any step of the discovery → selection → invocation → response cascade silently degrades everything downstream.
The counter-evidence is that the tool surface is where a lot of hard-won correctness lives: Oh My Pi (omp) fixes edit formats, DeerFlow deduplicates tool names and defers MCP schemas until requested, and Building Agents for Production Systems with MCP argues for grouping tools around intent rather than mirroring APIs. Building an AI Agent in Rails (Ionescu) shows the surface doubling as a security boundary — authorization logic encoded into function calls so the model gets scoped data access without unrestricted access. The synthesis: keep the surface small and atomic, and engineer the few tools you do expose carefully.
Delegation inside one agent
Delegation is the theme's most unsettled design question. The baseline is Components of a Coding Agent: subagents parallelise subtasks, but "the tricky design problem is not just how to spawn a subagent but also how to bind one" — how much context to inherit and what constraints to impose. DeerFlow enforces a hard concurrency cap and teaches the model to batch; Harness Engineering for Self-Improvement treats sub-agents and backend jobs as inspectable parallelism whose outputs live as files, not transient chat context.
Two sources argue the subagent primitive itself is wrong. Slate distinguishes subagents (isolated contexts communicating only by a returned message) from threads, whose episode return value is composable — one thread's episode can seed another, so context transfers across boundaries without inheriting the full trace. The Advisor Strategy inverts the usual orchestrator→worker direction: a smaller model drives end-to-end and escalates to a larger advisor only at hard decisions, making frontier reasoning an on-demand resource rather than a fixed cost — and it wins on both score and cost. Devin Fusion is the same idea as a router between a main model and a sidekick, switching only at compaction boundaries.
Against all of this, two voices argue the machinery may not be needed at all. What I learned building an opinionated and minimal coding agent invokes pi itself via bash for observability rather than building sub-agent infrastructure, and Ramp's engineers concluded the better model is "a single agent with a thousand skills," not a thousand agents.
The agent as a distributed system
The production-grade sources converge on one lesson: an agent that runs long enough and reaches real systems inherits distributed-systems problems, and must borrow its answers. Building Production-Ready Voice Agents is the most explicit — function-calling is its highest failure point (validate in code, not the LLM), and it reaches for timeouts, circuit breakers, graceful degradation, and idempotency, plus a latency budget ("silence is death": hang-ups rise 40% past one second). Cloud Agent Lessons from Cursor makes the same point at infrastructure scale: the environment is the product, and durable execution via Temporal took them from one nine to two nines of reliability by decoupling agents, machines, and conversation state. Memento adds a completion contract — required write tools with one bounded repair turn — to prevent the "finished but wrote nothing" failure, and TradingGoose Bear Researcher shows error categorisation and retry as first-class in a production edge function.
Building Agents That Don't Break Themselves draws the security line in the same architectural spirit: don't tell the agent to be careful, run it somewhere it doesn't have to be — separate the reasoning loop from shell execution so the sandbox is the boundary, not the prompt. That sits in deliberate tension with pi's "full YOLO, containerise if you care," taken up below.
State, the log, and persistence
A quieter but consistent thread: the durable, replayable record is becoming the agent's substrate. The Log is the Agent is the purest form — an append-only event log as source of truth, the working graph a deterministic projection of it, yielding replay, cheap forking, and total lineage. CodeAlta implements the same idea pragmatically: a JSONL journal is the canonical record and the SQLite cache a rebuildable projection. Agent Host Protocol (AHP) applies the Redux pattern — an immutable state tree changed only by reducers, total-ordered and broadcast — to synchronise many clients against many agent backends. All Your Agents Are Going Async names what this substrate still has to fix: as agents outlive the HTTP request, "the transport breaks," and durable state alone solves only half the problem; durable transport remains missing.
Agent UX
The UX sources are few but consistent: autonomy must be legible and reversible. AI UX Patterns — User Transparency argues transparency is the price of adoption — permissions that go beyond yes/no, symmetric data collection (a system that remembers must also forget), cost transparency before approving a plan, and a visible signal whenever the agent acts autonomously. Experience Design for Agents formalises this as a responsibility model with progressive authority: ship narrow, inspectable, reversible defaults, and let authority expand with demonstrated competence. Agent-Native Architectures (Every) maps autonomy to stakes and reversibility and insists on explicit completion signals rather than heuristic detection. As agents become durable, Real-Time Multiplayer Interfaces extends the argument to time: once both sides persist, every interface is multiplayer, and interruption must flow both ways. Even output formatting is UX — I Have ADHD Skill treats output shaping as a measurable regression, restating state every turn and leading with the next action.
Self-improving harnesses
Harness Engineering for Self-Improvement is the anchor: harness engineering as a meta-methodology, with systems that evolve their own workflow code (the Darwin Gödel Machine, Agentic Harness Engineering) and a candid list of open problems — weak evaluators, context lifecycle, negative results, diversity collapse, reward hacking, long-term maintenance, and the role of humans. Prime Agent (RLM Harness) shows the productised version: a "continual harness" where prompts, memories, and skill specs are durable state the agent refines through small, evidence-backed edits, never rewriting the immutable base prompt. The Log is the Agent argues self-modification is dangerous only because it is invisible — if a self-modification is itself an event, it becomes auditable and reversible. The Dark Factory is a DOT File adds the complementary claim that specs, not runners, are the durable artifact worth keeping. Agency pushes composition over modification: build agents from small natural-language primitives and keep memory about agents (what composed well) rather than inside them.
Where the Sources Disagree
Simplicity versus machinery. This is the deepest tension, and both sides have real evidence. What I learned building an opinionated and minimal coding agent reports that a four-tool agent with no MCP, no sub-agents, and no permission prompts is competitive with Codex and Cursor on Terminal-Bench, and that even a bare tmux session performs comparably — suggesting elaborate tool abstractions add complexity without benefit. Lessons from Building Vercel v0 and the d0 Agent agrees from production: as models get smarter, simpler agents work better. Against this, Honey I Shrunk the Coding Agent shows a deliberately richer scaffold more than doubling a small model's pass rate, MiMo Code wins specifically on >200-step tasks through heavy checkpoint/rebuild machinery, and LongHorizon-Harness triples OSWorld completion by adding a three-role audit loop around the same model. The reconciliation that fits all of them: harness machinery earns its cost at the edges — weak models, long horizons, production reliability — and is dead weight in the middle where the model is already sufficient. The two camps are optimising for different regions rather than contradicting each other.
Compaction versus externalised memory. Slate calls compaction "not deterministically lossy" and argues for isolation plus structured episodes; MiMo Code argues the answer is "not better compression but explicit storage-and-retrieval," and that asking a model to compress at the exact moment its context is degrading is backwards. CodeAlta and Sawtooth Memory respond by making compaction deterministic enough to trust — a structured template, replayable as a normal turn, with deterministic values extracted into a separate ledger that summarisation cannot drop. The live question is not whether to summarise but what survives summarisation, and the emerging answer is to move critical facts out of the narrative before compressing.
What a delegation boundary carries. Subagents return a message; Slate's threads return a composable episode; pi returns nothing because it builds no sub-agents at all; Ramp collapses the question by keeping one agent with many skills. Each is a case study rather than a benchmark, and no source offers comparative evidence for its choice of primitive.
Where the security boundary lives. Building Agents That Don't Break Themselves and What I learned building an opinionated and minimal coding agent agree the boundary must be architectural — a sandbox or a container. They disagree about the middle layer: pi dismisses permission prompts and in-tool guardrails as "security theater," while AI UX Patterns — User Transparency, Experience Design for Agents, and Agent-Native Architectures (Every) treat graduated permissions and approval flows as the product surface itself. Part of this is the difference between a personal local tool and a multi-user product, but the sources do not say so explicitly — the disagreement is left standing.
What's Missing
- Comparative evidence. Nearly every source is a single-system case study or a self-reported benchmark; the only controlled comparisons are Honey I Shrunk the Coding Agent (same model, two scaffolds) and The Advisor Strategy (same tasks, three configurations). Several sources explicitly leave their own ablations as future work — Slate's routing behaviour and MiMo Code's per-mechanism ablation among them — so the field still lacks an answer to which of these choices actually matters.
- Negative results and failure modes are named but unsolved: diversity collapse, reward hacking, and the maintenance and migration cost of self-improving harnesses appear as open challenges in Harness Engineering for Self-Improvement and almost nowhere else.
- The human's role. Weng's seventh challenge ("oversight at the right abstraction level") and Experience Design for Agents's claim that judgment "cannot be delegated" point at a design problem no source tackles head-on: what a human should actually do, at what cadence, in a loop that runs for hours.
- Evaluation of UX. The UX sources are principled but none measures adoption or abandonment; the transparency and autonomy claims are asserted, not tested.
- The cost of sandboxing. No source measures what separating the brain from the hands costs in capability or developer experience, even though the sources disagree about whether in-tool restrictions buy anything.
Also on This Theme
- Claude Cookbook — Anthropic's canonical collection of agent-pattern, SDK, tooling, and eval guides.
- Elysia — a decision-tree framework where a decision agent selects tools from environmental context.
- Grok Build — xAI's Rust terminal agent: a streaming
Tooltrait, actor-based conversation state, and a dedicated compaction engine. - Introducing Claude Tag — Anthropic's introduction of Claude Tag, attached as a shared note to several of this theme's sources.
- MimiClaw — a ReAct-loop assistant on an ESP32, showing the same loop running on ~$5 hardware.
- Mnemo — a local-first memory sidecar that extracts a knowledge graph from conversation and injects it into prompts.
- Open Design — a local design workspace treating coding-agent CLIs as a swappable runtime layer, with a five-panelist critique loop.
- Shelley — a single-user mobile coding agent arguing the interface is part of the architecture, not an afterthought.
- xa11y — Desktop Automation via Accessibility APIs — accessibility trees as a more robust substrate than screenshots for computer-use agents.
Compiled from 56 sources: Harness Engineering for Self-Improvement, AI Agents In-Depth — Function Calling, MCP and Tool Use Under the Hood, CodeAlta, Agency — agentbureau/agency, Agent-Building Playbook, Agent Host Protocol (AHP), Agent-native Architectures, Agentic Design — Architecture Catalog for AI Builders, AI UX Patterns — User Transparency, All your agents are going async, Building Agents for Production Systems with MCP, Building Agents that Don't Break Themselves, Building an AI agent inside a 7-year old Rails application, Building Autonomous Goal Loops That Deliver, Building Production-Ready Voice Agents, A Human-Augmenting Agentic Workflow for Causal Inference, Claude Cookbook, What We've Learned Building Cloud Agents, Components of a Coding Agent, DeerFlow — ByteDance's LangGraph-based AI Super-Agent, Devin Fusion: Frontier Performance at 35% Lower Cost, Elements of Agentic Systems Design, Elysia, Experience Design for Agents, Grok Build, Headlong: a microharness for persistent agents, Honey, I Shrunk the Coding Agent, How AI coding agents actually use your technology, i-have-adhd, i-have-adhd (SKILL.md), Inside OpenAI's in-house data agent, Lessons from building Vercel v0 and the d0 agent, LongHorizon-Harness, Mapping with In-Memory Layers to Reduce LLM Overload, Memento, mimiclaw, MiMo Code: Scaling Coding Agents to Long-Horizon Tasks, Mirage: A Unified Virtual File System for AI Agents, mnemo — Local-first AI memory layer for any LLM, oh-my-pi (omp) — A Coding Agent with the IDE Wired In, Open Design, The Open Source Agent Toolkit in 2026, Prime Agent: A Self-Improving RLM Agent, Ralph, Ramp: Lessons from Building a New AI Product - The Pragmatic Summit, Real-Time Multiplayer Interfaces, Sawtooth Memory, Shelley, Slate: moving beyond ReAct and RLM, Tau (τ): An educational coding agent you read like a textbook, The Advisor Strategy: Give Sonnet an Intelligence Boost with Opus, The Dark Factory is a DOT File, The Log is the Agent: Event-Sourced Reactive Graphs for Auditable, Forkable Agentic Systems, TradingGoose: agent-bear-researcher Edge Function, What I learned building an opinionated and minimal coding agent, Cross-platform desktop automation through accessibility APIs Last compiled: 2026-09-12