Skip to content
Packages Examples Agents Blog Get started

The config section key is ai (configures AIConfig). Environment prefix: ORI_AI__.

KeyTypeDefaultEnv VarDescription
namestr"ai"ORI_AI__NAMEConfiguration name
enabledboolTrueORI_AI__ENABLEDEnable AI features
llmClientConfig | NoneNoneORI_AI_LLM__*LLM client configuration
vectorVectorConfig | NoneNoneORI_VECTOR__*Vector store configuration
ragRAGConfig | NoneNoneORI_AI_RAG__*RAG pipeline configuration
governanceGovernanceConfigdefault-factory (disabled when governance package absent)ORI_AI_GOVERNANCE__*AI governance configuration
observabilityObservabilityConfigdefault-factory (disabled if oridecon-ai-observability not installed)ORI_AI_OBSERVABILITY__*AI observability configuration
subsystemsdict[str, dict[str, Any]]{}ORI_AI__SUBSYSTEMS__*Dynamic config for third-party subsystems
application.yaml
ai:
enabled: true
llm:
provider: openai
model: gpt-4o
api_key: ${ORI_AI_LLM__API_KEY}
temperature: 0.7
timeout: 60
governance:
enabled: true
subsystems:
custom_subsystem:
option_a: value

The nested delimiter is __ (double underscore):

Terminal window
export ORI_AI__ENABLED=true
export ORI_AI_LLM__PROVIDER=anthropic
export ORI_AI_LLM__MODEL=claude-sonnet-4-20250514
export ORI_AI_LLM__API_KEY=sk-ant-...
export ORI_AI_LLM__TEMPERATURE=0.3

Use get_subsystem_config() to retrieve config for a dynamically-discovered subsystem:

from oridecon.ai.config import AIConfig, get_subsystem_config
config = AIConfig()
sub_cfg = get_subsystem_config(config, "llm")
# Returns config.llm if set, otherwise config.subsystems["llm"]

AIConfig includes a model_validator that blocks insecure API keys (sk-..., sk-test, change-me) when ORI_ENV=production.