Skip to main content

Local MCP-exposed control plane for live coding-agent sessions.

Project description

AgentPool

AgentPool is a local Python CLI and MCP server for explicitly controlling coding-agent CLIs as worker sessions.

It is a control plane, not an auto-router. AgentPool exposes live provider, model, session, artifact, lease, and best-effort usage/capacity state. The primary agent or human still chooses the provider and model explicitly.

The v0.1 alpha posture is conservative:

  • tmux is the required runtime.
  • Provider selection is explicit; provider=auto is rejected.
  • Usage/capacity summaries are confidence-tagged and keyed by provider id.
  • CodexBar and ccusage are optional usage helpers when installed or configured.
  • AgentPool does not store provider credentials, scrape browser usage pages, rank models, merge code, or push code.

Requirements

  • Python 3.11 or newer.
  • tmux on PATH.
  • Git for worktree isolation and diff collection.
  • macOS or Linux. Windows is not a v0.1 target except through WSL-like shells.

Install

AgentPool publishes to PyPI as agentpool-cli; the installed command is agentpool.

uv tool install agentpool-cli      # recommended
pipx install agentpool-cli         # fallback
uvx agentpool-cli --help           # zero-install try

Then:

agentpool setup codex
agentpool doctor --deep --privacy

The agentpool-cli package installs on macOS, Linux, and Windows, but the runtime requires tmux, so the supported runtime is macOS or Linux (Windows via WSL).

Install from source:

git clone https://github.com/sidduHERE/agentpool.git
cd agentpool
uv tool install --force .

Or run from a development checkout:

uv venv
uv pip install -e ".[dev]"

A GitHub release install (wheel pinned to a tag, no PyPI required) is also supported:

scripts/install.sh latest

See docs/install.md for first-run, upgrade, and MCP setup notes.

Quickstart

agentpool init
agentpool setup cursor
agentpool config validate
agentpool doctor --deep --privacy
agentpool setup all
agentpool smoke --provider fake-question --repo . --json
agentpool inventory --json

Start an explicitly selected read-only worker:

agentpool spawn \
  --provider <provider-id> \
  --repo . \
  --task "Inspect the project and ask one clarifying question." \
  --isolation read_only

agentpool observe <session-id> --wait-for completed,error,question,approval_prompt --timeout 120 --json
agentpool send <session-id> "Continue with the smallest useful check."
agentpool artifacts <session-id> --json
agentpool transcript <session-id> --tail-lines 80 --json
agentpool sessions --recent 10 --json
agentpool collect <session-id> --json
agentpool terminate <session-id> --json

spawn defaults --initial-prompt-mode to provider_default. For Codex CLI this resolves to arg, which passes the first task as the Codex prompt argument instead of relying on a paste-and-submit startup cycle. Codex workers also accept process-local overrides such as --reasoning-effort high and --service-tier fast; AgentPool does not edit your Codex config.

For AgentPool-created edit isolation, choose worktrees explicitly:

agentpool spawn \
  --provider <provider-id> \
  --repo . \
  --task "Make the small patch." \
  --role implementer \
  --isolation worktree

agentpool worktrees list --repo .
agentpool worktrees cleanup --session-id <session-id>

Worktree isolation is not forced by default. Users often have their own worktree setup and cleanup rules, so AgentPool only creates a worktree when requested through --isolation worktree or policy configuration.

Usage And Capacity

agentpool usage-summary --refresh --json
agentpool stats --since 7d --json
agentpool usage-summary --refresh --backend codexbar --json
agentpool usage-summary --refresh --backend ccusage --provider claude-code --json

usage-summary returns a providers object keyed by provider id. It is not ordered and it is not a recommendation list. Each row includes usable, unusable_reason, quota windows, confidence, staleness, and reset timing when the provider exposes it. The older CLI capacity-summary command is retained as a human convenience alias; the MCP surface only exposes get_usage_snapshot and the opt-in get_usage_summary tool.

The default buffer is policy.min_remaining_percent = 10. If any reported quota window is below that buffer, the provider row is marked unusable for the summary. AgentPool still does not pick an alternative provider for you.

Provider Matrix

