← Catalog

acp-pi

Agent Client Protocol server for Pi: lets any ACP client drive a Pi agent over RPC

Package

Install

Install with PiG

pig install npm:acp-pi

Install with Pi

pi install npm:acp-pi
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

README

Written by the package's publisher, shown as published in version 0.2.1 (README.md). PiG does not review it.

acp-pi

An Agent Client Protocol server for Pi.

It lets any ACP client — an editor, a mobile app, a custom front end — drive a Pi agent without re-implementing Pi's runtime. The client speaks ACP; behind the scenes acp-pi runs a real pi and translates between the two protocols.

ACP client  ──ACP over stdio──▶  acp-pi  ──Pi RPC over stdio──▶  pi

Docs: Getting started · Configuration · Troubleshooting · Protocol mapping

Requirements

requirementwhy
Node.js 22.19 or newerthe bridge targets modern ESM and streams
pi on your PATH, already authenticatedacp-pi launches it; it cannot answer for Pi

Confirm Pi is ready before blaming the bridge:

printf '{"type":"prompt","message":"reply with: ok"}\n' | pi --mode rpc --no-session

If that prints a reply, you are set. If it prints No API key found for the selected model., fix that in Pi first — see credentials.

Install

npm install -g acp-pi

Quick start

cd /path/to/your-project
acp-pi --workspace /path/to/your-project

That starts the bridge on stdio and waits for a client. Run on a terminal with nothing attached it stays quiet and exits when stdin closes: an ACP client is what opens a session.

Two details cause most first-run failures:

  1. Start it from inside the directory you pass to --workspace. Clients request a session in their working directory, and the bridge refuses one outside the workspace it was given.
  2. pi must be on the PATH of whatever launches the bridge, not only of your interactive shell.

Full walkthrough: Getting started.

What a client gets

capabilitybehavior
ModelsThe session announces the models your Pi reports, with the active one selected
StreamingPi's output arrives as incremental message updates, not one block at the end
CancellationCancelling aborts the turn and keeps the agent alive for the next prompt
PermissionsPi's confirmation dialogs become ACP permission requests; a denial is honored
Model switchingThe client can switch models; Pi applies the change

What it does not do

  • One session per process. A second session/new on the same bridge is refused.
  • Text prompts only. Non-text content blocks are rejected, never silently dropped.
  • No credentials or models of its own. Whatever Pi is configured with is what the client sees.
  • No permission step of its own. If Pi does not ask before running something, the bridge does not invent an approval step.

Configuration

Everything is an environment variable; there are no config files. The full table, defaults and examples live in docs/configuration.md.

variabledefault
ACP_PI_COMMAND["pi","--mode","rpc","--no-session"] (JSON array)
ACP_PI_TURN_TIMEOUT_MS600000
ACP_PI_COMMAND_TIMEOUT_MS10000
ACP_PI_DEBUGunset

Troubleshooting

symptomfirst thing to check
No API key found for the selected model.Pi's authentication — see credentials
Internal error with no detailSet ACP_PI_DEBUG=1 and reproduce; the real message is in the trace
The session never opensThe client's working directory is outside --workspace
pi: command not foundpi is missing from the PATH the bridge was started with
The client lists no modelsPi reports no active model; run pi once and select one

Full guide with logs and debugging: Troubleshooting.

License

MIT.