Skip to main content
Glama

AgentBill

AIエージェント向けの従量課金システム。事前チェック(Preflight)。リクエストごとの上限設定。Stripe不要。


Stripeはいくら使ったかを教えてくれますが、それでは遅すぎます。 AgentBillは、予算を超過している場合、エージェントが実行される前にブロックします。

「Stripeをセーフティネットとして使っている時点で、その実行はすでに失敗している」 — scarlett1908, r/LangChain


インストール

pip install agentbill-sdk

Related MCP server: agent-budget

クイックスタート

from agentbill import AgentBillClient

client = AgentBillClient(api_key="agb_your_key")

check = client.preflight(agent_id="researcher", budget=5.00) if not check.approved: raise Exception("予算超過")

client.record(agent_id="researcher", cost=check.estimated_cost)

APIキーの取得: https://agentbill.fly.dev/register


機能

事前チェック(Preflight)。エージェントが実行される前に、AgentBillは「この顧客に十分な予算があるか?」を確認します。予算がなければ、計算リソースが消費される前にブロックします。

リクエストごとの上限設定。月間上限では、一度の不適切な実行を防ぐことはできません。3時間の調査ループが1回あるだけで、上限に達する前に予算を使い果たしてしまう可能性があります。AgentBillは呼び出しレベルで上限を強制します。

成果ベースの計測。何が課金対象イベントかを定義できます。バイト数や秒数ではなく、エージェントが実行したビジネスレベルのアクションに基づきます。


無料枠

月間1,000回の事前チェック呼び出し。クレジットカード不要。


対応していないこと

  • ステートマシンや取り消しロジックを伴うマルチステップワークフロー(対象外)

  • 決済プロセッサの代替(AgentBillはその前段に配置されます)

  • 非開発者向けのノーコードダッシュボード


Node.js

npm install agentbill


なぜStripeではないのか

機能

Stripe

AgentBill

事前チェックによるブロック

いいえ

はい

リクエストごとの上限設定

いいえ

はい

計算前のブロック

いいえ

はい

エージェント向け設計

いいえ

はい


MCPサーバー

AgentBillは、Claude Code、Cursor、Windsurf、およびMCP互換のエージェントホストとネイティブに統合するためのMCPサーバーを提供します。

PyPIのagentbill-mcpからインストールしてください:

uvx agentbill-mcp

MCPサーバーは2つのツールを公開します:

  • preflight(agent_id, customer_id, estimated_units, ceiling) — 実行前に予算を確認します。予算が尽きている場合はブロックします。

  • record_event(agent_id, units, customer_id, metadata) — 作業完了後に課金します。

~/.claude/settings.json で設定します:

{
  "mcpServers": {
    "agentbill": {
      "command": "uvx",
      "args": ["agentbill-mcp"],
      "env": { "AGENTBILL_API_KEY": "sk_live_..." }
    }
  }
}

ソース: mcp/ | PyPI: agentbill-mcp | MCPレジストリ: io.github.marketinglior-pixel/agentbill-mcp


このリポジトリにスターを付ける

リクエストごとの上限設定が必要だった方は、ぜひスターを付けてください。他の開発者がこのツールを見つける助けになります。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows

      https://mcp.flowra.dev/mcp
    • Veqen brings together work and coding agent costs per person and team, product inference costs per customer, agent spending, protection incidents, invoice checks, chargeback and the month-end close. Ask your assistant to investigate recorded spending, compare model prices, review provider keys and incidents, record bills and credits, or manage budgets, alerts, teams and spending policies. Your account role and plan govern access. Provider-key shut-off and agent-card controls require the appropriate role and provider permissions. Destructive actions require confirmation, and organizations can require a second person to approve a shut-off. SDK budget blocking is not a guaranteed spending cap. Work and coding agents are free for up to 3 people; product inference is free up to $1,000 in monthly AI spend. Connect your Veqen account for private organization data. The separate public model-price server needs no account. Estimates remain separate from provider invoices. Setup and permissions: https://veqen-app.com/docs/mcp

      https://veqen-app.com/mcp
    • Veqen brings together work and coding agent costs per person and team, product inference costs per customer, agent spending, protection incidents, invoice checks, chargeback and the month-end close. Ask your assistant to investigate recorded spending, compare model prices, review provider keys and incidents, record bills and credits, or manage budgets, alerts, teams and spending policies. Your account role and plan govern access. Provider-key shut-off and agent-card controls require the appropriate role and provider permissions. Destructive actions require confirmation, and organizations can require a second person to approve a shut-off. SDK budget blocking is not a guaranteed spending cap. Work and coding agents are free for up to 3 people; product inference is free up to $1,000 in monthly AI spend. Connect your Veqen account for private organization data. The separate public model-price server needs no account. Estimates remain separate from provider invoices. Setup and permissions: https://veqen-app.com/docs/mcp

      https://veqen-app.com/mcp
    • Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for AgentPay — the payment gateway for autonomous AI agents. Fund a wallet once, give your agent the key, and it discovers, provisions, and pays for tool APIs on its own. One key, every tool.
      112 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Budget management and cost tracking MCP server for autonomous agents, enabling budget creation, cost recording, spending projections, and alert rules.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server that enables AI agents to request human approval before spending money, check approval status, verify signed tokens, and manage API keys.
      9
      MIT