awslabs /cli-agent-orchestrator
Multi-agent orchestration for AI coding CLIs — Claude Code, Kiro, Codex, and more, coordinated in isolated tmux sessions
★ 1,730⑂ 356👁 5⑃ 1,046● 464▤ 20
+27
日增长
+115
周增长
1,730
stars
356
forks
5
watchers
1,046
prs
464
issues
20
releases
README
is disallowed. Keep in sync with README.md. -- CLI Agent Orchestrator (CAO) English | 简体中文 CLI Agent Orchestrator (CAO) 是一个开源的多 Agent 编排框架,面向 Claude Code、Kiro CLI、Codex CLI、Antigravity CLI、Hermes Agent、Kimi CLI、MiniMax Code、GitHub Copilot CLI、OpenCode、Oh My Pi 和 Cursor CLI 等 AI 编程 CLI。CAO 会把每个 Agent 运行在隔离的 tmux 会话中,并通过 Model Context Protocol (MCP) 以 supervisor-worker 模式协调它们。一个 supervisor Agent 可以并行、串行,或以 swarm 方式把任务分派给多个专长不同的 Agent。 📚 文档站点 —— 指南、参考文档,以及两门交互式课程(英文)。 CAO 是什么? CAO(读作 "kay-oh")是一个轻量的本地编排器,位于你和常用 CLI 编程 Agent 之间。你不再只能一次运行一个 Agent,而是可以让 supervisor Agent 启动、发送消息并协调多个 worker Agent。每个 worker 都是真实的 CLI 工具(如 Claude Code、Kiro、Codex 等),运行在自己的 tmux 终端里。 Agent 之间通过 MCP 暴露的原语通信,包括 handoff、assign 和 send_message。你可以通过 CLI、内置 Web UI,或 MCP 管理服务器来管理它们。由于每个 Agent 都是完整的 CLI 进程,CAO 能保留原工具的行为、鉴权方式和高级能力,例如 Claude Code sub-agents、Kiro CLI custom agents 等。这些是普通 API wrapper 难以完整保留的。 常见使用场景 - 并行代码审查 / 实现:supervisor 同时分派 N 个 reviewer 审查 N 个文件,然后汇总结果。 - 跨 provider 工作流:supervisor 使用一个 CLI(如 Kiro),worker 使用另一个 CLI(如 Claude Code),也可以按 profile 指定 provider。 - 定时 Agent 任务:通过 Flows 设置类似 cron 的触发器,例如「每天早上 9 点」运行。 - CI 中的无头 Agent 执行:使用 cao launch --headless --async 无人值守地运行任务。 - 带 HITL 的多 Agent swarm:人可以 attach 到任意 tmux 会话,随时介入或调整方向。 - 由 Agent 管理 Agent:主 Agent 可以在自己的对话循环中使用 cao-ops-mcp 创建和监控 CAO 会话。 分层多 Agent 系统 CAO 实现的是分层多 Agent 系统:一个 supervisor Agent 把任务委派给专门的 worker Agent,而不是把所有事情都塞进同一个上下文。 !CAO architecture: supervisor agent delegating to worker agents in isolated tmux sessions via MCP 核心能力 - 分层 supervisor-worker 编排:supervisor 负责协调与分派,worker 专注自己的任务域。整体上下文得以保留,worker 的上下文也不会被污染。 - 通过 tmux 隔离会话:每个 Agent 都运行在自己的 tmux 会话中。上下文清晰隔离,保留真实 PTY 访问能力,人也可以随时 tmux attach 进去调整。 - 基于 MCP 的编排原语:handoff(同步,等待完成)、assign(异步,fire-and-forget)和 send_message(Agent 间 inbox 投递)。Hermes worker 还会使用 answer_user_prompt 处理结构化审批和澄清提示;其他 provider 在实现等价 prompt 状态前,可能回退为普通文本投递。详见 Multi-Agent Orchestration。 - 跨 provider 混用:同一个会话里可以让 worker 运行在不同 CLI 上。可以通过 Agent frontmatter 把某个 profile 固定到指定 provider。详见 Cross-Provider Orchestration。 - 定时 flows:用类似 cron 的方式调度无人值守的 Agent 运行。详见 docs/flows.md。 - Web UI、CLI 和 MCP 三种控制面:可以从浏览器、cao session 命令,或 cao-ops-mcp server 管理会话。详见 docs/control-planes.md。 - 按 Agent 限制工具权限:通过 profile 中的 role 和 allowedTools 控制权限,并在可用时转换为各 provider 的原生限制。详见 docs/tool-restrictions.md。 - 持久化 Agent 记忆:Agent 可以通过 memory_store 和 memory_recall MCP 工具跨会话保存和召回知识。CAO 会在会话启动时自动注入相关记忆作为上下文。详见 docs/memory.md。 - 直接介入 worker:不同于传统的「sub-agent」功能,你可以 attach 到正在运行的 worker,并在任务中途介入。 - 保留完整 CLI 能力:Agent 保留原 CLI 的能力,包括 Claude Code sub-agents、Kiro CLI custom agents、provider 原生鉴权等。 - 用于 outbound events 的插件系统:可以把 Agent 间消息转发到 Discord、Slack、Telegram 或任意 webhook 目标。详见 Plugins。 项目结构和架构细节请参考 CODEBASE.md。 安装 环境要求 - curl 和 git:用于下载安装脚本和克隆仓库。 - Python 3.11 或更高版本:详见 pyproject.toml。 - tmux 3.3+:用于 Agent 会话隔离。 - uv:快速的 Python 包安装器和虚拟环境管理器。 1. 安装 Python 3.11+ bash macOS (Homebrew) brew install [email protected] Ubuntu/Debian sudo apt update && sudo apt install python3.12 python3.12-venv
Top issues
#1350[Proposal] A deterministic, gated PR pipeline: trustworthy CI first, then required gates, with AI review as an advisory layer25 comments · 2026-11-16#801[Feat] Cost-efficient CAO sessions: measure first, then run lean agents11 comments · 2026-09-19#745[Feat] Centralize cao-server in one Kubernetes Deployment and Service10 comments · 2026-09-07#583[Roadmap] Conversational deterministic workflows and portable goal loops7 comments · 2026-08-10#405[Bug] claude_code: AskUserQuestion/plan dialogs classify as idle/completed — inbox delivery auto-answers user decision dialogs7 comments · 2026-07-10#649[Feat] Expose CAO as an ACP server so external hosts can drive a session over a typed protocol6 comments · 2026-08-21#845[Feat] Multi-agent robotics examples using CAO CLI agents5 comments · 2026-09-30#777[Vision] CAO 3.0 — run anywhere, shared by your whole organisation as a multi-tenant SaaS5 comments · 2026-09-13
Discussions
#846Research inquiry: CAO’s protected PyPI publish job0 comments · 2026-09-30#577Proposal: Add Grok CLI as a first-class provider1 comments · 2026-08-09#563Podiom — a durable single-agent/session layer alongside CAO's supervisor-worker model1 comments · 2026-08-06#373How to use code_supervisor properly?1 comments · 2026-07-02#93What is the intended use case for Handoff?3 comments · 2026-03-02#46Message delivery delay in Assign pattern when Supervisor receives multiple async callbacks1 comments · 2026-01-10#34Get flow results1 comments · 2025-12-14
Latest release
v2.5.5 v2.5.5 2026-11-24Requires Python 3.11 or later (1119). On Python 3.10, stay on 2.5.4. This release was re-tagged on d094b4ba (1467). The first v2.5.5 tag pointed at e2f2978c, whose version files still said 2.5.4, so it could not publish (1466). Added after the first v2.5.5 tag fix: re-attach output pipelines and seed status on server restart (1438) in https://github.com/awslabs/cli-agent-orchestrator/pull/1444 fix(agent-plugins): return None from containment helpers on NUL-byte and non-str paths in https://github.com/awslabs/cli-agent-orchestrator/pull/1452 feat(skills): rename the cao-plugin skill to ca