Acp Router logo

Acp Router

OrganizationPopular
openclaw
acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

Overview

Publisheropenclaw
Repositoryopenclaw
Skill nameacp-router
Stars
391K
Forks
82.2K
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by openclaw on GitHub. Read the source before you install it.

Installation

Install the Acp Router AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openclaw/openclaw/tree/main/extensions/acpx/skills/acp-router
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openclaw/openclaw.git /tmp/openclaw
mkdir -p .claude/skills
cp -r /tmp/openclaw/extensions/acpx/skills/acp-router .claude/skills/acp-router
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Acp Router in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Acp Router on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Acp Router is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ACP Harness Router

When user intent is "run this in Claude Code/Cursor/Copilot/OpenClaw/OpenCode/Gemini/Qwen/Kiro/Kimi/iFlow/Droid/Kilocode (ACP harness)", do not use subagent runtime or PTY scraping. Route through ACP-aware flows.

Codex is special: plain chat/conversation binding and control should use the native Codex app-server plugin (/codex bind, /codex threads, /codex resume) instead of the default ACP path. Use ACP for Codex only when the user explicitly names ACP//acp/acpx, or when spawning background child sessions through sessions_spawn where a native Codex runtime spawn is not available yet.

Intent detection

Trigger this skill when the user asks OpenClaw to:

  • run something in Claude Code / Cursor / Copilot / OpenClaw / OpenCode / Gemini / Qwen / Kiro / Kimi / iFlow / Droid / Kilocode
  • run Codex explicitly through ACP, /acp, or acpx
  • continue existing harness work
  • relay instructions to an external coding harness
  • keep an external harness conversation in a thread-like conversation

Mandatory preflight for coding-agent thread requests:

  • Before creating any thread for ACP harness work, read this skill first in the same turn.
  • After reading, follow OpenClaw ACP runtime path below; do not use message(action="thread-create") for ACP harness thread spawn.

Mode selection

Choose one of these paths:

  1. OpenClaw ACP runtime path (default): use sessions_spawn / ACP runtime tools.
  2. Direct acpx path (telephone game): use acpx CLI through exec to drive the harness session directly.

Use direct acpx when one of these is true:

  • user explicitly asks for direct acpx driving
  • ACP runtime/plugin path is unavailable or unhealthy
  • the task is "just relay prompts to harness" and no OpenClaw ACP lifecycle features are needed

Do not use:

  • subagents runtime for harness control
  • /acp command delegation as a requirement for the user
  • PTY scraping of supported ACP harness CLIs when acpx is available

AgentId mapping

Use these defaults when user names a harness directly:

  • "openclaw" -> agentId: "openclaw"
  • "claude" or "claude code" -> agentId: "claude"
  • "codex" -> agentId: "codex" only for explicit ACP/acpx requests or background ACP runtime spawn
  • "copilot" or "github copilot" -> agentId: "copilot"
  • "cursor" or "cursor cli" -> agentId: "cursor"
  • "droid" or "factory droid" -> agentId: "droid"
  • "opencode" -> agentId: "opencode"
  • "gemini" or "gemini cli" -> agentId: "gemini"
  • "iflow" -> agentId: "iflow"
  • "kilocode" -> agentId: "kilocode"
  • "kimi" or "kimi cli" -> agentId: "kimi"
  • "kiro" or "kiro cli" -> agentId: "kiro"
  • "qwen" or "qwen code" -> agentId: "qwen"

These defaults match current acpx built-in aliases.

If policy rejects the chosen id, report the policy error clearly and ask for the allowed ACP agent id.

OpenClaw ACP runtime path

Required behavior:

  1. For ACP harness thread spawn requests, read this skill first in the same turn before calling tools.
  2. Use sessions_spawn with:
    • runtime: "acp"
    • thread: true
    • mode: "session" (unless user explicitly wants one-shot)
  3. For ACP harness thread creation, do not use message with action=thread-create; sessions_spawn is the only thread-create path.
  4. Put requested work in task so the ACP session gets it immediately.
  5. Set agentId explicitly unless ACP default agent is known.
  6. Do not ask user to run slash commands or CLI when this path works directly.

Example:

User: "spawn a test codex ACP session in thread and tell it to say hi"

Call:

json
{
  "task": "Say hi.",
  "runtime": "acp",
  "agentId": "codex",
  "thread": true,
  "mode": "session"
}

Thread spawn recovery policy

When the user asks to start a coding harness in a thread, treat that as an ACP runtime request and try to satisfy it end-to-end.

Required behavior when ACP backend is unavailable:

  1. Do not immediately ask the user to pick an alternate path.
  2. First attempt automatic local repair:
    • ensure plugin-local pinned acpx is installed in the ACPX plugin package
    • verify ${ACPX_CMD} --version
  3. After reinstall/repair, restart the gateway and explicitly offer to run that restart for the user.
  4. Retry ACP thread spawn once after repair.
  5. Only if repair+retry fails, report the concrete error and then offer fallback options.

When offering fallback, keep ACP first:

  • Option 1: retry ACP spawn after showing exact failing step
  • Option 2: direct acpx telephone-game flow

