ResearchAgent · AI Tinkerers Singapore · 10 Oct 2026→ next ← back R replay P pause
ResearchAgent

A research agent with a wallet.

It answers from free sources first. When the missing piece sits behind a paywall, it can buy that one article straight from the writer, for cents, inside a budget you set. If the article doesn't contain what the writer promised, the money comes back.

Live runReplayed from its event log
Fri 9 Oct · 04:00:31 SGT
S$1.60budget left of S$2.00
S$0.40spent, net of refund
33.6 s · 2 bought · 1 refunded
Scroll the log or drag the timeline to scrub · hover a bar to see its event · click a row to jump to it

The question you just watched, "Are Kestrel Semiconductor's advanced-packaging lead times in Malaysia getting shorter?", with a S$2 budget. This is the live rehearsal run of 9 Oct (DeepSeek writing, OpenAI Decisions judging, XRPL Testnet settling), replayed at 2.4× from its 38 recorded events. Blue bars read and decide, orange bars pay, red is the failed proof, green is the refund and the verified article.

The whole system

Who does what

An LLM writes. A decision model judges what's worth buying. Plain code pays. The writers' sites and their search run on this laptop, so nothing comes from the open web. The models and the ledger are real online services.

Online: DeepSeek (writes), OpenAI Decisions · gpt-6-luna (judges; Cloudflare's Clef-flash is the one-line fallback), Cloudflare Workers AI (turns text into numbers for search), XRPL Testnet (settles payments). On this laptop: the engine, the wallet's spending rules, and eight writers' sites. The writers and their 81 articles are fictional and labelled SYNTHETIC.

Step 2 · Free answer

Free first. Then name what's missing.

DeepSeek writes from the free sources only, and every sentence cites an exact passage. The plan froze the facts you asked for before anything was read, so no article can change what counts as missing.

Answer v1 · free sources

Requested facts · frozen by the plan

Kestrel's advanced-packaging lead times in Malaysia, with dates and figures
waiting
Whether those lead times are trending shorter
waiting

DeepSeek · cited answer

Kestrel's Phase 2 plant in Penang was commissioned on 15 August 2026, raising capacity from 11,000 to 16,000 advanced-packaging units a month.Open Records · p2
Kestrel signed a 21-year contract on 8 September 2026 for 40 MW of solar for the plant.Load Factor · free post
No operator filing in the record gives customer lead times.Open Records · p17
Still missingLead times in Malaysia, with dates and figures

Real text from the run's answer v1. The citation chips point at passage IDs (p2, p17) in a source the agent has read; code checks each one before the answer is shown. The coverage check found 0 of 2 requested facts answered, so a gap stays open.

Step 3 · Decide

A decision model scores what's worth buying.

It reads each paywalled article's public teaser and returns numbers, not prose: does it fill the gap, is it original, is it credible. Code multiplies those by the writer's track record and compares value per dollar.

Round 1 · 12 paywalled candidates · top 6 shown
Writer · articlePrice Fills the gap?Original?Credible? × track recordValuePer S$Policy
value = fills-gap × original × (0.5 + 0.25 × credible) × track record  ·  buy only if value ≥ 0.20, then best value per S$ wins
THE OPENINGAlphaLeak is cheaper and promises the same thing, so it wins round 1 at 1.70 per S$ against The Fab Floor's 1.38. That is exactly the gap a bad actor aims for. Steps 6 and 7 close it.

Blue columns are the decision model's output (OpenAI Decisions · gpt-6-luna, one batched call per round). Orange columns are plain code. All numbers are from the live run. Every new writer starts with a track record of 0.80.

Why this model · we benchmarked two decision models

Buys the right article · F1 ↑

gpt-6-luna0.983
Clef-flash0.783

Probability error · Brier ↓

gpt-6-luna0.015
Clef-flash0.075

Cost per 1,000 rounds

gpt-6-luna$0.48
Clef-flash$0.44

SYNTHETIC benchmark: 160 generated scenarios, 64 held out, 3 repeats, under a decision rule written down before the run. Both models with our best wording and calibration. The whole study cost about US$0.96. A decision model returns probabilities instead of prose, so a threshold like 0.20 can mean the same thing on every question.

Step 4 · Only code pays

The budget is the only permission to spend.

The LLM has no buy button. It can say what's missing. It can't pick a purchase, raise the budget or pay. That happens in a few lines of ordinary code.

server/agents/decision.ts · the whole spending decision
// trust can only lower value, never the budget or cap
if (status !== 'active') verdict = 'SKIP_LOW_TRUST'
else if (rewrite)        verdict = 'SKIP_REWRITE'
else if (price > cap)    verdict = 'SKIP_OVER_CAP'  // S$1
else if (value < 0.20)   verdict = 'SKIP_LOW_VALUE'
else if (price > left)   verdict = 'SKIP_OVER_BUDGET'
else                     verdict = 'BUY'

// best value per dollar wins
pick = rows.filter(BUY).sort(byValuePerDollar)[0]
Budget leftof S$2.00
S$1.60
  • The LLM gets tools that can't spend: ask you a question, propose a plan, write the report.
  • S$1 cap per article, at most 3 buying rounds, buy only above the 0.20 bar.
  • One charge per intent. The signed payment is saved before it is sent, so a retry resends the same transaction and can't pay twice.

The meter replays the run's money: S$0.30 reserved and paid to AlphaLeak, S$0.30 refunded, S$0.40 paid to The Fab Floor.

Step 5 · Pay over HTTP

Paying is one extra round trip.

HTTP has had a status code for this since 1997: 402 Payment Required. x402 puts the price in a header. The agent pays on the ledger and asks again with the signed payment attached. Like a vending machine that speaks HTTP.

x402 v2 · scheme exact · network xrpl:1
+15.6 s

The price tag (decoded header)

HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: base64({
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact", "network": "xrpl:1",
    "asset": "XRP", "amount": "30000",
    "payTo": "rGeN8NcEVRVvWeFoyY9Df1TyiLq9AhoX5T",
    "maxTimeoutSeconds": 60,
    "extra": { "invoiceId": "{quote, article, version,
                 manifestRoot, amount, payTo}" }
  }]
})