Provider id Command Usage status in v0.1 Model pinning
codex-cli codex native local app-server rate-limit probe; CodexBar optional --model
cursor-cli agent or cursor-agent optional CodexBar Cursor usage; native CLI usage is interactive /usage only --model + read-only --mode ask
claude-code claude temporary /usage probe; ccusage telemetry optional --model
devin-cli devin Devin/Windsurf plan-status API from existing CLI auth, with /usage fallback --model
copilot-cli gh copilot GitHub Copilot usage API from env or gh auth token forwarded --model
droid-cli droid unknown unless surfaced by future safe probe process-local settings file
opencode opencode configured adapter; usage unknown in this alpha catalog-driven

Compatibility note: the PRD calls Factory's coding product factory-droid, but AgentPool exposes it as droid-cli because the installed command is droid. Do not add a duplicate factory-droid inventory row unless a distinct harness appears.

Privacy Posture

AgentPool is local-first, but usage probes can still be sensitive because they read existing CLI auth state and may call provider APIs on explicit refresh.

AgentPool does not:

  • store provider credentials;
  • read browser cookies by default;
  • scrape browser dashboards;
  • trigger login flows;
  • silently accept paid overage.

AgentPool does store:

  • SQLite session, event, usage snapshot, artifact, and lease metadata;
  • transcript and artifact files under ~/.agentpool/artifacts by default;
  • generated runtime settings that are not credentials.

Run:

agentpool doctor --privacy --json

See SECURITY.md and docs/usage-detection.md.

MCP

Start the MCP server:

agentpool mcp
agentpool mcp --toolsets default,stats
AGENTPOOL_MCP_LOCKDOWN=1 agentpool mcp

Example host config:

agentpool mcp-config --client generic
{
  "mcpServers": {
    "agentpool": {
      "command": "agentpool",
      "args": ["mcp"]
    }
  }
}

Verified install helpers (deeplink or one-liner shell command):

agentpool mcp-config --client cursor --absolute-command --install
agentpool mcp-config --client claude-code --absolute-command --install
agentpool mcp-config --client codex --absolute-command --install
agentpool mcp-config --client copilot-cli --absolute-command --install

Raw config generators:

agentpool mcp-config --client claude-code --json
agentpool mcp-config --client codex
agentpool mcp-config --client cursor
agentpool mcp-config --client claude-desktop --json

Use --absolute-command if the MCP host does not inherit your shell PATH. Verified per-host steps live in docs/mcp-clients.md. Team templates: .cursor/mcp.json.example, .mcp.json.example, and docs/examples/README.md. MCP Registry draft metadata: server.json. It intentionally omits package entries until agentpool-cli exists on PyPI. Release checklist: docs/release.md. Provider setup guides: Cursor, Cursor Agent CLI, Codex, Claude Code, Copilot, Droid, and Devin.

MCP-connected agents should read these once on connect:

  • agentpool://onboarding
  • agentpool://skill.md

Then use tools for live operations. The default MCP toolset is deliberately small: inventory, usage snapshot, provider models, spawn, observe, send, interrupt, collect, artifact manifest, transcript paging, and terminate. Add opt-in toolsets with agentpool mcp --toolsets default,stats,sessions,leases,worktrees.

Coding agents with shell access should prefer the CLI path. It is more token-efficient because large worker output stays in artifact files and observe/collect return compact manifests by default. MCP remains first-class for MCP-native hosts and no-shell environments. See docs/agent-cli-and-mcp.md.

Development Checks

Development and CI checks are documented in CONTRIBUTING.md.

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

agentpool_cli-0.1.2.tar.gz (195.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentpool_cli-0.1.2-py3-none-any.whl (113.5 kB view details)

Uploaded Python 3

File details

Details for the file agentpool_cli-0.1.2.tar.gz.

File metadata

  • Download URL: agentpool_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 195.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentpool_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5356440ddeadc5b4736876430c9d775413ae0414516fa0aa8b6e0340450a05dd
MD5 2055823b3a34bfc4b8ed4cdfc37d0b7b
BLAKE2b-256 907811d1c73606b4820b8355f5947812e87b3a2fff72245c088268d3cbf7786b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentpool_cli-0.1.2.tar.gz:

Publisher: release.yml on sidduHERE/agentpool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentpool_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agentpool_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 113.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentpool_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0cf5c29b27d661bea0d24cff045df44a7c2934f408f713fc460a5d23b55b0b9
MD5 04f79f75cfd394293e84a8c1308a087a
BLAKE2b-256 66e2befcd2b6de9f64c236dd7bd4045f1bec83dd43dae902d50d54cdd8ba209b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentpool_cli-0.1.2-py3-none-any.whl:

Publisher: release.yml on sidduHERE/agentpool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page