Overview
The agent system uses environment variables for configuration, API credentials, and runtime settings. Variables can be set in a.env file, passed via command line, or configured in your deployment platform.
Required Variables
These variables are required as a minimum to run any agent:Private key for the Ethereum wallet used to place bets and interact with prediction markets.Format: 64-character hexadecimal string (with or without
0x prefix)OpenAI API key for GPT model access.Format:
sk-...Required for most agents that use language models for prediction and reasoning.AI Model API Keys
Depending on which agent you run, you may need additional AI service API keys:OpenAI API key for GPT-4, GPT-4o, GPT-3.5, and o1 models.Used by:
prophet_gpt4oprophet_gpt4prophet_gpt4ominiprophet_o1prophet_o1miniprophet_o3minimicrochainthink_thoroughly- Most other agents
Anthropic API key for Claude models.Used by:
prophet_claude3_opusprophet_claude35_haikuprophet_claude35_sonnet
Google API key for Gemini models.Used by:
prophet_gemini20flash
DeepSeek API key for DeepSeek models.Used by:
prophet_deepseekchatprophet_deepseekr1
Research and Information API Keys
Agents use various APIs for research and information gathering:Serper API key for Google Search integration.Purpose: Enables agents to search the web for information about marketsGet it: serper.devUsed by: Research-intensive agents like
think_thoroughly, gptr_agentTavily API key for AI-powered search.Purpose: Advanced search and information retrievalGet it: tavily.comUsed by: Research agents,
think_thoroughly_prophetThe Graph API key for querying blockchain data.Purpose: Access to indexed blockchain data and market informationUsed by: Agents that need historical market data
Social Media Integration
Private key for Farcaster account.Purpose: Post predictions and insights to FarcasterUsed by:
social_media agentTwitter API key (Consumer Key).Used by:
social_media agentTwitter API key secret (Consumer Secret).Used by:
social_media agentTwitter access token for authenticated requests.Used by:
social_media agentTwitter access token secret.Used by:
social_media agentTwitter bearer token for API v2.Used by:
social_media agentVector Database and Embeddings
Pinecone API key for vector database operations.Purpose: Store and retrieve embeddings for semantic searchUsed by:
olas_embedding_oa, agents using embedding-based retrievalDatabase Configuration
Database connection URL for SQLAlchemy.Format:
postgresql://user:password@host:port/databasePurpose: Persistent storage for agent state, market data, and analyticsExample: postgresql://agent:password@localhost:5432/prediction_agentUsed by: Agents that require persistent state, NFT treasury game agentsObservability and Monitoring
Langfuse secret key for authentication.Purpose: Track LLM calls, costs, and performance
Langfuse public key for authentication.Purpose: Track LLM calls, costs, and performance
Langfuse host URL.Default:
https://cloud.langfuse.comPurpose: Endpoint for Langfuse telemetry dataDeployment version tag for Langfuse traces.Default:
none (set in Dockerfile)Purpose: Track which version of code generated specific tracesNote: Automatically set to git SHA during CI/CD buildsSystem Configuration
Python module search path.Default:
/app (in Docker)Purpose: Ensure Python can find project modulesProtocol Buffers implementation to use.Default:
pythonPurpose: Use pure Python implementation of Protocol BuffersDisable transformers library warnings.Default:
1Purpose: Suppress warnings about PyTorch (we only use transformers for tokenization)Application Configuration
Enable no-auth mode for Streamlit apps.Default:
1Purpose: Opens Streamlit apps without authentication requirementsUsed by: Interactive Streamlit applicationsName of the agent to run (used in Docker CMD).Format: One of the
RunnableAgent enum valuesExamples: prophet_gpt4o, microchain, social_mediaPurpose: Specify which agent to run when container startsTarget market type (used in Docker CMD).Options:
omen, manifold, polymarket, metaculusPurpose: Specify which prediction market platform to interact withExample Configuration Files
Minimal Configuration
Minimum required for basic agent operation:.env
Standard Configuration
Recommended for most agents:.env
Full Configuration
Complete configuration with all services:.env
Docker Configuration
Using .env File
Using Environment Variables
Docker Compose
docker-compose.yml
Kubernetes Configuration
Using Secrets
Using ConfigMap
Agent-Specific Requirements
Prophet Agents
Prophet Agents
Required:
BET_FROM_PRIVATE_KEYOPENAI_API_KEY(or alternative AI API key)
SERPER_API_KEY- For web researchTAVILY_API_KEY- For enhanced researchLANGFUSE_*- For monitoring
Microchain Agent
Microchain Agent
Required:
BET_FROM_PRIVATE_KEYOPENAI_API_KEY
SERPER_API_KEY- For tool-based researchLANGFUSE_*- For monitoring
Social Media Agent
Social Media Agent
Research Agents (Think Thoroughly, GPTR)
Research Agents (Think Thoroughly, GPTR)
Required:
BET_FROM_PRIVATE_KEYOPENAI_API_KEYSERPER_API_KEYTAVILY_API_KEY
GRAPH_API_KEY- For blockchain dataLANGFUSE_*- For monitoring
NFT Treasury Game Agents
NFT Treasury Game Agents
Required:
BET_FROM_PRIVATE_KEYOPENAI_API_KEYSQLALCHEMY_DB_URL
Embedding-Based Agents (OLAS)
Embedding-Based Agents (OLAS)
Required:
BET_FROM_PRIVATE_KEYOPENAI_API_KEYPINECONE_API_KEY
Simple Agents (Coinflip, Known Outcome)
Simple Agents (Coinflip, Known Outcome)
Required:
BET_FROM_PRIVATE_KEY
Security Best Practices
Never Commit Secrets
Keep
.env files in .gitignore. Never commit API keys or private keys to version control.Use Secret Management
Use proper secret management tools like Google Secret Manager, AWS Secrets Manager, or Kubernetes Secrets.
Rotate Keys Regularly
Rotate API keys and private keys periodically, especially after team member changes.
Limit Permissions
Use API keys with minimal required permissions. Create separate keys for different environments.
Troubleshooting
Missing Required Variables
Missing Required Variables
When you run an agent, it will check for required variables and tell you if any are missing:Add the missing variable to your
.env file or environment.Invalid API Keys
Invalid API Keys
If you see authentication errors, verify your API keys:
Database Connection Errors
Database Connection Errors
Verify your
SQLALCHEMY_DB_URL format:Environment Not Loaded
Environment Not Loaded
Ensure your
.env file is in the correct location:Next Steps
Local Deployment
Run agents locally with environment variables
Docker Deployment
Configure environment for Docker containers
Cloud Deployment
Set up secrets and config in Kubernetes
Agent Reference
Learn about specific agent requirements
BET_FROM_PRIVATE_KEYOPENAI_API_KEYFARCASTER_PRIVATE_KEYTWITTER_API_KEYTWITTER_API_KEY_SECRETTWITTER_ACCESS_TOKENTWITTER_ACCESS_TOKEN_SECRETTWITTER_BEARER_TOKEN