About Agent Base
Agent Base is an MCP server published by giraffe-tree in the Developer Tools category: agent Base is a source-level research project on coding agents. It compares Codex CLI, OpenCode, Gemini CLI, Kimi CLI, and SWE-agent across agent loops, tools, MCP integration, context/memory handling, UI flows, web architecture, and safety controls. It has been installed 0 times through Conduid.
The repository has 31 stars and 2 forks, with the last commit 6 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx agent-baseThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Agent Base
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
Agent-Base:七大 Code Agent 源码深度解析
从“会用 Agent”到“懂 Agent 架构取舍”。
仓库定位
本仓库是对多套 Code Agent 的源码级拆解 + 横向对比,核心目标:
- 看懂 Agent Loop 如何驱动“推理 -> 工具调用 -> 反馈 -> 再推理”
- 看懂不同项目在 Safety、Memory、MCP、Checkpoint 等问题上的工程取舍
- 为你设计/改造自己的 Agent 系统提供可复用参考
7 个项目对比
💡 阅读建议: 从 Codex 开始(文档最完整),再根据兴趣选择。每个项目都有独特的架构亮点。
🔮 Claude Code (TypeScript)
适合研究: React TUI 与 AsyncGenerator 模式
- Ink 终端 React 组件化 UI
- 统一
query()AsyncGenerator 驱动
📄 概览 · Agent Loop · Memory
🦀 Codex (Rust)
适合研究: 企业级安全机制
- 完善的安全沙箱和权限分级
- 推荐入门首选
🔷 Gemini CLI (TypeScript)
适合研究: 内存管理和上下文策略
- 三层分层内存架构
- 状态机驱动的调度器
🌙 Kimi CLI (Python)
适合研究: 状态持久化和回滚
- Checkpoint 完整实现(时间旅行)
- 命令级撤销/重做
📄 概览 · 循环 · Checkpoint
⚡ OpenCode (TypeScript)
适合研究: 现代 Web 集成
- Vercel AI SDK 架构
- 流式响应处理
🔬 SWE-agent (Python)
适合研究: 学术研究/自动化修复
- 可配置 History Processors
- 专为软件工程任务设计
🎯 Qwen Code (TypeScript)
适合研究: 工程化架构与循环检测
- 完善的循环检测服务
- 结构化 Agent 设计模式
📚 快速入口
不想纠结?从这里开始
覆盖范围(基于 docs/ 全量盘点)
截至 2026-03-31,docs/ 目录共 177 篇文档:
- 主线技术文档:118 篇
- Questions 专题文档:59 篇
| 类别 | 目录 | 内容 |
|---|---|---|
| 核心项目(7) | codex / gemini-cli / kimi-cli / opencode / swe-agent / qwen-code / claude-code |
每个项目按统一编号体系拆解(01~13) |
| 跨项目对比 | comm |
共性抽象、架构对比、ACP、Plan & Execute、未来方向 |
| 补充专题 | cursor / claude |
Cursor Checkpoint 存储分析、Claude 消息上下文保留机制 |
统一分析框架(01~13 编号)
绝大多数项目都按以下主线组织,便于横向对读:
| 编号 | 主题 | comm | codex | gemini-cli | kimi-cli | opencode | swe-agent | qwen-code | claude-code |
|---|---|---|---|---|---|---|---|---|---|
01 |
概览 | link | link | link | link | link | link | link | link |
02 |
CLI 入口 / Session 管理 | link | link | link | link | link | link | link | link |
03 |
Session 运行时 | link | link | link | link | link | link | link | link |
04 |
Agent Loop | link | link | link | link | link | link | link | link |
05 |
Tools 系统 | link | link | link | link | link | link | link | link |
06 |
MCP 集成 | link | link | link | link | link | link | link | link |
07 |
Memory Context | link | link | link | link | link | link | link | link |
08 |
UI 交互 | link | link | link | link | link | link | link | link |
09 |
Web Server | link | link | link | link | link | link | link | link |
10 |
Safety Control | link | link | link | link | link | link | link | link |
11 |
Prompt 组织 | - | link | link | link | link | link | link | link |
12 |
日志记录机制 | link | link | link | link | link | link | link | link |
13 |
ACP 集成 | link | link | link | link | link | link | link | link |
文档地图(按目录)
| 目录 | 主线文档 | Questions | 快速入口 |
|---|---|---|---|
| comm | 15 | 2 | 概览 / Agent Loop 对比 / ACP 是什么 / ACP 跨项目对比 / Plan and Execute 对比 |
| codex | 13 | 8 | 概览 / Loop / Safety |
| gemini-cli | 13 | 9 | 概览 / Loop / Memory |
| kimi-cli | 16 | 12 | 入门 / 概览 / Memory+Checkpoint |
| opencode | 14 | 10 | 概览 / Session 管理 / Loop |
| swe-agent | 12 | 11 | 概览 / Loop / Tools |
| qwen-code | 12 | 4 | 概览 / Loop / Safety |
| cursor | 1 | 2 | Checkpoint 映射 / state.vscdb 分析 |
| claude-code | 13 | 10 | 入门 / 概览 / Agent Loop / Memory |
完整目录导航请看:
_sidebar.md
高频 Questions 专题入口
| 主题 | 文档入口 |
|---|---|
| Tool 并发调用 | Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Claude Code |
| 工具错误处理 | Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Qwen Code / Claude Code |
| 防止无限循环 | Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Qwen Code / Claude Code |
| 上下文压缩 | Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Qwen Code / Claude Code |
| Plan and Execute | 跨项目总览 / Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Claude Code |
| Checkpoint 与回滚 | Kimi 实现 / Kimi 权衡 / OpenCode 实现 / SWE-agent 实现 / SWE-agent 权衡 / Cursor 映射分析 |
| WebSearch 实现 | 跨项目对比 / Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Qwen Code / Claude Code |
| Subagent / 多代理 | Codex / Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Qwen Code / Claude Code |
| Why keep reasoning | Gemini CLI / Kimi CLI / OpenCode / SWE-agent / Claude Code |
| ACP 协议实现 | 跨项目 ACP 对比 / 什么是 ACP |
三段学习路径
路线 A:30 分钟快速建立直觉
路线 B:2 小时完成架构骨架
路线 C:专题深入
- Checkpoint:
kimi-cli/opencode/swe-agent/cursor - 推理保留与上下文:
gemini-cli/kimi-cli/opencode/swe-agent/claude - 未来趋势:
从第一性原理看 Coding Agent 的未来突破
获取源码(可选)
如需对照源码阅读:
git clone https://github.com/openai/codex.git
git clone https://github.com/google-gemini/gemini-cli.git
git clone https://github.com/MoonshotAI/kimi-cli.git
git clone https://github.com/SWE-agent/SWE-agent.git
git clone https://github.com/anomalyco/opencode.git
git clone https://github.com/QwenLM/qwen-code.git
研究基线
- 时间: 2026-02-22
- 来源: 各项目 GitHub 当时最新分支
- 方法: 源码阅读 + 关键流程图解 + 跨项目对比
贡献建议
欢迎提交 Issue / PR:
- 修正文档中的事实性错误或路径失效
- 增补新的 Questions 专题(建议沿用已有命名风格)
- 在
template/下复用模板补齐尚未覆盖的分析维度
README mirrored from the source repository 4 months ago. The original is authoritative.