Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/brand-numbers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Brand numbers

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

# Fails when a marketing number in this repo disagrees with brand-numbers.json.
#
# --check is deliberately OFFLINE. It compares against the committed snapshot
# and never fetches, so a blockrun.ai deploy in progress cannot fail this repo's
# CI. Pulling a newer artifact is a separate, deliberate act:
#
# node scripts/sync-brand-numbers.mjs --refresh
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: node scripts/sync-brand-numbers.mjs --check
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Franklin Agent

Open-source AI agent with a wallet. 55+ models. Pay per use with USDC via x402.
Open-source AI agent with a wallet. <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models. Pay per use with USDC via x402.

## Commands

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Capability pillars:

Built on three layers:
1. **x402 micropayment protocol** — HTTP 402 native payments
2. **BlockRun Gateway** — aggregates 55+ LLMs + paid APIs (Exa, DALL-E, future Runway/Suno/CoinGecko)
2. **BlockRun Gateway** — aggregates <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> LLMs + paid APIs (Exa, DALL-E, future Runway/Suno/CoinGecko)
3. **Franklin Agent** — this repo, the reference client

## Commands
Expand Down
2 changes: 1 addition & 1 deletion CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The first, unpaid HTTP request whose 402 response carries the payment terms; Fra
_Avoid_: Pre-flight, handshake.

**BlockRun Gateway**:
The single upstream service Franklin calls for both LLM completions and paid tools (Exa, ImageGen, VideoGen, MusicGen, market data); aggregates 55+ models and accepts x402.
The single upstream service Franklin calls for both LLM completions and paid tools (Exa, ImageGen, VideoGen, MusicGen, market data); aggregates <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models and accepts x402.
_Avoid_: API, provider, backend, BlockRun (without "Gateway") when referring to the service.

**Per-turn spend cap**:
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Every tool call is itemized. Every token is priced. When the wallet hits zero, F

## Smart Router

**55+ models. One decision. Zero guesswork.**
**<!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models. One decision. Zero guesswork.**

You don't pick models. Franklin picks for you.

Expand Down Expand Up @@ -316,7 +316,7 @@ You don't subscribe to electricity, you pay for what you use. Franklin brings th

### 🧠 &nbsp;Multi-model is the future

No single model is best at everything. Sonnet writes better code, Gemini handles longer context, DeepSeek costs 20x less for simple tasks. The Smart Router routes every request to the optimal model in <1ms — up to 89% savings vs. always using Opus.
No single model is best at everything. Sonnet writes better code, Gemini handles longer context, DeepSeek costs 20x less for simple tasks. The Smart Router routes every request to the optimal model in <1ms — <!-- br:savings.autoVsBaselinePct -->87<!-- /br:savings.autoVsBaselinePct -->% cheaper than pinning Claude Opus 5 for every request.

</td>
<td width="33%" valign="top">
Expand All @@ -338,7 +338,7 @@ No email. No phone. No KYC. Your Base or Solana address is your account — port
| 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** |
| Picks best model per task | ❌ single-vendor | ❌ plan-tied | ❌ | ✅ **Smart Router, <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> 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 |
Expand Down Expand Up @@ -366,14 +366,14 @@ Ask "what's BTC looking like?" — Franklin fetches live price data, computes RS
**🎨 AI image generation**
Ask "generate a logo" — Franklin calls DALL-E / GPT Image, saves the result locally, paid from your wallet.

**🧠 55+ models via one wallet**
**🧠 <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models via one wallet**
Anthropic, OpenAI, Google, xAI, DeepSeek, GLM, Kimi, Minimax, NVIDIA free tier. One wallet, one interface, automatic fallback.

**💳 x402 micropayments (YOPO)**
HTTP 402 native. Every paid action is a signed USDC micropayment via EIP-712 — 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 55+ LLMs. Four profiles (auto/eco/premium/free). Adapts to your usage over time.
Trained on 2M+ real requests. Classifies your task and picks the best model from <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> LLMs. Four profiles (auto/eco/premium/free). Adapts to your usage over time.