The receipt

HTTP/1.1 200 OK
PAYMENT-RESPONSE: base64({
  "success": true,
  "network": "xrpl:1",
  "transaction": "FCC78F2D571A…E1C28323"
})

// + the article, its passages and their salts
// ledger 21,384,313 · tesSUCCESS
// 30,000 drops = 0.03 XRP, shown as S$0.30

The real AlphaLeak purchase. The agent pays the writer's own wallet; we never hold the money. Each writer runs its own facilitator, the part that checks and submits the payment. 8.7 s from 402 to article, most of it waiting for the ledger to validate. Explorer: testnet.xrpl.org · FCC78F2D…

Step 6 · Verify

Neither side trusts the other.

The writer checks the payment on the ledger before it delivers. The agent checks the writer's signature before it pays, then recomputes every promise after delivery.

Checks on both sides of one purchase

Agent · before payingIs this writer who it says?

  1. ·Manifest signature is valid
  2. ·Signing key belongs to the wallet being paid
  3. ·402 price and payee match the manifest
  4. ·Invoice names this article and its manifest

Writer · before deliveringDid I really get paid?

  1. ·Pays my wallet, exact amount
  2. ·Invoice ID matches this quote
  3. ·Not expired, not seen before
  4. ·Validated on the ledger · tesSUCCESS

Agent · after deliveryDid I get what was promised?

  1. ·Every passage matches its fingerprint
  2. ·Word count matches
  3. ·Every promised fact is really there
AlphaLeak · S$0.3015 passages
Promised: a dated figure in passage "lead-times". Delivered:
"Our sources say lead times out of Penang are collapsing and customers are already noticing the difference. Allocation is loosening, queues are shrinking… Expect the confirmation soon, and expect it to be big."
✗ Proof failed · no number, no date
The Fab Floor · S$0.40round 2
Promised: dated lead-time figures. Delivered:
"By 1 August 2026, the same Penang line was quoting 22 weeks… Then on 15 September 2026, the number came in at 18 weeks."
✓ Proof verified · 6 claims recomputed
ANALOGYThe manifest is a sealed envelope with fingerprints on the outside. Before paying you can't read the passages, but you can see their fingerprints (salted hashes). After paying you get the salts, so you can recompute every fingerprint and check every promise. A promise names the kind of fact, never its value, so it gives nothing away.

Real passages from the two articles bought in the run. AlphaLeak's fingerprints all matched (the text is what it said it was) but its promised dated figure isn't in the text. Fingerprint = sha256(salt ‖ index ‖ passageId ‖ text); the manifest is signed by the same XRPL key that receives the payment.

Step 7 · Refund and track record

A broken promise costs the writer.

The agent challenges the writer. The writer's own server re-checks and refunds on the ledger. Its track record drops either way, so a cheat gets one sale and then gets blocked.

From broken promise to blocked writer
  1. +16.1 sAgent sends POST /w/alphaleak/challenge with the tx hash and the claim lead-times-dated
  2. +22.3 sAlphaLeak's server re-checks the bytes it stored, finds the claim broken, and refunds S$0.30 on the ledger. Invoice ID = the original tx hash. Tx A23F2033…
  3. +22.3 sTrack record 0.80 → 0.40. Below 0.50 the writer is blocked: never bought, never cited.
  4. +22.8 sRound 2 buys The Fab Floor (S$0.40). Proof verified, track record 0.80 → 0.83.
AlphaLeak · track recordactive
0.40
00.50 blocked below1
BLOCKED
The Fab Floor · track recordactive
0.83
track record = (kept + 4) ÷ (kept + 5 × broken + 5)  ·  new writer: 4 ÷ 5 = 0.80  ·  one broken: 4 ÷ 10 = 0.40  ·  one kept: 5 ÷ 6 = 0.83

The answer changes

Answer v2: Kestrel's Penang lead time fell from 26 weeks (1 Jun) to 22 (1 Aug) to 18 (15 Sep 2026), a cut of 31% while capacity grew from 11,000 to 16,000 units a month. 2 of 2 requested facts answered.

The ledger can't force a refund: it can check a hash and a deadline, not whether a sentence contains a date. So the penalty lives in the track record. A writer who refuses or ignores a challenge for 30 s loses twice as much and is delisted. Calibration also counts: AlphaLeak claimed relevance 0.96 and delivered 0, so its score is multiplied by 1 − 0.96² = 0.08 as well.

How we built it

Built by coding agents, specced as GitHub issues.

Issues as specs, overnight orchestrated runs, parallel git worktrees, and agents that rehearsed this demo and wrote down where it breaks.

git log · every merged pull request
Fri 9 Oct
72pull requests merged
+75,352lines added
−65,301lines deleted
165GitHub issues, used as the specs
23PRs merged in one overnight run, in 2 h 17 min
3agent reviewers ran the live demo 13 times
US$0.96for the whole decision-model benchmark

Real PR titles and line counts from GitHub (Collaboration95/theFastandtheFungible). Blue bars are mostly new code, grey bars mostly deletion; bar height is lines changed (log scale), one bar per PR. The 6 Oct pivot threw away the first corpus and rebuilt search, payments and the agent loop in two days.

ResearchAgent

An LLM writes.
A decision model chooses.
Code pays.

Writers and articles: SYNTHETICModels: live