Quick Start¶
Get AIS running in paper trading mode in under 5 minutes.
1. Install¶
git clone https://github.com/kmshihab7878/Autonomous-Investment-Swarm.git
cd Autonomous-Investment-Swarm
pip install -e ".[dev]"
2. Configure¶
At minimum, set the HMAC secret:
3. Start Redis¶
4. Run Paper Trading¶
You should see structured JSON output:
{"event": "session_started", "mode": "paper", "strategies": ["momentum_ma_crossover", "funding_rate_contrarian"]}
{"event": "cycle_start", "cycle": 1, "timestamp": "2026-01-15T10:00:00Z"}
{"event": "signal_generated", "agent": "momentum", "symbol": "BTCUSDT", "direction": 1, "confidence": 0.72}
{"event": "risk_approved", "symbol": "BTCUSDT", "size": 0.001, "token": "hmac:a3f2..."}
{"event": "order_submitted", "symbol": "BTCUSDT", "side": "BUY", "qty": 0.001, "mode": "paper"}
{"event": "cycle_end", "cycle": 1, "duration_ms": 245}
5. Start the API¶
In a separate terminal:
Check the system:
# Health check (no auth required)
curl http://localhost:8000/health
# System status (requires API key)
export AIS_API_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
curl -H "Authorization: Bearer $AIS_API_KEY" http://localhost:8000/control/status
6. Check Metrics¶
With the API running, Prometheus metrics are available at:
What Just Happened?¶
Each 60-second cycle:
- Strategy agents analyzed market data and generated
Signalobjects - Weighted arbitration selected the best signal
- Portfolio allocator sized the order based on NAV and confidence
- Risk engine validated the order against all guards (drawdown, leverage, liquidity, exposure)
- Risk engine signed the approved order with an HMAC token
- OMS verified the token and submitted to the paper trading simulator
- Event store recorded the decision for audit trail
Next Steps¶
- Configuration — Customize risk limits, strategies, and exchanges
- Strategy Development — Build your own strategy agent
- Deployment — Run the full stack with Docker Compose
- Architecture — Understand the system design