Repository navigation
ADK agent that pays for a tool over x402 within an operator-set cap and verifies the receipt #7491
ShiftAboveCtrl
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.
A small ADK agent that buys a paid capability over x402 inside a spend cap the model cannot change, and verifies the signed receipt it gets back.
https://github.com/ShiftAboveCtrl/tollex/tree/main/examples/google-adk (
root_agentwith four function tools:tollex_plan(free),tollex_terms(free),tollex_buy,tollex_verify_receipt)What may be useful beyond Tollex itself:
tollex_buyonly works when the operator setsTOLLEX_ALLOW_PAYMENTS=1, a per-call ceilingTOLLEX_MAX_ATOMIC_USDGand a session budgetTOLLEX_MAX_SESSION_ATOMICin the environment. They are never tool arguments, so the model cannot raise them.TOLLEX_RAIL=basefor USDC on Base, orrobinhood): a 402 asking for another network, token or a higher amount is refused before anything is signed.The capabilities are Robinhood Chain data (stock-token quotes and halts, chain reads, call simulation, x402 endpoint inspection), about 0.008 USD per call in USDC on Base. I'm from the Tollex team. Feedback on the tool shapes for ADK welcome.
All reactions