automaton.config¶
WARNING
This documentation is almost entirely "vibe coded"; while a helpful resource for humans and agents to understand this codebase, it should not be considered a source of ground truth in the way documentation normally is, and the user is responsible for verifying that all instructions given here are safe.
automaton.config
¶
Configuration loading and management for Automaton.
AutomatonConfig
¶
Automaton configuration.
Loads and manages provider-based model configuration from YAML file. Providers define API endpoints and authentication once, then models reference providers by name.
Attributes:
| Name | Type | Description |
|---|---|---|
config_path |
Path
|
Path to the loaded configuration file |
data |
dict
|
Raw configuration data |
Examples:
>>> config = AutomatonConfig()
>>> model = config.get_model("example-model")
>>> model["provider"]
'example'
Load configuration from file or use defaults.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path
|
Path to YAML config file. If None, uses default. |
None
|
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If config file not found |
Source code in automaton/config.py
providers
property
¶
Get configured providers.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary mapping provider names to their configurations |
models
property
¶
Get configured models.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary mapping model names to their configurations |
harnesses
property
¶
Get configured harnesses.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary mapping harness names to their configurations |
defaults
property
¶
Get default settings.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary of default settings |
timeout_seconds
property
¶
Get default timeout in seconds.
Returns:
| Type | Description |
|---|---|
int
|
Default timeout in seconds |
sandbox_network
property
¶
Return whether harness and verification use loopback-only networking.
allowed_provider_executed_tools
property
¶
Provider-executed tool types the model proxy is permitted to forward.
Empty by default, which blocks all of them. These tools run on the model provider's infrastructure rather than inside the sandbox, so the sandbox network namespace cannot confine them and their use leaves no trace in the harness transcript. Allowing one is an explicit, auditable decision.
Configure under defaults in config.yaml::
defaults:
allowed_provider_executed_tools:
- web_search
Returns:
| Type | Description |
|---|---|
frozenset[str]
|
Lowercased tool type names. |
get_provider
¶
Get provider configuration by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Provider name to look up |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Provider configuration dictionary |
Raises:
| Type | Description |
|---|---|
ValueError
|
If provider not found in config |
Source code in automaton/config.py
get_model
¶
Get model configuration by name, with provider settings merged in.
Automatically normalizes base_url to ensure it ends with /v1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Model name to look up in configuration |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Merged model configuration dictionary with keys: - model: str - base_url: str - api_key_env: str - cert: str | None - api: str | None (opaque API-style hint, interpreted by the harness) |
Raises:
| Type | Description |
|---|---|
ValueError
|
If model not found in configuration |
Examples:
>>> config = AutomatonConfig()
>>> model = config.get_model("example-model")
>>> "base_url" in model
True
Source code in automaton/config.py
get_agent
¶
get_harness
¶
Get harness configuration by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Harness name to look up |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Harness configuration dictionary |
Raises:
| Type | Description |
|---|---|
ValueError
|
If harness not found in config |
Source code in automaton/config.py
initialize_user_config
¶
Create the default user config directory and template if missing.
Returns:
| Type | Description |
|---|---|
Path
|
Path to the created config file |
Examples: