Inspiration

Machines are starting to do real work on their own such as delivery robots, drones, EV fleets. But the moment one needs to buy something, like a few minutes of charging, a human has to step in with a card or an app. We wanted to see what happens when the machine can pay for itself, safely, with limits a human sets once and also how others could benefit in this style of system.

What it does

Tollgate is an autonomous payment agent for machines. In our demo, a simulated delivery robot notices its battery is low, finds a pay-to-power charging dock, and gets back an x402 "402 Payment Required" price. The agent than decides whether the price is acceptable. Once approved, it pays in USDC on Solana (currently devnet only), and the dock powers on only after the payment settles.

Every payment passes through guardrails enforced in code, not by the AI:

  • Per-payment cap and a rolling 24-hour budget
  • Allowlist for payee, network, and asset
  • Price-tamper check (the 402 amount must match the advertised price)
  • Human approval above a threshold, by dashboard or voice
  • Rate limit and a kill switch

A live dashboard shows the robot, the docks, the budget, and each payment. The robot speaks its decisions out loud, and the operator can approve, deny, pause, or resume by voice. Voice can never raise limits or start a payment. In addition, the voice volume can be toggle on/off and adjusted.

How we built it

  • Charger server: Node.js with the official x402 v2 packages and the x402.org facilitator. Three simulated docks, settle-before-power-on, and replay protection (a replayed payment gets HTTP 409).

  • Agent: a logged decision loop: OBSERVE → DECIDE → DISCOVER → PLAN → GUARD → PAY → VERIFY → RECORD. Claude (Haiku 5.5) proposes a plan (which dock, how many minutes, why), with a rule-based planner as fallback. The LLM only proposes. Code enforces every limit against the real 402 before anything is signed.

  • Solana: USDC transfers on devnet using the x402 "exact" SVM scheme. The agent signs the transfer and the facilitator co-signs as fee payer. No custom on-chain program is deployed.

  • QuickNode Streams: a custom filter watches for USDC transfers into the merchant account and posts to an HMAC-verified webhook, so each payment is confirmed twice: once by the facilitator and once independently on-chain.

  • ElevenLabs: Text-to-Speech for the robot's voice and Speech-to-Text for operator commands.

Everything was written from scratch immediately after the kick-off meeting was over.

Challenges we ran into

  • Keeping the AI out of the money path: The planner can suggest, but it can't sign, so we had to design the loop so that a bad or malicious plan is refused before signing.
  • Fake 402s: We wrote attack tests with inflated amounts and swapped payees to prove the agent refuses them.
  • Webhook reliability: Our Streams webhook ran through a temporary tunnel whose URL changes on restart, which taught us to plan for a stable deployment early.
  • Voice safety: Deciding what voice is allowed to do (approve, deny, pause) and what it must never do (raise limits, start payments). -GUI registry: Determining the features, permissions, and capability each owner should have over its agent.

Accomplishments that we're proud of

  • Verified autonomous USDC payments on Solana devnet, including dashboard-approved and voice-approved payments
  • Guardrail refusals proven live: per-payment cap, daily budget, and human deny
  • 118 passing tests, including tampered-402 attacks refused before signing

What we learned

x402 makes machine payments feel like a normal web request, and that's the point: the hard part isn't paying, it's deciding when not to pay. Putting limits in code and treating the LLM as an advisor made the system something we'd trust with a real wallet.

What's next for Tollgate

  • Non-custodial agent budgets using SPL delegated spending.
  • A stable hosted deployment.
  • A physical demo: a real robot that drives to a charging pad and pays for its own power.
  • Agent expanded capability to cover drone devices.
  • Mainnet, once the guardrails have been tested harder.
  • Transition to TSE network to improve engagement with TSE-X product.

Built With

Share this project:

Updates

Submission history