BlockRun
Integrations / Coinbase AgentKit

Pair Coinbase AgentKit with BlockRun for models paid from the agent's own wallet

An AgentKit agent already holds on-chain assets; add the BlockRun Python SDK and it pays per request for every model in the catalog from the same wallet, over x402.

How it works

AgentKit gives an agent a wallet and on-chain actions. BlockRun gives it something to think with that is paid the same way: the Python SDK signs an x402 payment from the agent's key for each model call, so the agent that holds USDC on Base is also the agent that buys its own inference.

The pairing is two packages and a key. No provider account is created; the agent's spend on models appears as on-chain settlements next to its other transactions, which is what makes an autonomous budget auditable.

Behind it is the BlockRun catalog: 78 chat models plus image, video, music and speech generation, search, market data and multi-chain RPC, priced per call. 6 open-weight models are free and need no wallet.

Setup

1. Install

pip install coinbase-agentkit blockrun-llm eth-account

2. Use the agent's key for model calls

from blockrun_llm import LLMClient
client = LLMClient(private_key=agent_private_key)  # the AgentKit wallet's key
print(client.chat("openai/gpt-5.4", "Summarise my last three trades"))

Questions

Does the agent need a second wallet?
No. The same key that AgentKit uses can sign x402 payments for model calls.
Where do I see what the agent spent on models?
On-chain, as USDC settlements from the agent's wallet, and in the response usage for each call.