ERC-8183 · Draft · ERC · 2026-02-25
ERC-8183: Agentic Commerce
A minimal on-chain job escrow for AI agents and other service providers: a client funds a job in an ERC-20 token, a provider submits work, and a designated evaluator releases payment or triggers a refund.
What problem does it solve?
When software agents buy services from other agents (or from people), they need a way to pay that doesn't require trusting the other side: lock the money up front, release it only when the work is accepted, and get it back if nothing happens. Many such flows need nothing more than that.
ERC-8183, the Agentic Commerce Protocol, standardizes that minimal surface: a job with an escrowed ERC-20 budget, a small state machine, and a single evaluator who decides whether the work is done. Keeping the core tiny makes implementations easy to audit and compose, and extra behavior plugs in through optional hooks.
How it works
Each job records client, provider, evaluator, description, budget, expiredAt, status and an optional hook. States and transitions:
| From | To | Who / how |
|---|---|---|
| Open | Funded | client or provider setBudget, then client fund(jobId, expectedBudget) |
| Open | Rejected | client reject |
| Funded | Submitted | provider submit(jobId, deliverable) |
| Funded / Submitted | Rejected | evaluator reject (refund to client) |
| Submitted | Completed | evaluator complete (pay provider, minus optional fee) |
| Funded / Submitted | Expired | anyone claimRefund after expiredAt |
- The provider can be left as
address(0)at creation and set later withsetProvider, for example after bidding. fundtakesexpectedBudgetand reverts if the budget changed, protecting the client from front-running.deliverableandreasonarebytes32references (a hash, IPFS CID or attestation) so reputation systems such as ERC-8004 can index outcomes.- The evaluator can be the client itself, a third party, or a contract.
- A platform fee in basis points may be charged on completion only, never on refund.
Hooks (IACPHook.beforeAction / afterAction) run around every action except claimRefund, enabling allowlists, KYC checks, reputation updates or atomic side transfers.
Sample code
A client hiring an agent with ethers v6 (contract address and ABI fragments are placeholders for an implementation):
import { Contract, Wallet, JsonRpcProvider, parseUnits, id } from "ethers";
const signer = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(process.env.RPC_URL));
const acp = new Contract(process.env.ACP_ADDRESS!, [
"function createJob(address provider, address evaluator, uint256 expiredAt, string description, address hook) returns (uint256)",
"function setBudget(uint256 jobId, uint256 amount, bytes optParams)",
"function fund(uint256 jobId, uint256 expectedBudget, bytes optParams)",
], signer);
const budget = parseUnits("25", 6); // 25 units of a 6-decimals token
const expiredAt = BigInt(Math.floor(Date.now() / 1000) + 86_400);
const jobId = await acp.createJob.staticCall(providerAddr, evaluatorAddr, expiredAt, "Summarize report", "0x0000000000000000000000000000000000000000");
await (await acp.createJob(providerAddr, evaluatorAddr, expiredAt, "Summarize report", "0x0000000000000000000000000000000000000000")).wait();
await (await acp.setBudget(jobId, budget, "0x")).wait();
// approve the payment token to the ACP contract first, then:
await (await acp.fund(jobId, budget, "0x")).wait();
Hook interface from the spec:
interface IACPHook {
function beforeAction(uint256 jobId, bytes4 selector, bytes calldata data) external;
function afterAction(uint256 jobId, bytes4 selector, bytes calldata data) external;
}
Things to know
- Status: Draft. Function signatures may still change.
- The evaluator has full power over a submitted job; choose one the client trusts, or use a contract with clear rules.
- Hooks are trusted code picked by the client. A reverting hook can freeze a job until expiry, which is why
claimRefundis deliberately not hookable. Hooks should not be upgradeable mid-job. - The spec requires only one payment token per contract; per-job tokens are optional.
- Related agent standards: ERC-8004 for agent identity and reputation, ERC-8001 for multi-agent coordination.