Skip to main content

acppool

A worker pool for coding agents, steered by a human. You bring the jobs and the board; acppool runs the agents, queues their work, holds their questions and permission requests until a person answers, and keeps every turn going when your app restarts.

A Claude worker asks a question, gets an answer, and finishes its turn while the board is closed

It speaks the Agent Client Protocol (ACP) to the agents, so Claude Code, Codex, Goose and any other ACP agent run behind the same API. The library is standard-library Python with no packages to install; each agent brings its own runtime (Claude's and Codex's ACP adapters need Node.js, Goose needs nothing more).

Why

There are SDKs that talk to one agent, and finished apps that manage many of them. acppool is the layer in between: the part every agent board builds for itself.

  • Turns outlive your app. A supervisor process owns the agents. Restart or redeploy the board, and running turns carry on; restart the supervisor, and each agent resumes its session.
  • A human stays in the loop. An agent can ask the human (an MCP tool acppool gives it), and a permission request waits until someone answers it. Nothing is decided for the human by a timeout or a default policy.
  • It goes into your app. No UI and no web server of its own: you call functions, read files, and decide what a job is. A minimal board is 100 lines (examples/board.py).

Try it

git clone https://github.com/lunochkin/acppool && cd acppool
python3 examples/board.py
> join fake /tmp ada            # a miniature agent that echoes; needs nothing installed
> give ada hello
ada > tool: Read a
ada · echo:hello
ada ends its turn

To run Claude instead, install its ACP adapter once (Node.js needed) and have Claude Code signed in:

(cd examples/acp && npm install)
python3 examples/board.py
> join claude /tmp/demo ada
> give ada Write hello.py that greets me. Use the ask tool to ask me which language I want.

Leave the board with Ctrl-D while ada works, start it again, and ada's turn is still running or done. The demo above is docs/demo.tape, recorded with VHS.

How it fits together

your app ──socket + files──▶ supervisor ──ACP──▶ agent adapter ──▶ the agent (claude, codex, goose …)
   │                            │                                        │
   └─ pool, push, controls      └─ one event log per agent               └─ MCP ──▶ acppool's ask and wait
  • supervisor runs as its own process and owns one adapter process per agent. It starts, prompts, steers, cancels and resumes sessions, holds permission requests, and writes every event to sessions/<name>.jsonl. Your app commands it over a Unix socket (client.call) and reads its state from files, so a reader never waits on it.
  • pool is your record of the workers: each one's job, queue, question and undelivered messages, kept in a Store (SQLite, a JSON file, memory, or your own database).
  • push decides what an idle worker gets next: an answer, a message, the end of a background run it waits on, a compaction when its context is full, or its next job. Your App subclass says what a job is.
  • control has the human's controls: give, say, answer, permit, clear, reset, hold, take back, end.
  • needs lists what waits on the human (a question, a permission, a reply), each with a key to notify it once.
  • mcp is the agents' MCP server with the pool's own tools: ask the human, and wait on a background run. Add your app's tools beside them in the same server.
  • limits reads the plans' usage limits (the share of each window used, and when it resets) from where agents report them: the supervisor's record of its Claude agents' turns, a saved Claude Code status line, and Codex's app server. Each window's latest reading wins, and one that has reset is left out.
  • sessions cuts the event logs into sessions and turns, with each turn's tokens and cost; client.steps reads a log as one line per step.

Writing an app

Three pieces: the supervisor's configuration, an App, and a loop that runs the push.

from acppool import claude, client, control, pool, push, supervisor

# agentd.py, run as its own process; servers() gives each session your MCP server (acppool's ask and wait in it)
config = supervisor.Config.under(STATE, kinds={"claude": claude.installed(ADAPTER_FOLDER)}, servers=servers)
supervisor.main(config)

# your app
class Board(push.App):
    home = "the board"

    def brief(self, item, worker):          # the prompt a job is sent with
        return f"Fix {item['name']}. Report with the done tool."

    def job_over(self, job, worker):        # a job ends when the agent says so, not when a turn ends
        return job.get("done", False)

app = Board(pool.SqliteStore(STATE / "pool.db"), my_supervisor)  # my_supervisor: call() and agents(), over client
threading.Thread(target=push.run, args=(lambda: app,), daemon=True).start()
control.give(app, "ada", {"kind": "issue", "name": "#42"})

Every App hook has a default, so the simplest app overrides nothing: a job is one turn, and its brief is its name. The hooks you are likely to want are brief, job_over, judge (take, keep or drop a queued item at its turn), run_of (jobs of one run share a session), preamble (standing instructions) and record (your activity log). examples/ has a complete board and its supervisor.

Agents

Kind Adapter Steering mid-turn After a restart Notes
claude claude-agent-acp (npm) yes resumed Agent SDK options per kind, e.g. settingSources
codex codex-acp (npm) yes resumed sessions set to the agent mode
any ACP agent its own, e.g. goose acp if it offers it resumed, or loaded Kind(command=..., options=...)

A Kind is the adapter's command line plus what it offers beyond ACP: a steering method, session options (ACP config options set on every session), Claude-style _meta, a rate-limit report. Claude and Codex need Node.js for their adapters; agents that speak ACP natively, like Goose, need nothing else. An agent that cannot resume a session but can load one is loaded, with the history it replays kept out of the log.

Status

0.x: in daily use by two boards, and the API may still change between minor versions. Python 3.10 or newer, on macOS and Linux.

Neighbouring projects solve other parts: acpx is a scriptable ACP client for running one agent from a script or CI, with permissions decided by policy; the ACP adapters above translate each agent to ACP. acppool is the pool between the agents and your board.

Tests

python3 -m unittest discover -s acppool/tests -t .

They run the supervisor over a miniature ACP agent (acppool/tests/fake_agent.py) in a temporary folder, with no network and no agent installed.

License

MIT

Metadata

Release files for acppool 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acppool 0.2.0
File Size Uploaded Provenance Actions
acppool-0.2.0.tar.gz 56.7 kB Without provenance Details for acppool-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acppool 0.2.0
File Interpreter ABI Platform Actions
acppool-0.2.0-py3-none-any.whl Python 3 none any Details for acppool-0.2.0-py3-none-any.whl

Total release size: 119.7 kB

Release files / acppool-0.2.0.tar.gz

Download URL acppool-0.2.0.tar.gz
Size 56.7 kB
Tags Source
SHA-256 checksum
How to use checksums
619bd23b06a3a0476d49ba8c51fbfe0ef6b6e50405a2ac06563f5dfaf234fe93
BLAKE2b-256 checksum
How to use checksums
50739bf6e16b6c31843f5bf950c914d8418004027d355b751937af09d5fa77bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / acppool-0.2.0-py3-none-any.whl

Download URL acppool-0.2.0-py3-none-any.whl
Size 63.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0255dd167d0833602493c4ab50f5fcb7f76bbcd8539943f344b7f9890f6f35f
BLAKE2b-256 checksum
How to use checksums
28a23a0778cbbdfa7f3db56ebedc8607a9c88a2c70a0eae47c3f2f777306897d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for acppool 0.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page