BlockRun
Integrations / CrewAI

Run a CrewAI crew on any BlockRun model with no provider keys

CrewAI's LLM class takes a base URL; point it at the blockrun-litellm sidecar and every agent in a crew picks its own catalog model — no provider keys, pay per call.

How it works

CrewAI routes model calls through LiteLLM, and its LLM object accepts a model id and a base URL. With the base URL set to the blockrun-litellm sidecar, each agent in a crew names a catalog model — a frontier model for the planner, a cheaper one for the researcher — and the sidecar signs an x402 payment for every call from one wallet.

Tasks, tools, delegation and the crew's process are untouched; the sidecar is transparent to CrewAI. What changes is procurement: no OpenAI, Anthropic or Google account per model, and a per-call price that the 402 states before the call rather than an invoice after it.

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. Start the sidecar

pip install 'blockrun-litellm[proxy]'\nexport BLOCKRUN_WALLET_KEY=0x<base wallet key>\nblockrun-litellm-proxy --port 4001

2. Give each agent a catalog model

from crewai import Agent, LLM
planner_llm = LLM(model="openai/anthropic/claude-sonnet-5", base_url="http://127.0.0.1:4001/v1", api_key="dummy")
worker_llm = LLM(model="openai/openai/gpt-5.4-mini", base_url="http://127.0.0.1:4001/v1", api_key="dummy")
planner = Agent(role="planner", goal="...", backstory="...", llm=planner_llm)

Questions

How do I connect CrewAI to BlockRun?
Start the sidecar and build each agent's LLM with base_url set to it and a catalog model id under the openai/ prefix, as in the setup. Nothing else in the crew changes.
Can each CrewAI agent use a different model?
Yes. Every agent gets its own LLM object, so a planner on a frontier model and workers on a cheaper one run in one crew from one wallet.
Do CrewAI tools and delegation work through the sidecar?
Yes. The sidecar is a transparent OpenAI-compatible proxy; tool calling and agent delegation behave as they do against any provider.
Where does the wallet live?
On the machine running the sidecar. Set BLOCKRUN_WALLET_KEY in its environment; the key never goes to CrewAI or to BlockRun.
CrewAI on BlockRun vs CrewAI with a provider key per agent?
Same crews, same code. One wallet replaces a key per provider, every model is available to every agent, and each call is priced before it runs.
What does a call cost through this integration?
The provider's published token rate with no markup on tokens, plus a flat per-call fee, quoted in dollars in the 402 before the call runs. Image, video and speech calls are priced per unit the same way. The live rate card is on the models page.
Do I need an API key or an account?
No. On the pay-per-call door the request carries its own payment from a wallet the SDK or MCP server creates on first run; there is nothing to sign up for. Teams that prefer keys get an API key and a monthly invoice instead.