Understanding Open-Source Agent Frameworks: A Visual Guide to Harness Design Approaches
Why does the same LLM produce completely different agents when plugged into different frameworks? This article breaks down the concept of the Agent Harness—the runtime layer that turns raw token generation into real-world action—compares four representative open-source framework architectures (minimalist, shared-service, memory-driven, and multi-channel), and offers a practical five-dimension checklist for evaluating and selecting a framework. It also discusses how harness-level capabilities may eventually migrate into the models themselves, and why understanding the underlying agent loop remains essential for building reliable AI applications.
1. Why the Same Model Can Produce Different Agents
A large language model is, at its core, a “text in, text out” machine: it reads tokens and generates tokens. It is stateless, cannot update itself, and has no memory of previous conversations. To make a model actually “do work,” you need to wrap it in a layer of runtime capabilities—what the industry commonly calls the Agent Harness.
The word “harness” originally refers to horse tack: a horse can only pull a cart once it is fitted with a harness. Similarly, a large model can only execute tool calls, persist sessions, and enforce safety guardrails once it is equipped with a harness—turning token output into real actions in the world.
A complete agent can therefore be decomposed into two parts:
- Model weights: the LLM itself, responsible for reasoning and decision-making;
- Agent Harness: responsible for assembling prompts, executing tools, managing context, and enforcing guardrails—connecting the model to the outside world.
In practice, the harness’s impact on final results is no smaller than the model’s—possibly even larger. This is why plugging the same model into different frameworks yields agents with entirely different behaviors and capability boundaries.
2. Four Representative Architectural Approaches
If you open and read the source code of popular open-source agent frameworks, you’ll find dramatic differences in code size and design philosophy. They can be abstracted into four typical approaches:
2.1 The Minimalist Approach: Everything from Scratch
Some frameworks deliberately keep their code to a few hundred lines. The goal isn’t production use but teaching and demonstration—helping developers understand “what it actually takes to write a harness yourself.”
A minimal implementation typically includes:
# Core loop of a minimal harness (pseudocode)while True:model_output = llm(user_input + history)if model_output.has_tool_call:result = execute_tool(model_output.tool_name,model_output.args)history.append(tool_result(result))else:return model_output.text
The core is a loop of “model output → check for tool call → execute → feed result back into context → reason again.” The value of a minimal framework is that it exposes the agent’s skeleton clearly—ideal for learning. But it offers essentially nothing in session persistence, concurrency control, or permission management, so it isn’t suitable for production use as-is.
2.2 Shared-Service Architecture: One Server, Many Clients
Another class of frameworks consolidates tool execution and state management into a shared service process, with multiple clients (CLI, desktop, web) interacting with the model through this server. The benefits of this architecture:
- Centralized tool maintenance: plugins, tool registries, and permission policies are deployed only once;
- Session state continuity across clients: a user can switch from terminal to GUI without losing context;
- Controllable resources: model calls and subprocess execution are all funneled through the server, making rate limiting and auditing easier.
The cost is increased architectural complexity: you must handle service lifecycle management, client identity negotiation, and concurrent request scheduling.
2.3 The Memory-Driven Approach: Persisting Learned Skills
A third class of frameworks layers long-term memory and skill write-back mechanisms on top of the traditional “context window + file read/write” model: operational procedures an agent discovers during tasks are consolidated into skill entries and stored back into a memory library, where they serve as prior knowledge in prompt assembly for similar future tasks.
Task execution → Skill extraction → Write to skill library↓Similar task later → Retrieve skill → Inject into prompt → Higher first-attempt success rate
This is essentially engineering “reusable experience.” Implementation typically follows three phases: record (append) → consolidate → assemble (inject). During execution, raw records are appended; after a task completes, the model summarizes and distills them into structured skills; before the next execution, relevant skills are retrieved and injected. The key risk in designing such mechanisms is memory pollution—once a wrong conclusion is persisted, it gets repeatedly reused and amplified, so version tagging and invalidation/cleanup strategies are essential.
2.4 The Multi-Channel Approach: Connectors First
A fourth class of frameworks focuses on the messaging channel layer: a single agent core that can simultaneously connect to dozens of channels—chat platforms, email, voice interfaces, and more. These typically use a “gateway + adapter” pattern:
- The gateway handles unified message formatting, session routing, deduplication, and rate limiting;
- Each channel gets a lightweight adapter that only handles platform-specific authentication and event translation;
- The agent core is completely unaware of message origins, ensuring business logic is written once and reused everywhere.
This design suits applications shaped like “personal assistants or outward-facing services.” The key challenges are semantic differences across channels (e.g., group chats and private chats require completely different context strategies) and asynchronous feedback for long-running tasks.
3. How to Evaluate and Choose: Five Dimensions
After reviewing the four approaches, evaluating open-source frameworks can be distilled into a universal checklist:
- Core loop design: Are tool-call error retries, parallel calls, and loop exit conditions handled robustly?
- Context management: Multi-turn conversation compression, long-task memory, and strategies for context window overflow;
- Extension mechanisms: How tools/plugins/MCP-style protocols are registered and isolated, and the security sandbox for custom scripts;
- Channels and integrations: Do you need to connect to existing IM platforms, email, or API gateways?
- Maintainability: Code size, abstraction quality, and ease of secondary development.
Also pay attention to guardrails and knowledge-persistence capabilities: confirmation mechanisms for sensitive operations, tiered permissions, skill reuse, and memory lifecycle management. These details rarely show up in a README—the best way to assess them is to read the source code yourself.
4. A Practical Note on General-Purpose Capability Consolidation
It’s worth noting that a different kind of capability consolidation is emerging in the industry: mature harness capabilities from a given framework (such as memory consolidation and skill management) are being extracted backward into the model layer, so models learn “how to remember things” out of the box. The implications for developers:
- Short term: harness implementation details are a competitive advantage;
- Mid term: patching models at the harness level will gradually be replaced by native model capabilities;
- Long term: application form factors, tool ecosystem integration, and data/cost control remain each framework’s irreplaceable value.
Whichever framework you adopt, understanding the underlying harness loop—prompt assembly, tool execution, context and memory management, guardrails and auditing—is a required course for building reliable agent applications. A practical path: start by hand-writing a minimal harness from a minimalist implementation, then study how mature frameworks solve production problems. This lets you understand the “why” behind the differences and make independent judgments when doing technology selection.
