Required Environment Variables
Bloom requires specific environment variables depending on your integration method:For Direct API Integration
For MCP Server Integration
Finding Your Credentials
Agent ID
Agent ID
- Navigate to the Agents tab in your Bloom dashboard
- Find your agent in the list
- Copy the Agent ID from the agent details
Agent IDs are unique identifiers that look like:
agent_abc123def456Organization API Key
Organization API Key
- Go to your Profile tab in the Bloom dashboard
- Look for the API Keys section
- Copy your Organization API Key
BLOOM_AUTH Format
BLOOM_AUTH Format
For MCP servers, combine your credentials in this format:Example:
Development vs Production
Development Environment
For local development, use a.env file:
Consider creating separate agents for development and production environments.
Production Environment
For production, set environment variables through your deployment platform:- Docker
- Railway
- Vercel
Security Best Practices
Environment Variables
- Never commit API keys to version control
- Use
.envfiles for local development - Rotate keys regularly in production
Agent Scopes
- Follow principle of least privilege
- Create specific scopes for each use case
- Regularly audit agent permissions
Validation Script
Use this script to validate your environment setup:Troubleshooting
Environment Variables Not Loading
Environment Variables Not Loading
Symptoms: Getting “None” values for environment variablesSolutions:
- Ensure
.envfile is in the correct directory - Check that you’re using
python-dotenvif needed - Verify variable names match exactly (case-sensitive)
Authentication Errors
Authentication Errors
Symptoms: 401 Unauthorized responsesSolutions:
- Verify your organization API key is correct
- Check that the agent ID exists and is active
- Ensure you have the latest API key (not revoked)
Permission Denied
Permission Denied
Symptoms: 403 Forbidden responsesSolutions:
- Verify agent has required scopes assigned
- Check scope permissions include the HTTP method and path
- Confirm integration is properly configured