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.
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", {})
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]
Service Configuration#
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
Development Utilities#
- configs.config.get_logging_color(capability_name)[source]#
Get capability color with automatic context detection.
- Return type:
str
Internal Implementation#
- configs.config._get_config()[source]#
Get the global configuration instance (singleton pattern).
- Return type:
- 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