AgentBill

v0.3.1
io.github.marketinglior-pixel/agentbill-mcp Checked 3 days ago Published 2 months ago

One spend ceiling per agent job, as MCP tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

preflight

Check if an agent is allowed to run before starting work. Call this at the start of every agent invocation. Returns approved=True when the run has budget. Returns approved=False with a reason when preflight refused the call (budget_exhausted, ceiling_exceeded, free_tier_exceeded, task_ceiling_exceeded). Nothing is stopped by this server; the host decides. A unit is an integer you define and pass. AgentBill reserves the number you send and never converts those units into money, so the ceiling is only as tight as your estimate. The common convention is 1 unit =…

ParameterTypeDescription
agent_id *string
ceiling
customer_idstring
estimated_unitsinteger
idempotency_key
task_ceiling
task_ref

record_event

Record a billable event after agent work is complete. Call this once per unit of work completed. Safe to call from retried or parallel workflows, duplicate submissions are ignored automatically. Args: agent_id: Identifier for this agent or task type. Appears in the dashboard. units: Number of billable units this event represents. Default is 1. customer_id: Your internal customer identifier. Defaults to "default". metadata: Optional key-value pairs stored with the event (e.g. model name, latency).

ParameterTypeDescription
agent_id *string
customer_idstring
metadata
unitsinteger