Navigate to your dashboard to access your API keys
Copy your PANDA_AGI_KEY
2
Set Environment Variable
Configure your API key as an environment variable:
Create a .env file in your project root:
Copy
# .env filePANDA_AGI_KEY=your-api-key-here
Create a .env file in your project root:
Copy
# .env filePANDA_AGI_KEY=your-api-key-here
Set in your shell profile for persistence:
Copy
# Add to ~/.bashrc or ~/.zshrcPANDA_AGI_KEY="your-api-key-here"
Then reload your profile:
Copy
source ~/.bashrc # or source ~/.zshrc if using zsh
Copy
# Set permanently via System Environment Variables# Open System Properties > Advanced > Environment Variables# Or via PowerShell:[Environment]::SetEnvironmentVariable("PANDA_AGI_KEY", "your-api-key-here", "User")
3
Verify Configuration
Test that your API key is properly configured:
Copy
import osapi_key = os.getenv('PANDA_AGI_KEY')if api_key: print("✅ API key configured successfully")else: print("❌ API key not found")
4
Set in Python Code (Alternative)
You can also set the API key directly in your Python code:
Copy
import os# Set the API key in your environment variablesos.environ['PANDA_AGI_KEY'] = 'your-api-key-here'# Now you can import and use PandaAGIfrom panda_agi import Agent
Setting the API key this way only persists for the current Python process.
For production applications, consider using environment variables, a .env file with python-dotenv,
or a secure configuration manager like AWS Secrets Manager or HashiCorp Vault.
Configure your environment with the required API keys:
Create a .env file in your project root:
Copy
# Required: PandaAGI API Key (get from https://agi.pandas-ai.com/)PANDA_AGI_KEY=your-panda-agi-api-key# Optional: Tavily API Key for enhanced web search functionalityTAVILY_API_KEY=your-tavily-api-key
Create a .env file in your project root:
Copy
# Required: PandaAGI API Key (get from https://agi.pandas-ai.com/)PANDA_AGI_KEY=your-panda-agi-api-key# Optional: Tavily API Key for enhanced web search functionalityTAVILY_API_KEY=your-tavily-api-key
Add to your shell profile (~/.bashrc, ~/.zshrc):
Copy
# Required: PandaAGI API KeyPANDA_AGI_KEY="your-panda-agi-api-key"# Optional: Tavily API KeyTAVILY_API_KEY="your-tavily-api-key"
Add to your shell profile (~/.bashrc, ~/.zshrc):
Copy
# Required: PandaAGI API KeyPANDA_AGI_KEY="your-panda-agi-api-key"# Optional: Tavily API KeyTAVILY_API_KEY="your-tavily-api-key"
Set via System Environment Variables or PowerShell:
Copy
# Set environment variables permanently[Environment]::SetEnvironmentVariable("PANDA_AGI_KEY", "your-panda-agi-api-key", "User")[Environment]::SetEnvironmentVariable("TAVILY_API_KEY", "your-tavily-api-key", "User")
Important: Keep your API keys secure and never commit them to version control.
For production use, consider secure key management systems like AWS Secrets Manager,
HashiCorp Vault, or environment-specific configuration services.