agora.config

Runtime configuration via env → .env → defaults.

Functions

env_layer()

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.

get_settings()

require_secret(env_name, value)

Return value, or fail LOUDLY when a required secret is unset.

Classes

Settings

All settings override-able via AGORA_* env vars or a .env file.

class agora.config.Settings[source]

Bases: BaseSettings

All 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].

matrix_homeserver: str
matrix_server_name: str
matrix_user_id: str
matrix_password: str
matrix_registration_token: str
observer_user: str
observer_password: str
llm_model: str
profile: str

Named profile to select from profiles.yaml (”” = the file’s default).

profiles_file: str

Explicit profiles.yaml location (”” = ./profiles.yaml at CWD, then packaged default).

ollama_base_url: str
llm_timeout_seconds: float
max_parallel_agents: int
llm_warmup_seconds: float
skip_llm_warmup: bool
skip_vram_check: bool
vram_safety_margin_mib: int
review_timeout_seconds: float
watch_rooms: list[str]
enable_observer: bool
harness_tool_errors: str
harness_nudge_budget: int
harness_review_budget: int
harness_salvage_budget: int
routed_retry_budget: int
max_task_retries: int
arm_scaffolding: str
arm_strictness: str
strategy: str
plantuml_url: str
enable_web_fetch: bool
fetch_timeout_seconds: float
fetch_max_bytes: int
fetch_max_text_bytes: int
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.get_settings()[source]
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 .env lives here because config.py is the one place environment/.env is read — the profile-knob resolver injects the returned mapping rather than touching os.environ or .env itself.