An AI agent that ingests real-time Polymarket data, retrieves external evidence, analyzes resolution rules and liquidity risk, and generates structured research memos.
This is decision support, not automated trading.
Polymarket Gamma API
↓
Market Ingestion
↓
┌─────────────────────────────────┐
│ LangGraph Agent │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Market │ │ Evidence │ │
│ │ Analyzer │ │ Retriever │ │
│ └──────────┘ └──────────────┘ │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Risk │ │ Memo │ │
│ │ Critic │ │ Writer │ │
│ └──────────┘ └──────────────┘ │
└─────────────────────────────────┘
↓
Structured Research Memo (JSON)
↓
Eval Dashboard (Brier score, citation accuracy)
{
"market_question": "Will X happen by Y?",
"current_probability": 0.37,
"agent_estimate": 0.45,
"edge": 0.08,
"confidence": "medium",
"yes_case": ["evidence 1", "evidence 2"],
"no_case": ["counter 1", "counter 2"],
"resolution_risk": "medium",
"liquidity_risk": "low",
"sources": [],
"recommendation": "watch"
}The agent runs as a FastAPI backend. To start the local server with hot-reloading:
uv sync
export ANTHROPIC_API_KEY="..."
uv run uvicorn src.api.app:app --host 0.0.0.0 --port 8000 --reloadAPI docs will be available at http://localhost:8000/docs
# Single market memo
uv run python main.py --market <condition_id>
# Interactive mode
uv run python main.py --interactive
# Scan top AI/Crypto markets
uv run python main.py --scanThis project is configured for deployment on Railway.
To deploy:
- Connect your GitHub repository to Railway.
- Railway will automatically detect
railway.json/Dockerfileand build the service. - Add your
ANTHROPIC_API_KEYto the project variables in the Railway dashboard.
Alternatively, using the Railway CLI:
railway uppython eval/run_eval.py
# → citation accuracy, rule extraction, hallucination rate- No automated trade execution
- All recommendations require human confirmation
- Sources cited for every claim
- Confidence levels explicit
