GavrunConfig
Configuration dataclass for the Gavrun client. Normally constructed via configure() or GavrunConfig.from_env().
Fields
| Field | Type | Default | Env var |
|---|---|---|---|
agent_manager_url | str | (required) | GAVRUN_AGENT_MANAGER_URL |
tenant_id | str | "" | GAVRUN_TENANT_ID |
agent_name | str | "default-agent" | GAVRUN_AGENT_NAME |
environment | str | "dev" | GAVRUN_ENV |
api_key | str | None | None | GAVRUN_API_KEY |
mode | str | "enforce" | GAVRUN_MODE |
bootstrap_api_token | str | None | None | GAVRUN_BOOTSTRAP_API_TOKEN |
agent_id | str | None | None | GAVRUN_AGENT_ID |
client_id | str | None | None | GAVRUN_CLIENT_ID |
client_secret | str | None | None | GAVRUN_CLIENT_SECRET |
timeout_seconds | float | 5.0 | GAVRUN_TIMEOUT_SECONDS |
max_retries | int | 2 | GAVRUN_MAX_RETRIES |
fail_mode | str | "closed" | GAVRUN_FAIL_MODE |
correlation_id_header | str | "X-Correlation-Id" | GAVRUN_CORRELATION_ID_HEADER |
decision_signing_key | str | None | None | GAVRUN_DECISION_SIGNING_KEY |
from_env()
python
config = GavrunConfig.from_env()Reads all fields from environment variables.
fail_mode
Controls what happens when the preflight HTTP call fails (network error, timeout):
| Value | Behaviour |
|---|---|
"closed" (default) | Raises GavrunPreflightError — blocks the action on uncertainty |
"open" | Allows the action through — use only in non-critical dev workflows |
mode
See Modes.