Agent Squad Python Guide
2FastLabs/agent-squad
Map of the agent-squad Python framework for async multi-agent orchestration: which agent, classifier, storage and tool provider to pick, and the pitfalls to avoid.
Create a new CAO (CLI Agent Orchestrator) plugin. An agent skill from awslabs/cli-agent-orchestrator.
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install awslabs/cli-agent-orchestrator cao-plugin --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cao-plugin .claude/skills/cao-plugin && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cao-plugin" agent skill from https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-plugin into .claude/skills/cao-plugin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cao-plugin", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-pluginType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install awslabs/cli-agent-orchestrator cao-plugin --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cao-plugin .agents/skills/cao-plugin && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cao-plugin" agent skill from https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-plugin into .agents/skills/cao-plugin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cao-plugin", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install awslabs/cli-agent-orchestrator cao-plugin --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cao-plugin .cursor/skills/cao-plugin && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cao-plugin" agent skill from https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-plugin into .cursor/skills/cao-plugin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cao-plugin", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/awslabs/cli-agent-orchestrator.git --path skills/cao-plugin--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install awslabs/cli-agent-orchestrator cao-plugin --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cao-plugin .gemini/skills/cao-plugin && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cao-plugin" agent skill from https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-plugin into .gemini/skills/cao-plugin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cao-plugin", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install awslabs/cli-agent-orchestrator cao-pluginInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cao-plugin .github/skills/cao-plugin && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cao-plugin" agent skill from https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-plugin into .github/skills/cao-plugin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cao-plugin", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install awslabs/cli-agent-orchestrator cao-plugin --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cao-plugin .opencode/skills/cao-plugin && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cao-plugin" agent skill from https://github.com/awslabs/cli-agent-orchestrator/tree/main/skills/cao-plugin into .opencode/skills/cao-plugin/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cao-plugin", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cao-pluginCreate a new CAO (CLI Agent Orchestrator) plugin. An agent skill from awslabs/cli-agent-orchestrator.
Cao Plugin is an agent skill from awslabs/cli-agent-orchestrator, published by the product's own GitHub organization. Create a new CAO (CLI Agent Orchestrator) plugin. Use this skill whenever the user wants to add a plugin that reacts to CAO lifecycle or messaging events, scaffold a plugin package, understand plugin requirements, or integrate an external system (Discord, Slack, dashboards, logging, metrics) with CAO. Also use when the user asks what plugin events are available, how plugin discovery works, or how to install a plugin into a CAO environment.
Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/hook-events.md` and `references/plugin-template.md`).
It sits in Agent Workflows, covering Multi-agent orchestration. It works with Discord, Slack, Python and Model Context Protocol. The repository describes itself as: Multi-agent orchestration for AI coding CLIs — Claude Code, Kiro, Codex, and more, coordinated in isolated tmux sessions. The licence is Apache-2.0.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit b29f40a. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
uvpythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cao Plugin loads about 3.1k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 114 tokens; SKILL.md has 1,255 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
- **`.env` files** — use `python-dotenv` (`load_dotenv(find_dotenv(usecwd=True))`) inside `setup()`. Process-level env v- [ ] If using `.env`, is it in the directory where `cao-server` was launched (or a parent)?eference plugin (webhook forwarder with `.env` config, HTTP client lifecycle, unit tests).Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from awslabs/cli-agent-orchestrator at commit b29f40a, republished under its Apache-2.0 licence (© awslabs). 1,255 words, ~3,052 tokens.
.claude/skills/cao-plugin/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Guide for creating a new CAO plugin. A "plugin" is a Python package installed alongside CAO that subscribes to CAO lifecycle and messaging events via typed async hooks.
A CAO plugin is a standalone Python package that:
CaoPlugin from cli_agent_orchestrator.plugins@hook("<event_type>") decoratorscao.plugins Python entry-point group at cao-server startupTypical uses: forwarding inter-agent messages to chat apps, logging/observability, external dashboards, metrics export, alerting on session or terminal lifecycle.
Gather this information:
references/hook-events.md for the full catalog.setup() / teardown().setup(), optionally via python-dotenv.These are the non-negotiable contracts a plugin must satisfy to be loaded and dispatched to. Verify each one before calling your plugin complete.
Minimum viable layout:
my-cao-plugin/
├── pyproject.toml # Build config + entry-point declaration
├── my_cao_plugin/
│ ├── __init__.py # Can be empty
│ └── plugin.py # Contains the CaoPlugin subclass
├── tests/ # Optional but strongly recommended
│ └── test_plugin.py
├── env.template # Optional; only if the plugin reads env vars
└── README.md # Optional; install + config instructions for usersSee examples/plugins/cao-discord/ in this repo for a complete reference implementation.
CaoPlugin from cli_agent_orchestrator.plugins.cls(). Do NOT define __init__ with required parameters.async def setup(self) -> None — called once at cao-server startup after instantiation.async def teardown(self) -> None — called once at cao-server shutdown.@hook decorator.A raising setup() disables that plugin for the lifetime of the server process (warning logged, other plugins continue to load). A raising teardown() is logged and does not stop other plugins from tearing down.
A hook method must:
async def — sync hooks are not supported in v1.@hook("<event_type>") using the exact event-type string from references/hook-events.md.None.inspect.getmembers on the instance).Multiple hook methods on the same plugin may subscribe to the same event type — each is dispatched independently. Execution order across hooks is not guaranteed.
Exceptions raised inside a hook are caught by the registry and logged as warnings. They do not affect CAO's primary operation and they do not stop other hooks for the same event from running.
Declare the plugin class under the cao.plugins entry-point group in pyproject.toml:
[project.entry-points."cao.plugins"]
my_plugin = "my_cao_plugin.plugin:MyPlugin"my_plugin) is the plugin name used in CAO's startup log (Loaded CAO plugin: my_plugin). It has no other runtime effect.CaoPlugin. Entry points whose target is not a CaoPlugin subclass are skipped with a warning.cao.plugins if it ships multiple plugin classes.No CAO-side configuration is required to enable a plugin — installation plus entry-point declaration is sufficient.
hatchling as the build backend to match CAO's toolchain.>=3.10.cli-agent-orchestrator as a runtime dependency so CaoPlugin, hook, and the event dataclasses are importable.httpx, aiohttp, python-dotenv) your plugin uses.Minimal pyproject.toml:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-cao-plugin"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"cli-agent-orchestrator",
# ... your plugin's deps
]
[project.entry-points."cao.plugins"]
my_plugin = "my_cao_plugin.plugin:MyPlugin"CAO does not inject configuration into plugins in v1. Options:
setup() with os.environ.get(...). Raise RuntimeError with a clear message if a required var is missing so the startup log points the user at the misconfiguration..env files — use python-dotenv (load_dotenv(find_dotenv(usecwd=True))) inside setup(). Process-level env vars override .env values, which is the expected precedence.setup(); you own the format.Ship an env.template alongside the plugin if it reads env vars, documenting every variable, whether it's required, and its default.
setup() is awaited exactly once, after the plugin class is instantiated at server startup.teardown() is awaited exactly once at server shutdown, only for plugins whose setup() succeeded.cao-server.post_create_terminal fires after the terminal is persisted, not before).pre_* hooks today — you cannot veto or mutate an operation from a plugin.Create the layout from §1. Populate pyproject.toml per §5. references/plugin-template.md has a copy-paste skeleton.
In my_cao_plugin/plugin.py:
from cli_agent_orchestrator.plugins import CaoPlugin, PostSendMessageEvent, hook
class MyPlugin(CaoPlugin):
async def setup(self) -> None:
# Read config, open clients. Raise on misconfiguration.
...
async def teardown(self) -> None:
# Close clients, flush buffers. Safe to call after failed setup.
...
@hook("post_send_message")
async def on_message(self, event: PostSendMessageEvent) -> None:
...Keep teardown() robust to partial setup() failures — guard any resource access with hasattr or an initialized flag. See examples/plugins/cao-discord/cao_discord/plugin.py for the pattern.
Consult references/hook-events.md for the current event catalog, each event type's string, the matching dataclass, and available fields. Import event dataclasses from cli_agent_orchestrator.plugins.
Add the [project.entry-points."cao.plugins"] section to pyproject.toml per §4.
The plugin must be importable by the same Python environment that runs cao-server.
# Editable install into the CAO dev virtual environment
uv pip install -e ./my-cao-plugin
# Or, if CAO was installed as a tool:
uv tool install --reinstall cli-agent-orchestrator \
--with-editable ./my-cao-pluginRestart cao-server and check the startup log for one of:
Loaded CAO plugin: my_plugin — success.Failed to load plugin 'my_plugin' — setup() raised; check the traceback logged alongside.Plugin entry point 'my_plugin' is not a CaoPlugin subclass, skipping — the entry-point target is wrong.No CAO plugins registered (cao.plugins entry point group is empty) — the entry point is not declared, or the package was not installed into the same environment as CAO.Unit tests for a plugin are straightforward because event dataclasses are zero-arg constructible:
import pytest
from cli_agent_orchestrator.plugins import PostSendMessageEvent
from my_cao_plugin.plugin import MyPlugin
@pytest.mark.asyncio
async def test_on_message_dispatches(monkeypatch):
plugin = MyPlugin()
await plugin.setup()
await plugin.on_message(
PostSendMessageEvent(
sender="a",
receiver="b",
message="hi",
orchestration_type="send_message",
)
)
await plugin.teardown()For plugins that make HTTP calls, use httpx.MockTransport (see examples/plugins/cao-discord/tests/test_plugin.py) rather than real network calls. Assert side-effects (requests sent, logs emitted) — do not assert CAO-side dispatch wiring, which is covered by CAO's own registry tests.
Reload the plugin after code changes:
# Stop cao-server, then reinstall if dependencies changed:
uv pip install -e ./my-cao-plugin --force-reinstall --no-deps
# Then restart cao-server.Troubleshooting checklist if Loaded CAO plugin: does not appear:
cao-server? (uv pip list | grep my-cao-plugin)pyproject.toml contain [project.entry-points."cao.plugins"]?CaoPlugin subclass? (python -c "from my_cao_plugin.plugin import MyPlugin; print(MyPlugin.__mro__)")setup() raise? Check cao-server logs for a Failed to load plugin warning..env, is it in the directory where cao-server was launched (or a parent)?When your plugin is complete, verify:
pyproject.toml — hatchling build backend, cli-agent-orchestrator dependency, cao.plugins entry pointmy_cao_plugin/__init__.py — present (can be empty)my_cao_plugin/plugin.py — CaoPlugin subclass with zero-arg construction and at least one @hook-decorated async methodenv.template — if any env vars are readtests/test_plugin.py — setup/teardown happy and failure paths; at least one test per hook methodREADME.md — install commands, config vars, troubleshootingLoaded CAO plugin: in cao-server startup logsreferences/hook-events.md — Full catalog of supported event types, their string identifiers, and event dataclass fields.references/plugin-template.md — Annotated minimal plugin skeleton.examples/plugins/cao-discord/ — Complete reference plugin (webhook forwarder with .env config, HTTP client lifecycle, unit tests).docs/feat-plugin-hooks-design.md — Full design document for the plugin system.© awslabs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in skills/cao-plugin of awslabs/cli-agent-orchestrator.
Open the folder on GitHubat commit b29f40a
Cao Plugin next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cao Plugin this skillawslabs/cli-agent-orchestrator | 1.4k | — | ~3.1k | Automated safety check: Notes | Apache-2.0 | |
| Agent Squad Python Guide2FastLabs/agent-squad | 7.8k | — | ~4.7k | Automated safety check: Pass | Apache-2.0 | |
| Soul Interviewldbumble/taskuary | 137 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Frontmcp Channelsagentfront/frontmcp | 146 | — | ~3.7k | Automated safety check: Pass | Apache-2.0 | |
| Taskuary Setupldbumble/taskuary | 137 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Ops Inboxdavepoon/buildwithclaude | 3.6k | — | ~7.2k | Automated safety check: Notes | MIT |
2FastLabs/agent-squad
Map of the agent-squad Python framework for async multi-agent orchestration: which agent, classifier, storage and tool provider to pick, and the pitfalls to avoid.
ldbumble/taskuary
Conduct a seven-question adaptive interview and turn the answers into Taskuary's SOUL.md.
agentfront/frontmcp
A skill your agent uses when pushing real-time notifications or events into Claude Code (or another MCP client) sessions, or building two-way chat bridges.
ldbumble/taskuary
Walk the owner through setting Taskuary up - the AI brain, where work arrives, the operator documents, reports and workflows - by reading the install's real state and using the screens that already…
davepoon/buildwithclaude
Full inbox management across all channels — WhatsApp (wacli), Email (Gmail MCP), Slack (MCP), Telegram (user-auth MCP), Discord (webhook + REST read), Notion (MCP — comments, mentions, assigned…
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
awslabs/cli-agent-orchestrator
Enable, operate, and extend CAO's MCP Apps surface — the host-rendered fleet dashboard visible inside MCP App hosts (Claude Desktop, ChatGPT, VS Code Copilot, Goose, Postman).
awslabs/cli-agent-orchestrator
Author live dashboard UI from an agent via the emitui MCP tool.
awslabs/cli-agent-orchestrator
Load the official MCP Apps builder skills (create-mcp-app, migrate-oai-app, add-app-to-server, convert-web-app) from github.com/modelcontextprotocol/ext-apps.
awslabs/cli-agent-orchestrator
Create a new CLI agent provider for CAO (CLI Agent Orchestrator).
awslabs/cli-agent-orchestrator
Find and select the best installed CAO agent profile for a task before delegating with assign or handoff.
awslabs/cli-agent-orchestrator
Contribute changes to the CAO (CLI Agent Orchestrator) codebase — the local dev loop, the CI gate map, and the pre-PR checklist.
Works with
Categories
Create a new CAO (CLI Agent Orchestrator) plugin. An agent skill from awslabs/cli-agent-orchestrator. Cao Plugin is an agent skill from awslabs/cli-agent-orchestrator, published by the product's own GitHub organization. Create a new CAO (CLI Agent Orchestrator) plugin.
Cao Plugin fits situations like: the user wants to add a plugin that reacts to CAO lifecycle; messaging events; scaffold a plugin package; understand plugin requirements.
Run `npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a claude-code`. Or copy the skill folder (skills/cao-plugin in awslabs/cli-agent-orchestrator) into .claude/skills/cao-plugin in your project. Claude Code loads it when a task matches its description.
Run `npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a codex`. Or copy the skill folder (skills/cao-plugin in awslabs/cli-agent-orchestrator) into .agents/skills/cao-plugin in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cao-plugin, .gemini/skills/cao-plugin, .github/skills/cao-plugin and .opencode/skills/cao-plugin in your project.
Going by SKILL.md and its folder, Cao Plugin needs the command-line tools its instructions call (uv and python). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Cao Plugin is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Cao Plugin: Agent Squad Python Guide (2FastLabs/agent-squad, 7.8k stars), Soul Interview (ldbumble/taskuary, 137 stars), Frontmcp Channels (agentfront/frontmcp, 146 stars) and Taskuary Setup (ldbumble/taskuary, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
awslabs (a GitHub organization, an official publisher) maintains it in awslabs/cli-agent-orchestrator, which has 1,396 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.
Source: awslabs/cli-agent-orchestrator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.