polymarket-ai-market-suggestor
Polymarket AI market suggestor that blends real-time news, social sentiment, and on-chain trends to propose new prediction markets with LLM reasoning, analytics, and CLI tooling.
Polymarket AI Market Suggestor
AI-native workflow that transforms real-time trends, news, and existing Polymarket markets into actionable, publish-ready market suggestions. Built for research teams, traders, DAO governance desks, and community curators who want to discover “what market should Polymarket list next?” using a mix of LLM reasoning, sentiment signals, and overlap checks.
SEO keywords: Polymarket AI, AI agent Polymarket, Polymarket AI market prediction, AI market prediction, Polymarket prediction market bot, Polymarket real-time trading bot, Polymarket AI trading bot, Polymarket market analyzer, Polymarket AI market suggestor.
Why PolySuggest AI?
- Trend-aware ideation – Combines live NewsAPI + Twitter sentiment to surface emerging narratives.
- Crypto momentum feed – Adds CoinGecko trending tokens as signals for on-chain market discovery.
- Overlap protection – Uses Polymarket Gamma API to ensure suggestions are novel and not already live.
- LLM-powered reasoning – GPT-4o (or fallback heuristic) produces clear resolution rules, YES/NO framing, and references.
- Explainable output – Each idea includes rationale, confidence scoring, and tagged metadata for filtering.
- Local knowledge base – SQLite bundle store captures every run for history, analytics, and dashboards.
- Ready for production – Typer CLI, structured logging, Markdown/JSON reporting, tests, Docker-friendly dependency set.
ℹ️ The AI core and workflow are inspired by leading open-source prediction market agents such as Prediction-Market-AggregationAgent-system while focusing on generative market ideation instead of trading.
Architecture Overview
TrendScanner (NewsAPI, Twitter API)
│
▼
Sentiment & Keyword signals ────────┐
│
PolymarketClient (Gamma API) │
│ │
▼ │
Existing market snapshots ──────────┘
│
▼
SuggestionEngine (LangChain + GPT-4o)
│
▼
SuggestionBundle (Pydantic)
│
├─ Storage (SQLite) — durable bundle history + analytics
├─ CLI (Typer + Rich) — interactive reports
└─ Reporting utils — JSON / Markdown / history summaries
trend_scanner.py— pulls hot news and tweets with VADER sentiment.trend_scanner.py(crypto) — optional CoinGecko trending feed for DeFi narratives.polymarket_client.py— fetches trending/current markets via Gamma API.ai.py— formats context + prompts GPT-4o (falls back if no API key).orchestrator.py— runs the end-to-end pipeline and deduplicates output.storage.py— SQLite-backed bundle persistence.analytics.py— portfolio-wide stats on past runs.reporting.py— exports Markdown dashboards and history summaries.cli.py— Typer command group:suggestandsummarize.
Quick Start
git clone https://github.com/your-org/polymarket-ai-market-suggestor.git
cd polymarket-ai-market-suggestor
python -m venv .venv && source .venv/bin/activate # or use uv/pdm
pip install -r requirements.txt
cp ENV.sample .env
# populate .env with OpenAI / NewsAPI / Twitter keys
Generate Suggestions
polysuggest suggest "AI safety regulation" --keywords "AI,regulation,legislation" --count 4 \
--markdown reports/ai-safety.md --output reports/ai-safety.json
Sample console output:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Title ┃ Confidence ┃ Resolution Source ┃ Tags ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ Will the EU enact the AI Act before Q4 2025? │ 0.72 │ Official EU Parliament DB │ ai-policy,... │
│ ... │ ... │ ... │ ... │
└───────────────────────────────────────────────┴────────────┴────────────────────────────┴───────────────┘
Outputs:
reports/ai-safety.json– structuredSuggestionBundle.reports/ai-safety.md– Markdown one-pager for sharing.- SQLite bundle store (default
data/bundles.db) captures a full copy for analytics.
Summarize History
polysuggest summarize reports/
Displays a Rich table of prior suggestion runs (topic, timestamp, top pick, confidence).
To use the built-in storage instead:
polysuggest summarize
Inspect & Analyze
polysuggest show 3 # Detailed view for run #3
polysuggest insights # Aggregated stats (top tags, avg confidence, sentiment)
Configuration
Environment variables (copy ENV.sample):
| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY |
GPT-4o API key for suggestion engine | sk-... |
OPENAI_MODEL |
Override model | gpt-4o-mini |
POLYMARKET_API_BASE |
Gamma API endpoint | https://gamma-api.polymarket.com |
NEWS_API_KEY |
NewsAPI key (optional) | news-... |
TWITTER_BEARER_TOKEN |
Twitter v2 bearer token (optional) | AAAAAAAA... |
DEFAULT_TREND_KEYWORDS |
Fallback keywords | polymarket, ai, elections |
CHROMA_PERSIST_PATH |
Future use for RAG vector store | .chroma |
POLYSUGGEST_DATA_DIR |
Directory for SQLite bundle storage | data |
No LLM key? The system falls back to a deterministic heuristic generator so pipelines remain testable offline.
Roadmap
- Integrate Tavily/NewsCatcher for better global news coverage.
- Plug in CrewAI/agent voting for multi-model consensus.
- Streamlit dashboard for live market ideation boards.
- Optional Polymarket CLOB integration to auto-submit community market suggestions.
- RAG knowledge base seeded with past Polymarket markets and governance posts.
Development & Testing
pip install -r requirements.txt
pytest
To run the CLI inside the repo without installing:
python -m polysuggest.cli suggest "US election turnout"
Logging is powered by Loguru; set LOGURU_LEVEL=DEBUG for verbose traces.
Dockerfile coming soon (project is fully dependency-pinned via requirements.txt / pyproject.toml).
Need help or collaboration?
- 📧 [email protected]
- 📣 Telegram: @lorine93s
- 🐦 X (Twitter): @kakamajo_btc
Let’s build the next generation of AI-native Polymarket tooling together.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found