AgentPool

io.github.sidduHERE由 GitHub 账号 sidduHERE 发布v0.1.13更新于 Oct 24, 2026

See each coding-agent subscription's live limits and offload work to one with headroom.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器兼命令行工具,显示各编程代理订阅的实时用量上限,并让助手把任务交给仍有余额的提供方执行。

可以做什么
查看已配置的编程代理提供方、可用模型以及带置信度和重置时间的用量/容量摘要,并读取委派偏好与入门资源。在指定提供方和仓库上显式创建工作任务会话,可选只读或 worktree 隔离,然后观察、轮询、发送消息、中断、收集结果和终止会话。读取产物清单并分页查看会话记录。可按需启用统计、会话、租约和 worktree 工具集。
适用场景
适合同时付费订阅多个编程代理(Codex、Claude Code、Cursor、Copilot、Devin、Droid)的用户,让助手在分派任务前先看清哪个订阅还有余量。也适合在无 shell 访问的 MCP 原生客户端中运行并监督委派的工作会话。
运行要求
需在本机安装 Python 3.11 及以上,并通过 PyPI 的 agentpool-cli 包以 mcp 子命令启动。默认运行时需要 PATH 中有 tmux;termctrl、Git、CodexBar 和 ccusage 为可选。实时运行时支持 macOS 或 Linux(Windows 仅限 WSL)。各提供方 CLI 需已安装并完成登录;服务器本身未声明任何凭据。
安装前请注意
用量探测会读取现有 CLI 的登录状态,刷新时可能调用提供方 API,因此用量数据可能敏感。它会在 SQLite 和 agentpool 主目录下的文件中保存会话、事件、用量快照、产物和记录元数据。创建的工作会话会操作你的仓库,选择 worktree 隔离时可修改文件;终止会话和清理 worktree 会改变状态。提供方需显式选择,且不会静默接受付费超额。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AgentPool,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

AgentPool

You pay for several coding-agent subscriptions — Codex, Claude Code, Cursor, Copilot, Devin, Droid — but you work in one at a time. The rest sit idle until your active provider hits its 5-hour or weekly limit, and then you stall.

AgentPool is a local Python CLI and MCP server that reads the live usage limits of every coding-agent subscription you have and lets you — or your primary agent — offload work to whichever one still has headroom. Use the capacity you already pay for, and keep moving instead of hard-stopping at a cap.

It is a control plane, not an auto-router. AgentPool exposes live provider, model, session, artifact, lease, and best-effort usage/capacity state, and runs the work you offload as explicit worker sessions. You or your agent still choose the provider and model — AgentPool makes the limits visible so that choice is informed, never automatic.

The v0.1 alpha posture is conservative:

  • tmux is the default runtime; Terminal Control is optional when configured.
  • 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.
  • Optional: termctrl on PATH for the Terminal Control runtime.
  • Git for worktree isolation and diff collection.
  • macOS or Linux for live runtimes. 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.

bash
uv tool install agentpool-cli      # recommendedpipx install agentpool-cli         # fallbackuvx agentpool-cli --help           # zero-install try

Then:

bash
agentpool setup codexagentpool doctor --deep --privacy

The agentpool-cli package installs on macOS, Linux, and Windows, but live terminal runtimes are supported on macOS or Linux (Windows via WSL).

Optional Terminal Control config:

yaml
runtime:  default: tmux  terminal_control:    enabled: true    binary: termctrl    session_prefix: agentpool    cols: 120    rows: 36

Install from source:

bash
git clone https://github.com/sidduHERE/agentpool.gitcd agentpooluv tool install --force .

Or run from a development checkout:

bash
uv venvuv pip install -e ".[dev]"

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

bash
scripts/install.sh latest

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

Quickstart

For AI agents, start by loading the bundled version-matched skill:

bash
agentpool skills get agentpoolagentpool skills get core --full
bash
agentpool initagentpool setup cursoragentpool config validateagentpool doctor --deep --privacyagentpool setup allagentpool smoke --provider fake-question --repo . --jsonagentpool inventory --jsonagentpool usage-summary --refresh --json

