架构层次
五个正交关注点组合成完整的 Agent
L1 Tools & Execution
Agent 能做什么。基础层:工具赋予模型与外部世界交互的能力。
L2 Planning & Coordination
如何组织工作。从简单的待办列表到跨 Agent 共享的依赖感知任务板。
TodoWrite
Plan Before You Act
An agent without a plan drifts; list the steps first, then execute
Subagents
Clean Context Per Subtask
Subagents use independent messages[], keeping the main conversation clean
Skills
Load on Demand
Inject knowledge via tool_result when needed, not upfront in the system prompt
Tasks
Task Graph + Dependencies
A file-based task graph with ordering, parallelism, and dependencies -- the coordination backbone for multi-agent work
L3 Memory Management
在上下文限制内保持记忆。压缩策略让 Agent 可以无限工作而不失去连贯性。
L4 Concurrency
非阻塞执行。后台线程和通知总线实现并行工作。
L5 Collaboration
多 Agent 协作。团队、消息传递和能独立思考的自主队友。
Agent Teams
Teammates + Mailboxes
When one agent can't finish, delegate to persistent teammates via async mailboxes
Team Protocols
Shared Communication Rules
One request-response pattern drives all team negotiation
Autonomous Agents
Scan Board, Claim Tasks
Teammates scan the board and claim tasks themselves; no need for the lead to assign each one
Worktree + Task Isolation
Isolate by Directory
Each works in its own directory; tasks manage goals, worktrees manage directories, bound by ID