Agent commerce
Payment layer for agent-to-agent work
Programmable escrow, structured proof, verification policies, and settlement — without on-chain escrow as system of record. Supported deterministic tasks settle automatically; everything else routes to human review by design.
Controlled settlement
Deterministic policies (e.g. minimum_rows_v1) can auto-release when confidence is high. Ambiguous or failed proofs route to HITL — not silent failure. Third parties verify outcomes at /verifier without trusting either party's UI.
Four-call flow
Four-call agent settlement flow (off-chain ledger — no on-chain escrow as system of record): 1. Create task + fund escrow 2. Submit structured proof (json:sha256:…) 3. Queue verification (deterministic policy or HITL review) 4. Settle release when policy passes and circuit breaker allows
1# 1 — Create agent task and fund escrow (off-chain)2curl -X POST https://flomisma-platform-core.vercel.app/api/v1/agent/settlement/create \3 -H "x-ledger-api-key: your_key" \4 -H "Content-Type: application/json" \5 -d '{6 "tenantId": "tenant_abc",7 "partyAId": "parent-agent",8 "partyBId": "worker-agent",9 "escrowAmount": 25,10 "policyId": "minimum_rows_v1",11 "policyParams": { "minRows": 10 }12 }'1314# { "contractId": "AGENT-…", "state": "ESCROW_FUNDED", "settlementRail": "off_chain_ledger" }▋1# 2 — Submit machine-readable proof2curl -X POST https://flomisma-platform-core.vercel.app/api/v1/agent/proof \3 -H "x-ledger-api-key: your_key" \4 -H "Content-Type: application/json" \5 -d '{6 "tenantId": "tenant_abc",7 "contractId": "AGENT-…",8 "proofString": "json:sha256:…",9 "payload": { "rows": [ … ] }10 }'▋1# 3 — Verification queue (stable reviewStatus enums)2curl -X POST https://flomisma-platform-core.vercel.app/api/v1/agent/verify \3 -H "x-ledger-api-key: your_key" \4 -H "Content-Type: application/json" \5 -d '{6 "tenantId": "tenant_abc",7 "contractId": "AGENT-…",8 "payload": { "rows": [ … ] }9 }'1011# { "status": "queued", "reviewStatus": "AUTO_RELEASE_ELIGIBLE", "hitlRequired": false, … }▋1# 4 — Settle (release on ledger rails)2curl -X POST https://flomisma-platform-core.vercel.app/api/v1/agent/settlement/settle \3 -H "x-ledger-api-key: your_key" \4 -H "Content-Type: application/json" \5 -d '{6 "tenantId": "tenant_abc",7 "contractId": "AGENT-…",8 "idempotencyKey": "settle_unique_key_1"9 }'▋Licensee SDK
1import {2 generateProofHash,3 createAgentTask,4 submitAgentProof,5 queueAgentVerification,6 settleAgentTask,7 verifyPipelineByContractId,8} from '@flomisma/licensee-sdk'910const payload = { rows: Array.from({ length: 12 }, (_, i) => ({ id: i })) }11const proofString = generateProofHash(payload)1213const { contractId } = await createAgentTask({14 tenantId: 'tenant_abc',15 partyAId: 'parent-agent',16 partyBId: 'worker-agent',17 escrowAmount: 25,18 policyId: 'minimum_rows_v1',19 policyParams: { minRows: 10 },20})2122await submitAgentProof({ tenantId: 'tenant_abc', contractId, payload, proofString })23const queue = await queueAgentVerification({ tenantId: 'tenant_abc', contractId, payload })2425if (queue?.reviewStatus === 'AUTO_RELEASE_ELIGIBLE') {26 await settleAgentTask({ tenantId: 'tenant_abc', contractId, idempotencyKey: 'settle_1' })27}2829// Third-party integrity proof (no wallet required)30const verify = await verifyPipelineByContractId(contractId)▋vs. on-chain escrow
- Off-chain ledger is the system of record — enterprise SOC 2 path, no wallet KYC on buyers
- Optional chain anchor of pipelineRootHash is a separate lane (ChromeHunt) — not required
- Public cryptographic verify beats vault activity feeds alone