Do not default to subagent runtime for these requests.

ACPX install and version policy (direct acpx path)

For this repo, direct acpx calls must follow the same pinned policy as the @openclaw/acpx extension package.

  1. Prefer plugin-local binary, not global PATH:
    • ${ACPX_PLUGIN_ROOT}/node_modules/.bin/acpx
  2. Resolve pinned version from extension dependency:
    • node -e "console.log(require(process.env.ACPX_PLUGIN_ROOT + '/package.json').dependencies.acpx)"
  3. If binary is missing or version mismatched, install plugin-local pinned version:
    • cd "$ACPX_PLUGIN_ROOT" && npm install --omit=dev --no-save acpx@<pinnedVersion>
  4. Verify before use:
    • ${ACPX_PLUGIN_ROOT}/node_modules/.bin/acpx --version
  5. If install/repair changed ACPX artifacts, restart the gateway and offer to run the restart.
  6. Do not run npm install -g acpx unless the user explicitly asks for global install.

Set and reuse:

bash
ACPX_PLUGIN_ROOT="<bundled-acpx-plugin-root>"
ACPX_CMD="$ACPX_PLUGIN_ROOT/node_modules/.bin/acpx"

Direct acpx path ("telephone game")

Use this path to drive harness sessions without /acp or subagent runtime.

Rules

  1. Use exec commands that call ${ACPX_CMD}.
  2. Reuse a stable session name per conversation so follow-up prompts stay in the same harness context.
  3. Prefer --format quiet for clean assistant text to relay back to user.
  4. Use exec (one-shot) only when the user wants one-shot behavior.
  5. Keep working directory explicit (--cwd) when task scope depends on repo context.

Session naming

Use a deterministic name, for example:

  • oc-<harness>-<conversationId>

Where conversationId is thread id when available, otherwise channel/conversation id.

Command templates

Persistent session (create if missing, then prompt):

bash
${ACPX_CMD} codex sessions show oc-codex-<conversationId> \
  || ${ACPX_CMD} codex sessions new --name oc-codex-<conversationId>

${ACPX_CMD} codex -s oc-codex-<conversationId> --cwd <workspacePath> --format quiet "<prompt>"

One-shot:

bash
${ACPX_CMD} codex exec --cwd <workspacePath> --format quiet "<prompt>"

Cancel in-flight turn:

bash
${ACPX_CMD} codex cancel -s oc-codex-<conversationId>

Close session:

bash
${ACPX_CMD} codex sessions close oc-codex-<conversationId>

Harness aliases in acpx

  • claude
  • codex
  • copilot
  • cursor
  • droid
  • gemini
  • iflow
  • kilocode
  • kimi
  • kiro
  • openclaw
  • opencode
  • qwen

Built-in adapter commands in acpx

Defaults are:

  • openclaw -> openclaw acp
  • claude -> bundled @agentclientprotocol/claude-agent-acp@0.79.0
  • codex -> bundled @agentclientprotocol/codex-acp@1.12.0 through OpenClaw's isolated CODEX_HOME wrapper
  • copilot -> copilot --acp --stdio
  • cursor -> cursor-agent acp
  • droid -> droid exec --output-format acp
  • gemini -> gemini --acp
  • iflow -> iflow --experimental-acp
  • kilocode -> npx -y @kilocode/cli acp
  • kimi -> kimi acp
  • kiro -> kiro-cli acp
  • opencode -> npx -y opencode-ai acp
  • qwen -> qwen --acp

If ~/.acpx/config.json overrides agents, those overrides replace defaults. If your local Cursor install still exposes ACP as agent acp, set that as the cursor agent override explicitly.

Failure handling

  • acpx: command not found:
    • for thread-spawn ACP requests, install plugin-local pinned acpx in the ACPX plugin package immediately
    • restart gateway after install and offer to run the restart automatically
    • then retry once
    • do not ask for install permission first unless policy explicitly requires it
    • do not install global acpx unless explicitly requested
  • adapter command missing (for example claude-agent-acp not found):
    • for thread-spawn ACP requests, first restore built-in defaults by removing broken ~/.acpx/config.json agent overrides
    • then retry once before offering fallback
    • if user wants binary-based overrides, install exactly the configured adapter binary
  • NO_SESSION: run ${ACPX_CMD} <agent> sessions new --name <sessionName> then retry prompt.
  • queue busy: either wait for completion (default) or use --no-wait when async behavior is explicitly desired.

Output relay

When relaying to user, return the final assistant text output from acpx command result. Avoid relaying raw local tool noise unless user asked for verbose logs.

Frequently asked questions

What does the Acp Router AI skill do?

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

Why use Acp Router on TypingMind?

Because you install it once and use it with any model. Acp Router is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Acp Router in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openclaw/openclaw/tree/main/extensions/acpx/skills/acp-router. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Acp Router?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Acp Router?

As many as you like. As long as a model supports skills, you can use Acp Router with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Acp Router AI skill free?

It is published on GitHub by openclaw. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