← Deep First Search

BlockRun + Agent Safe: pay-per-call AI with a hard cap

BlockRun gives agents 100+ models, search, data and compute behind one base URL, paid per call over x402 on Base. Agent Safe adds the cap people need before leaving an agent running: payments go only to BlockRun's address, never above your per-call cap, never past the budget, whatever the agent was told.

Tested live on Base mainnet (2026-10-07): an agent paid BlockRun 0.003 USDC to read a URL through /v1/exa/contents and got the page. Transaction.

1. Add BlockRun as a merchant

BlockRun prices each endpoint differently, so cap the call instead of pinning one price:

import { createAgentPay, MerchantRegistry } from "@deepfirstsearch/agent-pay";

const registry = new MerchantRegistry([{
  origin: "https://blockrun.ai",
  payTo: "0xe9030014F5DAe217d0A152f02A043567b16c1aBf", // BlockRun's Base address, as in its 402
  network: "eip155:8453",
  maxPerTx: 20_000n, // never more than 0.02 USDC per call
  label: "BlockRun",
}]);

If your agent uses a single endpoint, set pricePin to its price for an exact match.

2. Pay per call

const pay = createAgentPay({
  registry,
  policy: { allowedNetworks: ["eip155:8453"], periodBudget: { amount: 2_000_000n, periodMs: 86_400_000 } },
  payer: () => yourWallet,
  session: { readsUntrustedInput: true, accessesSensitiveData: false, canPay: true },
});
const plan = pay.commitPlan([{ origin: "https://blockrun.ai", maxSpend: 500_000n }], 60 * 60_000);

const res = await pay.fetch("https://blockrun.ai/v1/exa/contents", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ urls: ["https://example.com"] }),
}, { plan });

The SDK reads BlockRun's receipt under either header name (PAYMENT-RESPONSE or X-PAYMENT-RESPONSE), so a settled call is never reported as failed.

3. Or through MCP

{ "origin": "https://blockrun.ai", "label": "BlockRun", "payTo": "0xe9030014F5DAe217d0A152f02A043567b16c1aBf",
  "price": "0.02", "tolerancePct": 0, "maxPerTx": "0.02", "maxSpend": "2.00" }

(The MCP config takes a price; use your per-call ceiling there.)

Source, issues and the full SDK: github.com/DeepFirstHQ/deepfirstsearch. Questions or a merchant you'd like covered: Discussions.

If BlockRun changes its price or address

The pins are deliberate. The 402 is written by the server, and a 402 that suddenly names another address or a higher price is exactly what a redirected or hijacked payment looks like. So when BlockRun reprices or rotates its wallet, Agent Safe refuses and nothing is signed:

Confirm the change through BlockRun's own channels (its site, docs or announcement), then update pricePin or payTo in the registry, or price or payTo in the MCP config. To absorb small price changes without a prompt, allow a tolerance instead of removing the pin: toleranceBps in the registry (1000 = up to 10% over the pin) or tolerancePct in the MCP config.

Agent Safe is an independent open-source project (MIT), live on Base mainnet as an unaudited beta. Not affiliated with BlockRun.