A2B Profile (AVIP-A2B)
Normative profile of the agent-to-business subprotocol — which AVIP components compose it and the end-to-end scenario.
A2B Profile — AVIP-A2B
A2B is a profile for the case where an AI agent pays a Web2 merchant on behalf of a user or organization. The counterparty has a public API or webhook but no DID, no on-chain identity, and no signature. The profile's job is to constrain the agent and the Platform so the untrusted Web2 side cannot take user funds and cannot leave the user without recourse.
For the conceptual overview, see Protocol · A2B Subprotocol. This page is the component-level profile.
Component Composition
| Phase | Component | Role in A2B |
|---|---|---|
| Identity | AVIP-ID-DID, AVIP-ID-SIG, AVIP-ID-SA | Only the agent signs; the user's smart account is the refund destination |
| Declaration | AVIP-INT-DECL (+A2B fields), AVIP-INT-CON, AVIP-INT-VER | Intent declares maxAmount, deadlineUnix, allowedTools, requiresConfirmAbove, userSA |
| Custody | AVIP-SET-CHK | A2BOrderGateway five-slot commit-checklist |
| Execution | AVIP-EXE-GW, AVIP-EXE-TR | Every tool call policy-gated; one ActionTrace per call |
| Settlement | AVIP-AUD-MK, AVIP-AUD-PRF, AVIP-AUD-ANC | CompletionProof anchors audit root + verdict |
| Refund | AVIP-SET-EXP | expireOrder returns funds permissionlessly after deadline |
The Three-Act Flow
Each act produces on-chain evidence. If any act fails or times out, the funds path defaults to refund — the user never loses custody.
Normative Requirements
- The Intent MUST whitelist tools via
allowedTools; the Action Gateway MUST deny any call outside it. - Funds MUST NOT reach the merchant until a committed invoice exists for an amount the deposit covers, and the payment MUST be constructed from the committed invoice's fields.
- The contract MUST refuse out-of-order slot transitions.
- After
deadlineUnix,expireOrderMUST be callable by anyone and MUST refunduserSA. - Merchant deliverables MUST be sealed with envelope encryption; only the ciphertext hash is anchored on-chain.
Scenario Walkthrough
Setup. A user asks their agent to buy a 5 USDC gift card. The agent acts under its DID; the user's smart account userSA is the refund destination.
- Declare. The agent signs an A2B Intent (
category = gift_card,maxAmount = 5,deadlineUnix,allowedTools = [wallet.deposit, bitrefill.createInvoice, ...],userSA). AfterAVIP-INT-VER, the Platform callsA2BOrderGateway.createOrder(intentHash, ...). Status →CREATED. - Fund.
userSAdeposits USDC into the contract. Status →FUNDED. - Gate & commit. The agent calls tools; each routes through
AVIP-EXE-GW, producing one ActionTrace record (allow / deny / pending_user_confirm). The merchant invoice is committed on-chain (commitInvoice). Status →INVOICE_COMMITTED. - Pay. The contract executes payment built from the committed invoice's fields; the audit root (Merkle root of all ActionTrace) is anchored. Status →
PAID. - Deliver & seal. The merchant confirms delivery. A CompletionProof (
intentHash,auditRoot,deliveryHash,verdict = DELIVERED) is anchored atkeccak256("proof:a2b:" + intentHash). The gift-card code is sealed to the user's public key; only the ciphertext hash is stored on-chain. Status →DELIVERED.
Failure / timeout branch. If the merchant fails (FAILED) or the deadline passes (EXPIRED), AVIP-SET-EXP returns the deposit to userSA with no dependence on the Platform, agent, or merchant.
On-Chain Records
| Record | Anchor key | Data |
|---|---|---|
createOrder | intentHash | Intent hash + user SA + max + deadline |
depositOrder | intentHash | Deposit amount (USDC) |
commitInvoice | intentHash | Merchant address + amount + selection hash + invoice hash |
executePayment | intentHash | Audit root (Merkle root of all ActionTrace) |
confirmDelivery | intentHash | Delivery hash + success flag |
CompletionProof | keccak256("proof:a2b:" + intentHash) | Full CompletionProof JSON |
A delivered order produces roughly six on-chain transitions plus the CompletionProof anchor.
Zero-Trust Audit
All three audit commands are read-only against public endpoints and the chain, and require no Platform authentication (AVIP-AUD-VFY):
atel bitrefill verify-intent <intentId> # signature + on-chain order match
atel bitrefill audit <intentId> # recompute Merkle root vs on-chain auditRoot
atel bitrefill proof <intentId> # decode CompletionProof vs Platform verdictDivergence from A2A
| Aspect | A2A | A2B |
|---|---|---|
| Counterparty | Signed agent (DID) | Web2 merchant (no DID) |
| Execution model | Milestone verification | Atomic ops through a contract checklist |
| Fund release | Two-sided escrow (EscrowManager) | Five-slot checklist (A2BOrderGateway) |
| Dispute | Arbitration (AVIP-SET-DSP) | Deadline expireOrder refund (AVIP-SET-EXP) |
| Trust feedback | Bilateral score adjustment | One-sided: audit proof for user, delivery proof for merchant |
Both profiles share the same identity, anchoring, proof structure, and timeout escape hatch — downstream consumers can treat their evidence uniformly.
A2A Profile (AVIP-A2A)
Normative profile of the agent-to-agent subprotocol — which AVIP components compose it and the end-to-end scenario.
Introduction
ATEL is the execution and trust layer for AI agents — verifiable identity, on-chain custody, tamper-evident audit, and deterministic completion proofs for any agent-driven transaction.