Franklin: The First Economic Agent — An Open-Source AI That Spends Its Own USDC on Base


TL;DR — Most AI products write text or code. Franklin writes code and spends money to get the job done. It holds a USDC wallet, picks the best model per task from 55+ providers (Smart Router trained on 2M+ real requests), purchases trading data, generates images, pays for web search — all autonomously through x402 micropayments on Base and Solana. You state an outcome and the budget; Franklin decides what to call, what to pay, and when to stop. YOPO — You Only Pay Outcome. Apache-2.0, TypeScript, one npm package.
A new category: Economic Agent
Most AI products fit into one of three buckets — answer questions, write code, or automate a fixed workflow. None of them can spend money.
Franklin can. That single capability puts it in a different category we're calling the economic agent:
Economic Agent
Software that can hold a wallet, price its own actions, spend toward an outcome, and stop at a hard budget cap.
Four things have to be true at once for this category to exist:
- Purchasing power — it pays for models, tools, APIs, data feeds.
- Budget awareness — cost is part of the loop, not an afterthought tracked in a separate dashboard.
- Cross-vertical execution — code, trading, research, marketing, ops — the same agent across all of them, because the wallet is the same.
- Hard stopping conditions — the wallet balance is a real constraint, not a soft warning.

Franklin is the first product where all four are true at the same time. That's not because we wrote brilliant code — it's because Base + USDC + x402 made the unit economics finally work, and we built around that.
YOPO — the pricing model
You Only Pay Outcome. This is Franklin's pricing thesis, and it is the opposite of almost every other AI product:
| You pay for... | Result | |
|---|---|---|
| AI subscription (ChatGPT Plus, Cursor, etc.) | Access — paid whether you use it or not | $20–200/month, rate-limited |
| Pay-per-call (raw OpenAI/Anthropic API) | Every attempt — including failed retries | Hidden cost from retries and dead-ends |
| Franklin (YOPO) | The outcome — each signed micropayment | Provider cost + 5%. No more. |

