Standards code
ERC-8203 metered billing profile (Draft): how to bill an AI agent for each call
You want to bill an AI agent for each call without paying a network fee for each call. This document shows the pattern on top of ERC-8203, a Draft in an open pull request (#1614), not merged.
Install
Get the code
git clone https://github.com/Aboudjem/erc-8203-metered-billingWhat it does
- Shows how the existing ERC-8203 interface supports billing by usage.
- Describes three stages: open a session, meter the usage, settle at the end.
- Covers three paths: both parties agree, the provider goes silent, the meter is contested.
- Explains how to settle many sessions at once with one Merkle root.
- Lists the questions that are still open.
How it works
- 1. Open, off-chain. The client signs a lock that caps the budget of the session, with no transaction.
- 2. Meter, off-chain. The provider sends signed usage receipts as the calls happen.
- 3. Settle, in one on-chain transaction. Either party submits the latest receipt.
- 4. The contract pays the amount earned and refunds the rest.
Limits
- It is a document, not code. It adds no new contract, no new interface and no new standard.
- It is not part of the standard. The README calls it a non-normative profile.
- ERC-8203 is a Draft in an open pull request (#1614). It is not merged.
- Some questions are open, such as a unit price fixed at the start or one that floats.
- Good for
- Billing an agent for each API call, metering compute, or a data feed subscription.
- Not for
- A single purchase: the README calls the pattern overkill for that.
Questions
What is the ERC-8203 metered billing profile?
It is a document that shows how to bill an agent for each call with the ERC-8203 interface. ERC-8203 is a Draft in an open pull request (#1614).
Is the metered billing profile part of ERC-8203?
No. It is a non-normative profile. It documents a pattern and adds no new contract and no new standard.
How do I read the metered billing profile?
Read the README on GitHub, then the full worked example in docs/profile.md. There is no code to install.
Is the metered billing profile free?
Yes. The README marks it CC0-1.0, a public domain dedication.