Open-source · MIT · Python
The AI agent core
for prediction markets.
Prediction markets are one of 2026's hottest market structures — and agents are ready to trade them. polybot is an agent-driven trading framework with a native MCP server, letting Claude, GPT, and other agents analyse markets, size positions, and propose trades across Polymarket, Kalshi, Opinion, and Binance. Paper-trading by default. Human approval on anything live. Not a no-code workflow — a safe-by-default domain agent.
What is polybot?
An agent-driven trading framework for prediction markets — safe by default.
polybot is an open-source (MIT) Python framework and CLI for trading prediction markets — the 2026 market structure where LLM agents and event contracts meet. It ships first-class domain types for markets, orders, positions and risk, ten pluggable strategies, a native MCP server that exposes 25+ typed tools to AI agents, and connectors for Polymarket, Kalshi, Opinion and Binance under one unified risk and position model.
Unlike a generic workflow runner, polybot understands the domain: signals become venue-specific orders and risk invariants are enforced platform-wide. And unlike a bot you hand an API key, it is safe by default — every strategy runs in shadow (paper) mode, and an agent proposes trades while a human approves anything that moves real money.
- ◆ Agent-native. An MCP server lets Claude, GPT or any MCP client analyse markets and place approval-gated trades.
- ◆ Multi-venue. Polymarket CLOB, Kalshi, Opinion and Binance hedging behind one BaseVenue abstraction.
- ◆ Safe by default. Shadow-first, position caps, daily loss limits and a full audit log — enforced in the platform.
Problem → solution
The dangerous version of "let an agent trade" — fixed.
Handing an LLM an API key and a prompt is the easy, unsafe path. Four things break when you treat agent-driven trading like a generic automation. polybot fixes them at the platform level — with safety as the default, not an afterthought.
A workflow runner has no domain model
The problem
Chaining an LLM call to an HTTP node gives you an "agent" on paper. In production you still have to re-derive markets, orders, positions, fills and risk from scratch.
polybot's approach
polybot ships Pydantic types for Market, Order, Position, Signal and PriceUpdate. Strategies emit signals; the executor turns them into venue-specific orders.
Why polybot, not n8n →Risk lives in every script, so it lives nowhere
The problem
"Never exceed 2% daily drawdown across all venues" is not something a single node can enforce. Bolt-on risk checks drift out of sync with reality.
polybot's approach
Position, exposure and category caps plus daily loss limits are enforced pre-submission by the platform — the same invariants for every strategy and every venue.
How risk is enforced →Going live is a cliff, not a ramp
The problem
Most trading code has one mode: live. You find out a strategy is broken with real money on the line.
polybot's approach
Every strategy boots in shadow (paper) mode. Promote to live per-strategy only once the metrics prove out — and roll back just as easily.
How shadow mode works →Agents get bolted on with prompt glue
The problem
Wiring an LLM into a trading system usually means brittle prompt engineering and no guardrails on what the model can actually do.
polybot's approach
A native MCP server exposes 25+ typed tools with read-only introspection and approval-gated execution, so an agent is a first-class principal with tools and audit — not a prompt.
The MCP server →Code
From four commands to an agent loop.
Install in shadow mode, then let an agent analyse strategies and propose changes — that you approve at the CLI.
# install and bring up the stack
pip install polybot-trader
cp .env.example .env # POLYMARKET_PRIVATE_KEY, PROXY_ADDRESS
polybot db init
polybot strategy enable arbitrage
polybot strategy shadow arbitrage --enable
polybot start
→ dashboard at http://localhost:8000/ui
→ arbitrage running in shadow (paper) mode # from Claude Desktop / any MCP client
$ polybot mcp start
MCP server listening on stdio
→ list_markets(category="politics", limit=10)
→ compare_strategies(["arbitrage","stat_arb"], window_days=14)
→ suggest_strategy_improvements("stat_arb")
→ propose_config_change("stat_arb", {entry_z: 2.8})
[proposal p-0142 — pending your approval] See the full agent loop walkthrough →
Features
Everything you need to run agents on markets.
A complete platform — agent integration, strategies, models, venues, risk and analytics — that you self-host.
Native MCP server
25+ typed tools over stdio or HTTP. Drop polybot into Claude Desktop or any MCP client and your agent gets a trading desk.
Learn more →Ten built-in strategies
Arbitrage, statistical arbitrage, AI model, spread farming, copy trading, resolution arb and more — each a BaseStrategy subclass.
Learn more →Pluggable AI models
AIModelPlugin returns a probability + confidence. Claude, GPT, Perplexity and your own model all fit behind one interface.
Learn more →Four venues, one model
Polymarket CLOB, Kalshi (CFTC-regulated), Opinion and Binance hedging under a unified risk and position model.
Learn more →Risk as infrastructure
Position, exposure and category caps plus daily loss limits enforced pre-submission. Not per-strategy checks — platform invariants.
Learn more →Shadow mode first
Every strategy runs paper-trading by default. Promote to live per-strategy only when the metrics prove out.
Learn more →Dual-store analytics
SQLite for the operational store, DuckDB for OLAP analytics — strategy stats and correlations in milliseconds.
Learn more →Full audit log
Every signal, order and MCP tool call is logged with timestamp and actor. Agent actions are auditable by construction.
Learn more →Docker-first, self-hostable
A single docker-compose brings up the whole stack. Runs anywhere Python does — your infra, your keys, your data.
Learn more →How it works
Signals in. Risk-checked orders out.
Strategies and AI models emit signals. The core sizes them, checks them against your risk invariants, and routes them to venues — with agents and operators gating anything that goes live.
Strategies
Ten strategies, not one.
Pluggable BaseStrategy interface. Enable, shadow, or disable each one from the CLI.
Arbitrage
Low riskBuy YES + NO when combined < $1. Near-risk-free if sized right.
Statistical arbitrage
Medium riskTrade correlated markets that diverge from historical spread.
AI model
Medium riskLet an LLM or ML model predict true probability, trade the gap.
Spread farming
Low riskPassive market making — earn the bid-ask spread.
Copy trading
Medium riskMirror whale wallets you have back-tested as profitable.
Resolution arbitrage
Low riskMispricing near expiry when outcome is nearly certain.
Explore
Everywhere to go from here.
The whole of polybot, one grid — positioning, features, strategies, use cases, guides and more.
Why polybot
How a domain trading agent differs from generic workflow tools like n8n — the precise technical case.
Open →Features
The complete inventory: MCP server, strategies, models, venues, risk and analytics.
Open →How it works
Architecture, data flow and a six-step quickstart from install to a running dashboard.
Open →Strategies
The ten built-in strategies, each a pluggable BaseStrategy you enable, shadow, or disable.
Open →Use cases
Cross-venue arbitrage, AI agent trading desks, market making, and shadow-mode research.
Open →Guides
Long-form technical writing on the MCP server, risk controls, shadow mode and the agent loop.
Open →FAQ
Common questions on agents, strategies, venues and running polybot safely against real money.
Open →Consulting
Cryptuon builds production AI agents, MCP integrations and trading systems for teams.
Open →About
The project and the team behind polybot, and how it fits Cryptuon’s open-source work.
Open →Need an agent system built like this?
Cryptuon builds production AI agents, MCP integrations, and trading systems. polybot is our open-source showcase.