Environment Configuration
Copy page
How to configure the environment variables for the Inkeep Agent Framework
Environment Configuration
Overview
The Inkeep Agents framework uses a centralized environment configuration. This approach provides a single source of truth for all environment variables across the monorepo, eliminating duplication and simplifying configuration management.
Configuration Structure
Single Root Configuration
All packages in the monorepo reference a single .env file at the repository root. This is different from the typical approach of having separate .env files per package.
Loading Priority
Environment variables are loaded in the following order (highest priority first):
/package-name/.envPackage specific configuration.env- Main configuration file~/.inkeep/config- User-global settings (shared across all repo copies).env.example- Default values
This hierarchy allows for flexible configuration management across different scenarios. If you have .env or .env.local in a package directory, they will override the root .env or .env.local for that package.
Use Cases
1. Basic Local Development
For simple local development with a single repository copy:
Troubleshooting
Environment variables not loading
- Check loading order - later sources override earlier ones
- Verify file paths are correct
- Ensure
packages/agents-coreis built:pnpm --filter @inkeep/agents-core build
Missing variables in production
Ensure all required variables are set in your deployment environment. The application will fail fast if critical variables are missing.
Database connection issues
- For SQLite: Make sure youu are using an absolute path to the db file