That last command is the one you will run most: it shows every configured subscription's remaining limit, reset time, and a usable flag, so you can see at a glance which provider to offload the next task to.

Start an explicitly selected read-only worker:

bash
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 60 --jsonagentpool send <session-id> "Continue with the smallest useful check."agentpool artifacts <session-id> --jsonagentpool transcript <session-id> --tail-lines 80 --jsonagentpool session show <session-id> --jsonagentpool sessions --recent 10 --jsonagentpool collect <session-id> --jsonagentpool terminate <session-id> --dry-run --jsonagentpool 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. Providers that expose reasoning controls also accept process-local overrides such as --reasoning-effort high; Codex also accepts --service-tier priority. AgentPool does not edit your provider config.

For AgentPool-created edit isolation, choose worktrees explicitly:

bash
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> --dry-run --jsonagentpool 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

bash
agentpool usage-summary --refresh --jsonagentpool usage-summary --refresh --no-interactive --jsonagentpool stats --since 7d --jsonagentpool usage-summary --refresh --backend codexbar --jsonagentpool 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, age/staleness, and reset timing when the provider exposes it. The older CLI capacity-summary command is retained as a human convenience alias; MCP also exposes get_capacity_summary as a compatibility alias for get_usage_summary.

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. Staleness is reported as age information only; it does not by itself make a provider unusable. If you want cached summary reads to refresh automatically after a threshold, set policy.usage_auto_refresh_after_seconds in ~/.agentpool/config.yaml. AgentPool still does not pick an alternative provider for you. MCP usage refreshes are intentionally bounded and may return partial=true; use the CLI commands above when a shell-capable agent needs a complete live refresh. Use --no-interactive or AGENTPOOL_NO_INTERACTIVE_USAGE=1 when a shell script must avoid provider TUI fallback probes.

Provider Matrix

Provider idCommandUsage status in v0.1Model pinning
codex-clicodexnative local app-server rate-limit probe; CodexBar optional--model + config-scoped reasoning/service tier
cursor-cliagent or cursor-agentoptional CodexBar Cursor usage; native CLI usage is interactive /usage only--model + read-only --mode ask
claude-codeclaudetemporary /usage probe; ccusage telemetry optional--model + --effort
devin-clidevinDevin/Windsurf plan-status API from existing CLI auth, with /usage fallback--model
copilot-cligh copilotGitHub Copilot usage API from env or gh auth tokenforwarded --model
droid-clidroidunknown unless surfaced by future safe probeprocess-local settings file + --reasoning-effort
opencodeopencodeconfigured adapter; usage unknown in this alpha--model with provider/model ids

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:

bash
agentpool doctor --privacy --json

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

MCP

Start the MCP server:

bash
agentpool mcpagentpool mcp --toolsets default,statsAGENTPOOL_MCP_LOCKDOWN=1 agentpool mcp

Example host config:

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

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

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

Raw config generators:

bash
agentpool mcp-config --client claude-code --jsonagentpool mcp-config --client codexagentpool mcp-config --client cursoragentpool 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 metadata: server.json. It advertises the agentpool-cli PyPI package and should be bumped with each release. 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
  • agentpool://preferences.md

Then use tools for live operations. The user-owned preferences file also shows up through agentpool preferences and get_delegation_preferences(). It may say to use your native subagent system instead of AgentPool for some tasks. The default MCP toolset is deliberately small: inventory, usage snapshot, usage summary, provider models, preferences, spawn, observe, poll, send, interrupt, collect, artifact manifest, transcript paging, and terminate. Add opt-in toolsets with agentpool mcp --toolsets default,stats,sessions,leases,worktrees.

Shell-capable agents can use agentpool skills get agentpool instead of MCP resources to load the same core usage guidance from the installed CLI.

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.

来源:README.md,提交 de87ff2

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.13最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分