Configuration Guide

Learn how to configure Phoenix for your specific needs and use cases.

Environment Variables

AI Model Configuration
Configure your AI model providers
GOOGLE_GENERATIVE_AI_API_KEY

Required for Google Gemini models. Get your API key from the Google AI Studio.

Search & Web Tools
Configure web search and scraping capabilities
TAVILY_API_KEY

For advanced web search capabilities. Sign up at tavily.com for an API key.

SERP_API_KEY

Alternative search provider. Get your key from serpapi.com.

Authentication
OAuth and session management
GOOGLE_CLIENT_ID

Google OAuth client ID for Gmail integration and user authentication.

GOOGLE_CLIENT_SECRET

Google OAuth client secret. Keep this secure and never expose it publicly.

NEXTAUTH_SECRET

Random string used to encrypt session tokens. Generate with: openssl rand -base64 32

NEXTAUTH_URL

Your application URL. Use http://localhost:3000 for development.

Tool Configuration

Selective Tool Activation
Configure which tools are available for each agent session
// Example tool configuration const agentConfig = { tools: [ 'webSearch', 'generateImage', 'sendEmail', 'getWeather' ], maxSteps: 5, temperature: 0.7 }

Tools can be enabled or disabled per session based on your agent's requirements.

Security Configuration

API Key Security
  • • Never commit API keys to version control
  • • Use environment variables for all sensitive data
  • • Rotate API keys regularly
  • • Use different keys for development and production
OAuth Configuration

Google OAuth Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable Gmail API and Google+ API
  4. Create OAuth 2.0 credentials
  5. Add authorized redirect URIs

Performance Configuration

Optimization Settings

Model Parameters

temperature: 0.7 // Controls randomness (0-1)
maxTokens: 2048 // Maximum response length
topP: 0.9 // Nucleus sampling parameter

Agent Limits

maxSteps: 5 // Maximum tool calls per session
timeout: 30000 // Request timeout in milliseconds
retries: 3 // Number of retry attempts