by lorine93s
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.
# Add to your Claude Code skills
git clone https://github.com/lorine93s/polymarket-ai-market-suggestorGuides for using ai agents skills like 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.
ℹ️ 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.
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: suggest and summarize.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
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 – structured SuggestionBundle.reports/ai-safety.md – Markdown one-pager for sharing.data/bundles.db) captures a full copy for analytics.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
polysuggest show 3 # Detailed view for run #3
polysuggest insights # Aggregated stats (top tags, avg confidence, sentiment)
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.
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).
Let’s build the next generation of AI-native Polymarket tooling together.
No comments yet. Be the first to share your thoughts!