Other agents just talk. Franklin Agent holds your USDC and puts it to work —
trading, research, and autonomous tasks with real budgets, real guardrails, real outcomes.
One wallet. Every model. Every paid API. Pay only for outcomes — not subscriptions.
Quick start · Two ways to pay · Desktop · YOPO · Category · What it does · Smart Router · Comparison · Architecture · Community
| ### 💳 AI is utility, not SaaS You don't subscribe to electricity, you pay for what you use. Franklin brings the same model to AI. YOPO settlement means Franklin never bills you for access, only for outcomes. No monthly fees, no rate limits, no overdraft. | ### 🧠 Multi-model is the future No single model is best at everything. Opus reasons deeper, Gemini handles longer context, DeepSeek costs 20x less for simple tasks. The Smart Router routes every request to the optimal model in <1ms — 84% cheaper than pinning Claude Opus 5 for every request. | ### 🔐 Wallet is identity No email. No phone. No KYC. Your Solana, Base or Arc address is your account — portable, permissionless, global. A wallet requires only USDC. (Prefer an account and a card? [Two ways to pay](#two-ways-to-pay) — the key route exists, it just is not the one that makes the agent sovereign.) |
| **💼 Wallet-native economic execution** Franklin can decide what is worth paying for, route the call, sign the micropayment, and keep going until the goal is done or the budget is exhausted. **📈 Trading signals** Ask "what's BTC looking like?" — Franklin fetches live price data, computes RSI/MACD/Bollinger/volatility, and synthesizes a signal. **🎨 AI image generation** Ask "generate a logo" — Franklin calls DALL-E / GPT Image, saves the result locally, paid from your wallet. **🧠 90 models via one wallet** Anthropic, OpenAI, Google, xAI, DeepSeek, GLM, Kimi, Minimax, plus a free tier. One wallet, one interface, automatic fallback. **💳 x402 micropayments (YOPO)** HTTP 402 native. Every paid action is a signed USDC micropayment — an EIP-712 authorization on Base and Arc, a signed SPL transfer on Solana. Non-custodial: your keys never leave your machine. YOPO: you pay only for outcomes. **🧠 Learned model router** Trained on 2M+ real requests. Classifies your task and picks the best model from 90 LLMs. Four profiles (auto/eco/premium/free). Adapts to your usage over time. | **🛠 60+ built-in tools** Trading and DeFi (signals, portfolio, trade plans, Jupiter and 0x swaps, Polymarket, DeFiLlama), research (Exa, web search and fetch, X search, on-chain and market data), media (image, video, music), autonomy (goals, scheduler, monitors, sub-agents, mixture of agents), phone and voice calls, cloud sandboxes, and general files and shell. **💾 Persistent sessions** Every turn is streamed to disk with metadata. Resume any session by ID. Survives crashes, reboots, and compaction. **🔍 Full-text session search** `franklin search "payment loop"` from the CLI, or `/session-search "payment loop"` in chat. **📊 Cost insights** `franklin insights` shows spend breakdowns, trends, and projections. Never wonder where the USDC went. **⚡ Anthropic prompt caching** Multi-turn Sonnet/Opus sessions use ephemeral cache breakpoints to reduce input spend on long conversations. **🔒 Guarded by default** Trades need your approved plan, the wallet key never reaches the model, and every network call the agent makes is checked. See [Safety and security](#safety-and-security). **🔌 Plugin SDK + MCP** Core is workflow-agnostic. Add new verticals without touching the loop. Discover external tools automatically through MCP. |
` | Deep reasoning mode for hard problems | | `/remember` / `/flush` / `/dream`| Save a note / capture learnings / consolidate memory | | `/compact` | Structured context compression | | `/session-search` | Search past sessions | | `/history` / `/resume [id]` | Inspect or restore conversation state | | `/cost` / `/wallet` | Session cost, wallet address, and balance | | `/insights [--days N]` | Rich usage analytics | | `/help` | Full command list | `/model` takes a shortcut or any full gateway id. The newest models have explicit version shortcuts: `opus-5.5`, `sonnet-5.5`, `fable-5.1`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-5.1`, `grok-4.7` and `grok-4.6` (e.g. `/model gpt-6-sol` or `/model anthropic/claude-opus-5.5`). Bare aliases like `opus`, `gpt` and `grok` keep their current targets. --- ## Safety and security Franklin holds money, so the defaults assume a model can be steered by what it reads — a fetched page, a search result, an MCP response. - **Money moves only on your approval.** Trades need a trade plan you approve, in every permission mode. `--max-spend` sets a spending ceiling, and [lifecycle hooks](docs/examples/hooks/) can veto any paid action before it runs. - **The wallet key never reaches the model.** File, search and browser tools refuse the key store and the machine's own credential stores (`~/.ssh`, `~/.aws`, cloud and Solana CLI keys). The exact key values are also scrubbed from every tool result. - **Network calls stay public.** Model-driven requests (web fetch, webhooks, the browser) refuse loopback, private and cloud-metadata addresses, and re-check every redirect. - **The local panel answers only you.** It listens on loopback, checks the `Host` header, and its wallet and spend routes require a token that only the page it serves knows. Found a vulnerability? Please report it privately — see [SECURITY.md](SECURITY.md). --- ## How it works ```text ┌──────────────────────────────────────────────────────────────┐ │ Franklin Runtime │ │ Intent → Smart Router → Tool Use → Spend Control → Result │ ├──────────────────────────────────────────────────────────────┤ │ Learned Router │ │ 2M+ requests · 90 models · category detection · Elo scores │ ├──────────────────────────────────────────────────────────────┤ │ Agent Loop │ │ 60+ tools · Sessions · Compaction · Pricing · Plugin SDK │ ├──────────────────────────────────────────────────────────────┤ │ BlockRun Gateway │ │ 90 LLMs · CoinGecko · Search · Image APIs · paid services │ ├──────────────────────────────────────────────────────────────┤ │ x402 Micropayment Protocol │ │ HTTP 402 · USDC on Solana, Base & Arc · signed payloads │ └──────────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────┐ │ Your wallet │ │ (you own) │ └─────────────┘ ``` The loop is simple: 1. You state an outcome. 2. Franklin chooses what to read, call, and pay for. 3. The payment settles against your wallet. 4. Franklin reports the result and the spend. That economic loop is the product. --- ## Project layout ```text src/ ├── index.ts CLI entry (franklin) ├── banner.ts Ben Franklin portrait + FRANKLIN gradient text ├── agent/ Agent loop, LLM client, compaction, commands ├── tools/ 60+ built-in tools (trading, DeFi, research, media, │ phone, sandboxes, files and shell) ├── trading/ Market data (CoinGecko) + technical indicators ├── goal/ /goal objectives + adversarial verification ├── hooks/ Lifecycle hooks (PreSpend and friends) ├── scheduler/ Durable /loop scheduler ├── memory/ Wallet-keyed memory and trading journal ├── panel/ Local dashboard (franklin panel) ├── serve/ Agent host for the panel's Agents tab ├── content/ Content library with budget-bound media generation ├── brain/ Cross-session entity knowledge graph ├── channel/ Non-CLI ingress drivers (Telegram today) ├── events/ Internal event bus ├── plugin-sdk/ Public plugin contract (Workflow/Plugin/Channel) ├── plugins/ Plugin registry + runner (plugin-agnostic) ├── session/ Persistent sessions + search + channel tags ├── stats/ Usage tracking + insights engine ├── ui/ Ink-based terminal UI ├── proxy/ Payment proxy for external tools ├── router/ Learned model router (90 models, Elo scoring) ├── wallet/ Wallet management (Base/Arc + Solana) ├── mcp/ MCP server auto-discovery └── commands/ CLI subcommands ``` --- ## Free tier, for real Start with **zero dollars**. Franklin defaults to free models that need **no wallet and no API key** — nothing to fund, nothing to sign up for. ```bash franklin --model free ``` Once you fund it — [either way](#two-ways-to-pay) — Franklin gets more purchasing power: Sonnet, Opus, GPT, Gemini, Grok, and paid tools like Exa, image generation, and live market data. --- ## Remote control via Telegram Drive Franklin from anywhere with a bot token: ```bash export TELEGRAM_BOT_TOKEN=export TELEGRAM_OWNER_ID= franklin telegram # start the bot (owner-locked) ``` Session state resumes across process restarts (tagged by owner id). Slash commands `/new`, `/balance`, `/status`, `/help` handled locally by the bot layer; everything else forwards to the agent. Progressive streaming flushes partial answers at paragraph boundaries so long replies don't wait for turn-end. Same wallet. Same tools. From your phone. --- ## Documentation Full BlockRun docs: **https://blockrun.ai/docs** - [Agent developer guide](https://blockrun.ai/docs/getting-started/agent-developers) — building agents on BlockRun - [Models, SDKs & APIs](https://blockrun.ai/docs) — the full gateway reference - [Plugin SDK guide](docs/plugin-sdk.md) — build your own workflow vertical - [Changelog](CHANGELOG.md) — every release explained - [Roadmap](docs/ROADMAP.md) — what's coming next - [Proxy mode](docs/) — use Franklin as a payment proxy for Anthropic-compatible CLI agents --- ## Community - [Telegram](https://t.me/blockrunAI) — realtime help, bug reports, feature requests - [@BlockRunAI](https://x.com/BlockRunAI) — release notes, demos - [Issues](https://github.com/BlockRunAI/Franklin/issues) — bugs and feature requests --- ## Contributors Franklin ships work from outside the core team on a regular basis: typed Phone & Voice tools, the `/market` command, the model picker catalog, Jupiter precision guards, and the bug reports behind the prompt-caching, stream-timeout, and wallet-reservation fixes. The full list, with what each person shipped, lives in [ACKNOWLEDGMENTS.md](ACKNOWLEDGMENTS.md). Thank you. PRs welcome — see the Development section below for the local loop. --- ## Development ```bash git clone https://github.com/BlockRunAI/Franklin.git cd franklin npm install npm run build npm test # deterministic local tests — no API calls npm run test:e2e # live e2e tests — free smoke works unfunded; paid tools need network + funded wallet npm run test:free-models # live matrix across the current free models node dist/index.js --help ``` ### Desktop app The stable Franklin Desktop shell lives in [`apps/desktop`](apps/desktop). It uses the Franklin runtime built by this monorepo, so CLI and Desktop changes are versioned and tested together. See the [Desktop guide](apps/desktop/README.md) for the product status, security model, and complete development workflow. ```bash npm run desktop:dev # Desktop UI with the local mock agent npm run desktop:real --workspace @blockrun/franklin-desktop # real Franklin agent npm run desktop:build # type-check and build the renderer npm run desktop:package:mac npm run desktop:package:win ``` Packaged builds create a private, per-launch credential for the local Franklin service, keep cloud session sync off unless the user explicitly enables it, and use `Documents/Franklin` as the default workspace. Files outside that workspace remain available after an explicit approval. Team Mode is being developed separately and is not part of this stable integration. For the recommended live validation order and failure triage, see [docs/live-e2e-checklist.md](docs/live-e2e-checklist.md). **Contributing:** open an issue first to discuss meaningful changes. PRs welcome on bugs, docs, new models in pricing, and new tools. --- ## Shared model catalog Franklin uses [BlockRun Model Core](https://github.com/BlockRunAI/model-catalog) for model metadata, picker policy and price estimates. The runtime dependency is pinned to an immutable commit. On refresh, Franklin reads the public policy snapshot and the active gateway's catalog, so new models and prices can appear without a Franklin release. Base, Solana, Arc and API accounts have separate caches. Arc reads Base's policy and offline snapshot, with live rows from `arc.blockrun.ai`. The default picker shows Auto and curated groups; other available chat models remain accessible through +more / Ctrl+A. Existing Franklin shortcuts, including free aliases, retain their model targets. Shared policy can add new shortcuts but cannot retarget one Franklin already ships. Gateway price estimates still refresh for the selected model; a stable shortcut does not freeze that model's price. Historical explicit IDs and cost records remain usable. Policy and gateway requests run concurrently, each with a four-second deadline. Successful refreshes are cached for five minutes. If the policy host is unreachable, Franklin keeps the last good policy and still refreshes live gateway rows. If the gateway fails, the last valid catalog is retained; a cold start can use the bundled snapshot, which is not presented as live gateway data. CLI startup warms the catalog in the background. `BLOCKRUN_MODEL_CATALOG_URL` overrides the policy snapshot URL; an empty value disables remote policy updates. `FRANKLIN_CATALOG_OFFLINE=1` uses bundled data without catalog network requests. Payment signing and settlement remain in Franklin and its payment SDK. Auto routing's candidate policy remains separate from the shared catalog. ## License Apache-2.0. See [LICENSE](LICENSE). --- **The AI agent with a wallet.**
YOPO — You Only Pay Outcome. Your wallet. Your budget. Your results.
From the team at BlockRun.