kalshi-ai-trading-bot
The honest edge layer for Kalshi prediction markets - an agent-native toolkit (CLI, MCP server, Claude skill) that measures whether you actually beat the book i
What is kalshi-ai-trading-bot?
The honest edge layer for Kalshi prediction markets - an agent-native toolkit (CLI, MCP server, Claude skill) that measures whether you actually beat the book instead of claiming it.
Overview of kalshi-ai-trading-bot
What it is
Kalshi AI Trading Bot is an agent-native toolkit for Kalshi prediction markets. It provides a CLI, MCP server, and Claude skill. Its primary purpose is to measure whether a trader actually has an edge against the Kalshi book, rather than claiming profitability without proof. The toolkit includes a signed Kalshi API client, market-data ingestion, position tracking, SQLite telemetry, a Streamlit dashboard, a pluggable LLM client (any model on OpenRouter), atomic agent CLI tools, a Claude skill, and an MCP server. Example strategies are provided as starting points.
Key features
- Edge measurement: Uses
cli edgeto pull Kalshi's authoritative settlements, reconcile them against the decision journal, and score settled trades with metrics like Brier score, log-loss, and edge vs. book. The verdict is gated: with fewer than 10 forward-settled trades, it refuses to claim edge. - Self-improvement loop:
cli improvepulls settlements, reconciles them, and re-derives a machine-readable Edge Policy. The policy can block categories with negative realized P&L, issue side warnings, and apply haircuts for overconfident probability estimates. Groups with fewer than 5 settled trades earn no opinion. - Data-fed families: Includes source-readers and forward-scoring loops for families like AAA gas/diesel, monthly GPU compute price, OpenRouter weekly author text-share, and Truth Social weekly post buckets. Each pricing event is snapshotted with the model's fair, the book's quote, and fee-aware edges, then scored against the realized value.
- Agent-native surface: Provides CLI tools, a Claude skill, and an MCP server for integration with AI agents.
Use cases
- Traders who want to honestly measure their performance against the Kalshi book.
- Developers building automated trading strategies for prediction markets.
- Researchers analyzing edge and calibration in prediction market trading.
- Users who want to run a self-improving trading loop that learns from settled outcomes.
Getting started
bash# 1. Clone and set upgit clone https://github.com/ryanfrigo/kalshi-ai-trading-bot.gitcd kalshi-ai-trading-botpython setup_env.py # creates .venv, installs deps# 2. Add your API keyscp env.template .env# then open .env and fill in KALSHI_API_KEY and OPENROUTER_API_KEY# 3. Verify connectivitypython cli.py health# 4. Run an example strategy in paper modepython cli.py run --paper # AI directional (LLM-driven)python cli.py run --safe-compounder # Edge-based NO-side, no LLMOpen the dashboard in another terminal:bashpython cli.py dashboard
License and pricing
This project is open source under the MIT license. Pricing is open source (no cost).
Based on the project's public README and repository metadata.