Overview
JARVIS requires environment variables for both frontend and backend components. All sensitive credentials should be stored securely and never committed to version control.Environment File Structure
Create separate environment files:Frontend Environment Variables
Convex Configuration
Convex deployment URL for real-time database connections.Get this from your Convex dashboard after deploying your schema.Example:
https://happy-animal-123.convex.cloudExample Frontend .env.local
Backend Environment Variables
Core Application Settings
Application environment mode.Options:
development, staging, productionExample: SPECTER_ENV=productionFrontend URL for CORS configuration.Set this to your Vercel deployment URL in production.Example:
SPECTER_FRONTEND_ORIGIN=https://jarvis.vercel.appPort for the FastAPI server to listen on.Example:
SPECTER_API_PORT=8000Logging verbosity level.Options:
DEBUG, INFO, WARNING, ERROR, CRITICALExample: SPECTER_LOG_LEVEL=INFODatabase Configuration
Convex deployment URL for backend database operations.Same as frontend URL but used by backend for mutations/queries.Example:
CONVEX_URL=https://happy-animal-123.convex.cloudMongoDB Atlas connection string for persistent storage.Used for storing raw images and archival data.Example:
MONGODB_URI=mongodb+srv://user:[email protected]/jarvisAI Model API Keys
OpenAI API key for GPT-4 vision model.Used for image analysis and identification.Get it: platform.openai.com/api-keysExample:
OPENAI_API_KEY=sk-...Google Gemini API key for vision and synthesis.Used for screenshot parsing and report synthesis (cheaper than OpenAI).Get it: makersuite.google.com/app/apikeyExample:
GEMINI_API_KEY=AIza...Anthropic Claude API key (alternative LLM).Get it: console.anthropic.comExample:
ANTHROPIC_API_KEY=sk-ant-...Research & Data APIs
Exa API key for fast person search and web research.Critical for Tier 1 enrichment (~200ms response time).Get it: exa.aiExample:
EXA_API_KEY=exa_...Browser Use cloud API key for agent automation.Required for all Browser Use agents (LinkedIn, Twitter, Instagram, PimEyes).Get it: cloud.browser-use.com/new-api-keyExample:
BROWSER_USE_API_KEY=bu_...When set, agents use cloud browser sessions with persistent authentication.
Browser Use profile ID for persistent browser sessions.Set up authenticated sessions for LinkedIn, Twitter, Instagram:
- Set
BROWSER_USE_API_KEY - Run
browseruseCLI interactively - Log into platforms manually
- Sessions persist in your Browser Use cloud profile
BROWSER_USE_PROFILE_ID=profile_...Identity & Search Services
JSON array of PimEyes accounts for facial recognition.Format:
[{"email":"[email protected]","password":"pass123"}]Multiple accounts enable round-robin rotation to avoid rate limits.Example: PIMEYES_ACCOUNT_POOL=[{"email":"[email protected]","password":"xxx"}]Single PimEyes account email (alternative to account pool).Example:
[email protected]Single PimEyes account password.Example:
PIMEYES_PASSWORD=your_password64.io API key for additional face search capabilities.Example:
SIXTYFOUR_API_KEY=64_...Observability & Monitoring
Laminar API key for agent tracing and observability.Provides visibility into all LLM calls and agent runs.Get it: lmnr.aiExample:
LAMINAR_API_KEY=lm_...Config reads
LAMINAR_API_KEY; the SDK receives it via Laminar.initialize()HUD API key for multi-agent orchestration debugging.Example:
HUD_API_KEY=hud_...Memory & Persistence
SuperMemory API key for long-term memory and dossier caching.Enables cross-session memory for the research pipeline.Get it: supermemory.aiExample:
SUPERMEMORY_API_KEY=sm_...Communication Services
Telegram bot token for receiving photos from Meta glasses.Create a bot via @BotFather on Telegram.Example:
TELEGRAM_BOT_TOKEN=123456789:ABC...AgentMail API key for email communications.Example:
AGENTMAIL_API_KEY=am_...Breach & Security Data
Have I Been Pwned API key for breach data checks.Check if a person appears in known data breaches.Get it: haveibeenpwned.com/API/KeyExample:
HIBP_API_KEY=hibp_...Infrastructure
Daytona API key for sandbox management.Example:
DAYTONA_API_KEY=dt_...Daytona API URL for custom deployments.Default: Daytona cloud APIExample:
DAYTONA_API_URL=https://api.daytona.io1Password vault ID for credential management.Example:
OP_VAULT_ID=vault_...Complete .env.example
Here’s the complete example from the source repository:Service Flags
The backend automatically detects which services are configured based on environment variables. Access this information at the/api/status endpoint:
true if its required environment variables are set and non-empty.
Required vs Optional
Minimum Required for Basic Functionality
Optional but Recommended
Security Best Practices
Local Development
- Use .env files: Keep credentials in
.envfiles, never in code - Add to .gitignore: Ensure
.envis in.gitignore - Use .env.example: Provide a template without actual values
- Rotate keys regularly: Change API keys periodically
Production Deployment
- Use platform secrets: Vercel Environment Variables, Daytona Secrets
- Separate environments: Different keys for dev/staging/production
- Principle of least privilege: Only grant necessary permissions
- Monitor usage: Watch for unexpected API usage spikes
- Enable API key restrictions: Restrict keys to specific domains/IPs where possible
Credential Management
- Vercel
- Daytona
- Local
Set environment variables in Vercel dashboard:
- Project Settings > Environment Variables
- Add each variable
- Choose environments (Production, Preview, Development)
- Click “Save”
Troubleshooting
Variables Not Loading
Problem: Environment variables are undefined at runtime. Solutions:- Verify file name:
.env(backend) or.env.local(frontend) - Check file location: Must be in project root
- Restart dev server after changing .env files
- For frontend, ensure
NEXT_PUBLIC_prefix for client-side variables
Service Flag Shows False
Problem:/api/status shows a service as false when it should be configured.
Solutions:
- Check variable name matches exactly (case-sensitive)
- Ensure value is non-empty
- For JSON values like
PIMEYES_ACCOUNT_POOL, verify valid JSON syntax - Restart backend after changing environment variables
CORS Errors
Problem: Frontend can’t connect to backend. Solution:- Set
SPECTER_FRONTEND_ORIGINto match your frontend URL exactly - Include protocol:
https://not justdomain.com - No trailing slash:
https://domain.comnothttps://domain.com/
Next Steps
Backend Deployment
Deploy the FastAPI backend with environment variables configured
Frontend Deployment
Deploy the Next.js frontend with Convex URL configured