learn-claude-code-rust
Agent 不是框架,是模型。你的工作是造工具箱。
"The model IS the agent. The code is the harness.
Build great harnesses. The agent will do the rest."
— learn-claude-code-rust
12 个渐进 session,用 Rust 实现 Claude Code 的核心架构。每个 session 只增加一个机制,不改变已有的 agent loop。 从最简单的工具调用,到多智能体协作、上下文压缩、任务图调度,完整走一遍真实 agent 系统的构建路径。
12 个 Session
Agent Loop
One loop & Bash is all you need
Tool Use
Adding a tool means adding one handler
TodoWrite
An agent without a plan drifts
Subagents
Break big tasks down; each subtask gets a clean context
Skills
Load knowledge when you need it, not upfront
Context Compact
Context will fill up; you need a way to make room
Tasks
Break big goals into small tasks, order them, persist to disk
Background Tasks
Run slow operations in the background; the agent keeps thinking
Agent Teams
When the task is too big for one, delegate to teammates
Team Protocols
Teammates need shared communication rules
Autonomous Agents
Teammates scan the board and claim tasks themselves
Worktree Isolation
Each works in its own directory, no interference
功能亮点
- ▸每个 session 只加一个机制,循序渐进,不绕弯
- ▸Rust 实现,附带 Next.js 可交互学习平台
- ▸三语文档:中文 / 英文 / 日文
- ▸代码模式可直接迁移到农业、医疗、制造等任意领域