Autonomous financial agent + live dashboard for managing treasury, credit, and intelligence monetization on Base.
biff_agent/
├── agent/ # 🤖 Biff Agent (LangGraph + CDP + Floe)
│ ├── src/ # Agent source code
│ │ ├── store.ts # State persistence + runtime config
│ │ ├── nodes/serve.ts # Admin API + static file server
│ │ └── ...
│ ├── tests/ # 83 unit tests
│ ├── scripts/ # Utility scripts
│ └── data/ # Local persistence (gitignored)
├── frontend/ # 🖥️ Dashboard (React + Vite + Tailwind)
│ └── src/pages/
│ ├── Home.jsx # ASCII Biff hero
│ ├── HowItWorks.jsx # Agent explanation
│ ├── Tracking.jsx # 7 public dashboards
│ └── Admin.jsx # Auth + controls
└── railway.json # Deploy config
# Install all workspaces
npm install
# Build everything
npm run build
# Run agent (includes API server + frontend)
npm run dev:agent
# Run tests
npm testAutonomous financial agent built on LangGraph with a cyclic execution model:
- Perception — On-chain balances, Chainlink oracles, Floe loan positions
- Reasoning — Anthropic Claude Sonnet evaluates state against financial rules
- Action — Executes on-chain transactions (borrow, collateral, repay)
See agent/README.md for detailed documentation.
| Route | Description |
|---|---|
/ |
Home — ASCII Biff art + navigation |
/how-it-works |
Agent architecture and tech stack |
/tracking |
Live dashboards (7 widgets, auto-refresh) |
| Route | Access | Features |
|---|---|---|
/admin |
ADMIN_SECRET required |
Pause/resume, force actions, config updates |
- Agent Vitality — Status, uptime, cycle count
- Portfolio — USDC, WETH, total value
- Loan Health — LTV gauges, countdown, principal/collateral
- Performance — Success rate, errors, last action
- Action Distribution — Pie chart of agent decisions
- USDC History — Line chart of balance over time
- Recent Activity — Timeline of last 30 cycles
| Endpoint | Auth | Description |
|---|---|---|
GET /api/state |
Public | Current agent state |
GET /api/history |
Public | Cycle history |
GET /api/config |
Public | Runtime configuration |
POST /api/auth |
— | Login with ADMIN_SECRET |
POST /api/pause |
Required | Pause agent loop |
POST /api/resume |
Required | Resume agent loop |
POST /api/force-cycle |
Required | Execute cycle immediately |
POST /api/force-action |
Required | Override LLM decision |
POST /api/config |
Required | Update thresholds + interval |
- Connect your GitHub repo to Railway
- Set environment variables:
CDP_API_KEY_ID,CDP_API_KEY_SECRET,CDP_WALLET_SECRETLLM_PROVIDER,LLM_API_KEYADMIN_SECRET(your admin password)NETWORK_ID=base-sepolia
- Deploy from
mainbranch - The
railway.jsonhandles build + start automatically
- Network: Base
- Intelligence: Anthropic Claude
- Infrastructure: Coinbase Developer Platform (CDP)
- Oracle: Chainlink
- Liquidity: Floe Finance
- Payments: x402