Skip to main content

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:
string
required
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)
Never commit this to version control. Keep it secure and never share it.
string
required
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:
string
OpenAI API key for GPT-4, GPT-4o, GPT-3.5, and o1 models.Used by:
  • prophet_gpt4o
  • prophet_gpt4
  • prophet_gpt4omini
  • prophet_o1
  • prophet_o1mini
  • prophet_o3mini
  • microchain
  • think_thoroughly
  • Most other agents
string
Anthropic API key for Claude models.Used by:
  • prophet_claude3_opus
  • prophet_claude35_haiku
  • prophet_claude35_sonnet
string
Google API key for Gemini models.Used by:
  • prophet_gemini20flash
string
DeepSeek API key for DeepSeek models.Used by:
  • prophet_deepseekchat
  • prophet_deepseekr1

Research and Information API Keys

Agents use various APIs for research and information gathering:
string
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_agent
string
Tavily API key for AI-powered search.Purpose: Advanced search and information retrievalGet it: tavily.comUsed by: Research agents, think_thoroughly_prophet
string
The 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

string
Private key for Farcaster account.Purpose: Post predictions and insights to FarcasterUsed by: social_media agent
string
Twitter API key (Consumer Key).Used by: social_media agent
string
Twitter API key secret (Consumer Secret).Used by: social_media agent
string
Twitter access token for authenticated requests.Used by: social_media agent
string
Twitter access token secret.Used by: social_media agent
string
Twitter bearer token for API v2.Used by: social_media agent

Vector Database and Embeddings

string
Pinecone API key for vector database operations.Purpose: Store and retrieve embeddings for semantic searchUsed by: olas_embedding_oa, agents using embedding-based retrieval

Database Configuration

string
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 agents

Observability and Monitoring

string
Langfuse secret key for authentication.Purpose: Track LLM calls, costs, and performance
string
Langfuse public key for authentication.Purpose: Track LLM calls, costs, and performance
string
Langfuse host URL.Default: https://cloud.langfuse.comPurpose: Endpoint for Langfuse telemetry data
string
Deployment 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 builds

System Configuration

string
Python module search path.Default: /app (in Docker)Purpose: Ensure Python can find project modules
string
Protocol Buffers implementation to use.Default: pythonPurpose: Use pure Python implementation of Protocol Buffers
string
Disable transformers library warnings.Default: 1Purpose: Suppress warnings about PyTorch (we only use transformers for tokenization)

Application Configuration

string
Enable no-auth mode for Streamlit apps.Default: 1Purpose: Opens Streamlit apps without authentication requirementsUsed by: Interactive Streamlit applications
string
Name 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 starts
string
Target market type (used in Docker CMD).Options: omen, manifold, polymarket, metaculusPurpose: Specify which prediction market platform to interact with

Example 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

Required:
  • BET_FROM_PRIVATE_KEY
  • OPENAI_API_KEY (or alternative AI API key)
Optional:
  • SERPER_API_KEY - For web research
  • TAVILY_API_KEY - For enhanced research
  • LANGFUSE_* - For monitoring
Required:
  • BET_FROM_PRIVATE_KEY
  • OPENAI_API_KEY
Optional:
  • SERPER_API_KEY - For tool-based research
  • LANGFUSE_* - For monitoring
Required:
  • BET_FROM_PRIVATE_KEY
  • OPENAI_API_KEY
  • FARCASTER_PRIVATE_KEY
  • TWITTER_API_KEY
  • TWITTER_API_KEY_SECRET
  • TWITTER_ACCESS_TOKEN
  • TWITTER_ACCESS_TOKEN_SECRET
  • TWITTER_BEARER_TOKEN
Required:
  • BET_FROM_PRIVATE_KEY
  • OPENAI_API_KEY
  • SERPER_API_KEY
  • TAVILY_API_KEY
Optional:
  • GRAPH_API_KEY - For blockchain data
  • LANGFUSE_* - For monitoring
Required:
  • BET_FROM_PRIVATE_KEY
  • OPENAI_API_KEY
  • SQLALCHEMY_DB_URL
Purpose: Database stores game state and agent interactions
Required:
  • BET_FROM_PRIVATE_KEY
  • OPENAI_API_KEY
  • PINECONE_API_KEY
Purpose: Vector database for semantic search and retrieval
Required:
  • BET_FROM_PRIVATE_KEY
Note: These agents don’t use AI models or external APIs

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

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.
If you see authentication errors, verify your API keys:
Verify your SQLALCHEMY_DB_URL format:
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