ryanfrigo/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.

What it solves

This project provides a rigorous toolkit for trading on the Kalshi prediction market. Instead of claiming guaranteed profits, it focuses on providing the tools to honestly measure whether a trading strategy has a statistical "edge" against the market book, preventing users from mistaking luck for skill through strict out-of-sample validation.

How it works

The toolkit integrates a signed Kalshi API client with a decision journal and telemetry system. It uses a "self-improvement loop" where trades are executed, settled, and then measured using metrics like Brier scores and log-loss. This data is used to automatically derive an "Edge Policy" that can block losing categories or apply "haircuts" to overconfident probability estimates to calibrate future trades.

It offers an agent-native surface via a CLI and an MCP (Model Context Protocol) server, allowing LLMs (like Claude) to drive the trading process—from researching catalysts to executing guarded orders—while keeping API keys local.

Who it’s for

Traders and developers interested in prediction markets who want a disciplined, data-driven approach to automated trading and a framework to prove their strategy's performance using real settlement data.

Highlights

  • Honest Edge Measurement: Uses Brier scores and log-loss and refuses to claim edge if the sample size is too small (under 10 forward-settled trades).
  • Self-Improvement Loop: Automatically updates trading policies based on settled P&L and calibration errors.
  • Agent-Native Design: Includes a first-mover MCP server and a dedicated Claude skill for LLM-driven account management.
  • Risk Governance: Built-in daily-loss circuit breakers, drawdown halts, and fractional Kelly sizing.
  • Pluggable LLM Integration: Connects to any model via OpenRouter with a configurable fallback chain.
  • Coded Example Strategies: Ships with AI-driven directional trading and a math-based "Safe Compounder" strategy.

Related

  • Project
  • Project
  • Project
  • Project
  • Project