// Blog

Technical notes for AI agent builders

Tutorials, comparisons and design patterns for building autonomous agents that self-fund, call 345+ models and orchestrate MCP Tools.

The cache decides the price: prompt caching and the x402 upto scheme

Prompt caching turned per-call LLM pricing into a function of history: cache writes cost 1.25x base input, cache reads 0.1x, and which one you get depends on traffic in the last five minutes, on the model that served the request, and on the workspace that owns the cache. We price a real agent loop on Claude Opus 5 — the same 30,000-token prefix at $0.2100 cold and $0.0375 warm — then show why x402's exact scheme, built on EIP-3009's fixed signed amount, cannot express that. The answer is already merged: the upto scheme, where amount means the authorized maximum at verification and the measured consumption at settlement, implemented on EVM through Permit2 because EIP-3009 requires exact amounts at signature time. We verify the x402UptoPermit2Proxy contract on Base, walk the six-month commit history of the scheme, cover the minimum-cacheable-prefix thresholds that make model fallback silently destroy caching, and close with what a gateway owes its agents: normalized cache accounting in the OpenAI-compatible usage object, cache-aware fallback ordering, and a receipt that says why the number is the number.

15 min read →

TEE-attested agent wallets: what a TDX quote actually proves

"The agent's key never leaves the enclave" is the pitch behind every TEE agent wallet. We audited the actual spec: the HKDF that derives the key, the two-link signature chain, what MRTD and the RTMRs measure, and what it costs to verify on-chain. The attestation proves which code runs on which hardware. It does not prove the wallet you funded is the wallet that signs.

14 min read →

ERC-7824 and Nitrolite: state channels audited for agent payments

State channels promise per-token billing with no gas per call — exactly what an LLM gateway wants. We audited ERC-7824 against the deployed Nitrolite contracts, censused the ChannelHub on Base, Ethereum and Polygon, and found the session-key delegation an agent would rely on cannot sign its own exit.

15 min read →

USDT0 meets x402: an audit of Tether's WDK rail on Plasma and Stable

Tether's Wallet Development Kit added an x402 guide on February 18, 2026: a self-custodial agent wallet signs an EIP-3009 authorization in USDT0 and a hosted facilitator settles it on Plasma or Stable. We read the docs, pulled both token contracts, resolved their proxies, read the verified TetherTokenV2 source, cloned the Semantic demo and adapter, unpacked the current wallet package from npm, probed both chains and the facilitator, and sampled recent traffic. The contracts do what x402 needs, including ERC-1271 for smart-account agents, but version() reverts, Plasma has no upstream default-asset row, the guide documents v1 headers while installing the v2 SDK, the hosted facilitator returned HTTP 500 and 503 on the day we tested, the MCP toolkit on npm is a 0.0.0 placeholder, and 5,000 recent Plasma transactions plus 1,200 Stable blocks contained zero EIP-3009 calls. Semantic's roadmap ends in a pay-per-token LLM router.

18 min read →

Entra Agent ID audited: blueprints, fmi_path and the agent marker claim

Microsoft Entra Agent ID went GA in April 2026 and got an MCP-server how-to on September 3. We audited the primary sources: the 58 Markdown files under docs/agent-id in the public entra-docs repo, the Graph beta resource types, the sidecar's OpenAPI document and image tags on MCR, and the token claims reference. The model is unusual: an agent identity is a service principal with no credentials of its own. Its blueprint holds the credential and impersonates the agent through a two-hop client_credentials exchange keyed by fmi_path. The resulting token carries xms_par_app_azp and facet claims valued 11 or 13. We map the three OAuth flows, the 59 Graph permissions blocked for agents, the sidecar's HTTP contract, the federation path for agents that run outside Azure, and the exact-match resource rule that makes or breaks an MCP server behind Entra.

20 min read →

Passkey signers on x402: P-256 from the Secure Enclave to USDC

The x402 spec still says a payment signature is 65 bytes. Ours was 640. We generated a P-256 key with openssl, made it the owner of a Coinbase Smart Wallet on a Base fork, signed a real EIP-3009 authorization as a WebAuthn assertion, and settled it through USDC's bytes-signature overload. Along the way we measured the EIP-7951 precompile on Ethereum, Base, OP Mainnet, Arbitrum and Polygon, compared it with the Solidity fallbacks, replayed the verification against Base mainnet with state overrides, and read what the x402 facilitator actually does with a signature that cannot be recovered with ecrecover.

16 min read →

Agentic week: Cardano got into x402 and reset its clocks

Between 4 and 11 September, 23 pull requests merged into x402 and the biggest was a fourteen-week Cardano integration. Getting a chain with probabilistic finality in forced the facilitator timeout from 30 to 90 seconds, fixed Hono and Next adapters that could return an empty body after a long settle, and made the seller's maxTimeoutSeconds the MCP client's abort timer. Also: a double-encoding catalog poisoning fix ported to three languages, a minDeposit hint with a buyer-side ceiling, the MCP Python SDK refusing off-origin redirects, X Pay shipping responses before settlement, and Visa's 23 percent trust number.

12 min read →

GENIUS Act rulebook: what regulated dollars mean for paying agents

The dollar an agent spends over x402 is about to become a licensed product. We audit the GENIUS Act and its five pending proposals as an operator: the three definitions that decide whether a payment gateway is a digital asset service provider, the three prohibitions with dates in 2027 and 2028, the freeze capability that Section 4(a)(6) turns into a licensing condition and that already lives in USDC's transferWithAuthorization modifiers, and the x402 facilitator code that cannot name a blacklisted address when it fails. Plus the interest ban, who is lining up to be a permitted issuer, and what it all means for a gateway that accepts USDT and USDC.

17 min read →