cao-provider
Skill1.4k starsChanged 2 months agoApache-2.0View on GitHub
Create a new CLI agent provider for CAO (CLI Agent Orchestrator). Use this skill whenever the user wants to add support for a new CLI-based AI agent (e.g., a new coding assistant CLI), integrate a new provider, or scaffold a provider implementation. Also use when the user asks about the provider architecture, what files to modify, or how providers work in CAO.
Trending
Quiet since October.about the whole repository
Who's talking about awslabs/cli-agent-orchestrator
- theplenkov-forks/cli-agent-orchestrator“Add Devin CLI provider”GitHub · Jun 28, 2026 · 4 reactions
- theplenkov-forks/cli-agent-orchestrator“Add Devin CLI provider”GitHub · Jun 23, 2026 · 4 reactions
- pavelkrotkov/aipro“fix(v3): persist CAO attribution for each accepted turn”GitHub · Sep 19, 2026 · 1 reactions
- theplenkov-forks/cli-agent-orchestrator“[feat] Official devcontainer feature for CAO”GitHub · Apr 3, 2026 · 1 reactions
- theplenkov-forks/cli-agent-orchestrator“[feat] Non-interactive / headless mode for containerized deployments”GitHub · Apr 3, 2026 · 1 reactions
The biggest 5 of 20 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 20
Talked about on GitHub (20 times).
On GitHub · 20
- Jun 28, 2026Add Devin CLI provider — theplenkov-forks/cli-agent-orchestrator4 reactions · 31 comments
- Jun 23, 2026Add Devin CLI provider — theplenkov-forks/cli-agent-orchestrator4 reactions · 30 comments
- Sep 19, 2026fix(v3): persist CAO attribution for each accepted turn — pavelkrotkov/aipro1 reaction · 1 comment
- Apr 3, 2026[feat] Official devcontainer feature for CAO — theplenkov-forks/cli-agent-orchestrator1 reaction
- Apr 3, 2026[feat] Non-interactive / headless mode for containerized deployments — theplenkov-forks/cli-agent-orchestrator1 reaction
15 more on GitHub
- Apr 3, 2026[feat] Make CORS origins configurable — theplenkov-forks/cli-agent-orchestrator1 reaction
- Apr 3, 2026[bug] tmux PTY attach inherits TERM=dumb in container environments — theplenkov-forks/cli-agent-orchestrator1 reaction
- Apr 3, 2026[bug] WebSocket PTY rejects connections from Docker bridge IPs — theplenkov-forks/cli-agent-orchestrator1 reaction
- Apr 3, 2026[feat] Add Devin CLI provider — theplenkov-forks/cli-agent-orchestrator1 reaction · 1 comment
- Apr 3, 2026[feat] Plugin/provider extension API — register providers without patching source — theplenkov-forks/cli-agent-orchestrator1 reaction
- Oct 4, 2026agent-plugins.github.awslabs.cli-agent-orchestrator: init at 2.5.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.awslabs.cli-agent-orchestrator: v2.5.1 → refs/tags/v2.5.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026Code review of a python segfault fix caused "cybersecurity prevention" — openai/codex0 reactions · 1 comment
- Sep 25, 2026agent-skills.github.awslabs.cli-agent-orchestrator: init at 2.5.1 — sudosubin/agents.nix0 reactions
- Sep 18, 2026RFC: modernize Passdown orchestration for ACP and cross-provider agents — vunm-io/passdown0 reactions · 8 comments
- Sep 10, 2026Add September 10 verified AI CLI discoveries — hasnocool/AI-CLI-Catalog0 reactions · 2 comments
- Jul 20, 2026feat: add CLI Agent Orchestrator (CAO) integration — ag-ui-protocol/ag-ui0 reactions · 8 comments
- Jul 20, 2026feat: add CLI Agent Orchestrator (CAO) integration — plauzy/ag-ui0 reactions · 2 comments
- Jul 20, 2026fix(cao-integration): canonical awslabs link + recurrence guard (P0-3, F-SL4) — plauzy/ag-ui0 reactions · 1 comment
- Apr 3, 2026[feat] Plugin/provider extension API — register providers without patching source — theplenkov-forks/cli-agent-orchestrator0 reactions · 1 comment
In this repository52 other files it gives its agents.
- cao-pluginSkill
- cao-providerSkill
- cao-agent-routingSkill
- cao-session-managementSkill
- cao-supervisor-protocolsSkill
- cao-worker-protocolsSkill
- aidlc-portfolioSkill
- agui-authorSkill
- cao-agent-routingSkill
- cao-contributingSkill
- cao-learningSkill
- cao-mcp-appsSkill
- cao-memorySkill
- cao-pluginSkill
- cao-providerSkill
- cao-session-livenessSkill
- cao-session-managementSkill
- cao-supervisor-protocolsSkill
- cao-worker-protocolsSkill
- cao-workflowSkill
- mcp-apps-builderSkill
- agui-authorSkill
- cao-agent-routingSkill
- cao-contributingSkill
- cao-learningSkill
- cao-mcp-appsSkill
- cao-memorySkill
- cao-pluginSkill
- cao-session-livenessSkill
- cao-session-managementSkill
- cao-supervisor-protocolsSkill
- cao-worker-protocolsSkill
- cao-workflowSkill
- mcp-apps-builderSkill
- migrate-agent-pluginSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- alphaSkill
- escaped-skillSkill
- alphaSkill
- alphaSkill
- betaSkill
- not-the-folder-nameSkill
- alphaSkill
- linkedSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Clean up: when the terminal is deleted
- Very specific: line 51
Read references/provider-template.md for the full annotated template.
- Distinctive: line 77
Add the import and elif branch:
- Distinctive: line 93
If the provider executes code or accesses the filesystem, add it:
- Very specific: line 114
Only add a TOOL_MAPPING entry if the CLI has its own native tool names that differ from CAO's vocabulary.
- Very specific: line 124
Read references/test-guide.md for the full test structure.
- Very specific: line 132
Use unittest.mock.patch to mock tmux_client.
- Very specific: line 136
Add test classes to existing e2e test files and a fixture in test/e2e/conftest.py.
- Distinctive: line 151
If any step fails, investigate:
- Very specific: line 161
Create docs/new-cli.md with prerequisites, launch examples, agent profile format, known limitations, and troubleshooting.
- Distinctive: line 165
When your provider is complete, verify you've touched all these files:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CAO Provider Creator
Guide for creating a new CLI agent provider for CLI Agent Orchestrator. A "provider" is an adapter that lets CAO interact with a specific CLI-based AI agent through tmux.
What You're Building
A provider translates between CAO's unified interface and a specific CLI tool's terminal output. It needs to:
- Launch the CLI tool in a tmux window with the right flags
- Detect status by parsing terminal output (IDLE, PROCESSING, COMPLETED, ERROR, WAITING_USER_ANSWER)
- Extract responses from the terminal buffer after the agent finishes
- Clean up when the terminal is deleted
Before You Start
Gather this information about the target CLI:
- What command launches it? (e.g.,
claude,kiro-cli chat,codex) - What does the idle prompt look like? (e.g.,
>,❯,ask a question) - What does the processing state look like? (e.g., spinner characters, "Thinking...")
- How are responses formatted? (e.g., preceded by
⏺, inside a box, plain text) - Does it support
--dangerously-skip-permissionsor similar flags? - Does it have a REPL mode or is it single-shot?
- How does it handle MCP servers? (CLI flags, config file, agent JSON)
- Does it use alt-screen (full-screen TUI) or scrollback (inline output)? This fundamentally changes status detection logic — see lesson #16
- What's the exit command? (
/exit,/quit, Ctrl+C)
Step-by-Step Implementation
Step 1: Add to ProviderType enum
File: src/cli_agent_orchestrator/models/provider.py
class ProviderType(str, Enum):
# ... existing providers ...
NEW_CLI = "new_cli"The value string is used everywhere — in API requests, database, config. Use snake_case.
Step 2: Create the provider class
File: src/cli_agent_orchestrator/providers/new_cli.py
Read references/provider-template.md for the full annotated template. The key sections:
Regex patterns — Define at module level, not inside methods. You need patterns for:
- ANSI code stripping (reuse
r"\x1b\[[0-9;]*m") - Idle prompt detection (what the prompt looks like when waiting for input)
- Processing detection (spinners, "Thinking...", progress indicators)
- Response markers (how agent responses start — e.g.,
⏺for Claude Code) - Permission/confirmation prompts (if the CLI asks Y/n questions)
Status detection priority — The order in get_status() matters. Read references/lessons-learnt.md for the critical "stale buffer" lesson. The recommended pattern:
1. Strip ANSI codes from terminal output
2. Check WAITING_USER_ANSWER first (permission prompts need immediate attention)
3. Check COMPLETED (response marker + idle prompt both present in recent lines)
4. Check IDLE (just idle prompt, no response marker)
5. Check PROCESSING (spinner/thinking indicator in recent lines only)
6. Default to ERRORMessage extraction — Find the last response boundary in the terminal output and extract everything between it and the next prompt. Always strip ANSI codes from the final extracted text.
Step 3: Register in ProviderManager
File: src/cli_agent_orchestrator/providers/manager.py
Add the import and elif branch:
from cli_agent_orchestrator.providers.new_cli import NewCliProvider
# In create_provider():
elif provider_type == ProviderType.NEW_CLI.value:
provider = NewCliProvider(
terminal_id, tmux_session, tmux_window, agent_profile, allowed_tools
)Step 4: Add to PROVIDERS_REQUIRING_WORKSPACE_ACCESS
File: src/cli_agent_orchestrator/cli/commands/launch.py
If the provider executes code or accesses the filesystem, add it:
PROVIDERS_REQUIRING_WORKSPACE_ACCESS = {
# ... existing ...
"new_cli",
}Step 5: Tool restriction enforcement
Two separate questions, answered in two places. Read docs/tool-restrictions.md for full context.
How CAO delivers the policy (one of three mechanisms):
- CLI flags (e.g., Claude Code
--disallowedTools, Copilot CLI--deny-tool, Grok--allow/--deny): add the provider toTOOL_MAPPINGinsrc/cli_agent_orchestrator/utils/tool_mapping.pyto translate CAO vocabulary to native tool names. - Agent file (e.g., Kiro CLI, OpenCode CLI): CAO writes
allowedToolsinto the agent file at install time in its own vocabulary or the CLI's permission schema. NoTOOL_MAPPINGentry needed. - System prompt (e.g., Kimi CLI, Codex): CAO prepends restriction instructions to the system prompt. No
TOOL_MAPPINGentry needed.
Whether the CLI then enforces it is a separate fact, recorded per provider in src/cli_agent_orchestrator/utils/enforcement.py (native, prompt, none) and shown to the operator on the launch gate. The mechanism does not decide it: OpenCode enforces its agent-file permission block (native, at install time), while Kiro is launched --trust-all-tools with tools: ["*"] and its allowedTools only suppresses approval prompts (none). Adding a provider means adding BOTH its delivery code and its PROVIDER_ENFORCEMENT row; test/test_enforcement_tables.py fails until the docs tables agree.
Only add a TOOL_MAPPING entry if the CLI has its own native tool names that differ from CAO's vocabulary.
Step 6: Handle startup prompts
Many CLIs show cascading prompts on first launch (workspace trust, permission bypass, terms acceptance). Handle these in initialize() or a dedicated _handle_startup_prompts() method using a polling loop — not a single check. See references/lessons-learnt.md #17 for the stabilization loop pattern. Also consider shell warm-up (#14) and TERM variable compatibility (#15).
Step 7: Write unit tests
File: test/providers/test_new_cli_unit.py
Read references/test-guide.md for the full test structure. Minimum coverage:
- Initialization — successful start, shell timeout, CLI timeout, agent profiles
- Status detection — IDLE, PROCESSING, COMPLETED, WAITING_USER_ANSWER, ERROR, empty output
- Message extraction — successful extraction, edge cases, error handling
- Regex patterns — verify each pattern matches expected terminal output
- Edge cases — ANSI codes, Unicode, long outputs, multiple responses
Use unittest.mock.patch to mock tmux_client. Create fixture files in test/providers/fixtures/.
Step 8: Write e2e tests
Add test classes to existing e2e test files and a fixture in test/e2e/conftest.py. Read references/test-guide.md for the full list of e2e test classes to add.
Step 9: Validate with assign + handoff orchestration
This is the canonical multi-agent e2e test. It exercises assign (non-blocking), handoff (blocking), send_message (async inbox), and status detection under concurrent load. Use the examples/assign/ profiles:
cao install examples/assign/data_analyst.md
cao install examples/assign/report_generator.md
cao install examples/assign/analysis_supervisor.md
cao launch --agents analysis_supervisor --provider new_cli --auto-approveTest flow: Supervisor assigns 3x data_analyst workers in parallel + handoff 1x report_generator (blocking) → analysts send_message results back to supervisor → supervisor combines template + results into final report.
If any step fails, investigate:
- Assign fails: Status detection not recognizing IDLE after analyst finishes, or per-directory lock conflict (see lesson #19)
- Handoff times out: COMPLETED not detected — check stale buffer (lesson #1) or alt-screen detection (lesson #16)
- send_message not delivered: Supervisor not reaching IDLE state, blocking message delivery — check startup prompt loop (lesson #17)
- Concurrent failures: Race conditions in shared config files (lesson #19) or TERM env issues (lesson #15)
See test/e2e/test_assign.py for the automated version. Reference: https://github.com/awslabs/cli-agent-orchestrator/tree/feature/kimi-cli/examples/assign
Step 10: Documentation
Create docs/new-cli.md with prerequisites, launch examples, agent profile format, known limitations, and troubleshooting. Update README.md provider table and CHANGELOG.md.
File Checklist
When your provider is complete, verify you've touched all these files:
src/cli_agent_orchestrator/models/provider.py— ProviderType enumsrc/cli_agent_orchestrator/providers/new_cli.py— Provider classsrc/cli_agent_orchestrator/providers/manager.py— Import + elif branchsrc/cli_agent_orchestrator/cli/commands/launch.py— PROVIDERS_REQUIRING_WORKSPACE_ACCESSsrc/cli_agent_orchestrator/utils/tool_mapping.py— TOOL_MAPPING (only if CLI needs translation)test/providers/test_new_cli_unit.py— Unit teststest/providers/fixtures/new_cli_*.txt— Test fixturestest/e2e/conftest.py— require_new_cli fixturetest/e2e/test_*.py— E2E test classesdocs/new-cli.md— Provider documentationREADME.md— Provider tableCHANGELOG.md— New provider entry
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

