This project implements a multi-agent AI system designed to research events and generate predictions related to prediction markets.
The system collects real-world information from the web, stores contextual knowledge, simulates trader analysis, and generates a final prediction.
The architecture is designed to mimic how traders analyze news events before making market decisions.
The system is composed of multiple agents working together:
-
Scraper Agent
- Collects event information from the web using Apify Google Search Scraper.
- Extracts titles and descriptions of relevant events.
-
RAG Memory Layer
- Stores collected event information.
- Retrieves knowledge for downstream analysis.
-
Trader Agents
- Simulate market traders analyzing event information.
- Generate sentiment signals (positive / negative / neutral).
-
Decision Agent
- Aggregates trader signals.
- Produces a final prediction about market direction.
Web Events ↓ Scraper Agent (Apify) ↓ RAG Knowledge Memory ↓ Trader Sentiment Analysis ↓ Decision Agent ↓ Market Prediction
- Python
- Apify (Web scraping)
- Modular multi-agent architecture
- Simple RAG memory system
Clone the repository:
git clone https://github.com/yourusername/prediction-ai-agent.git
Navigate into the project folder:
cd prediction-ai-agent
Create virtual environment:
python -m venv venv
Activate environment:
Mac / Linux: source venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Create a file named config.py and add your Apify API token:
APIFY_TOKEN = "your_apify_token"
EVENT_QUERY = "AI startup funding news"
Run the AI agent:
python main.py
Starting AI Prediction Agent...
Starting Prediction Agent Researching event: AI startup funding news
Storing knowledge Retrieving knowledge Traders analyzing knowledge
FINAL RESULT Prediction: Market uncertain
Future improvements may include:
- Integration with real prediction market APIs (Polymarket / Kalshi)
- LLM-based reasoning using OpenRouter
- Improved RAG with vector databases
- Real trader wallet analysis
- Market category classification (sports / politics / weather)
Darshan S BE Computer Science & Data Science PES College of Engineering