
Plzebo
io.github.wkoverfield由 GitHub 账号 wkoverfield 发布v0.2.0更新于 Oct 24, 2026
Cost-parity bench for agent loops: $/success and time across model mixes, with verifiable receipts.
概览
一个本地 MCP 服务器,让助手启动、延长并读取成本对等基准测试,按每次成功结果的花费和耗时比较不同 agent 循环。
- 可以做什么
- 从命名的 arm 模板启动测量,先返回成本估算和一次性确认令牌,此时不产生花费(measure_start)。把已有运行延长到更大的 K,复用已付费的试验(measure_extend)。查看任务进度并读取结论与回执(measure_status、measure_result)。运行通过本地网关计量,按调用记录服务商上报的 token 用量,回执可从原始行重新计算。
- 适用场景
- 当你需要比较两种或更多完成同一任务的方式,例如更便宜的模型组合、不同配置、开启或关闭某个工具,并希望得到关于每次成功成本的可靠结论而不是猜测时使用。
- 运行要求
- 以 npx 运行的本地进程;需要 Node 22.6 或更高版本和 Git,以及各 arm 与 oracle 所需的环境。placebo 模式需导出 ANTHROPIC_API_KEY 或 OPENAI_API_KEY;passthrough 模式改用各自的登录。必须设置预算,MCP 的 arm 只能来自 claude-cli、claude-subscription 和 codex-cli 模板。
安装
在 SourceWeft 中
- 打开 控制台中的 Plzebo,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
plzebo
Cost-parity bench for agent loops. Point it at two or more ways of getting the same task done (a cheaper model mix, a different setup, a tool on vs off) and it measures which one delivers the outcome for less, in dollars and in minutes, and whether the gap is real or noise. Runs locally, on your own keys or your own subscription. An agent can call it on itself over MCP.
The headline metric is cost per successful outcome: total metered spend divided by successes, compared across arms with a 95% confidence interval. Time per successful outcome is reported beside it. When the data cannot support a claim, plzebo says so instead of making it.
How it measures
- Arms are whole loops. An arm is a shell command that runs an agent to completion on a task, plus model rewrite rules applied at a local metering gateway. Loop code can be byte-identical across arms while the gateway maps every
claude-*call to each arm's model. - Every model call transits the gateway. Arms receive a placebo key (
sk-placebo-...) and a redirected base URL; the gateway swaps in the real key upstream and records provider-reported token usage per call. A call that bypasses the gateway fails at the provider instead of billing invisibly, and a trial with zero metered calls is flagged, never compared. - Trials are paired and interleaved. K pairs run back to back with a seeded coin flip deciding arm order per pair, so provider drift lands inside pairs. Prompt caching is disabled and every trial carries a unique nonce, so no arm warms a cache for another.
- Grading never trusts the agent's tree. The diff is filtered against a protected-path list (tests, runner config), applied to a pristine checkout, and the test command runs there. Editing the tests fails the trial.
- Statistics refuse to overclaim. Success differences use an exact McNemar test with Holm correction across arms. Parity requires an equivalence test, not just a failed significance test. Cost and time deltas come from a paired bootstrap. Fewer than five successes on either side blocks cost rulings. Timeouts are graded failures with spend included; crashes and provider throttling (429/529) are excluded with spend disclosed. Every refusal is printed as an explicit do-not-claim line.
- Receipts are the artifact. Every run writes a JSON receipt: the spec and its pre-registration hash, every trial's raw rows (tokens, per-call status, changed paths, output tails), the stats inputs, the pricing table version, and a generated estimand statement.
plzebo verify receipt.jsonrecomputes every derived number from the raw rows and reports any divergence.
Requirements
Node 22.6 or later (the CLI runs its TypeScript sources through Node type stripping; the launcher supplies the flag on versions that need it). Git, plus whatever your arms and oracle need (for the examples here: python3).
Quick start
A spec:
Every run prints its cost estimate before the first trial. A run without a budget is refused. Start with a small K: the report on an inconclusive run prints the exact K that would resolve it and the estimated cost, and plzebo extend <receipt.json> --to-k K reuses the trials you already paid for. A receipt can be extended once, and the extension is disclosed inside it.
Auth modes
auth: placebo(default): you exportANTHROPIC_API_KEYorOPENAI_API_KEY; arms only ever see placebo keys. Strongest metering guarantee: a bypassing call fails loudly.auth: passthrough: the arm uses its own login. No API credits are spent; USD is imputed from metered tokens at list rates and the receipt discloses this. Tokens are the ground truth either way. Verified for Claude Code, which honorsANTHROPIC_BASE_URLunder subscription auth. Codex under ChatGPT auth routes to its own backend and ignoresOPENAI_BASE_URL, so subscription-authed Codex is unmeterable; run Codex arms in API-key mode via thecodex-clitemplate instead.
Two caveats for passthrough arms. A trial that bypasses the meter is excluded rather than falsely counted, but the tokens it consumed upstream are real; the receipt cannot see them. And a personal login carries personal agent configuration: instructions, hooks, and memory files travel with it, which can inflate costs and, for agents that act on standing instructions, cause writes outside the trial workspace. Prefer isolated-config templates when comparing loops rather than your own setup.
Model-mix arms (orchestrator and workers on different models)
Every cost node in a receipt records two models: role, the model the loop REQUESTED, and model, what the arm's rewrite rules resolved it to. A loop that requests different models for different jobs (a main session on one model, subagents on another) therefore encodes its role structure into the receipt, and arms that share the same command can bind those roles differently through rewrites alone:
The packaged scripts/arms/subagent-mix.sh shows the Claude Code shape: a headless session with an inline --agents definition whose worker requests a different model than the main session. Adapt the agent prompt and models to your task.
A model-mix comparison is only valid when the loop actually delegated: a trial whose cost tree has no worker-role calls measured a solo run, not a mix.
fidelity exits 1 if any completed trial never made a worker-role call, and prints each trial's call counts, tokens, and imputed spend grouped by requested and resolved model, so the mix an arm claims is checkable from its receipt.
Providers
The gateway speaks two wire formats: Anthropic and OpenAI-compatible, which covers most open-weight serving (Ollama, vLLM, OpenRouter, Together, and similar). Arms can override providers individually:
Constraint: plzebo can only meter loops that authenticate with a key or token and honor a redirectable base URL (ANTHROPIC_BASE_URL / OPENAI_BASE_URL).
MCP
npx plzebo-mcp serves four tools on stdio: measure_start, measure_extend, measure_status, and measure_result. Starting a measurement is two-phase: the first call validates the request and returns a cost estimate plus a one-time confirm token while spending nothing; only a second call presenting that token runs trials. A budget is mandatory, and MCP arms come only from named templates (claude-cli, claude-subscription, codex-cli), never raw shell. Job state and receipts persist under .plzebo/, so verdicts survive the session that produced them.
What a receipt supports, and what it does not
A receipt is a single-task result under a stated model mapping. It is not a model capability ranking and does not generalize beyond its fixture; the estimand text inside the receipt says exactly this. USD figures on passthrough arms are imputed at pricing-table rates from metered tokens, not billed spend, and the pricing table version travels in the receipt so the numbers stay recomputable after prices change.
License
MIT
来源:README.md,提交 073d415
工具
0版本历史
1- v0.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分