acp-to-api
Multi-provider ACP proxy CLI that exposes OpenAI-compatible REST APIs backed by Agent Client Protocol subprocess providers.
Features
- OpenAI-compatible API --
/chat/completions, Responses API, and Anthropic/v1/messages - Multiple providers -- Cursor, Kiro, Codex (via codex-acp), Claude Code (via claude-code-acp)
- Runtime management -- add, remove, and reload providers without restarting
- Daemon mode -- run as a background service with
start/stop/status/restart - Auto-start -- install as a macOS launchd or Linux systemd service
- Web dashboard -- embedded real-time trace viewer at
/dashboard - Config hot-reload -- watches config file for changes and applies them automatically
- XDG directories -- follows XDG Base Directory spec for config and state
Quick start (no install needed)
Run directly with uvx -- nothing to install:
uvx acp-to-api serve --provider '{"name":"cursor","command":"agent","args":["acp"]}'
Or with a config file:
uvx acp-to-api serve --config acp-to-api.toml
Install
uv add acp-to-api
Or with pip:
pip install acp-to-api
For development:
git clone https://github.com/pingu1m/acp-to-api.git
cd acp-to-api
uv sync --dev
Requirements
- Python 3.10 to 3.14
- At least one ACP provider CLI installed (e.g. Cursor
agent,kiro-cli,codex-acp,claude-code-acp)
This project uses the official ACP Python SDK.
Configuration
Example acp-to-api.toml:
port = 11434
host = "127.0.0.1"
[providers.cursor]
command = "agent"
args = ["acp"]
[providers.kiro]
command = "kiro-cli"
args = ["acp", "--trust-all-tools"]
If no config file exists, acp-to-api creates a starter config at ~/.config/acp-to-api/config.toml on first run.
OpenAI client example
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:11434/api/v1/cursor/openai",
api_key="unused",
)
resp = client.chat.completions.create(
model="cursor",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(resp.choices[0].message.content)
Daemon mode
uvx acp-to-api start --config acp-to-api.toml # background
uvx acp-to-api status
uvx acp-to-api stop
uvx acp-to-api restart --config acp-to-api.toml
Install as a system service (auto-start on boot):
uvx acp-to-api setup --config acp-to-api.toml # macOS launchd / Linux systemd
uvx acp-to-api setup --uninstall
Dashboard
Open http://127.0.0.1:11434/dashboard to see live trace events, manage providers, and inspect request/response payloads.
Raw logging
--raw-acp-- logs ACP JSON-RPC traffic--raw-rest-- logs REST requests and responses
Limitations
- Tuning parameters (
temperature,max_tokens) are accepted for API compatibility but not forwarded to the ACP agent. - Token usage in responses is estimated from text length, not measured by the agent.
- Only one prompt runs per provider at a time (serialized via prompt lock).
Security
acp-to-api is designed for local/trusted-network use only. The API has no authentication; anyone who can reach the server can invoke providers, which spawn subprocesses.
- The default bind address is
127.0.0.1(localhost only). Use--host 0.0.0.0only if you trust your network. - If you need network access, place the server behind a reverse proxy with authentication.
- The dashboard and trace logs capture full request/response bodies (prompts, completions, tool calls). Be aware of this if you pipe sensitive data through the proxy.
Run tests
uvx --from . --with pytest --with httpx --with pytest-asyncio pytest -v
Lint and format
uvx ruff check .
uvx ruff format .
Build and publish
uv build
uv publish
License
Metadata
Release files for acp-to-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| acp_to_api-0.1.1.tar.gz | 53.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acp_to_api-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.6 kB
Release files / acp_to_api-0.1.1.tar.gz
| Download URL | acp_to_api-0.1.1.tar.gz |
|---|---|
| Size | 53.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e48eddc8c71b7c77758fc1dae3887f445ea174772aa6da46ddc036b7a045495
|
|
BLAKE2b-256 checksum How to use checksums |
fe5849e67e61a0876190db98375315600cb91d548a664ce500d1ab86f5822ff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / acp_to_api-0.1.1-py3-none-any.whl
| Download URL | acp_to_api-0.1.1-py3-none-any.whl |
|---|---|
| Size | 33.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fabf169e97f7066f0d353148321a78aff336821d3a859ceb0ada2b49fce1ce1
|
|
BLAKE2b-256 checksum How to use checksums |
d7ccad36ae2040edc7828549af24c0eb88f5943188adfbb74cf43372c33c8b10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for acp-to-api 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.