</td>
<td width="50%" valign="top">
Expand Down Expand Up @@ -429,13 +429,13 @@ Core is workflow-agnostic. Add new verticals without touching the loop. Discover
│ Intent → Smart Router → Tool Use → Spend Control → Result │
├──────────────────────────────────────────────────────────────┤
│ Learned Router │
│ 2M+ requests · 55+ models · category detection · Elo scores │
│ 2M+ requests · <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models · category detection · Elo scores │
├──────────────────────────────────────────────────────────────┤
│ Agent Loop │
│ 16 tools · Sessions · Compaction · Pricing · Plugin SDK │
├──────────────────────────────────────────────────────────────┤
│ BlockRun Gateway │
55+ LLMs · CoinGecko · Search · Image APIs · paid services │
<!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> LLMs · CoinGecko · Search · Image APIs · paid services │
├──────────────────────────────────────────────────────────────┤
│ x402 Micropayment Protocol │
│ HTTP 402 · USDC on Base & Solana · signed payment payloads │
Expand Down Expand Up @@ -479,7 +479,7 @@ src/
├── stats/ Usage tracking + insights engine
├── ui/ Ink-based terminal UI
├── proxy/ Payment proxy for external tools
├── router/ Learned model router (55+ models, Elo scoring)
├── router/ Learned model router (<!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models, Elo scoring)
├── wallet/ Wallet management (Base + Solana)
├── mcp/ MCP server auto-discovery
└── commands/ CLI subcommands
Expand Down
34 changes: 34 additions & 0 deletions brand-numbers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://blockrun.ai/brand/numbers.schema.json",
"version": 1,
"models": {
"chatVisible": 66,
"totalVisible": 86,
"free": 8,
"freeWithheld": 17,
"image": 8,
"video": 5,
"music": 1,
"speech": 5,
"soundfx": 1,
"withFallback": 44,
"withFallbackAllEntries": 75
},
"clawrouter": {
"dimensions": 15,
"tiers": 4,
"profiles": 4,
"aliases": 202
},
"mcp": {
"tools": 19
},
"chains": {
"rpc": 40
},
"savings": {
"baselineModel": "anthropic/claude-opus-5",
"ecoVsBaselinePct": 98,
"autoVsBaselinePct": 87
}
}
2 changes: 1 addition & 1 deletion docs/adr/0002-blockrun-gateway-as-aggregator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Status:** accepted

Franklin makes every LLM and paid-tool call through a single counterparty — the BlockRun Gateway — instead of integrating directly with each model provider, image/video/audio service, search API, and market-data feed. The gateway aggregates 55+ models and a small set of paid APIs and accepts x402 uniformly.
Franklin makes every LLM and paid-tool call through a single counterparty — the BlockRun Gateway — instead of integrating directly with each model provider, image/video/audio service, search API, and market-data feed. The gateway aggregates <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models and a small set of paid APIs and accepts x402 uniformly.

## Considered options

Expand Down
2 changes: 1 addition & 1 deletion docs/anatomy-of-an-economic-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ seamlessly.
│ signed USDC (HTTP 402)
BlockRun Gateway
55+ models / paid APIs
<!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models / paid APIs
User Wallet
Expand Down
4 changes: 2 additions & 2 deletions docs/why-ai-agents-need-a-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ cheap models because cheapness is now something the agent can
agents both learn in real time.

**3. Single-vendor failure becomes a one-command swap.** A router
with 55+ models across every major provider can route around any
with <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models across every major provider can route around any
single vendor's bad release. The wallet doesn't know or care which
model answered — it only pays for the answer that arrived.

Expand All @@ -175,7 +175,7 @@ filled it.

Franklin is the reference implementation of the Economic Agent. It's
an AI agent CLI that holds USDC on Base or Solana, routes requests
across 55+ models, and settles every paid action in real time via
across <!-- br:models.chatVisible -->66<!-- /br:models.chatVisible --> models, and settles every paid action in real time via
the [x402](https://x402.org) HTTP-402 micropayment protocol. It is
Apache-2.0, written in TypeScript, and ships as one npm package.

Expand Down
Loading
Loading