Skip to main content
Define and version reusable configuration objects as components for consistent settings across ensembles.

Overview

Config components enable you to:
  • Centralize settings used across multiple agents and ensembles
  • Version configurations for reproducibility and rollback
  • Manage secrets securely in KV storage
  • Test different configurations with version tags
  • A/B test different settings

Quick Start

1. Create a Config Component

Create a JSON configuration file:

2. Add to Edgit

3. Reference in Your Ensemble

URI Format and Versioning

All config components use the standardized URI format:
Format breakdown:
  • config:// - Protocol identifier for config components
  • {path} - Logical path to the config (e.g., anthropic-settings, providers/openai)
  • [@{version}] - Optional version identifier (defaults to @latest)
Version format:
  • @latest - Always uses the most recent version
  • @v1 - Uses latest patch of major version (v1.x.x)
  • @v1.0.0 - Specific semantic version (immutable)
  • @prod - Custom tag for production versions
  • @staging - Custom tag for staging versions

Example URIs

How to Reference in Ensembles

There are three ways to reference configs in your ensembles: Use the config:// URI format to reference versioned config components:

2. Template Expression Format

Use ${components.config_name@version} to embed config references in YAML:

3. Inline Config

For simple operations or during development, use inline config objects directly:

Using Config Components

Multiple Agents with Different Configs

Config Types and Examples

AI Provider Settings

API Configuration

Database Connection Settings

Processing Parameters

Feature Flags

Caching and Performance

Config components are automatically cached for 1 hour (3600 seconds) after first load.

Default Caching

Custom Cache TTL

Bypass Cache

Best Practices

1. Version All Configurations

Use semantic versioning:

2. Use Semantic Versioning

  • PATCH (v1.0.1): Bug fixes, non-breaking adjustments
  • MINOR (v1.1.0): New optional features, compatible changes
  • MAJOR (v2.0.0): Breaking changes, incompatible updates

3. Separate By Concern

Organize configs by their purpose:

3. Create Environment-Specific Versions

4. Document Configuration Fields

5. Use Descriptive Names

6. Handle Sensitive Values

For secrets, store in KV with appropriate access controls:

Versioning Strategy

Development Workflow

Staged Rollout

A/B Testing Configs

Using ctx API in Agents

When building custom agents with TypeScript handlers, you can access configs through the ctx API:

ctx.configs.get(name)

Get a configuration object by name:

Using Config for API Calls

Dynamic Config Selection

Environment-Based Config

Merging Configs

Troubleshooting

Config Not Found

Error: Component not found: config://anthropic-settings@v1.0.0 Solution:
  1. Check config exists: edgit list configs
  2. Check version: edgit tag list anthropic-settings
  3. Verify deployment: edgit tag show anthropic-settings@v1.0.0

Invalid Configuration

Error: JSON parse error when loading config Solution:
  1. Validate JSON: jsonlint configs/anthropic-settings.json
  2. Check for required fields
  3. Verify format matches expected schema

Configuration Mismatch

Issue: Agent doesn’t recognize config fields Solution:
  1. Check agent documentation for supported fields
  2. Verify config format matches agent requirements
  3. Test with inline config first

Next Steps

Prompt Components

Reusable AI instructions

Query Components

SQL queries as components

Think Operation

AI reasoning operations

Edgit Versioning

Version control for components