Generic remote WebSocket transport for ACP agents and clients.
Project description
acpremote
acpremote is the generic remote transport package for ACP.
It exposes any existing acp.interfaces.Agent over WebSocket and can also turn a remote ACP server
back into a local ACP agent proxy. It can also mirror any stdio ACP command by spawning it as a
child process.
Note: Used 0.8.2 as initial release for compatibility with acpkit monorepo. This is an early release and might have issues.
Docs:
- https://vcoderun.github.io/acpkit/acpremote/ (INACTIVE)
Install:
uv add acpremote
pip install acpremote
Server
Expose any ACP agent:
from acpremote import serve_acp
server = await serve_acp(agent=my_acp_agent, host='127.0.0.1', port=8080)
await server.serve_forever()
Expose a stdio ACP command instead of an in-memory agent:
from acpremote import serve_command
server = await serve_command(
['npx', '@zed-industries/codex-acp'],
host='127.0.0.1',
port=8080,
)
await server.serve_forever()
env={...} overrides selected variables while inheriting the parent process environment. That
keeps command lookup through PATH intact while still letting the caller inject tokens or runtime
flags.
Default routes:
- metadata:
http://127.0.0.1:8080/acp - health:
http://127.0.0.1:8080/healthz - websocket:
ws://127.0.0.1:8080/acp/ws
Client Proxy
Turn a remote ACP endpoint back into a local ACP agent:
from acp import run_agent
from acpremote import connect_acp
agent = connect_acp('ws://127.0.0.1:8080/acp/ws')
await run_agent(agent)
That pattern is what powers a local stdio ACP façade in front of a remote ACP server.
Transport Timing
TransportOptions can attach proxy-observed latency information to the ACP stream:
from acpremote import TransportOptions, connect_acp
agent = connect_acp(
'ws://127.0.0.1:8080/acp/ws',
options=TransportOptions(
emit_latency_meta=True,
emit_latency_projection=True,
),
)
Available signals:
- streamed updates can carry
field_meta["acpremote"]["transport_latency"] - a visible
Transport LatencyACP card can be emitted after each prompt turn
The metrics are proxy-observed timings, not synchronized end-to-end host clock measurements.
Transport Notes
Current transport behavior:
- one WebSocket text message carries one ACP JSON message
- binary frames are rejected
- bearer-token auth is supported
- stdio ACP commands can be mirrored with
serve_command(...) - transport limits are configurable through
TransportOptions
This package is transport-focused. It doesn't assume ACP Kit adapters or ACP Kit-owned runtime semantics.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acpremote-0.8.2.tar.gz.
File metadata
- Download URL: acpremote-0.8.2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ec5dde2d505b569c4cd1513764e3887fb563bf2ee969937c32a216bb42f0f07
|
|
| MD5 |
dc909f357c709390fe832c3d79b62d27
|
|
| BLAKE2b-256 |
892662c52b3fef3dd86ff0c40493792d1903a287a7c05a7292469d2133db5440
|
File details
Details for the file acpremote-0.8.2-py3-none-any.whl.
File metadata
- Download URL: acpremote-0.8.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60133a735c550098b3d2c1bb035d974a40be28b10e6dbda52f18997035b25f5
|
|
| MD5 |
d30abf20d58e56a32ca84fd7eade5b3b
|
|
| BLAKE2b-256 |
4552a35bbb57e37cac8ca101d3ec5f8c55b1264bc4f3f569a2848dd0382fc7e1
|