Skip to content

GavrunConfig

Configuration dataclass for the Gavrun client. Normally constructed via configure() or GavrunConfig.from_env().

Fields

FieldTypeDefaultEnv var
agent_manager_urlstr(required)GAVRUN_AGENT_MANAGER_URL
tenant_idstr""GAVRUN_TENANT_ID
agent_namestr"default-agent"GAVRUN_AGENT_NAME
environmentstr"dev"GAVRUN_ENV
api_keystr | NoneNoneGAVRUN_API_KEY
modestr"enforce"GAVRUN_MODE
bootstrap_api_tokenstr | NoneNoneGAVRUN_BOOTSTRAP_API_TOKEN
agent_idstr | NoneNoneGAVRUN_AGENT_ID
client_idstr | NoneNoneGAVRUN_CLIENT_ID
client_secretstr | NoneNoneGAVRUN_CLIENT_SECRET
timeout_secondsfloat5.0GAVRUN_TIMEOUT_SECONDS
max_retriesint2GAVRUN_MAX_RETRIES
fail_modestr"closed"GAVRUN_FAIL_MODE
correlation_id_headerstr"X-Correlation-Id"GAVRUN_CORRELATION_ID_HEADER
decision_signing_keystr | NoneNoneGAVRUN_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):

ValueBehaviour
"closed" (default)Raises GavrunPreflightError — blocks the action on uncertainty
"open"Allows the action through — use only in non-critical dev workflows

mode

See Modes.

Apache 2.0 License