Skip to content
Agentic Control Plane

Ways to set up ACP

ACP can sit in two places in your agent, and they see different things:

  • Interception is a hook or wrapper at the point where tools execute. It checks each tool call against your rules (allow / deny / ask) and writes the tool-call audit trail.
  • The proxy is a base-URL change at the point where model calls go out. It prices every call, shows prompt-cache economics, and meters spend per run.

Full coverage is both. Neither replaces the other: interception never sees token usage, and the proxy never sees what your code actually executes. Find your situation below. Each section ends with the coverage you’ll have and, if one of the two is missing, the step that adds it.

Jump to your stack:

Note to AI agents: this page is also served as raw markdown at /docs/setup.md. If you are setting up ACP on behalf of a user, run the commands for their harness below, then verify in the console that both planes report activity. If you have no signed-in human available (evaluating ACP autonomously, running a benchmark or starter), don’t stop at the login step. Self-onboard with POST /v1/sandbox-tenants per the agents quickstart. That gives you an ephemeral workspace and a scoped key in one call. When a human appears, hand them the nextSteps.claimPageUrl from the response, and one click makes the workspace permanently theirs.

I use Claude Code

One command:

macOS · Linux · WSL
curl -sf https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

This installs the hook (~/.acp/govern.mjs plus PreToolUse/PostToolUse entries). Every tool call is checked and audited. Every model turn is priced from the session transcript that Claude Code hands the hook. You don’t need a launcher or an env var, and a Max subscription works (costs shown at API-rate equivalents).

It also writes the optional claude-acp launcher, which routes model calls through the ACP proxy. That adds the second layer: policy on the model call itself and the declared tool surface.

Your coverage with plain claude: interception ✓ · cost ✓ (from the transcript) · proxy ✗. With claude-acp: interception ✓ · cost ✓ · proxy ✓.

Details: Claude Code integration.

I use Codex

The same installer detects Codex:

macOS · Linux · WSL
curl -sf https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

It confirms the hooks feature flag (on by default since Codex 0.145) and registers the PreToolUse/PostToolUse hooks with a .* matcher. On current builds that covers shell commands, apply_patch edits, and MCP tool calls. On older builds it covers shell only. It also wires the ACP MCP connector for the calls hooks can’t see. Hosted tools such as web search never fire Codex hooks, so read the coverage notes before relying on hooks alone. For hooks.json, the events, and the deny contract, see the Codex CLI hooks reference.

For the cost plane, the same install (when it connects a workspace) writes an ACP model provider into ~/.codex/config.toml and installs a codex-acp launcher. Start Codex with it instead of codex:

codex-acp

That one invocation runs with the ACP provider selected (codex -c model_provider=acp). Plain codex keeps whatever provider it had. Your workspace key is read from ~/.acp/credentials and passed through the environment, never written into config.toml.

This keeps the authentication mode already selected in Codex. ChatGPT sign-in stays on your subscription, and API-key sign-in stays on Platform API billing. ACP uses the separate x-acp-key only to identify your workspace, and never forwards that key to OpenAI. Workspace-managed API billing is available only as an explicit alternative, not a silent fallback.

To wire it by hand, or make it the default for plain codex, the provider block the installer writes is in the Codex cost-tracking reference. It must live in ~/.codex/config.toml, because provider keys are ignored in project-local .codex/config.toml.

Your coverage: interception ✓ (local tools via hooks: shell, apply_patch, MCP on current builds; hosted tools such as web search go through the MCP connector’s acp_check, see the coverage notes) · proxy ✓ when you launch with codex-acp. Plain codex: interception ✓ · proxy ✗.

Details: Codex integration.

I’m on Windows

Every curl … | bash line on this page assumes a POSIX shell. In PowerShell, use the native installer. It works with PowerShell 5.1 and 7, needs no modules, and requires Node.js 18+:

irm https://agenticcontrolplane.com/install.ps1 | iex

It covers Claude Code, Cursor and Codex, and writes the same things the shell installer does: the hook dispatcher at %USERPROFILE%\.acp\govern.mjs, hooks in each client’s config, the ACP MCP connector, and the claude-acp / codex-acp cost X-ray launchers in %USERPROFILE%\.acp\bin (added to your user PATH). Re-running it is safe. Hooks, config blocks and the PATH entry are replaced in place, never stacked.

WSL alternative. Every other harness (opencode, Qwen Code, Hermes, OpenClaw, Grok) and the fully on-device --local mode are POSIX-only for now. Inside WSL, ACP installs exactly as on Linux:

wsl bash -c "curl -sf https://agenticcontrolplane.com/install.sh | bash"

A WSL install covers the agents you run inside WSL. A PowerShell install covers the ones you run on Windows. If you use both, install in both. They write to different home directories and don’t conflict.

I run a Hermes agent

Four commands, native to Python:

pip install acp-hermes
hermes plugins enable acp
acp-hermes login
acp-hermes proxy-setup --verify

The plugin registers Hermes’s pre_tool_call and post_tool_call hooks, which cover every Hermes tool. proxy-setup reads Hermes’s own config, registers ACP as a provider pointed at the proxy, and keeps your current model. --verify sends one controlled completion to prove the wiring end to end. --undo reverses it.

Step two asks whether to let the plugin replace built-in tools. Answer no. ACP only registers hooks and never needs tool override. It also prints Takes effect on next session, so restart hermes before expecting rows. Enabling mid-session is the usual cause of “provisioned but no controlled calls.”

On a headless box (VPS, server, container), swap step three for acp-hermes login --device (0.2.4+). It prints a short code, you approve it at cloud.agenticcontrolplane.com/device from any browser, and the key lands directly on the machine. It works from raw curl too: POST /device/code, approve, then poll POST /device/token.

