Configuration Management
Copy page
Learn how to configure your Inkeep Agent projects with inkeep.config.ts and environment overrides
Overview
Inkeep Agent projects use a hierarchical configuration system that combines file-based configuration, environment variables, and command-line overrides. This flexible approach supports different deployment environments while maintaining developer-friendly defaults.
Configuration File Format
inkeep.config.ts
The primary configuration file for your project:
Configuration Options
| Option | Type | Description | Default |
|---|---|---|---|
tenantId | string | Required. Unique identifier for your tenant | - |
agentsManageApiUrl | string | Management API endpoint | 'http://localhost:3002' |
agentsRunApiUrl | string | Runtime API endpoint | 'http://localhost:3003' |
apiTimeout | number | API request timeout (ms) | 30000 |
retryAttempts | number | Number of retry attempts | 3 |
Config File Discovery
The CLI uses a sophisticated discovery mechanism to locate your configuration:
Search Pattern
- Explicit Path: If
--configflag is provided, use that file directly - Upward Search: Starting from current working directory:
- Look for
inkeep.config.tsin current directory - If not found, move to parent directory
- Repeat until found or reach filesystem root
- Config file should be at the same level as
package.json/tsconfig.json
- Look for
- Error Handling: If no config found, provide helpful error message
Example Discovery
Configuration Priority
Settings are resolved in this order (highest to lowest priority):
1. CLI Flags (Highest Priority)
Command-line flags override all other settings:
2. Environment Variables
Environment variables override config file values:
Supported Environment Variables:
| Variable | Config Equivalent | Description |
|---|---|---|
INKEEP_TENANT_ID | tenantId | Tenant identifier |
INKEEP_AGENTS_MANAGE_API_URL | agentsManageApiUrl | Management API URL |
INKEEP_AGENTS_RUN_API_URL | agentsRunApiUrl | Runtime API URL |
INKEEP_ENV | - | Environment name for credential loading |
INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET | - | Optional API bypass token |
INKEEP_AGENTS_RUN_API_BYPASS_SECRET | - | Optional API bypass token |
3. Config File Values
Values explicitly set in your inkeep.config.ts:
4. Built-in Defaults (Lowest Priority)
Default values used when not specified elsewhere:
Advanced Configuration
TypeScript Support
The config system is fully typed, providing IntelliSense and validation:
Dynamic Configuration
You can use environment-based logic in your workspace config:
Note: This single config file manages all projects within the workspace.
Multiple Configurations
For workspaces requiring different configurations:
Configuration Validation
The CLI validates configuration at runtime:
Required Fields
URL Validation
Type Validation
Debugging Configuration
View Current Configuration
Configuration Sources
The CLI shows where each setting comes from:
Best Practices
1. Environment-Specific Configs
Use different configs for different environments:
2. Secret Management
Never commit secrets to config files:
3. Documentation
Document your configuration options:
Troubleshooting
Config Not Found
Solutions:
- Ensure
inkeep.config.tsexists at workspace root (same level aspackage.json) - CLI searches upward - make sure you're running from within the workspace
- Use
--configflag to specify absolute or relative path to config file - Check file name (must be exactly
inkeep.config.ts) - Verify you're not running from a completely separate directory tree
Invalid Configuration
Solutions:
- Add required
tenantIdfield - Check for typos in field names
- Verify TypeScript compilation
Environment Issues
Solutions:
- Unset environment variable:
unset INKEEP_TENANT_ID - Use
--configto override with specific file - Check
.envfiles for conflicting values
The configuration system provides the flexibility to adapt your Inkeep Agent projects to different environments while maintaining consistency and type safety across your development workflow.