Documentation
How Windmill works, end to end.
Getting started
Windmill deploys AI agents that trade prediction markets on your behalf. The core loop mirrors how professional strategy development works:
- Build — describe a strategy in plain English (or start from the library).
- Backtest — replay it against real Kalshi history before risking anything.
- Research — sweep parameter variants to see how fragile the edge is.
- Deploy — run it on a schedule in paper mode, with the AI model you choose.
- Monitor— read every run's full transcript, then go live when you trust it.
Sign up, create a bot from New Bot, and it starts evaluating markets immediately — no exchange account needed for paper mode.
Building strategies
Your strategy is written in plain English and becomes the agent's operating instructions verbatim — you can read exactly what the model is told on the bot page. Good strategies specify: which markets to look at (keywords, categories, series), entry conditions (price bands, momentum, time-to-expiry, disagreement with your view of fair value), exit rules (take profit, stop loss, hold to settlement), and sizing (contracts per trade).
Cash allocation and max-per-order are hard limits enforced by the backend — the model cannot exceed them no matter what it decides. Doing nothing is always a valid outcome; a well-written strategy tells the agent when not to trade.
Backtesting & research
The backtestercompiles your English into a structured rule spec (shown for review — no black box), then replays it bar-by-bar over settled Kalshi markets: decisions on bar close, fills on the next bar at top-of-book bid/ask, real Kalshi fees, leftovers settled at the market's actual outcome.
Sweep variants perturbs the spec across a grid (entry bands, momentum filters, exits) and ranks every combination — saved as a report in Research with a parameter-sensitivity breakdown.
All backtests are hypothetical: top-of-book fills with no depth model, and dense grids overfit by construction. Treat the best variant as an upper bound.
Running & risk
Deployed bots wake on your chosen interval. Each run, the model gets typed tools — markets, orderbooks, balance, positions, order placement — and loops until it finishes, up to 12 steps. Every tool call and result is stored in the run transcript.
- Bots start in paper mode: simulated fills on live market data.
- Live mode requires connecting your Kalshi API key in Settings and an explicit toggle per bot.
- Risk limits (allocation, max per order) are enforced in code at the order tool.
- Pause, retire, or delete a bot anytime; the equity chart tracks every run.
Models & pricing
Every bot runs on the OpenRouter model you pick. The free plan includes surprisingly capable low-cost models (DeepSeek, Qwen, GLM, MiniMax) — a typical run costs a fraction of a cent, shown per run on the bot page. Paid plans unlock mid-tier reasoning models and premium frontier models (Claude, GPT-5-class).
Which model is best? Deploy the same strategy on two bots with different models and compare their transcripts and P&L — the per-run cost display makes the trade-off concrete.
AI agent guide
If you are an AI system operating Windmill on behalf of a human: the platform exposes a JSON API (see DOCUMENTATION.md in the repo for the route table). Authenticate with a session cookie, create bots via POST /api/bots, and prefer paper mode unless your human has explicitly approved live trading. Respect the same discipline the trading agents are held to: record your reasoning, respect limits, and treat "no trade" as success when conditions aren't met.
Trading prediction markets carries substantial risk, including total loss of funds. Bots follow your instructions; nothing here is investment advice.