Your coverage: interception ✓ · proxy ✓. --verify has already confirmed it, not just configured it. If you stopped after login: interception ✓ · proxy ✗, so run acp-hermes proxy-setup --verify.

Details: Hermes integration.

I use the DeepSeek Harness

Two commands, native to dsh’s plugin system:

dsh plugin --profile <your-profile> add @agenticcontrolplane/dsh
export ACP_BEARER_TOKEN=gsk_...   # or keep it in ~/.acp/credentials

The plugin registers on dsh’s tools/pre-execute and tools/post-execute pipeline, which every tool dispatch flows through, including custom plugins and Code Mode sub-calls. ask decisions feed dsh’s own approval prompt. In headless compositions with no approval service, dsh denies asks by design. Plugins are per-profile, so repeat the add for each profile you boot (the one-line installer does this for every existing profile automatically).

A deny is reported to the agent but the dsh plugin does not enforce it yet. The tool can still run after a deny. The integration guide has the details.

dsh needs Node 22, and it’s a developer preview. The integration guide records the current sharp edges.

Your coverage: interception ✓ (all tools; a deny is reported to the agent but not yet enforced by the dsh plugin, see the integration guide) · proxy ✗. dsh calls DeepSeek’s API directly, and model-spend metering through the proxy isn’t wired for dsh yet.

Details: DeepSeek Harness integration.

I built with LangGraph or CrewAI

One call wires both planes in-process:

pip install acp-langchain   # or acp-crewai

Interception takes one registration on the agent (LangChain 1.x):

from langchain.agents import create_agent
from acp_langchain import ACPMiddleware

agent = create_agent(model=..., tools=[send_email, ...],
                     middleware=[ACPMiddleware()])   # every tool, present and future

For Deep Agents, use from acp_langchain.deepagents import create_deep_agent instead of from deepagents. The signature is the same, and the subagents are covered too (stock create_deep_agent does not pass user middleware down to them). For CrewAI, legacy chains, and custom StateGraphs, stack @governed("send_email") under @tool.

Proxy: init() points the model clients you construct at ACP. Call it before you build one, because the SDKs read their config from the environment at construction time:

import acp_governance as acp

acp.init()                 # sets the base URL + key for Anthropic and OpenAI
model = ChatOpenAI()       # now priced and metered

If you construct clients explicitly, pass the config instead:

from acp_governance import model_client_kwargs

model = ChatOpenAI(**model_client_kwargs("openai"))

The proxy routes gpt-*, claude-*, and gemini-* model ids to the right provider and forwards unchanged. init() is all-or-nothing per provider. It sets the base URL and the key, or leaves that provider alone and names it. A provider left half-applied (ACP’s URL against your real vendor key) would just 401, so it never happens silently.

Your coverage: interception ✓ (middleware or decorated tools) · proxy ✓ (init()). Only interception: proxy ✗, so call init(). Only init(): proxy ✓ · interception ✗, so register the middleware or decorate the tools. Node works the same way: import { init } from "@agenticcontrolplane/governance".

Details: LangGraph · Deep Agents · CrewAI · all frameworks.

I call model APIs directly

If your agent is your own code calling the Anthropic or OpenAI API, swap the base URL and authenticate with your ACP key (gsk_... from the console):

  • Anthropic SDK: base_url = "https://api.agenticcontrolplane.com/anthropic"
  • OpenAI-compatible clients: base_url = "https://api.agenticcontrolplane.com/v1"

The responses are the same, now metered.

What this gets you, and what it doesn’t. The proxy prices every call, meters cache economics, and applies policy to model calls and to the tool-use blocks the model asks for. It cannot see or block what your code actually executes. If the model asks for delete_file and your code runs it, ACP saw the request, not the execution. That is the job of interception, and a base-URL swap doesn’t provide it.

Your coverage: proxy ✓ · interception ✗, by construction rather than misconfiguration. If your code executes tools, add the @governed decorator from the framework SDKs (previous section) to close the gap.

I already use a gateway (LiteLLM, OpenRouter, …)

Put ACP nearest the agent. Policy and pricing should see what the agent actually asked for. Routing, caching, and compression belong downstream, between ACP and the provider. A gateway upstream of ACP rewrites or caches requests before ACP sees them, which blinds both policy and pricing.

Where this stands today:

  • Tested and supported: ACP’s proxy forwards directly to the providers (Anthropic-native, OpenAI-compatible, and the OpenAI Responses passthrough). Your interception setup (hooks or decorators from the sections above) is unaffected by any gateway choice, because it doesn’t touch the model path.
  • Not supported yet: a per-workspace configurable upstream, so ACP can forward to your gateway (agent → ACP → LiteLLM/OpenRouter → provider). Before we claim support for a specific gateway, we need to verify that it passes real token-usage fields back unchanged. A downstream layer that rewrites or caches without reporting usage correctly would corrupt your cost data, and we’d rather say “untested” than guess.
  • Not supported: putting your gateway between the agent and ACP. It works mechanically but breaks the principle above, because ACP would meter post-rewrite traffic instead of what the agent intended.

Your coverage: interception per your harness or framework section above, unchanged · proxy ✓ only in direct-to-provider mode, for now. If chaining ACP in front of your gateway is what’s blocking you, tell us which gateway. Per-gateway tests get prioritized by real demand.

Check what you actually have

Two quick reads in the console:

  • Interception live? Logs shows tool calls within seconds of your agent’s next action.
  • Proxy live? Any run showing a dollar cost was metered. A run with tool calls but no cost means model calls are bypassing the proxy.

A coverage doctor command and a per-agent Coverage card in the console, reporting interception and proxy per agent in this same shape, are in progress.