Multi-agent autonomous trading system for Polymarket prediction markets, powered by Xiaomi MiMo V2.5 Pro as the long-chain reasoning core.
Polymarket has 1000+ active markets at any moment. Manual traders cannot scan, analyze, and act on edge windows that close in minutes. Existing bots use single-shot heuristics (price drift, volume spikes) and miss the structural reasoning required for binary event resolution — oracle source mismatches, settlement timing, narrative shifts, correlated market arbitrage. PolyForge replaces the human analyst with a 5-agent pipeline where each agent specializes and MiMo provides the deep reasoning step.
┌──────────┐ ┌──────────┐ ┌──────────────┐ ┌──────────┐ ┌──────────┐
│ Scout │→ │ Analyst │→ │ MiMo Reasoner│→ │ Risk │→ │ Executor │
│ (markets)│ │ (signals)│ │ (long-chain) │ │ (sizing) │ │ (CLOB) │
└──────────┘ └──────────┘ └──────────────┘ └──────────┘ └──────────┘
│ │ │ │ │
└─────────────┴────────────────┴───────────────┴─────────────┘
shared state bus
| Agent | Job | Model |
|---|---|---|
| Scout | Poll Polymarket Gamma API every 15s, filter by volume/spread/time-to-resolve, push candidate markets to bus | rule-based |
| Analyst | Pull orderbook depth, historical price, anchor-source verification (Coinbase + Chainlink), produce signal dict | rule-based + small LLM |
| MiMo Reasoner | Long-chain reasoning over signal + market context, produce trade thesis with confidence score and exit conditions | MiMo V2.5 Pro |
| Risk Manager | Apply position sizing (Kelly-fraction with floor/ceiling), portfolio correlation check, daily loss cap | deterministic |
| Executor | Submit limit orders via Polymarket CLOB, monitor fill, manage exits, log to SQLite | deterministic |
The Reasoner agent runs long-chain CoT for every trade decision. Concretely:
- Multi-step verification — cross-check anchor price (Polymarket crypto-price API openPrice) vs Coinbase vs Chainlink Data Streams to detect oracle gaps that flip resolution outcome
- Narrative weighting — read Twitter/Discord context, weigh against on-chain signals, reason about asymmetric information
- Counter-evidence search — explicitly search for trade-killing facts before sizing, not after
- Exit-condition design — generate stop-loss + take-profit + time-stop tuple per trade, tied to specific invalidation events
MiMo handles the reasoning chain end-to-end in a single inference, eliminating the multi-call orchestration overhead that other models require.
- Python 3.12, asyncio
- Polymarket CLOB SDK + Gamma REST API
- Xiaomi MiMo V2.5 Pro via OpenAI-compatible endpoint
- SQLite for trade journal, Prometheus for metrics
- systemd service deployment
- ✅ Scout + Analyst + Risk Manager: production
- ✅ Executor: paper trade mode (60+ trades logged)
- 🟡 MiMo Reasoner: integrated, A/B testing against rule-based reasoner
- 🔜 Live capital deployment: pending 30-day paper trade Sharpe > 1.0
git clone https://github.com/indrarg8899/polyforge
cd polyforge
pip install -r requirements.txt
cp .env.example .env # add MIMO_API_KEY, POLYMARKET_PK
python -m polyforge.run --mode paperMIT