Skip to content
Closed
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
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. <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> models. Pay per use with USDC via x402.
Open-source AI agent with a wallet. <!-- br:models.chatVisible -->76<!-- /br:models.chatVisible --> models. Pay per use with USDC via x402.

## Commands

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Franklin is the first AI agent in the **Autonomous Economic Agent** category — it doesn't just write text, it autonomously spends USDC from a user-funded wallet to execute real work: coding, trading, content generation.

Three verticals under one brand:
- **Dev agent** — coding, debugging, review across <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> models with wallet-bound spending
- **Dev agent** — coding, debugging, review across <!-- br:models.chatVisible -->76<!-- /br:models.chatVisible --> models with wallet-bound spending
- **Trading agent** — signals, portfolio, risk, persistent P&L across sessions
- **Content agent** — ImageGen, VideoGen, budget-tracked media production

Built on three layers:
1. **x402 micropayment protocol** — HTTP 402 native payments
2. **BlockRun Gateway** — aggregates <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> LLMs + paid APIs (Exa, DALL-E, future Runway/Suno/CoinGecko)
2. **BlockRun Gateway** — aggregates <!-- br:models.chatVisible -->76<!-- /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 <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> 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 -->76<!-- /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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Fund the wallet. Set a budget. Walk away — and come back to a book.
> general-purpose Autonomous Economic Agent — specialized as a wallet-native trading
> agent. It inherits Franklin's economic substrate (x402 micropayments, USDC settlement,
> the shared [Router Core](https://github.com/BlockRunAI/router-core) engine across
> <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> models, removable-by-design harness components)
> <!-- br:models.chatVisible -->76<!-- /br:models.chatVisible --> models, removable-by-design harness components)
> and adds a deterministic fee-aware risk engine, a wallet-bound trade journal, a
> multi-role persona debate, and a Backtest → Paper → Live strategy lifecycle.

Expand All @@ -31,7 +31,7 @@ and is covered by the local test suite (386 tests, no network).
| Capability | Status | Where |
|---|---|---|
| USDC wallet on Base or Solana, x402 pay-per-call to every model and paid API | ✅ shipped | `src/wallet/`, `@blockrun/llm` |
| Auto model routing on the shared Router Core engine, <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> models, dead-model kill-switch | ✅ shipped | `src/router/` |
| Auto model routing on the shared Router Core engine, <!-- br:models.chatVisible -->76<!-- /br:models.chatVisible --> models, dead-model kill-switch | ✅ shipped | `src/router/` |
| Paper trading against **live** CoinGecko marks (real P&L, simulated fills) | ✅ shipped | `src/trading/live-exchange.ts` |
| Deterministic risk engine: cash **including exchange fee**, per-position cap, total exposure cap, sell integrity | ✅ shipped | `src/trading/risk.ts` |
| Record-then-flag execution: a fill the venue executed is always booked; deviations are warnings, never silent drops | ✅ shipped | `src/trading/engine.ts` |
Expand Down Expand Up @@ -149,7 +149,7 @@ You don't pick models. `Auto` (the default) runs the shared
Franklin, ClawRouter and `@blockrun/llm` make — classifying the request across 15 dimensions,
dropping every model that cannot satisfy it (tools, vision, context, output length), and
ranking the survivors on fit, cost, speed and reliability. Sub-millisecond, no network on the
hot path, <!-- br:savings.autoVsBaselinePct -->88<!-- /br:savings.autoVsBaselinePct -->% cheaper than pinning Claude Opus 5 for everything.
hot path, <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% cheaper than pinning Claude Opus 5 for everything.

A model the gateway stops serving is removed from every chain on the next request (the
dead-rung kill-switch), so a retired id never strands a turn.
Expand Down Expand Up @@ -180,7 +180,7 @@ Pin one with `/model <shortcut>` when you want to:
| | `omni` | Nemotron 3 Nano Omni (text + image + audio) | $0 |
| | `nano-vl` | Nemotron Nano VL | $0 |

The full catalog — <!-- br:models.totalVisible -->96<!-- /br:models.totalVisible --> visible models including image, video, music and speech — is at
The full catalog — <!-- br:models.totalVisible -->100<!-- /br:models.totalVisible --> visible models including image, video, music and speech — is at
[blockrun.ai/models](https://blockrun.ai/models). Pricing is provider cost + 5%, settled per
call in USDC. No free alias ever falls back to a paid model.

Expand Down
14 changes: 7 additions & 7 deletions brand-numbers.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"$schema": "https://blockrun.ai/brand/numbers.schema.json",
"version": 1,
"models": {
"chatVisible": 72,
"totalVisible": 96,
"free": 5,
"freeWithheld": 20,
"chatVisible": 76,
"totalVisible": 100,
"free": 7,
"freeWithheld": 26,
"image": 9,
"video": 8,
"music": 1,
"speech": 5,
"soundfx": 1,
"withFallback": 44,
"withFallbackAllEntries": 78
"withFallback": 48,
"withFallbackAllEntries": 89
},
"clawrouter": {
"dimensions": 15,
Expand All @@ -29,6 +29,6 @@
"savings": {
"baselineModel": "anthropic/claude-opus-5",
"ecoVsBaselinePct": 98,
"autoVsBaselinePct": 88
"autoVsBaselinePct": 84
}
}
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 <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> 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 -->76<!-- /br:models.chatVisible --> models and a small set of paid APIs and accepts x402 uniformly.

## Considered options

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 <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> models across every major provider can route around any
with <!-- br:models.chatVisible -->76<!-- /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 <!-- br:models.chatVisible -->72<!-- /br:models.chatVisible --> models, and settles every paid action in real time via
across <!-- br:models.chatVisible -->76<!-- /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