Configuration
Engram uses environment variables for configuration. Create a .env file in your project root.
Required Configuration
Database
DATABASE_URL=postgresql://engram:engram_dev_password@localhost:5432/engram
Azure OpenAI (for embeddings and chat)
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_KEY=your_key
AZURE_EMBEDDING_DEPLOYMENT=text-embedding-3-small
AZURE_CHAT_DEPLOYMENT=gpt-4o
Optional Configuration
OpenAI Batch API
For cheaper enrichment using OpenAI's Batch API (50% discount):
OPENAI_API_KEY=sk-proj-...
OPENAI_MODEL=gpt-4o-mini
AI Foundry Format
Alternative Azure configuration format:
AZURE_AI_PROJECT_ENDPOINT=https://your-project.api.azureml.ms
AZURE_AI_API_KEY=your_key
Configuration Precedence
- Environment variables (highest priority)
.envfile in current directory- Default values
Validating Configuration
Run any command to verify your configuration:
engram stats
If configuration is missing, Engram will display an error message indicating which variables need to be set.
See Also
- Installation - Setup instructions
- Troubleshooting - Common configuration issues