|
1 | | -# Comparison of Major Harness Implementations |
| 1 | +# 主流 Harness 实现对比 |
2 | 2 |
|
3 | | -This is a factual comparison of prominent agent harnesses as of mid-2025. The field moves fast — specifics may change, but the architectural patterns are stable. |
| 3 | +这是截至 2025 年中主要 Agent Harness 的事实性对比。这个领域变化很快——细节可能过时,但架构模式是稳定的。 |
4 | 4 |
|
5 | | -## Overview Table |
| 5 | +## 概览表 |
6 | 6 |
|
7 | | -| Project | Context Management | Memory | Skills / Tools | Multi-Agent | Open Source | |
| 7 | +| 项目 | 上下文管理 | 记忆 | Skill / 工具 | 多 Agent | 开源 | |
8 | 8 | |---|---|---|---|---|---| |
9 | | -| **OpenClaw** | AGENTS.md-driven context injection. Loads workspace files, skills, and memory on each session. Context compression via summarization. | File-based: MEMORY.md (long-term), daily logs (memory/YYYY-MM-DD.md), wiki/ for structured knowledge. Fully portable. | Skill system: each skill is a SKILL.md + supporting files. Installable from ClawdHub. MCP protocol support. | Sub-agent spawning with push-based completion. Orchestrator delegates tasks, results auto-announce. | ✅ Open source | |
10 | | -| **Claude Code** | 512K context window. Loads files on demand via read tool. CLAUDE.md for project-level instructions. Compacts old messages when context fills. | Session-based. No persistent memory across sessions by default. CLAUDE.md provides project continuity. User-managed files. | Built-in tools: read, write, edit, exec, web search. Extensible via MCP servers. Permission system (allow/deny/ask). | Single-agent. No native sub-agent support. Can invoke other CLI tools via exec. | ✅ Open source | |
11 | | -| **Codex (OpenAI CLI)** | Loads repo structure + relevant files. AGENTS.md for instructions. Sandboxed execution environment. | No persistent memory. Reads project files (README, AGENTS.md) for context. Session state resets on each run. | Built-in: file read/write, exec, web search. Runs in network-disabled sandbox by default. Can enable network per session. | Single-agent. No multi-agent orchestration. Designed for single-task execution. | ✅ Open source | |
12 | | -| **Cline** | VS Code extension. Loads open files + relevant workspace files. Custom instructions file. Sliding window for context management. | No built-in persistent memory. Relies on workspace files and conversation history within VS Code session. | File operations, terminal commands, browser automation. MCP server support for extensibility. Approval workflow for actions. | Single-agent. No multi-agent support. Human-in-the-loop via approval prompts in VS Code. | ✅ Open source | |
13 | | -| **Aider** | Git-aware context. Explicitly add files to context with /add. Repo map provides project-wide overview. Diff-based editing. | Git history as implicit memory. No dedicated memory system. Session history persists within terminal session. | Focused tool set: file editing (diff format), git operations, linting, testing. No plugin system. | Single-agent. No multi-agent. Designed for paired programming (human + one agent). | ✅ Open source | |
14 | | -| **Cursor** | IDE-integrated. Full repo indexing with embeddings. Loads relevant files based on semantic search. @-mentions for explicit context. | No persistent agent memory. Codebase index serves as implicit knowledge. .cursorrules for project config. | Code editing, terminal, file operations, documentation lookup. Integrated debugger context. No plugin marketplace. | Single-agent. No multi-agent. Background indexing is async but not agent-based. | ❌ Proprietary | |
15 | | -| **Nexu** | Agent-native IM platform. Per-agent workspace with AGENTS.md, SOUL.md, USER.md, MEMORY.md. Skills inject specialized context. | Comprehensive: MEMORY.md (curated long-term), daily logs, wiki/ knowledge base, TOOLS.md (environment-specific notes). Cross-session continuity by design. | Skill marketplace. Each skill is self-contained with SKILL.md instructions. Platform-level tools: calendar, email, messaging, browser, camera, nodes. | Multi-agent native. Sub-agent spawning, cross-channel messaging, cron scheduling. Agents can coordinate across IM channels. | ❌ Proprietary (platform) | |
| 9 | +| **OpenClaw** | 基于 AGENTS.md 的上下文注入。每次会话加载工作区文件、Skill 和记忆。通过摘要实现上下文压缩。 | 基于文件:MEMORY.md(长期)、每日日志(memory/YYYY-MM-DD.md)、wiki/ 存放结构化知识。完全可迁移。 | Skill 体系:每个 Skill 由 SKILL.md + 支撑文件组成。可从 ClawdHub 安装。支持 MCP 协议。 | 子 Agent 生成,完成后推送通知。协调者委派任务,结果自动回报。 | ✅ 开源 | |
| 10 | +| **Claude Code** | 512K Context Window。按需通过 read 工具加载文件。CLAUDE.md 提供项目级指令。上下文满时压缩旧消息。 | 基于会话。默认不支持跨会话持久记忆。CLAUDE.md 提供项目连续性。用户自行管理文件。 | 内置工具:read、write、edit、exec、web search。可通过 MCP 服务器扩展。权限系统(allow/deny/ask)。 | 单 Agent。不支持原生子 Agent。可通过 exec 调用其他 CLI 工具。 | ✅ 开源 | |
| 11 | +| **Codex (OpenAI CLI)** | 加载仓库结构和相关文件。AGENTS.md 提供指令。沙箱执行环境。 | 无持久记忆。读取项目文件(README、AGENTS.md)获取上下文。每次运行会话状态重置。 | 内置:文件读写、exec、web search。默认在禁用网络的沙箱中运行。可按会话启用网络。 | 单 Agent。不支持多 Agent 编排。设计为单任务执行。 | ✅ 开源 | |
| 12 | +| **Cline** | VS Code 扩展。加载打开的文件和相关工作区文件。自定义指令文件。滑动窗口管理上下文。 | 无内置持久记忆。依赖工作区文件和 VS Code 会话内的对话历史。 | 文件操作、终端命令、浏览器自动化。支持 MCP 服务器扩展。通过 VS Code 内的审批流程进行操作确认。 | 单 Agent。不支持多 Agent。通过 VS Code 中的审批提示实现人机协作。 | ✅ 开源 | |
| 13 | +| **Aider** | Git 感知上下文。通过 /add 显式添加文件到上下文。仓库地图提供项目全局概览。基于 diff 编辑。 | Git 历史作为隐式记忆。无专用记忆系统。会话历史在终端会话内持久。 | 聚焦的工具集:文件编辑(diff 格式)、Git 操作、lint、测试。无插件系统。 | 单 Agent。不支持多 Agent。设计为结对编程(人 + 一个 Agent)。 | ✅ 开源 | |
| 14 | +| **Cursor** | IDE 集成。基于 embedding 的全仓库索引。根据语义搜索加载相关文件。通过 @-mention 显式指定上下文。 | 无持久 Agent 记忆。代码库索引作为隐式知识。.cursorrules 用于项目配置。 | 代码编辑、终端、文件操作、文档查找。集成调试器上下文。无插件市场。 | 单 Agent。不支持多 Agent。后台索引是异步的但不基于 Agent。 | ❌ 闭源 | |
| 15 | +| **Nexu** | Agent 原生 IM 平台。每个 Agent 拥有独立工作区:AGENTS.md、SOUL.md、USER.md、MEMORY.md。Skill 注入专业上下文。 | 完整体系:MEMORY.md(长期精选)、每日日志、wiki/ 知识库、TOOLS.md(环境相关笔记)。跨会话连续性是核心设计。 | Skill 市场。每个 Skill 自包含,带有 SKILL.md 指令。平台级工具:日历、邮件、消息、浏览器、相机、节点。 | 原生多 Agent。子 Agent 生成、跨频道消息、定时任务。Agent 可跨 IM 频道协作。 | ❌ 闭源(平台) | |
16 | 16 |
|
17 | | -## Deep Dive: Key Differentiators |
| 17 | +## 深入解析:核心差异 |
18 | 18 |
|
19 | | -### Context Strategy |
| 19 | +### 上下文策略 |
20 | 20 |
|
21 | | -How each harness decides what to show the model: |
| 21 | +各 Harness 如何决定给模型展示什么: |
22 | 22 |
|
23 | 23 | ``` |
24 | | -Aider : Explicit — user adds files manually (/add, /drop) |
25 | | -Claude Code : On-demand — agent reads files as needed |
26 | | -Cursor : Semantic — embeddings index, auto-retrieves relevant code |
27 | | -OpenClaw/Nexu : Config-driven — AGENTS.md declares what to load |
28 | | -Codex : Repo-aware — scans structure, loads relevant files |
29 | | -Cline : IDE-aware — open tabs + workspace files |
| 24 | +Aider : 显式 — 用户手动添加文件(/add, /drop) |
| 25 | +Claude Code : 按需 — Agent 根据需要读取文件 |
| 26 | +Cursor : 语义 — embedding 索引,自动检索相关代码 |
| 27 | +OpenClaw/Nexu : 配置驱动 — AGENTS.md 声明加载内容 |
| 28 | +Codex : 仓库感知 — 扫描结构,加载相关文件 |
| 29 | +Cline : IDE 感知 — 打开的标签页 + 工作区文件 |
30 | 30 | ``` |
31 | 31 |
|
32 | | -**Trade-off:** Explicit control (Aider) gives precision but requires user effort. Semantic retrieval (Cursor) is automatic but can miss or include wrong files. Config-driven (OpenClaw) is predictable but needs upfront setup. |
| 32 | +**权衡:** 显式控制(Aider)精确但需要用户操作。语义检索(Cursor)自动但可能遗漏或引入错误文件。配置驱动(OpenClaw)可预测但需要前期配置。 |
33 | 33 |
|
34 | | -### Memory Architecture |
| 34 | +### 记忆架构 |
35 | 35 |
|
36 | 36 | ```python |
37 | | -# Type 1: No memory (Claude Code, Codex, Cursor, Cline) |
38 | | -# Each session starts fresh. Context comes from project files. |
| 37 | +# 类型 1:无记忆(Claude Code, Codex, Cursor, Cline) |
| 38 | +# 每次会话从零开始。上下文来自项目文件。 |
39 | 39 | context = load_project_files() # That's it |
40 | 40 |
|
41 | | -# Type 2: File-based memory (OpenClaw, Nexu) |
42 | | -# Persistent knowledge across sessions, user-editable. |
| 41 | +# 类型 2:基于文件的记忆(OpenClaw, Nexu) |
| 42 | +# 跨会话持久化知识,用户可编辑。 |
43 | 43 | context = ( |
44 | 44 | load_project_files() |
45 | 45 | + load_memory("MEMORY.md") |
46 | 46 | + load_daily_log(today) |
47 | 47 | + load_wiki_if_relevant(task) |
48 | 48 | ) |
49 | 49 |
|
50 | | -# Type 3: Embedded memory (proprietary platforms) |
51 | | -# Stored in vector DB, retrieved by similarity. |
| 50 | +# 类型 3:嵌入式记忆(闭源平台) |
| 51 | +# 存储在向量数据库中,按相似度检索。 |
52 | 52 | context = ( |
53 | 53 | load_project_files() |
54 | 54 | + vector_search(task, memory_store) |
55 | 55 | ) |
56 | 56 | ``` |
57 | 57 |
|
58 | | -### Tool Extensibility |
| 58 | +### 工具扩展性 |
59 | 59 |
|
60 | | -| Approach | Projects | Pros | Cons | |
| 60 | +| 方式 | 项目 | 优点 | 缺点 | |
61 | 61 | |---|---|---|---| |
62 | | -| **MCP Protocol** | OpenClaw, Claude Code, Cline | Standard protocol, interoperable | Server setup overhead | |
63 | | -| **Skill Files** | OpenClaw, Nexu | Self-contained, shareable, marketplace | Custom format | |
64 | | -| **Built-in Only** | Aider, Codex | Simple, predictable | Limited extensibility | |
65 | | -| **IDE Integration** | Cursor, Cline | Rich editor context | Tied to IDE | |
| 62 | +| **MCP 协议** | OpenClaw, Claude Code, Cline | 标准协议,可互操作 | 服务器配置有开销 | |
| 63 | +| **Skill 文件** | OpenClaw, Nexu | 自包含、可共享、有市场 | 自定义格式 | |
| 64 | +| **仅内置** | Aider, Codex | 简单、可预测 | 扩展性有限 | |
| 65 | +| **IDE 集成** | Cursor, Cline | 丰富的编辑器上下文 | 绑定 IDE | |
66 | 66 |
|
67 | | -### Multi-Agent Patterns |
| 67 | +### 多 Agent 模式 |
68 | 68 |
|
69 | | -Most harnesses are single-agent. Multi-agent support varies significantly: |
| 69 | +大多数 Harness 是单 Agent 的。多 Agent 支持差异很大: |
70 | 70 |
|
71 | 71 | ```python |
72 | | -# OpenClaw/Nexu: First-class sub-agent spawning |
| 72 | +# OpenClaw/Nexu: 一等公民的子 Agent 生成 |
73 | 73 | subagent = spawn( |
74 | 74 | task="Research competitor pricing", |
75 | 75 | model="gpt-4o", |
76 | 76 | tools=["web_search", "web_fetch"], |
77 | 77 | ) |
78 | 78 | # Result auto-announces when done — no polling needed |
79 | 79 |
|
80 | | -# Claude Code: Indirect multi-agent via exec |
| 80 | +# Claude Code: 通过 exec 间接实现多 Agent |
81 | 81 | result = exec("claude-code --print 'Review this PR'") |
82 | 82 | # Works but no structured communication |
83 | 83 |
|
84 | | -# Others: No native multi-agent |
85 | | -# Workaround: multiple terminal sessions, manual coordination |
| 84 | +# 其他: 无原生多 Agent |
| 85 | +# 变通方案: 多个终端会话,手动协调 |
86 | 86 | ``` |
87 | 87 |
|
88 | | -## Choosing the Right Harness |
| 88 | +## 如何选择合适的 Harness |
89 | 89 |
|
90 | | -| If you need... | Consider | |
| 90 | +| 如果你需要…… | 考虑 | |
91 | 91 | |---|---| |
92 | | -| Deep code editing with IDE integration | **Cursor** or **Cline** | |
93 | | -| Terminal-based coding agent | **Claude Code** or **Aider** | |
94 | | -| Sandboxed task execution | **Codex** | |
95 | | -| Multi-agent orchestration | **OpenClaw** or **Nexu** | |
96 | | -| Persistent memory across sessions | **OpenClaw** or **Nexu** | |
97 | | -| Extensible tool ecosystem | **OpenClaw** (skills + MCP) | |
98 | | -| Minimal setup, just works | **Aider** | |
| 92 | +| 深度代码编辑 + IDE 集成 | **Cursor** 或 **Cline** | |
| 93 | +| 终端编码 Agent | **Claude Code** 或 **Aider** | |
| 94 | +| 沙箱化任务执行 | **Codex** | |
| 95 | +| 多 Agent 编排 | **OpenClaw** 或 **Nexu** | |
| 96 | +| 跨会话持久记忆 | **OpenClaw** 或 **Nexu** | |
| 97 | +| 可扩展的工具生态 | **OpenClaw**(Skill + MCP) | |
| 98 | +| 最小配置,开箱即用 | **Aider** | |
99 | 99 |
|
100 | | -## What the Table Doesn't Show |
| 100 | +## 表格之外 |
101 | 101 |
|
102 | | -- **Model support** — Most harnesses are model-agnostic (OpenClaw, Cline, Aider support many providers). Codex is OpenAI-only. Claude Code is Anthropic-focused. |
103 | | -- **Cost** — Varies wildly based on model choice, context size, and task complexity. Not a harness feature, but a usage pattern. |
104 | | -- **Speed** — Depends more on model latency than harness architecture. Streaming support is universal. |
105 | | -- **Community** — Open-source projects (Aider, Claude Code, Cline, OpenClaw) have active communities. Community size doesn't equal quality. |
| 102 | +- **模型支持** — 多数 Harness 与模型无关(OpenClaw、Cline、Aider 支持多种提供商)。Codex 仅限 OpenAI。Claude Code 聚焦 Anthropic。 |
| 103 | +- **成本** — 因模型选择、上下文大小和任务复杂度而异。不是 Harness 特性,而是使用模式的问题。 |
| 104 | +- **速度** — 更多取决于模型延迟而非 Harness 架构。流式输出已普遍支持。 |
| 105 | +- **社区** — 开源项目(Aider、Claude Code、Cline、OpenClaw)都有活跃社区。社区规模不等于质量。 |
106 | 106 |
|
107 | | -## Common Pitfalls |
| 107 | +## 常见陷阱 |
108 | 108 |
|
109 | | -- **Choosing based on hype** — Pick the harness that fits your workflow, not the one with the most GitHub stars. |
110 | | -- **Ignoring memory** — If your tasks span sessions, a harness without persistent memory means re-explaining context every time. |
111 | | -- **Assuming "open source" means "free"** — The harness is free; the model API calls are not. Budget for API costs. |
112 | | -- **Locking into one harness** — File-based configurations (AGENTS.md, MEMORY.md) are portable. Proprietary memory is not. See [Memory Portability →](memory-portability.md). |
| 109 | +- **跟风选择** — 选适合你工作流的 Harness,而不是 GitHub star 最多的。 |
| 110 | +- **忽视记忆** — 如果你的任务跨会话,没有持久记忆的 Harness 意味着每次都要重新解释上下文。 |
| 111 | +- **以为"开源"等于"免费"** — Harness 免费,模型 API 调用不免费。要预估 API 成本。 |
| 112 | +- **锁定单一 Harness** — 基于文件的配置(AGENTS.md、MEMORY.md)可迁移。闭源的记忆系统则不行。参见 [记忆可迁移性 →](memory-portability.md)。 |
113 | 113 |
|
114 | | -## Further Reading |
| 114 | +## 延伸阅读 |
115 | 115 |
|
116 | | -- [Scaling Dimensions →](scaling-dimensions.md) — How these harnesses scale across time, space, and interaction |
117 | | -- [Glossary →](glossary.md) — Key terms used throughout this guide |
| 116 | +- [扩展维度 →](scaling-dimensions.md) — 这些 Harness 如何在时间、空间和交互维度上扩展 |
| 117 | +- [术语表 →](glossary.md) — 本指南中使用的关键术语 |
118 | 118 |
|
119 | 119 | --- |
120 | 120 |
|
121 | | -*Next: [Glossary →](glossary.md)* |
| 121 | +*下一篇:[术语表 →](glossary.md)* |
0 commit comments