A
Glossary
Agentic Billing
Agentic billing is the set of billing mechanics that charge for work an autonomous AI agent performs rather than for a person's access: identifying the agent as a spender, authorizing spend before it acts, metering a multi-step run as one billable job, and settling calls the agent makes to other paid services.
Key Takeaways
Identity comes before metering. The account that pays and the actor that spends split apart, so every event needs an agent id and a run id.
The run is the billable unit, not the request. Anthropic reports agents using about 4x the tokens of a chat interaction, and multi-agent systems about 15x.
Authorization clears before the agent acts. AP2 v0.2 pairs an open-stage mandate carrying the user's constraints with a closed stage authorizing a specific amount.
Deduplication becomes a correctness requirement, not hygiene. A retried step double-counts unless every attempt carries a stable key.
Agent-to-agent settlement erases the customer record. x402 answers an unpaid request with HTTP 402 and settles per request from a wallet, with no account behind it.
What makes billing agentic?
Billing turns agentic when the actor generating charges is software the customer delegated authority to. That breaks the join every billing system rests on, one usage event to one human account. AI agent pricing covers the model choice separately.
Four identifiers have to travel with every event once an agent is in the loop.
Identifier | Answers | Why billing needs it
|
|---|---|---|
Customer id | Who pays | The invoice needs an account with a contract |
Agent id | Which delegate spent | Two agents on one account get capped separately |
Run id | Which task the spend belongs to | Collapses hundreds of steps into one line |
Step id | Which attempt inside the run | Separates a retry from extra work |
Drop the agent id and usage attribution stops at the account, so a customer questioning a charge gets a total, no explanation. Drop the run id and the invoice reads as raw API traffic, which is what I usually find.
How does an agent get charged for what it does?
The run gets charged, assembled from every step the agent took, after an authorization check that already ran. Three of these stages can't be reconstructed after the fact.
Authorize a ceiling. Check balance and entitlement, then reserve against it before the first step. AP2 v0.2 writes this as an open-stage mandate carrying the user's constraints, closed later against a specific amount.
Meter every step with a stable key. Each model call, tool call, and retry lands tagged with the run id and an idempotency key, so a replay counts once.
Decide what counts at ingest. Failed steps, cache hits, and duplicate attempts need one rule applied on arrival, not at invoice time.
Collapse the run. At 4x to 15x the token traffic of a chat interaction, a line item per step produces an invoice nobody reads.
Capture or release the hold. The consumed amount hits the ledger and the remainder returns to the balance, so a reservation never behaves like a charge.
Flexprice is enterprise-grade, open source usage based billing infrastructure for AI and SaaS companies. It can be deployed in your own VPC, on-prem, or on Flexprice's managed cloud. That puts the authorization check and the metering path in one system at a stated P99 under 60ms, so a balance check can sit inline in an agent loop. TestZeus, which builds AI agents that automate Salesforce testing for enterprises, went live in 3 days with 1 engineer and saved roughly a month of engineering time. Usage Metering covers ingest, and the event and wallet APIs are documented at docs.flexprice.io.
What breaks when agents transact without a human?
Everything in the invoice path that assumes somebody can be asked a question.
Nobody approves the overage. An agent hits its limit mid-run, and the system chooses alone between blocking, degrading to a cheaper model, or finishing and billing it. A spending cap with no defined behaviour past the ceiling abandons the run halfway.
Retry storms read as demand. A flaky dependency produces a burst of near-identical attempts, and a meter without deduplication bills it as consumption the customer never asked for.
Stale authorization outlives its task. A mandate written for one job shouldn't fund the next. Scope and expiry bind to the run, not to a long-lived session or key.
Agent-to-agent calls carry no customer. x402 settles per request from a wallet, so the service earning that revenue has no account, contract, or tax jurisdiction to attach it to.
Cost and price drift apart per run. Two identically priced runs can differ several times over in inference cost, and unprofitable customers stay invisible until the provider bill lands.
Related terms
Each of these pages picks up one mechanic named above.
AI agent pricing covers the model choice: per run, per action, per outcome, or per token.
Usage attribution ties consumption back to the account, agent, and feature responsible for it.
Spending cap is the ceiling that decides what an agent can do once its balance runs out.
Idempotency key is the identifier that keeps a retried step from counting twice.
Real-time metering is the ingest speed an inline authorization check depends on.
Credit burn-down is the balance mechanic an agent draws against while a run executes.
FAQ
Is agentic billing the same as agentic payments?
No. Agentic payments covers how a machine-initiated transaction clears through a payment rail. Agentic billing covers how the amount got calculated: which steps counted, what the run was authorized for, and which account owns the charge. The boundary is porous, since a signed mandate is something the billing system has to read.
Who gets billed when an AI agent spends money?
The account that delegated authority to the agent. The agent is the actor, not the payer, which is why both ids belong on every event. Attribution has to resolve downward from an invoice line to the run that caused it, and upward from a misbehaving agent to the account that will dispute the bill.
Can an AI agent have its own billing account?
It can hold a wallet and credentials, and per-request rails like x402 assume that. It can't hold the contract. Someone with legal capacity signs terms, owes tax, and files disputes, so an agent wallet still resolves upward to a customer of record.
Back to glossary
















