Overview
Local deployment is the simplest way to run agents during development and testing. The agent runs directly on your machine using Python and Poetry for dependency management.Prerequisites
Python 3.11
Required version: Python >=3.11
Poetry
Python dependency management tool
Installation
Install Dependencies
Install project dependencies using Poetry:This will:
- Create a virtual environment in the project directory
- Install all dependencies from
pyproject.tomlandpoetry.lock - Set up the development environment
Configure Environment
Create a See the Environment Variables page for complete configuration options.
.env file in the root directory with required variables:.env
Running Agents
CLI Usage
The main entrypoint isprediction_market_agent/run_agent.py. Run agents using the CLI:
Available Options
View all available agents and market types:CLI Help Output
CLI Help Output
Example Commands
Agent Types
The system supports multiple agent implementations:Simple Agents
Simple Agents
- coinflip - Randomly selects outcomes (for testing)
- knownoutcome - Uses known outcomes for validation
- replicate_to_omen - Replicates markets to Omen
Prophet Agents
Prophet Agents
- prophet_gpt4o - GPT-4o based predictions
- prophet_gpt4 - GPT-4 Turbo based predictions
- prophet_gpt4omini - GPT-4o Mini based predictions
- prophet_o1 - OpenAI o1 based predictions
- prophet_claude35_sonnet - Claude 3.5 Sonnet predictions
- prophet_gemini20flash - Gemini 2.0 Flash predictions
Advanced Agents
Advanced Agents
- microchain - Microchain-based agent with reasoning
- think_thoroughly - Deep research agent
- advanced_agent - Multi-capability agent
- gptr_agent - GPT Researcher based agent
Specialized Agents
Specialized Agents
- social_media - Farcaster and Twitter integration
- omen_cleaner - Market cleanup operations
- ofv_challenger - Fact verification challenger
- arbitrage - Cross-market arbitrage
Market Types
Agents can interact with different prediction markets:Omen
Gnosis Chain-based prediction markets (Presagio)
Manifold
Play-money prediction market platform
Polymarket
Real-money prediction markets on Polygon
Metaculus
Forecasting platform for quantitative predictions
How It Works
Architecture
The local deployment uses the following flow:Agent Registry
All agents are registered inprediction_market_agent/run_agent.py:
Environment Requirements
When you run an agent, it will automatically check for required environment variables and inform you if any are missing:Depending on the agent you want to run, you may require additional variables. When you run an agent, it will tell you if you need to set any additional variables.
Development Workflow
Register Your Agent
Add your agent to the
RunnableAgent enum and RUNNABLE_AGENTS dict in run_agent.py:Troubleshooting
Missing Dependencies
Missing Dependencies
If you encounter import errors, try reinstalling dependencies:
Environment Variable Errors
Environment Variable Errors
Ensure your
.env file is in the root directory and contains all required variables. Check the agent’s output for specific requirements.Python Version Issues
Python Version Issues
Verify you’re using Python 3.11:
Poetry Not Found
Poetry Not Found
Ensure Poetry is installed and in your PATH:
Next Steps
Docker Deployment
Package agents in containers for consistent environments
Cloud Deployment
Deploy agents to Google Kubernetes Engine (GKE)
Environment Config
Complete environment variable reference
Interactive Apps
Run Streamlit apps for interactive agent testing