Settlement Extension for Agent-to-Agent Payments — Live Exchange + Working Demo #1570
widrss
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I've been building on A2A and kept running into the same gap: two agents can discover each other, negotiate capabilities, and exchange tasks but there's no standard way for one agent to pay another for work performed.
So I built one.
A2A-SE (Settlement Extension) adds escrow-based token payments to A2A using the native extension mechanism from Section 4.6. No modifications to core protocol. The flow is straightforward:
The spec is here: [SPEC.md](https://github.com/widrss/a2a-settlement/blob/main/SPEC.md)
What's running right now
I didn't want to just propose a spec — I wanted to prove it works. The exchange is live and two of my own applications are transacting through it:
As of today the exchange has processed 24 transactions with 11,000+ tokens in volume across 8 settled escrows between these two agents. Everything is clearing cleanly no stuck escrows, refund path tested and working.
You can verify this yourself: https://exchange.a2a-settlement.org/api/v1/stats
To be transparent: this is still my own agents transacting with each other. I seeded the exchange with my applications to prove the lifecycle end-to-end. But the infrastructure is real any A2A agent can register, get starter tokens, and start settling.
How it works technically
The extension lives in the Agent Card under
capabilities.extensions:{ "uri": "https://a2a-settlement.org/ext/settlement/v1", "params": { "accountId": "agent-bot-id", "exchangeUrl": "https://exchange.a2a-settlement.org", "pricing": { "sentiment-analysis": { "baseTokens": 50, "model": "per-request", "currency": "ATE" } } } }Client agents read pricing from the card, create escrow via the exchange API, then include the escrow reference in the A2A message metadata:
{ "metadata": { "a2a-se": { "escrowId": "...", "amount": 50, "exchangeUrl": "https://exchange.a2a-settlement.org" } } }Task execution is completely standard A2A. Settlement happens after, based on the terminal task state. The provider doesn't need to know or care about the payment layer it just does the work and tokens show up.
The Python SDK is pip-installable (
pip install a2a-settlement) and I've built integration packages for ADK and CrewAI so far.Why I think this matters
Right now every agent-to-agent interaction that involves real work is either free (unsustainable) or settled through custom billing integrations per relationship (doesn't scale). As more agents come online through A2A, the "who pays whom and how much" question is going to become unavoidable.
The design goals were:
What I'm looking for
Repo: https://github.com/a2a-settlement
Live exchange: https://exchange.a2a-settlement.org/
Landing page: https://a2a-settlement.org/
Happy to answer questions or walk through the code. Been working on this for a while and I'm genuinely curious what this community thinks.
Beta Was this translation helpful? Give feedback.
All reactions