Skip to content
Agentic Control Plane

Stop a force-push and ask before risky commands in Prime Agent

See, control, and price every tool call Prime Agent makes: the ipython kernel where all its shell, file and Python action happens, plus any custom tool. Prime Agent ships no permission framework. This extension adds one, in one command.

Install

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

The installer detects Prime Agent and puts the extension at ~/.prime/agent/extensions/acp.ts. It opens your browser once to set up a workspace and save the key to ~/.acp/credentials. Restart Prime Agent (or run /reload), and every tool call is checked from the next session.

MIT-licensed, zero dependencies, one readable file. Read it before you run it.

Why an extension is enough

Prime Agent is a fork of pi-mono. It kept pi’s extension API and went further on minimal tools: one model-facing tool, ipython, in a persistent kernel. Code is the action. Shell, files and network all run as code there. There are no built-in approval prompts, no allowlist and no permission framework. The docs name the permission gate as the example extension and leave writing it to you.

It does have the same typed events as pi. Every tool call goes through tool_call (before, and blockable) and tool_result (after, and rewritable). There is no MCP layer and no second tool path, because MCP arrives as Python skills that run inside ipython. One extension on those events sees everything the agent does.

That matters because Prime Agent is built to run unattended: /autonomous mode with budget limits, daemon-backed always-on sessions, heartbeats and schedules, and recursive subagents. Long-running shell access with nobody watching is where you want a record kept off the machine.

How it works

event ACP endpoint What happens
tool_call POST /govern/tool-use allow proceeds. ask blocks the call and holds it for approval on the console Approvals page or from the approval email, then you ask the agent to retry. deny blocks it and puts the reason in the transcript.
tool_result POST /govern/tool-output Records the result. Redaction rewrites what the model reads. A server block becomes corrective feedback.

Decisions come from the same workspace policies as Claude Code, pi, dsh, and the rest of your agents. A new workspace starts in audit mode, where everything is recorded and only the safety floor holds calls. The rules page lists what the floor holds.

Why it ignores hasUI

Prime Agent 0.8.x reports ctx.hasUI = true even in headless print mode, though its docs say it should be false. Every CLI session, TUI and -p alike, runs inside a daemon worker. So hasUI cannot tell a person at the keyboard from an empty chair. An extension that trusted it would treat unattended runs as attended. It would continue when the gateway is down, and it would raise approval prompts nobody can answer.

This extension does not use hasUI to approve anything. Every ask shows as a block in Prime Agent and waits on the console Approvals page and in the approval email. A person approves it there before the agent retries, attended or not. Tier labels are cautious in the same way: worker and headless processes report background unless ACP_AGENT_TIER says otherwise. Details are in the controls reference.

If the gateway is unreachable

  • Attended sessions continue, loudly. The call proceeds with an [ACP] ⚠ UNGOVERNED warning and an entry in ~/.acp/lapse.log.
  • Unattended runs are blocked. That includes /autonomous and scheduled sessions, where the block is the safety net.
  • Policy denies are unaffected. The extension retries once before either behavior applies.

Manual install

mkdir -p ~/.prime/agent/extensions
curl -sf https://raw.githubusercontent.com/agentic-control-plane/prime-agent-acp-plugin/main/index.ts \
  -o ~/.prime/agent/extensions/acp.ts

Put the key in ~/.acp/credentials (or ACP_BEARER_TOKEN). Prime Agent needs Node 22.8+. The global extensions path loads without a project-trust prompt, so the checks are on before any repository is opened.

Add the cost X-ray

The extension checks and records tool calls. It never sees the model call, so it cannot price it. The installer adds a second extension, ~/.prime/agent/extensions/acp-proxy.ts. It registers the acp provider (the proxy’s base URL, key from the ACP_KEY environment variable) only when ACP_PROXY=1. The installer also adds prime-acp next to claude-acp and codex-acp:

prime-acp

prime-acp reads your workspace key from ~/.acp/credentials. It sets ACP_PROXY=1 and --model acp/gemini-3.5-flash for that launch only. ACP_PRIME_MODEL=<id> picks another. If the gateway is unreachable, it starts plain Prime with a one-line note. Plain prime never loads the provider. Full walkthrough: Turn on Cost X-Ray.

Learn more

Protected in 3 steps

Out of the box, ACP records every tool call your agents make. A short safety floor applies in every mode: catastrophic commands (rm -rf on your home or system folders, disk wipes) are always blocked, and force-push, destructive SQL, piping a download into a shell, and deleting outside your project are held for your approval. Your own rules (ask first / never) start applying when you turn on enforce. No rule can loosen the floor; a workspace owner or admin can switch it off on the Policies page (you were asked at install). With --local the always-blocked list is narrower: rm -rf on your home or root, disk wipes, fork bombs.

  1. 1
    Install. One command, then approve this machine in the browser. curl -sf https://agenticcontrolplane.com/install.sh | bash
  2. 2
    Turn on your rules. Run /acp-enforce in your agent. The starter rules start applying: rm and keychain reads are held for your approval (you approve on the console Approvals page or from the approval email); everything else keeps running and is recorded. Add your own with /acp-ask Bash.curl, /acp-deny Bash.git.push, /acp-allow Bash.npm, or on the Policies page. With --local there is no mode switch: the rules in ~/.acp/policy.json apply from the first call, and the starter file asks before rm, curl, git push, chmod and chown.
  3. 3
    See it work. Ask your agent to do something risky, for example git push --force on a scratch repo. ACP holds the call for your approval; the call and your answer land in the audit log (/acp-why for the last hold, the console Activity page, or ~/.acp/audit.jsonl with --local). In Prime Agent, a held call shows as a block in the agent; approve it on the console Approvals page or from the approval email, then ask the agent to retry.

Copy-paste rules for the things people are most afraid of (force-push, prod database, rm -rf, a secret in a curl, overnight runs, a cost cap): Rules that stop the scary things.