Everything You Need toBuild AI Trading Agents
Open source platform for autonomous trading across crypto, stocks, and prediction markets. Self-host for free or use our cloud.
AI Trading Agents
Not rule-based bots. These are autonomous agents powered by LLMs that reason about market conditions, weigh risk/reward, and make trading decisions the way a human analyst would — but faster and without emotion.
- Agents use natural language prompts as their strategy
- LLM reasoning for every trade decision
- Full audit log of agent thinking process
- Configurable risk parameters and guardrails
[agent] Analyzing BTC/USDT...
[think] RSI at 32, oversold territory
[think] Volume spike 3x avg, possible reversal
[think] Support at 62,400 holding on 4h chart
[think] Risk/reward ratio: 2.8 — favorable
[decide] BUY 0.05 BTC @ 62,580
[execute] Order filled. Stop-loss: 61,200
Multi-Market Trading
One agent framework. Multiple markets. Same tools, same prompts, different opportunities.
Binance
24/7 market access. Spot and futures trading with real-time price feeds.
BTC, ETH, SOL, and 100+ pairs
Yahoo Finance / Alpaca
Market data via Yahoo Finance. Paper and live trading via Alpaca brokerage API.
US equities, ETFs
Polymarket
Trade on real-world event outcomes. Agents analyze probability and find mispriced markets.
Events, elections, outcomes
[gen 1] 12 variants · best sharpe: 0.82
[gen 2] 12 variants · best sharpe: 1.14
[gen 3] 12 variants · best sharpe: 1.31
[gen 4] 12 variants · best sharpe: 1.58
[done] Best prompt found: v4-7
[diff] +"weight volume confirmation higher"
[diff] +"ignore RSI below 20 in strong trends"
Prompt Optimizer
Evolutionary AI that improves your trading strategies automatically. It generates prompt variants, backtests each one, and breeds the winners.
- Generates mutations of your agent's strategy prompt
- Backtests each variant against historical data
- Selects top performers, breeds next generation
- Converges on higher Sharpe ratios over generations
Backtesting
Replay historical market data and let your agents make decisions as if it were live. No look-ahead bias. Realistic execution simulation with slippage and fees.
- Historical OHLCV data for all supported markets
- Agents reason in real-time as data replays
- Sharpe ratio, max drawdown, win rate, profit factor
- Compare multiple strategies head-to-head
Strategy: momentum-btc-v3
Period: 2024-01-01 to 2025-01-01
Total trades: 247
Win rate: 61.5%
Sharpe ratio: 1.84
Max drawdown: -8.2%
Total return: +47.3%
vs Buy&Hold: +21.1%
Paper Trading
Risk-free simulation with real market data. Your agents trade with virtual money against live prices. Identical execution path as live trading, so when you're ready, the switch is seamless.
- Real-time market data feeds
- Simulated order execution with slippage
- Full P&L tracking and analytics
Risk Management
Every trade passes through pre-trade risk checks before execution. Agents can reason about risk, but hard limits are enforced at the system level.
- Max position size and exposure limits
- Drawdown limits — auto-pause on threshold breach
- Automatic stop-loss enforcement
MCP Protocol
Agents interact with markets through the Model Context Protocol. Standardized tools that work the same way regardless of which market or broker you're connected to.
{
"tool": "get_price",
"params": {
"symbol": "BTC/USDT",
"exchange": "binance"
}
}
// Response
{ "price": 62580.50,
"volume_24h": 1847293847,
"change_24h": +2.34 }
$ git clone https://github.com/agentalpha/agentalpha
$ cd agentalpha
$ docker compose up -d
Starting agentalpha-server ... done
Starting agentalpha-ui ... done
Dashboard: http://localhost:3000
API: http://localhost:8080
Self-Hosted
Your machine. Your data. Your rules. AgentAlpha runs anywhere Docker runs — a $5 VPS, a Raspberry Pi, or a rack server. SQLite database means zero external dependencies.
- Single docker compose up command to deploy
- All data in a local SQLite file you can backup with cp
- No phone-home, no telemetry, no tracking
- Works offline (except for market data and LLM calls)
- MIT license — fork it, modify it, sell it
Ready to Build?
Clone the repo and have your first agent running in under a minute.