Configuration System#

Configuration system with YAML loading, environment resolution, and seamless LangGraph integration.

Core Classes#

ConfigBuilder#

class configs.config.ConfigBuilder(config_path=None)[source]#

Bases: object

Configuration builder with clean, modern architecture.

Features: - YAML loading with validation and error handling - Recursive config merging with special handling - Environment variable resolution - Convention-based application loading - Pre-computed nested dictionaries for performance - Explicit fail-fast behavior for required configurations

Initialize configuration builder.

Parameters:

config_path (str | None) – Path to the config.yml file. If None, uses default path.

Main configuration builder with YAML loading, environment resolution, and LangGraph integration.

__init__(config_path=None)[source]#

Initialize configuration builder.

Parameters:

config_path (str | None) – Path to the config.yml file. If None, uses default path.

get(path, default=None)[source]#

Get configuration value using dot notation path.

Return type:

Any

Primary Access Functions#

configs.config.get_config_value(path, default=None)[source]#

Get a specific configuration value by dot-separated path.

This function provides context-aware access to configuration values, working both inside and outside LangGraph execution contexts.

Parameters:
  • path (str) – Dot-separated configuration path (e.g., “execution.timeout”)

  • default (Any) – Default value to return if path is not found

Returns:

The configuration value at the specified path, or default if not found

Raises:

ValueError – If path is empty or None

Return type:

Any

Examples

>>> timeout = get_config_value("execution.timeout", 30)
>>> debug_mode = get_config_value("development.debug", False)
configs.config.get_full_configuration()[source]#

Get the complete configuration dictionary.

This function provides access to the entire configurable dictionary, working both inside and outside LangGraph execution contexts.

Returns:

Complete configuration dictionary with all configurable values

Return type:

Dict[str, Any]

Examples

>>> config = get_full_configuration()
>>> user_id = config.get("user_id")
>>> models = config.get("model_configs", {})
configs.config.get_agent_dir(sub_dir)[source]#

Get the target directory path within the agent data directory using absolute paths.

Parameters:

sub_dir (str) – Subdirectory name (e.g., ‘user_memory_dir’, ‘execution_plans_dir’)

Returns:

Absolute path to the target directory

Return type:

str

Specialized Configuration Functions#

Model and Provider Access#

configs.config.get_model_config(app_or_framework, service=None, model_type=None)[source]#

Get model configuration with automatic context detection.

Works both inside and outside LangGraph contexts.

Parameters:
  • app_or_framework (str) – Application name or ‘framework’ for framework models

  • service (str) – Service name or model name for framework models

  • model_type (str) – Model type for nested services (optional)

Returns:

Dictionary with model configuration

Return type:

Dict[str, Any]

configs.config.get_provider_config(provider_name)[source]#

Get API provider configuration with automatic context detection.

Return type:

Dict[str, Any]

Service Configuration#

configs.config.get_framework_service_config(service_name)[source]#

Get framework service configuration with automatic context detection.

Return type:

Dict[str, Any]

configs.config.get_application_service_config(app_name, service_name)[source]#

Get application service configuration with automatic context detection.

Return type:

Dict[str, Any]

Runtime Information#

configs.config.get_session_info()[source]#

Get session information with automatic context detection.

Return type:

Dict[str, Any]

configs.config.get_current_application()[source]#

Get current application with automatic context detection.

Return type:

str | None

configs.config.get_execution_limits()[source]#

Get execution limits with automatic context detection.

Return type:

Dict[str, Any]

configs.config.get_agent_control_defaults()[source]#

Get agent control defaults with automatic context detection.

Return type:

Dict[str, Any]

Development Utilities#

configs.config.get_logging_color(capability_name)[source]#

Get capability color with automatic context detection.

Return type:

str

configs.config.get_langfuse_enabled()[source]#

Get Langfuse configuration with automatic context detection.

Return type:

bool

configs.config.get_pipeline_config(app_name=None)[source]#

Get pipeline configuration with automatic context detection.

Return type:

Dict[str, Any]

Internal Implementation#

configs.config._get_config()[source]#

Get the global configuration instance (singleton pattern).

Return type:

ConfigBuilder

configs.config._get_configurable()[source]#

Get configurable dict with automatic context detection.

Return type:

Dict[str, Any]

See also

framework.state.StateManager

State management utilities that use configuration

State and Context Management

State and context systems that depend on configuration

Prompt Customization

Complete guide to configuration management patterns