45 AI trading agents. 21 named personas (Arthur Hayes, Jim Simons, George Soros, Jesse Livermore, Warren Buffett, Peter Lynchβ¦). 147 built-in MCP tools across Cube (31), CCXT (92), and Alpaca (24), plus 110 CCXT exchanges. Paper trading by default. MIT licensed. Runs on Claude Code.
> /hire risk-manager
> /hire arthur-hayes
> /hire market-maker
> @arthur-hayes what's the macro thesis right now?
> scan all exchanges for BTC price differences
> the arbitrageur found a 15bps spread between cube.exchange and Binance β execute it
> risk-manager, approve this trade
45 autonomous trading agents inside Claude Code, with built-in MCP connectors and broad multi-exchange support via CCXT. Shared analysis libraries cover indicators, execution, portfolio analytics, and risk tooling.
21 are named personas β Arthur Hayes, Jim Simons, George Soros, Jesse Livermore, Stanley Druckenmiller, Warren Buffett. The other 24 are role-based: scalpers, market makers, risk managers, quants, arbitrageurs.
No config files. No YAML. You hire agents that fit your thesis and fire the ones that don't deliver. Each one carries its own personality, philosophy, and KPIs.
- 45 agents total in
skills/(_templateexcluded) - 21 named personas + 24 role-based specialists
- 147 built-in MCP tools across active servers
- Cube: 31 tools
- CCXT: 92 tools
- Alpaca: 24 tools
- 110 exchanges via CCXT (from the installed
ccxtpackage in this repo)
You get a quant analyst that only trusts data, a risk manager that blocks trades when the sizing is wrong, and a market maker running Avellaneda-Stoikov across three venues.
The arbitrageur watches every connected exchange for mispricings and won't shut up about it. They argue with each other. The risk manager says no a lot.
More exchanges = smarter desk. Cross-exchange arb, smart order routing, multi-venue MM.
| Strategy | Description |
|---|---|
| Cross-exchange arb | Spot price gaps, execute both legs |
| Market making | Multi-venue quotes, Avellaneda-Stoikov |
| Macro trading | DXY, yields, Fed policy via Hayes agent |
| Stat arb / quant | Mean reversion, momentum, pairs |
| Portfolio | Risk parity, Kelly sizing, drawdowns |
| Execution algos | TWAP, VWAP, Iceberg routing |
| Step | What Happens |
|---|---|
| 1. Connect | Connect any exchange via plugins. Paper mode by default. |
| 2. Hire | Pick agents. KPIs get tracked. |
| 3. Trade | Agents propose, risk manager approves. |
Paper trading is on by default. You have to opt in to live.
YOU (trader)
β
βββ /hire risk-manager β activate agents
βββ /hire arbitrageur
βββ /hire market-maker
β
βΌ
CLAUDE CODE (AI runtime)
β
βββ Skills (45 SKILL.md files) β agent personas, strategies, KPIs
β
βββ Exchange Connectors (MCP) β connect any exchange
β βββ Cube (built-in)
β βββ Binance, Coinbase, Kraken, OKX...
β βββ 110 via CCXT
β
βΌ
YOUR EXCHANGES (paper or live)
Skills define what an agent thinks and does.
Connectors talk to exchanges.
The two layers don't know about each other. Add an exchange, don't touch agent code. Write an agent, don't touch exchange code.
| You are a... | ai-fund gives you... |
|---|---|
| Crypto trader | 45 agents, natural language |
| Quant | Backtest, stat tools, multi-exchange |
| Fund operator | KPIs, hire/fire, risk controls |
| Developer | MIT skill system, any exchange |
git clone https://github.com/cubexch/ai-fund
cd ai-fund
npm ciOpen Claude Code and connect your exchanges:
claude
> /setup
Hire your first agents:
> /hire risk-manager
> /hire arthur-hayes
> /hire jim-simons
Put them to work:
> @arthur-hayes what's the macro thesis? DXY is falling and the Fed paused.
> @jim-simons scan for statistical anomalies across BTC pairs on all exchanges
> @risk-manager size a long position given current portfolio
Recent Cube connector updates added a first-party cube CLI and expanded analysis/trade tooling.
cd connectors/cube/mcp-server
npm run login
npm run status
npm run cube -- --helpUse the command groups directly (cube account ..., cube market ..., cube order ..., cube risk ..., cube trade ...) or call MCP tools from Claude Code. Full reference: connectors/cube/README.md.
- Portfolio/Risk intelligence:
assess_portfolio_risk,simulate_stress_test - Signal intelligence:
detect_confluence,detect_bb_squeeze,get_market_microstructure - Execution planning:
plan_twap,simulate_market_impact - Smart routing/discovery:
search_assets,get_trending,execute_trade
These tools are designed to be chained (scan β validate β risk-check β execution plan β route).
Connect any exchange via MCP plugins. Each connector handles authentication differently β some use API keys, others use local auth. See connectors/README.md for setup details.
When handing an AI agent access to exchange credentials, think about security. See the API Key Security section below.
| Cube | Coinbase | Binance | Kraken | OKX | |
|---|---|---|---|---|---|
| Connector | Built-in MCP | Built-in (CCXT) | Built-in (CCXT) | CLI | okx-mcp |
| Auth | Local (no keys) | Key+secret+pass | Key+secret | Key+secret | Key+secret+pass |
| Spot | β | β | β | β | β |
| Perps | β | Limited | β | β | β |
| Paper | β | Sandbox | Testnet | β | Demo |
| Alpaca | Kraken | IBKR | |
|---|---|---|---|
| Setup | Built-in MCP | CLI | CCXT/custom |
| API keys | Key+secret | Key+secret | Portal auth |
| Stocks | β No-fee | Tokenized | β |
| Crypto | β | β | β |
| Options | β | β | β |
| Paper | β | β | β |
AI agents can read files, call tools, log output, and spawn processes. Your API key in a config file? The agent can see it.
| Risk | Mitigation |
|---|---|
| Keys in config | Use read-only keys. Disable withdrawal. |
| Keys in env vars | Use subaccounts with limited funds. |
| Keys in logs | Avoid verbose mode. Review MCP code. |
| Keys in transcripts | Scrub before sharing sessions. |
| No rotation | Rotate regularly. IP whitelist. |
| Withdrawal enabled | Always disable. Use subaccounts. |
Some connectors (like Cube's built-in MCP) use local auth with no API keys. Others require key+secret in config files. Choose connectors that match your security requirements.
110 additional exchanges work via
npm i -g ccxt-mcpβ anything CCXT supports in this repo's pinned CCXT version.
More venues = more strategies. Cross-exchange arb doesn't work with one exchange.
See connectors/README.md for setup details.
21 agents modeled after real traders. The philosophy isn't just flavor text β it changes how they read markets and size positions.
| Persona | Philosophy | Style |
|---|---|---|
| Arthur Hayes | Macro-to-crypto. DXY, real yields, liquidity cycles. | Leveraged macro conviction |
| George Soros | Reflexivity theory. Attack regime breaks. Boom-bust cycles. | Thesis-driven, concentrated |
| Stanley Druckenmiller | Go for the jugular. Concentrated macro bets when conviction is high. | High-conviction sizing |
| Paul Tudor Jones | Risk management IS the strategy. 200-day MA. 5:1 R:R minimum. | Trend following, risk-first |
| Ray Dalio | All-weather portfolio. Risk parity. 15 uncorrelated bets. | Balanced allocation |
| Jim Simons | Pure quant. Statistical edge. Zero emotion. Sharpe > 2.0. | Systematic stat arb |
| Ed Thorp | Kelly criterion. Mathematical edge. The original quant. | Optimal bet sizing |
| Jesse Livermore | Tape reading. Pyramiding. "It was my sitting that made the big money." | Classic speculation |
| Michael Saylor | Bitcoin is digital property. Stack sats. Never sell. | Relentless BTC accumulation |
| Cathie Wood | Disruptive innovation. Wright's law. 5-year thesis. | High-conviction innovation |
| Raoul Pal | Exponential age. Network value. 4-year cycles. | Cycle-based portfolio |
| PlanB | Stock-to-Flow. Halving cycles. On-chain models. | Model-based BTC valuation |
| Willy Woo | On-chain analytics. NVT. Holder behavior. "The chain doesn't lie." | On-chain signals |
| CZ | Build in the bear. Spot only. Ecosystem investing. Fundamentals > hype. | Ecosystem value investing |
| GCR | Contrarian. Fade the crowd. "When everyone agrees, they're usually wrong." | Contrarian conviction |
| Cobie | Narrative trading. Early to the meta. Asymmetric bets. | Narrative lifecycle |
| Ansem | Early discovery. Momentum alpha. Degen with discipline. | Micro-cap momentum |
| Hsaka | Chart structure. S/R levels. Only A+ setups. Patience. | Technical swing trading |
| Tetranode | DeFi yield. Real yield vs emissions. Governance power. | Yield optimization |
| Warren Buffett | Value investing. Margin of safety. Competitive moats. Long-term compounding. | Fundamental value |
| Gwyneth Chen | Pro market maker. Spread capture. Adverse selection. Avellaneda-Stoikov. | Institutional MM |
> /hire arthur-hayes
> @arthur-hayes what's the macro setup? DXY is falling and the Fed just paused.
> /hire jim-simons
> @jim-simons scan for statistical anomalies across all BTC pairs
> /hire michael-saylor
> @michael-saylor set up a weekly DCA into BTC across all exchanges
23 agents organized by function. These don't have celebrity personas β they just do their job.
| Agent | Role | Multi-Exchange |
|---|---|---|
| Scalper | Sub-second, order book | Lowest-latency venue |
| Momentum | Breakouts, trend riding | Cross-venue scans |
| Mean Reversion | Fades extremes | Cross-venue deviation |
| Swing | Multi-day S/R holds | Best fill routing |
| Arbitrageur | Buy low, sell high | Core cross-exchange |
| Grid | Systematic levels | Grid per venue |
| Agent | Role | Multi-Exchange |
|---|---|---|
| Execution Trader | TWAP, VWAP, Iceberg | Smart order routing |
| Market Maker | Two-sided quotes | Multi-venue quoting |
| DCA Strategist | Scheduled buys | Cheapest venue |
| Agent | Role | Multi-Exchange |
|---|---|---|
| Quant Analyst | RSI, MACD, backtests | Cross-venue signals |
| Order Flow | Tape reading, whales | Cross-venue flow |
| Volatility | Vol regime detection | Cross-venue vol |
| Sentiment | Funding, OI, fear/greed | Aggregated data |
| On-Chain | Wallets, exchange flows | Exchange-agnostic |
| Agent | Role | Multi-Exchange |
|---|---|---|
| Risk Manager | VaR, Kelly, drawdown caps | Aggregate all venues |
| Equity Risk Manager | Equity-specific risk: beta, sector, factor | Cross-exchange |
| Portfolio Manager | Allocation, rebalancing | Cross-exchange |
| Performance | Post-trade analysis | Per-venue comparison |
| Agent | Role | Multi-Exchange |
|---|---|---|
| Funding Farmer | Delta-neutral yield | Best rates cross-venue |
| Liquidation Hunter | Margin monitoring | All exchanges |
| Pairs Trader | Long/short correlated | Cross-exchange pairs |
| Breakout | Range breaks + volume | Cross-venue volume |
| Agent | Role | Multi-Exchange |
|---|---|---|
| Backtester | Historical simulation | Any exchange data |
Every agent has KPIs. Miss them and you're out. /review runs a desk-wide evaluation:
> /review
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DESK PERFORMANCE REVIEW β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ£
CONNECTED: cube.exchange (live) Β· Binance (paper) Β· Kraken (paper)
ββββββββββββββββββββ¬βββββββββββββ¬βββββββββ¬βββββββββββ
β Agent β Primary KPIβ Actual β Grade β
ββββββββββββββββββββΌβββββββββββββΌβββββββββΌβββββββββββ€
β Risk Manager β Breaches β 0 β π’ A β
β Arbitrageur β Net P&L β +$340 β π’ B+ β
β Market Maker β Spread P&L β +$120 β π’ B β
β Momentum Trader β Win Rate β 41% β π΄ D β
ββββββββββββββββββββ΄βββββββββββββ΄βββββββββ΄βββββββββββ
RECOMMENDATION:
π΄ FIRE Momentum Trader β win rate below 55% target
Market is range-bound. Replace with Mean Reversion Trader.
What ships with each agent:
| Component | Description |
|---|---|
| Metrics | Win rate, Sharpe, spread, drawdown |
| Self-Eval | Agent grades its own session |
| Fire Triggers | Hard thresholds, auto-removal |
| ai-fund | ai-hedge-fund | Freqtrade | Hummingbot | |
|---|---|---|---|---|
| LLM-native | β Claude | β Multi-LLM | β | β |
| Agents | 45 | 18 | User-defined | ~12 |
| Hire/fire | β | β | β | β |
| Personas | 21 | β | β | β |
| Exchanges | 110+ | Stocks only | 30+ | 20+ |
| Cross-arb | β | β | β | β |
| SOR | β | β | β | β |
| Crypto | β | β | β | β |
| Multi-MM | β | β | β | 1 venue |
| No API keys | β cube | β | β | β |
| Paper | β All | β | β | β |
| License | MIT | MIT | GPL | Apache |
| Command | Description |
|---|---|
/setup |
Connect exchanges, API keys, mode |
/desk |
Active agents, positions, KPIs |
/hire <role> |
Activate an agent |
/fire <role> |
Remove an agent |
/review |
Performance review + fire recs |
/backtest |
Test on historical data |
| Desk | Agents |
|---|---|
| Conservative | risk-manager, dca, performance |
| Arb | risk, arbitrageur, execution, quant |
| MM | risk, market-maker, orderflow, vol |
| Macro | hayes, pal, risk, execution |
| BTC Maxi | saylor, plan-b, willy-woo, risk |
| Full | risk, portfolio, arb, mm, hayes, simons |
ai-fund/
βββ connectors/ # Exchange connections (built-in + beta, 110 via CCXT)
β βββ cube/ # Built-in: cube.exchange (CLI + MCP tool surface)
β βββ ccxt/ # Built-in: Coinbase, Binance, 110 exchanges (92 tools)
β βββ alpaca/ # Built-in: stocks, ETFs, crypto (24 tools)
β βββ README.md # How to add more exchanges
βββ skills/ # 45 agent personas (exchange-agnostic)
βββ lib/ # 28 shared libraries, 250+ pure functions
β βββ indicators.ts # SMA, EMA, RSI, MACD, BB, ATR, ADX, OBV, Stochastic
β βββ math.ts # Kelly, VaR, Sharpe, Sortino, correlation, drawdown
β βββ execution-planner.ts # TWAP, VWAP, iceberg, market impact (Almgren-Chriss)
β βββ execution-analytics.ts # Order book analysis, slippage, fill simulation
β βββ portfolio-analytics.ts # Portfolio exposure, stress test, rebalancing
β βββ confluence-detector.ts # Multi-TF confluence, BB squeeze, mean reversion
β βββ grid-trading.ts # DCA scheduling, grid optimization, basis trade
β βββ volume-profile.ts # Volume profile, value area, correlation regime
β βββ ... # Backtester, regime detector, signal generator, etc.
βββ examples/ # Pre-built desk configurations
βββ scripts/ # npx installer
βββ .claude/commands/ # Slash commands (/setup, /desk, /hire, etc.)
| Layer | Role |
|---|---|
skills/ |
45 agent personalities, strategies, KPIs |
connectors/ |
Built-in and beta exchange MCP servers with capability-gated surfaces |
lib/ |
28 shared libraries β indicators, risk, execution, portfolio, options, stat-arb, microstructure |
.claude/commands/ |
Slash commands |
Add an exchange β no agent files change. Write an agent β no exchange code involved.
An open-source AI crypto trading framework with 45 agents running inside Claude Code. You hire the ones that match your strategy and fire the ones that miss KPIs. Think of it as a trading desk, not a bot.
- 21 named personas (Arthur Hayes, Jim Simons, George Soros, Jesse Livermore, Warren Buffett, and more) plus role-based agents across desk functions. They share analysis libraries for indicators, risk, execution, portfolio analytics, market microstructure, and stat-arb workflows.
110 exchanges via CCXT in the pinned dependency, plus dedicated connectors for Cube, Alpaca, Robinhood, Hyperliquid, and gateway orchestration.
MIT-licensed, fully open source. You need Claude Pro or Team ($20/month) for the Claude Code runtime.
Yes. The Arbitrageur scans for price gaps. The Execution Trader routes to the best venue. The Market Maker quotes across venues at once. It's one of the main reasons to use this.
virattt's project does stocks with investor personas (Buffett, etc.). ai-fund is crypto, works with any exchange, has 45 agents with connector-backed tool surfaces, and fires them when they underperform. Comparison table.
Yes. Everything starts in paper/testnet. The Risk Manager reviews all trades. You have to explicitly confirm before anything goes live.
If the exchange supports them. Kraken has tokenized stocks. Alpaca does US equities with full paper trading support.
Any exchange you already use. The architecture is venue-agnostic β agents work the same way regardless of connector. If you want zero-config to try things out, Cube's built-in connector needs no API keys. For maximum exchange coverage, use CCXT.
It depends on the connector. Some use local auth (no keys in files). Others require API keys in config β AI agents can read those. Use read-only keys, disable withdrawals, scope to subaccounts, and don't share session transcripts without scrubbing. Full breakdown here.
Drop a folder in skills/ with a SKILL.md file. Template at skills/_template/SKILL.md.
Create a folder in skills/ with a SKILL.md file. Use skills/_template/SKILL.md to start.
| Section | What Goes In It |
|---|---|
| Personality | Who they are, how they talk |
| Philosophy | Beliefs that drive decisions |
| Capabilities | Which tools, how used |
| Metrics | KPIs, red flags, fire triggers |
| Self-Eval | How they grade themselves |
Package manager: use npm workspaces only. The governed root commands assume npm ci and npm run ... from the repo root.
CI/CD: GitHub Actions runs npm run build and npm run check on every push and PR (.github/workflows/test.yml). The default PR path covers governed workspaces and hermetic suites only.
Canonical commands:
npm run buildbuilds the shared lib plus supported connector workspaces.npm run checkruns workspace typecheck, hermetic unit tests, hermetic integration tests, and evals.npm run test:unitruns deterministic default suites.npm run test:integrationruns mocked or replay-backed connector integration suites.npm run test:platformruns loopback/keychain/process-sensitive suites and is opt-in.npm run test:liveruns real exchange tests and is opt-in.
Auth: Agents authenticate via Device Authorization (RFC 8628) β no API keys needed. See docs/agent-auth-brief.md.
See CONTRIBUTING.md. New agents, exchange connectors, bug fixes all welcome.
ai-fund is for educational and research purposes. Not financial advice. Crypto trading can lose you money. Use paper mode when testing. Backtests don't predict anything.
MIT.
- cube.exchange β built-in connector
- OKX Trade Kit β 107 trading tools via MCP
- Kraken CLI β 134 commands, built-in paper trading
- CCXT MCP β 110 exchanges via universal adapter
- CCXT β universal exchange adapter (Coinbase, Binance, 110)
- Claude Code β AI runtime that powers the desk
- Connectors Guide β how to add any exchange