polybot

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.

10 strategies MCP server · 25+ tools Paper-trading default Human-in-the-loop Polymarket · Kalshi · Opinion · Binance Claude · GPT · Perplexity
10
built-in strategies
arbitrage → AI model
25+
MCP tools
typed, over stdio or HTTP
4
venues
Polymarket · Kalshi · Opinion · Binance
MIT
open source
self-host, fork, audit

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.

quickstart · your terminal
# 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
agent session · MCP
# 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.

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.

AI agent (MCP) Claude · GPT · custom Strategies 10 × BaseStrategy Operator (CLI) approvals · config polybot core Signal → sizing Risk gate (caps/limits) Executor + audit log SQLite · DuckDB · NNG pub/sub Polymarket CLOB Kalshi Opinion Binance (hedge)

Strategies

Ten strategies, not one.

Pluggable BaseStrategy interface. Enable, shadow, or disable each one from the CLI.

See all strategies →

Explore

Everywhere to go from here.

The whole of polybot, one grid — positioning, features, strategies, use cases, guides and more.

Need an agent system built like this?

Cryptuon builds production AI agents, MCP integrations, and trading systems. polybot is our open-source showcase.