Skip to content

Configure Workloads

Runtime config is workload input for caracal run and SDK credential loaders. It is not Console state and it does not create, select, or manage zones.

OrderSource
1CARACAL_CONFIG, when set and the file exists.
2Environment runtime config.
3$XDG_CONFIG_HOME/caracal/caracal.toml or ~/.config/caracal/caracal.toml.

The runtime does not read ./caracal.toml from the current working directory.

VariableMeaning
CARACAL_STS_URL or CARACAL_ZONE_URLCloud/custom STS URL override for token exchange.
CARACAL_GATEWAY_URLCloud/custom Gateway URL override used by SDK transports.
CARACAL_COORDINATOR_URLCloud/custom Coordinator URL override used by SDKs and Console agent views.
CARACAL_ZONE_IDZone identifier.
CARACAL_APPLICATION_IDConfidential application identifier.
CARACAL_APP_CLIENT_SECRET_FILECloud/custom path to a mounted client-secret file.
CARACAL_APP_CLIENT_SECRETInline local-development client secret.
CARACAL_RUN_CREDENTIALS_FILECloud/custom JSON credential manifest file.
CARACAL_RUN_CREDENTIALSInline JSON credential manifest.
CARACAL_RUN_CONTINUE_ON_FAILUREtrue or false for required credential failure behavior.
CARACAL_RUN_TTL_SECONDSCredential exchange TTL, capped at 900 seconds.
CARACAL_MCP_GOVERNANCE_MODEblock or log.

Set only one of CARACAL_RUN_CREDENTIALS_FILE and CARACAL_RUN_CREDENTIALS.

Local dev and stable runtime launches normally set only CARACAL_ZONE_ID and CARACAL_APPLICATION_ID. The runtime and SDKs auto-detect the client secret and credential manifest from the OS Caracal config directory:

<Caracal config dir>/runtime/<zone_id>/<application_id>/client-secret
<Caracal config dir>/runtime/<zone_id>/<application_id>/credentials.json

Local dev and stable service URLs also resolve automatically. Set service URL overrides only for cloud deployments, containers, or custom service locations.

zone_id = "zone_prod"
application_id = "app_agent"
ttl_seconds = 900
[[credentials]]
env = "OPENAI_API_KEY"
resource = "resource://openai"
credential_type = "provider_token"
upstream_prefix = "https://api.openai.com/v1"
[[optional_credentials]]
env = "CARACAL_MANDATE"
resource = "resource://mandate-aware-api"
credential_type = "caracal_mandate"
on_failure = "warn"
[mcp_governance]
mode = "block"
FieldMeaning
zone_urlCloud/custom STS URL override used by caracal run; sts_url is accepted as an SDK-readable alias/fallback.
gateway_urlCloud/custom Gateway endpoint override for SDK transports.
coordinator_urlCloud/custom Coordinator endpoint override for SDK agent/delegation features.
zone_idZone created in Console.
application_idConfidential application used by the workload.
app_client_secret_fileCloud/custom secret-file path override.
app_client_secretInline local-development secret.
ttl_secondsCredential exchange TTL; defaults to and is capped at 900 seconds.
continue_on_failureRequired credential failure behavior; defaults to false.
credentials[]Required resource tokens.
optional_credentials[]Optional resource tokens with on_failure = "warn" or "error".
mcp_governance.modeblock or log for likely MCP subprocesses.

Credential entries use env, resource, optional upstream_prefix, and optional credential_type. provider_token is the caracal run golden path and requires a provider with allow_runtime_injection = true; caracal_mandate is for workloads that consume Caracal mandates directly. SDKs can also use entries as resource audiences and Gateway routing hints.

  • Use auto-detected local credential files for dev and stable runtime launches.
  • Use explicit secret-file paths for cloud deployments, containers, or external secret stores.
  • Secret files and explicit config files must not be group- or world-writable.
  • The default profile path must use owner-only permissions on POSIX systems.
  • Non-local insecure http:// STS URLs are rejected unless explicitly allowed by environment.
  • Environment names that affect runtime loading, such as NODE_OPTIONS, LD_PRELOAD, and dynamic-library path variables, are blocked.

Cloud deployments, containers, and external secret stores can override the auto-detected local paths with CARACAL_APP_CLIENT_SECRET_FILE, CARACAL_RUN_CREDENTIALS_FILE, or app_client_secret_file in a runtime profile. Use these only when the standard OS Caracal config directory is not the correct secret location for the workload.

Cloud deployments and custom service locations can also set CARACAL_STS_URL, CARACAL_GATEWAY_URL, CARACAL_COORDINATOR_URL, sts_url, gateway_url, or coordinator_url. Do not set these for the default local stack.

Console guided setup can generate a complete profile and one-time secret file using real zone, application, provider, resource, policy, and credential values. Enable file writing when you want the Console to write the profile and secret file with owner-only permissions.

SymptomCheck
CARACAL_CONFIG is set but ignoredThe file must exist; when it is set, no other profile path is considered.
Runtime rejects a profileRemove unknown fields and check permissions, URL safety, and credential env names.
Provider key is not injectedConfirm the credential uses credential_type = "provider_token" and the provider config allows runtime injection.
SDK Gateway routing does not happenConfirm gateway_url and upstream_prefix are present.
Optional credential stops the processSet on_failure = "warn" for optional credentials that may be absent.

Use Run Workloads when the profile is ready and you need to inject scoped credentials into a process.