SI Agent News
DevelopingAgentsSecurityResearch

A hackathon project gives AI agents a spending wallet with hard limits

Telegraph Purse sits between an agent and its money, enforcing spending caps and keeping receipts. It runs on test funds only, but the design is worth studying.

$0.50default daily spending cap in the purse

The short version

Why it matters

Once an agent can pay for things, a bug or a bad instruction can turn into a real bill. This project shows the safer pattern: put the limits in a separate layer the agent cannot talk its way past. If you ever let software spend for you, decide the ceiling first and test what happens when it is hit.

A wallet with a leash

Ask an AI agent for the current Bitcoin price or whether it is raining in Lagos, and it has two weak options. It can guess from old training data, or it can call some outside service nobody approved. As dev.to reported, a developer built a third path for a hackathon: let the agent pay for one fresh fact at a time, with strict limits on how much it can spend.

The project is called Telegraph Purse. It was made for Telegraph Hackathon Season II, a contest with cash prizes, and the author discloses this up front. Everything runs on a test network with test USDC (a dollar-linked digital coin), so no real money moves. Treat it as a prototype, not a finished product.

What Telegraph and the purse do

Telegraph is a network where an agent can buy a single live fact for about $0.01. Providers on the network, called miners, supply the answer, and payment is settled in USDC. The purse is a small open-source MCP server. MCP, the Model Context Protocol, is a standard way to plug outside tools into an AI agent.

The purse acts as a gatekeeper between the agent and the money, and it does three jobs:

What a session looks like

In the author's example, a Hermes agent was asked for the Bitcoin price in US dollars. It said it would use the purse, bought the fact, and replied with $74,114. The answer came with the cost of $0.01, the miner that supplied it and a receipt code.

The defaults are $0.05 per answer and $0.50 per day, set in a configuration file. By the author's math, a runaway agent could buy about 50 answers in a day before hitting the wall. You can also restrict which kinds of facts are allowed, for example crypto prices and weather only.

The agent gets seven tools. Only one, which buys an answer, costs money. The others show a quote, today's spend against your caps, recent receipts, the wallet balance, what the network can answer, and a way to check a purchase on the Telegraph node.

Lessons from the failures

The most useful part of the write-up is what went wrong. On Nov 1 the weather miner was down. Telegraph's node returned an HTTP 500 error, which means a server-side failure, yet it still took payment, eight times. The first version of the purse recorded those as unpaid, which was inaccurate. Now any failure after a payment is signed gets the label failed_paid and counts toward your limits.

Two more lessons stand out. The documentation points to Base Sepolia in places, but the live test node actually settles on Ethereum Sepolia, so the author advises checking a block explorer yourself. And an allow-list has to fail closed: a free-form question only reveals what kind of fact it bought after payment, so with an allow-list active the purse simply refuses free-form questions.

The author reports 36 on-chain payments of 0.01 test USDC through Nov 14, 2026, covering crypto prices, weather and web search. A newer escrow payment option, where funds are held until delivery, settled one live answer in 367 ms. There are also 36 offline tests that run automatically on GitHub without a wallet.

Trying it, and its limits

The project needs Node 20 or newer and works with Hermes or any MCP client. A free probe command lists what the network can answer and what each answer costs, without spending anything. A setup command creates a throwaway wallet, mints 5 test USDC if the wallet holds a little Sepolia ETH for fees, and prints the configuration to paste into your agent. The author warns never to use a wallet that holds real funds.

The caveats are plain. This is one developer's hackathon entry on a test network, and the numbers are self-reported. The payment network itself had a billing problem during testing. Still, the pattern of caps checked before signing, a record of every attempt and failures counted as costs is a sensible template for anyone building agents that handle money.

What to watch

Try it

If you build with agents, run the free probe command from the project's GitHub repository to see live quotes without spending anything. Then write down the daily ceiling you would set for an agent of your own.

Sources and links

Liked it? Say why

Add a line for other readers.

No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.

Listen to the AI Wire headlines

Listen to the AI Wire

Listen to our daily AI shows every morning: on your commute, in the shower, wherever you are

Listen to the daily shows

First reported by dev.to · Read the original. Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.

More AI news