AgentWrapper/agent-orchestrator
GitHub: AgentWrapper/agent-orchestrator
面向并行 AI 编程 Agent 的编排型 IDE,可在隔离工作空间中同时管理多个编码 Agent 并自动处理 CI 失败、代码审查和合并冲突等反馈闭环。
Stars: 8256 | Forks: 1182

# Agent Orchestrator
**面向并行 AI 编程 Agent 的编排层**
[](https://github.com/AgentWrapper/agent-orchestrator/stargazers)
[](https://github.com/AgentWrapper/agent-orchestrator/graphs/contributors)
[](https://x.com/aoagents)
[](https://discord.com/invite/Uz7JjxbwG)
[](https://www.apache.org/licenses/LICENSE-2.0)
这是一款 Agentic IDE,可在隔离的工作空间中监管并行的 AI 编程 Agent,并提供完全的控制能力,以及针对 CI 失败、审查评论和合并冲突的自动反馈循环。

### 在 X 上见证 AO 的旅程
[功能](#features) • [快速开始](#quick-start) • [架构](#architecture) • [文档](#documentation) • [贡献](#contributing)
## 功能
| 功能 | 描述 |
| :----------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Agent 无关平台** | 包含 23+ 种 Agent 适配器,涵盖 [Claude Code](https://code.claude.com/docs/en/overview)、[OpenAI Codex](https://openai.com/)、[Cursor](https://cursor.com/)、[OpenCode](https://opencode.ai/)、[Aider](https://aider.chat/)、[Amp](https://ampcode.com/manual)、[Goose](https://goose-docs.ai/)、[GitHub Copilot](https://github.com/features/copilot)、[Grok](https://x.ai/grok)、[Qwen Code](https://github.com/QwenLM/qwen-code)、[Kimi Code](https://www.kimi.com/code)、[Cline](https://cline.bot/)、[Continue](https://www.continue.dev/)、[Kiro](https://kiro.dev/) 等 |
| **隔离的工作空间** | 每个会话都会生成属于自己的 git worktree 以及专用的 runtime |
| **平台原生 Runtime** | 在 Darwin/Linux 上使用 tmux,在 Windows 上使用 conpty,以实现最佳性能 |
| **实时 PR 观察** | 中立于提供商的 SCM 观察器,带有自动反馈路由机制 |
| **自动反馈路由** | 将 CI 失败、审查评论和合并冲突路由至所属的 Agent |
| **持久事实存储** | SQLite 持久化不可变事实,并在读取时推导显示状态 |
| **CDC 广播** | DB 触发器将变更附加到 change_log,并通过 SSE 进行广播 |
| **桌面体验** | 原生 Electron 应用,配备 React UI 和实时终端流 |
| **仅本地回环 Daemon** | 设计上在 127.0.0.1 上进行 HTTP 控制,无 auth、CORS 或 TLS |
### 支持的 Agent
支持 23+ 种基于 CLI 的编程 Agent,包括 Claude Code、OpenAI Codex、Cursor、OpenCode、Aider、Amp、Goose、GitHub Copilot、Grok、Qwen Code、Kimi Code、Crush、Cline、Droid、Devin、Auggie、Continue、Kiro 和 Kilo Code。
**只要能在终端中运行,就能在 Agent Orchestrator 上运行。**
## 快速开始
### 前置条件
| 要求 | 最低要求 | 推荐 |
| ----------- | ------- | ----------- |
| Go | 1.25+ | 最新版 |
| Node.js | 20+ | 最新 LTS |
| Git | 任意 | 最新版 |
| pnpm | 任意 | 最新版 |
**可选:**
- `tmux` (Darwin/Linux) - 用于 Unix runtime
- `gh` (GitHub CLI) - 用于经过身份验证的 GitHub API 调用
### 安装
下载适用于您平台的最新版本:
| 平台 | 下载 |
| ----------- | ------------------------------------------------------------------------------------------------- |
| **Windows** | [Setup.exe](https://github.com/AgentWrapper/agent-orchestrator/releases/latest) |
| **macOS** | [Agent Orchestrator.dmg](https://github.com/AgentWrapper/agent-orchestrator/releases/latest) |
| **Linux** | [Agent Orchestrator.AppImage](https://github.com/AgentWrapper/agent-orchestrator/releases/latest) |
**直接下载:** [最新版本](https://github.com/AgentWrapper/agent-orchestrator/releases/latest)
## 遥测
Agent Orchestrator 会收集少量遥测数据,以用于可靠性分析和产品理解。默认情况下,数据存储在本地;通过环境变量可以开启远程传输选项。[阅读完整的遥测政策](docs/telemetry.md)。
## 架构
Agent Orchestrator 是一个长期运行的 Go daemon,围绕具有可替换适配器的 **入站/出站端口契约 (inbound/outbound port contracts)** 构建。
**核心心智模型:** 观察 (OBSERVE) 外部事实 → 更新 (UPDATE) 持久事实 → 推导 (DERIVE) 显示状态 / 执行 (ACT)
**关键组件:**
- **前端** - Electron + React UI,包含 TanStack Router/Query 和 shadcn/ui
- **后端 Daemon** - 基于 Go 的 HTTP 服务器,包含控制器、服务和适配器
- **Runtime** - 特定于平台:在 Darwin/Linux 上使用 `tmux`,在 Windows 上使用 `conpty`
- **存储** - 带有变更数据捕获 (CDC) 的 SQLite,用于实时更新
- **适配器** - 23+ 种 Agent 适配器、git worktree 工作空间、GitHub SCM 集成
有关详细的架构图、数据流和核心承载规则,请参阅 [architecture.md](docs/architecture.md)。
## 文档
| 文档 | 描述 |
| -------------------------------------------------------- | ------------------------------------------------------- |
| [架构](docs/architecture.md) | 系统架构、数据流和核心承载规则 |
| [后端代码结构](docs/backend-code-structure.md) | 逐个包的归属和依赖规则 |
| [AGENTS.md](AGENTS.md) | 贡献者和 Worker Agent 契约 |
| [Agent 适配器契约](docs/agent/README.md) | Agent 适配器接口和钩子行为 |
## 测试
```
# Backend 测试
cd backend
go test -race ./...
# Frontend 测试
cd frontend
pnpm test
# 本地 Full CI 验证
npx @redwoodjs/agent-ci run --all
```
## 配置
所有配置均由环境变量驱动。该 daemon 不需要配置文件。
| 变量 | 默认值 | 用途 |
| --------------------- | -------------------- | --------------------------- |
| `AO_PORT` | `3001` | HTTP 绑定端口 |
| `AO_REQUEST_TIMEOUT` | `60s` | 单次请求超时 |
| `AO_SHUTDOWN_TIMEOUT` | `10s` | 优雅关闭上限 |
| `AO_RUN_FILE` | `~/.ao/running.json` | PID/端口握手 |
| `AO_DATA_DIR` | `~/.ao/data` | SQLite 数据目录 |
| `AO_AGENT` | `claude-code` | 兼容性 Agent 适配器 |
| `GITHUB_TOKEN` | - | GitHub 认证 token |
### 健康检查
```
curl localhost:3001/healthz # Liveness probe
curl localhost:3001/readyz # Readiness probe
```
## 许可证
Apache License 2.0 - 详见 [LICENSE](LICENSE)。
**[在 GitHub 上为我们点赞](https://github.com/AgentWrapper/agent-orchestrator)** • **[报告问题](https://github.com/AgentWrapper/agent-orchestrator/issues)** • **[讨论](https://github.com/AgentWrapper/agent-orchestrator/discussions)**
由 Agent Orchestrator 社区倾情制作
标签:AI智能体, EVTX分析, MITM代理, SOC Prime, 人工智能, 代码审查, 任务编排, 开发工具, 日志审计, 用户模式Hook绕过, 网络调试, 自动化