agui-author
Author live dashboard UI from an agent via the `emit_ui` MCP tool. Emit
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
$ npx -y skills add awslabs/cli-agent-orchestrator --skill cao-provider --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cao-providerContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: cao-provider description: 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.
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.
A provider translates between CAO's unified interface and a specific CLI tool's terminal output. It needs to:
1. **Launch** the CLI tool in a tmux window with the right flags 2. **Detect status** by parsing terminal output (IDLE, PROCESSING, COMPLETED, ERROR, WAITING_USER_ANSWER) 3. **Extract responses** from the terminal buffer after the agent finishes 4. **Clean up** when the terminal is deleted
Gather this information about the target CLI:
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.
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:
**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 ERROR
**Message 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.
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
)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",
}There are three approaches depending on the CLI's capabilities. Read `docs/tool-restrictions.md` for full context.
**Hard enforcement via CLI flags** (e.g., Claude Code, Copilot CLI): Add the provider to `TOOL_MAPPING` in `src/cli_agent_orchestrator/utils/tool_mapping.py` to translate CAO vocabulary to native tool names.
**Hard enforcement via agent JSON** (e.g., Kiro CLI): The CLI reads `allowedTools` from the agent profile. No `TOOL_MAPPING` entry needed — CAO passes vocabulary directly.
**Soft enforcement via system prompt** (e.g., Kimi CLI, Codex): No native restriction mechanism. CAO prepends restriction instructions to the system prompt. No `TOOL_MAPPING` entry needed.
Only add a `TOOL_MAPPING` entry if the CLI has its own native tool names that differ from CAO's vocabulary.
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).
File: `test/providers/test_new_cli_unit.py`
Read `references/test-guide.md` for the full test structure. Minimum coverage:
1. **Initialization** — successful start, shell timeout, CLI timeout, agent profiles 2. **Status detection** — IDLE, PROCESSING, COMPLETED, WAITING_USER_ANSWER, ERROR, empty output 3. **Message extraction** — successful extraction, edge cases, error handling 4. **Regex patterns** — verify each pattern matches expected terminal output 5. **Edge cases** — ANSI codes, Unicode, long outputs, multiple responses
Use `unittest.mock.patch` to mock `tmux_client`. Create f
CLI Agent Orchestrator (CAO) coordinates multiple AI coding CLIs so a supervisor can delegate work to specialist agents in parallel or sequence. 📚 Documentation — guides, reference, and two interactive courses.
Repo: awslabs/cli-agent-orchestrator
Author live dashboard UI from an agent via the `emit_ui` MCP tool. Emit
Find and select the best installed CAO agent profile for a task before
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,…
Store, recall, and forget durable facts with CAO memory — user preferences,
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,…