Three downstream consequences:
- No subscriptions. Use Franklin for $0.50 one week and $50 the next — you pay for compute actually consumed, nothing more.
- No rate limits. Subscriptions throttle you when you need AI most. YOPO has no artificial caps — if you have USDC, you have access.
- No overdraft. The wallet balance is the hard limit. When it's empty, Franklin stops. No surprise bills, no rate-limit walls at 3 a.m.
Concretely — $1 of USDC in Franklin's wallet gets you roughly:
- ~400K GPT-4o input tokens
- ~7M DeepSeek tokens
- ~13M Gemini Flash tokens
- ~20 DALL-E 3 images
- ~40 Exa neural web searches
- Unlimited NVIDIA
gpt-oss-120b(free tier, no wallet needed)
A $5 top-up is a meaningful budget for most knowledge-worker tasks. A $50 top-up is a developer's monthly Cursor bill, except you actually own the spend.
What Franklin can execute
Franklin is chat-first. You don't wire a DAG, configure six API keys, or commit to one model vendor. You state an outcome — Franklin decides what to read, search, fetch, call, and pay for.
📈 Trading signals
> what's BTC looking like today?
✓ TradingSignal BTC
## BTC Signal Report
Price: $71,056 USD (+2.3% 24h)
Market Cap: $1.42T
24h Volume: $29.6B
### Technical Indicators (30d)
- RSI(14): 53.2 — neutral
- MACD: 339.21 / Signal: 280.45 — bullish crossover
- Bollinger: within band (upper $73,773 / lower $64,545)
- Volatility: 35.3% annualized — medium
> if I enter at 65000 with $1000, where should my stop be?
Based on ATR(14) and support at $63,500:
Entry: $65,000 · Stop: $63,200 (−2.8%) · Risk: $27.69
Risk/reward to $70K target: 1:2.8 ✓
Live data from CoinGecko. RSI, MACD, Bollinger, volatility computed locally. Two of those tools — TradingSignal and TradingMarket — are built directly into the Franklin runtime alongside Read, Write, and Edit. Franklin treats trading as a first-class workload, not an afterthought, because the same wallet that pays for LLM calls can also pay for market-data APIs.
🎨 Image generation
> generate a logo for my AI startup — minimalist, dark background
✓ ImageGen "minimalist AI startup logo, dark background..."
Saved: generated-logo-1713052800.png (1024x1024)
Franklin calls DALL-E / GPT Image / Nano Banana / Grok Imagine directly from the CLI, paid from your wallet, no OpenAI key required. The hero images for this very article were generated by calling the BlockRun gateway with gpt-image-2 — paid in USDC from the agent wallet, $0.06 each, settled in seconds.
💻 Code
> refactor src/auth.ts to use the new jwt helper, then run the tests
✓ Read src/auth.ts $0.002
✓ Read src/lib/jwt.ts $0.001
✓ Edit src/auth.ts (-24 +31 lines) $0.008
✓ Bash npm test $0.000
› 142 passing · 0 failing · 2.4s
Done in 18s · $0.011
Code is still first-class. It's just one workload, not the entire category. Every tool call is itemized, every token is priced, every action is a signed USDC micropayment. When the wallet hits zero, Franklin stops. This is YOPO in practice.
📱 Telegram remote control
Run franklin telegram on an always-on machine (set TELEGRAM_BOT_TOKEN + TELEGRAM_OWNER_ID) and drive Franklin from your phone. Owner-locked, session-resumable across restarts, slash commands (/new, /balance, /status). Trading, content, dev work — all reachable from a Telegram chat while the actual execution and the wallet stay on your hardware.
The Smart Router — 55+ models, learned on 2M+ real requests
You don't pick models. Franklin picks for you.
The Smart Router classifies every request — coding, trading, reasoning, research — and selects the model with the best quality-to-cost ratio. It's trained on 2 million+ real requests from the production BlockRun gateway and is continuously updated as new models ship.
> refactor this auth module to use JWT
CODING kimi-k2.5 · 12.4K in / 2.1K out · $0.0023 saved 84%
> what's the BTC outlook for the week?
TRADING grok-4-1-fast-reasoning · 8.2K in / 1.8K out · $0.0008 saved 95%
> prove that this algorithm is O(n log n)
REASONING claude-sonnet-4.6 · 15.1K in / 3.4K out · $0.0312
Every response shows which model was chosen, why, and how much you saved vs. always defaulting to the most expensive option. Four profiles — auto (default, balanced), eco (cheapest with decent quality), premium (best regardless of cost), free (NVIDIA-only when wallet is $0). The router also adapts to your usage: keep retrying a model for coding tasks and Franklin learns to pick a different one next time.
Run /cost mid-session to see exactly where the USDC went:
Session Cost: $0.0847 (23 requests)
gemini-2.5-flash $0.0012 14 req CODING
kimi-k2.5 $0.0423 6 req CODING
claude-sonnet-4.6 $0.0412 3 req REASONING
Why this only works on Base + x402
Per-call payment isn't a new idea. The reason it never worked at agent scale is that every other settlement layer makes the unit economics impossible.
| Stripe | Ethereum L1 | Solana | Base + x402 | |
|---|---|---|---|---|
| Settle a $0.001 call | Won't process — under min charge | Gas exceeds payment | Works, ~0.4s | Works, ~1.8s |
| Sender holds API key | Yes — leak risk | N/A | N/A | No — wallet signs each call |
| Settlement primitive | Card auth + invoice | ERC-20 transfer | SPL token transfer | HTTP 402 + USDC |
| Latency to first byte | n/a (post-paid) | 12–30s | sub-second | sub-second |
| Native to HTTP | No (out-of-band webhook) | No (RPC) | No (RPC) | Yes — X-PAYMENT header |
The combination of (1) USDC liquidity on Base + (2) x402 turning HTTP into the payment surface + (3) sub-2-second finality is specifically what makes per-call autonomy economically viable. We tried every other path. They all break at the unit-economics level. Solana also works (Franklin pays USDC there too — both wallets derive from a single BIP-39 mnemonic), but Base is where most of the agent ecosystem and Coinbase's developer surface live in 2026.
How Franklin compares
Not to coding agents. Not to chatbots. To the entire concept of "AI subscription."
| Coding agents | Editor IDEs | Chatbots | Franklin | |
|---|---|---|---|---|
| Writes code | ✅ | ✅ | ⚠️ | ✅ |
| Spends money for you | ❌ | ❌ | ❌ | ✅ USDC wallet, x402 |
| Buys data + APIs + images + search | ❌ | ❌ | ❌ | ✅ 55+ APIs, one wallet |
| Picks best model per task | ❌ single-vendor | ❌ plan-tied | ❌ | ✅ Smart Router, 55+ models |
| Pricing model | Subscription | Subscription | Subscription | YOPO — per outcome, USDC |
| Monthly fee | $20–$200 | $20–$40 | $20+ | $0 |
| Rate-limited | Yes | Yes | Yes | No — limited only by wallet |
| Works when provider goes down | ❌ | ❌ | ❌ | ✅ routes to another |
| Identity | Vendor account | Vendor account | Account / email | ✅ wallet, no signup |
| Start free, no KYC | ❌ | ❌ | ❌ | ✅ |
| Source | Closed | Closed | Closed | Apache-2.0, local-first |
Franklin is the economic agent category in one sentence: software with a wallet that can spend toward a result.
16 built-in tools, plus MCP
Franklin ships with these tools as a standard library — you don't compose them, you just ask:
Read · Write · Edit · Bash · Glob · Grep · WebFetch · WebSearch · Task · ImageGen · VideoGen · MemoryRecall · AskUser · SubAgent · TradingSignal · TradingMarket · TradingPortfolio · TradingOpenPosition · TradingClosePosition · TradingHistory
Add new verticals via the Plugin SDK. Discover external tools automatically through MCP (Model Context Protocol). The core agent loop is workflow-agnostic — adding "DEX trading" or "DAO governance proposal" doesn't require touching the runtime.
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Franklin Runtime │
│ Intent → Smart Router → Tool Use → Spend Control → Result │
├──────────────────────────────────────────────────────────────┤
│ Learned Router │
│ 2M+ requests · 55+ models · category detection · Elo scores │
├──────────────────────────────────────────────────────────────┤
│ Agent Loop │
│ 16 tools · Sessions · Compaction · Pricing · Plugin SDK │
├──────────────────────────────────────────────────────────────┤
│ BlockRun Gateway │
│ 55+ LLMs · CoinGecko · Search · Image APIs · paid services │
├──────────────────────────────────────────────────────────────┤
│ x402 Micropayment Protocol │
│ HTTP 402 · USDC on Base & Solana · signed payment payloads │
└──────────────────────────────────────────────────────────────┘
│
▼
┌─────────────┐
│ Your wallet │
│ (you own) │
└─────────────┘
The loop:
- You state an outcome.
- Franklin chooses what to read, call, and pay for.
- The payment settles against your wallet.
- Franklin reports the result and the spend.
That economic loop is the product. Everything else — sessions, compaction, plugin SDK, prompt caching, Telegram bot, full-text session search, persistent insights — is plumbing around the loop.
What's open and what's not
Franklin core (Apache-2.0) — the agent loop, the 16 tools, the Smart Router, the wallet manager, the plugin SDK, the Telegram integration. All open. Fork it, run it, ship a competing agent if you want.
Not Franklin — the BlockRun gateway it pays. That's the upstream service catalog (55+ models + partner APIs + sandboxes), and we run it as a hosted product with 5% margin. Franklin can also point at any other x402-compatible gateway, including one you self-host.
The deliberate split: the agent is open, the marketplace is hosted. Same shape as git (open client) talking to GitHub (hosted service). The agent's autonomy doesn't depend on us continuing to operate the gateway.
Try it
# 1. Install (Node 20+, macOS / Linux / WSL)
npm install -g @blockrun/franklin
# 2. Run — uses NVIDIA Nemotron & Qwen3 free tier out of the box
franklin
# 3. (optional) Fund a wallet to unlock Sonnet, Opus, GPT, Gemini, Grok, paid APIs
franklin setup base # or: franklin setup solana
franklin balance # show address + USDC balance
Zero signup, zero credit card, zero phone verification. Send $5 USDC to the wallet and you have unlocked every frontier model and every paid tool in the BlockRun gateway.
Pin a specific model when you need it:
franklin --model nvidia/qwen3-next-80b-a3b-thinking
franklin --model anthropic/claude-sonnet-4.6
franklin --model openai/gpt-5.4
Run as a Telegram bot for remote control:
franklin telegram # owner-locked, session-resumable
Where Franklin goes next
- Franklin Swarm — orchestrating multiple Franklin instances against a shared budget allocator. Already prototyped; ships when we're confident the budget arbitration is fair under contention.
- Native Coinbase Smart Wallet support — Franklin can hold its own keys today, but for users who want their primary wallet to also act as the agent's wallet, smart-wallet integration removes the "fund this separate address" step.
- More partner data feeds — wallet/chain analytics, alt-data marketplaces, on-chain order books. The same x402 payment flow plugs them in without a new key per vendor.
- Per-tool budget caps — alongside the global wallet budget, soon you'll be able to say "spend up to $0.10 on images this session" or "no premium model calls."
- Solana parity — both chains work today; deeper Solana-side integrations coming alongside the Base ones.
Links
- GitHub: github.com/BlockRunAI/Franklin (Apache-2.0)
- npm: @blockrun/franklin
- Marketing site: franklin.run
- ClawRouter (the LLM router under the hood): github.com/BlockRunAI/ClawRouter
- BlockRun gateway: blockrun.ai
- x402 protocol: x402.org
- Base: base.org
- Telegram community: t.me/blockrunAI
- Founder: @bc1max, vicky@blockrun.ai
If you're at Base, on the Coinbase agent platform team, or just curious how an agent's economics shift the moment you give it a wallet — we want to talk. The economic-agent category is being defined right now. We'd rather define it with you than alone.
— The BlockRun team