agora.config
Runtime configuration via env → .env → defaults.
Functions
The effective |
|
|
Return |
Classes
All settings override-able via AGORA_* env vars or a .env file. |
- class agora.config.Settings[source]
Bases:
BaseSettingsAll settings override-able via AGORA_* env vars or a .env file.
- model_config = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_kebab_case': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_shortcuts': None, 'cli_use_class_docs_for_groups': False, 'enable_decoding': True, 'env_file': '.env', 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_nested_max_split': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': 'AGORA_', 'env_prefix_target': 'variable', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_validate', 'model_dump', 'settings_customise_sources'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_config_section': None, 'yaml_file': None, 'yaml_file_encoding': None}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- profiles_file: str
Explicit profiles.yaml location (”” = ./profiles.yaml at CWD, then packaged default).
- work_dir: Path
- flows_dir: Path
- git_repo_path: Path
- knowledge_cache_dir: Path
- agora.config.require_secret(env_name, value)[source]
Return
value, or fail LOUDLY when a required secret is unset.The one message shape for a missing secret: names the exact env var and points at .env.example. Called at composition roots (cli, scripts) right before the secret is used, so an unconfigured clone stops with a clear instruction instead of an opaque auth failure deep in the Matrix client.
- agora.config.env_layer()[source]
The effective
AGORA_*environment for consumers that are NOT Settings fields — the per-model profile inference knobs (num_ctx/max_tokens/temperature/ seed), resolved at the campaign composition root.Applies the SAME precedence pydantic-settings applies to Settings:
.env(lowest) merged under the process environment (highest). Reading.envlives here because config.py is the one place environment/.env is read — the profile-knob resolver injects the returned mapping rather than touchingos.environor.envitself.