The recipe

One function. One wallet. Three paid calls. That's the whole agent.

You give it a topic. It scrapes the open web for relevant pages, asks an edge-data endpoint whether anything market-moving is happening on that topic right now, then hands the raw material to a summarizer that writes a 500-word brief with footnoted sources.

On the bot wallet I ran this from this morning: $0.04 per topic. Wall time: 7.2 seconds, almost all of it waiting on the summarizer.

The pieces

WebProbe at webprobe.agentutility.ai/scrape returns ranked page extracts for a query. $0.012 per call at depth=3, twelve pages back.

EdgeFinance at edgefinance.agentutility.ai/signal returns the freshest market-relevant signal tagged to a topic. $0.008 per call. Returns { signal: null } when nothing applies, which is most of the time for non-financial topics.

Wordmint at wordmint.agentutility.ai/summarize takes a bundle of sources and writes a brief at a target word count. $0.02 per call at 500 words.

No API keys to provision, no quota dashboards to babysit. Just a wallet with a few bucks of USDC on Base.

The code

import { x402Client } from "@x402/client";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.WALLET_PK as `0x${string}`);
const x402 = x402Client({ account, chain: "base" });

export async function research(topic: string) {
  const scrape = await x402.post(
    "https://webprobe.agentutility.ai/scrape",
    { query: topic, depth: 3, max_pages: 12 }
  );

  const signal = await x402.get(
    `https://edgefinance.agentutility.ai/signal?topic=${encodeURIComponent(topic)}`
  );

  const brief = await x402.post(
    "https://wordmint.agentutility.ai/summarize",
    {
      sources: scrape.results,
      context: signal.data,
      target_words: 500,
      format: "brief_with_footnotes",
    }
  );

  return {
    topic,
    brief: brief.text,
    citations: brief.citations,
    market_context: signal.data,
    spent_usd: scrape.cost + signal.cost + brief.cost,
  };
}

if (import.meta.main) {
  const out = await research(process.argv[2] ?? "circulating USDC on Base");
  console.log(out.brief);
  console.log(`\n[${out.citations.length} sources · $${out.spent_usd}]`);
}

Run it.

WALLET_PK=0x... bun run research.ts "circulating supply of USDC on Base"

What comes back

The brief.text field hits the target word count within about 5%. Wordmint backfills citations using the URLs WebProbe returned, so every claim has a [1] style footnote pointing at a real page you can click. The market_context blob from EdgeFinance is JSON with fields like price_delta_24h, mention_spike_z, and any matched regulatory headlines.

For the run I did on "circulating supply of USDC on Base" just before writing this: WebProbe pulled 11 pages, EdgeFinance picked up a Coinbase blog post from this morning, and the brief opened with the current figure of 9.4B citing that post as source 1.

For a topic with no market angle, like "history of the Voynich manuscript," EdgeFinance returned { signal: null } and Wordmint quietly ignored the empty context field.

Cost knobs

Two things mostly move the bill, plus one optional saver.

Depth on WebProbe. At depth=1 you pay $0.004 and get 4 pages. At depth=5 you pay $0.022 and get 25. Depth=3 is the right balance for a brief at 500 words.

target_words on Wordmint. Pricing is linear. A 200-word brief is $0.008, a 1000-word brief is $0.04. Don't ask for more than you'll actually read.

Honestly, for non-financial topics you can skip EdgeFinance and save the eight cents per hundred runs. Wrap it in an if (looks_financial(topic)) and move on.

Why split it into three calls

You could ask a frontier LLM to do all this in one shot. It'd cost more, take longer, and you wouldn't have real URLs to cite.

The x402 split puts each step behind an endpoint that does one thing, prices it explicitly, and lets you swap any piece. Tomorrow when someone lists a better summarizer at half the price, you change one line. The wallet doesn't care. The scraper doesn't care.

Copy this pattern. Compose small paid pieces and let the wallet handle the billing. Log the cost field on every response so you actually know what your agent costs to run.