Skip to content

Environment variables

This page lists the environment variables that abt and its first-party tool packages read, which you can set. Environment abt sets for your tools lists the read-only path variables abt provides to your tools. Provider SDKs, the git and gh CLIs and OpenTelemetry read other variables, which the tables omit. Names you choose in env_var() calls are yours. Internal markers that abt sets for its own subprocesses are omitted.

Precedence is CLI > env > abt.yaml > default, as on Config precedence. Rows that say "used when … leave it unset" are exceptions: the abt.yaml value wins, and the variable is the fallback. For project defaults, prefer the abt.yaml config: keys in Configuration.

When abt loads a profile, it copies profiles.yaml outputs.*.env into the process environment.

Name Default Scope Purpose
ABT_APPROVALS_ADAPTER_TIMEOUT_SECONDS per adapter approvals Maximum seconds for one adapter call. Empty, none, 0 or a negative value disables it (not recommended).
ABT_APPROVALS_DEFAULT unset approvals Default approval resource for this run. Overrides approvals.default.
ABT_APPROVALS_DYNAMODB_ENDPOINT unset approvals Endpoint URL for DynamoDB Local or moto. Used when approvals.store.config.endpoint_url is unset.
ABT_APPROVALS_DYNAMODB_REGION boto3 chain approvals Region for the DynamoDB approval store. Used when approvals.store.config.region_name is unset.
ABT_APPROVALS_DYNAMODB_TABLE required approvals Table for the DynamoDB approval store. Used when approvals.store.config.table_name is unset.
ABT_APPROVALS_ENABLED approvals.enabled approvals Turns external approvals on or off. Overrides approvals.enabled.
ABT_APPROVALS_HANDLE_RECOVERY_SECONDS 3600 approvals Age after which a pending approval without a handle is marked failed.
ABT_ARTIFACT_DIR unset run Export directory for stateless run artifacts. Needs stateless mode. --artifact-dir wins.
ABT_BENCH_MAX_CONCURRENCY global budget bench Maximum concurrent abt bench cases. Capped by ABT_THREADS.
ABT_BYPASS_APPROVALS unset approvals approve or deny for every confirmation-required tool call. --bypass-approvals wins.
ABT_CHECKPOINT_BACKEND memory (abt chat: sqlite) checkpoint memory, sqlite, bedrock_agentcore, dynamodb or a plugin. --checkpoint-backend and --ephemeral win.
ABT_CHECKPOINT_BEDROCK_ACTOR_ID unset checkpoint AgentCore actor ID. Overrides checkpoint.config.actor_id.
ABT_CHECKPOINT_BEDROCK_MEMORY_ID unset checkpoint AgentCore memory ID or ARN. Overrides checkpoint.config.memory_id.
ABT_CHECKPOINT_BEDROCK_REGION unset checkpoint AgentCore region. Overrides checkpoint.config.region_name.
ABT_CHECKPOINT_DYNAMODB_COMPRESSION off checkpoint 1 or true compresses checkpoint payloads with zstd.
ABT_CHECKPOINT_DYNAMODB_ENDPOINT unset checkpoint Endpoint URL for DynamoDB Local or moto. Overrides checkpoint.config.endpoint_url.
ABT_CHECKPOINT_DYNAMODB_REGION boto3 chain checkpoint Region for the DynamoDB backend. Overrides checkpoint.config.region_name.
ABT_CHECKPOINT_DYNAMODB_TABLE required checkpoint Table for checkpoints and writes. Overrides checkpoint.config.table_name.
ABT_CHECKPOINT_DYNAMODB_TTL_SECONDS unset checkpoint Seconds until DynamoDB deletes a checkpoint row. Needs TTL on the table.
ABT_CHECKPOINT_SQLITE_PATH target/checkpoint/checkpoints.sqlite checkpoint SQLite database path. Overrides checkpoint.config.path.
ABT_COMPILE_CACHE_DIR <system temp>/abt-compile-cache-<uid> run Compile cache root for stateless runs. Outside the project target/. The default is created 0700; if that path already exists and is not a directory owned by you without group/other write access, abt uses a fresh private directory for the process instead (so a shared /tmp cannot supply a manifest). An explicit value is used as given.
ABT_CONFIRMATION_APPROVAL_TIMEOUT no timeout run Seconds to wait for a human decision. Used when the tool entry and config.confirmation.defaults leave it unset.
ABT_CONFIRMATION_ENABLED on run false turns off all tool confirmation.
ABT_CONFIRMATION_ON_APPROVAL_TIMEOUT deny run deny or approve. Used when the tool entry and config.confirmation.defaults leave it unset.
ABT_CONFIRMATION_ON_MISSING_GATE deny run deny, approve or raise for headless runs. Used when the tool entry and config.confirmation.defaults leave it unset.
ABT_CONTEXT_DEFAULT_MAX_CHARS 0 (no cap) compile Default max_chars for context.*() calls that omit it.
ABT_CONTEXT_FETCH_TIMEOUT 60 compile Seconds before an external context fetch times out.
ABT_CONTEXT_MODE auto compile Context mode used when config.context_mode is unset. Agent frontmatter takes precedence.
ABT_DEBUG off any 1 shows debug logs on stderr. Same as flags.debug. --no-debug wins.
ABT_DOCS_OMIT_TOOL_SOURCE_CODE off docs 1 leaves per-tool source code out of abt docs generate output.
ABT_DOCS_SKIP_PYTHON_TOOLS off docs 1 builds docs from the manifest without importing tools/*.py.
ABT_GIT_CACHE_TTL 30 git tools Seconds a bare-clone cache is reused without fetching.
GIT_ALLOW_PROTOCOL https for abt's network git calls git tools git's own variable. abt sets https on clone, fetch, push and the like unless it is already set. Set https:ssh when your git config rewrites https URLs to ssh (url.<base>.insteadOf). See Git tools.
ABT_GIT_CLONE_DEPTH 1 git tools Default clone depth. 0 clones full history.
ABT_GIT_CLONE_LOCK_TIMEOUT 60 git tools Seconds to wait for a per-repo clone lock.
ABT_GIT_CLONE_TIMEOUT 120 git tools Clone timeout in seconds.
ABT_GIT_EXEC_ALLOWLIST built-in list git tools First tokens allowed for shelled-out commands. See Git tools.
ABT_GIT_EXEC_TIMEOUT 30 git tools Timeout in seconds for git and gh subprocesses.
ABT_GIT_LOCK_STALE_SECONDS 300 git tools Age after which a stuck clone lock is cleared.
ABT_GIT_TOKEN unset packages Token for private package downloads in abt deps. Checked before GITHUB_TOKEN, GH_TOKEN and gh auth token.
ABT_HANDLERS_FAIL_FAST off run 1 makes the first failing handler fail the run. Same as --fail-on-handler-error.
ABT_INVOKE_TOKEN unset watch Bearer token for the invoke API (--serve-api). --invoke-token-env changes the variable name.
ABT_JSON_LOGGING off logging 1 writes JSON lines to stderr for log aggregation.
ABT_LAZY_CONTEXT off compile 1 keeps target/context/ while its files are on disk. --lazy and --no-lazy win.
ABT_LLM_STREAM_MAX_ATTEMPTS 3 run Restarts of the model stream on transient errors. 1 disables restarts.
ABT_LLM_STREAM_RETRY_MAX_WAIT_SECONDS 60 run Maximum backoff between stream restarts.
ABT_LLM_STREAM_RETRY_MIN_WAIT_SECONDS 1 run Minimum backoff between stream restarts.
ABT_LOAD_DOT_ENV off any Loads the nearest .env file. Same as --load-dot-env. Real variables win.
ABT_LOG_LEVEL INFO (DEBUG with --debug) watch Console level for abt watch run, produce and consume, for example WARNING.
ABT_MACROS_DIRS — project Colon-separated macro directories. abt sets it from paths.macros when the project loads. Context rendering reads a value you set beforehand while no project is loaded.
ABT_MAX_DELEGATION_DEPTH 10 run Maximum nesting depth for subagent delegation. At least 1.
ABT_MOCK_EXTERNAL_CONTEXT off compile 1 stubs external context fetches. --dry-run sets it.
ABT_OBSERVABILITY off observability 1 enables metrics and compile and run events. OTLP export also needs the observability extra.
ABT_PACKAGES_DIR <project_root>/.abt_packages packages Installed-package directory. Set a stable path when the project root is a rotating symlink.
ABT_PARTIAL_PARSE on compile 0, false, no or off disables the partial-parse cache.
ABT_PROFILES_DIR unset profile Directory that holds profiles.yaml. See profile lookup.
ABT_PROJECT_ROOT cwd project Project root. abt sets it when the project loads. Workspace, docs and runtime lookups read it as the project root while no project context is bound.
ABT_PROVIDERS_DIR — project Provider module directory. abt sets it from paths.providers when the project loads. Context rendering reads a value you set beforehand while no project is loaded.
ABT_SEQUENTIAL_MAX_CONCURRENCY global budget run Maximum concurrent nodes in one workflow batch. Capped by ABT_THREADS.
ABT_SKILL_FETCH_MAX_ATTEMPTS 5 compile Attempts for a remote skill fetch on transient GitHub errors.
ABT_SLACK_FOOTNOTE on Slack 0, false, no or off removes footnotes from Slack messages.
ABT_STATELESS off compile, docs 1 compiles in a temporary workspace, as --stateless does. abt run and dispatch read only the --stateless flag.
ABT_LIVE_COMPILE off compile 1 compiles live. Same as flags.live_compile. --no-live wins.
ABT_SUBAGENTS_MODE sync run Dispatch mode for subagents without mode:. Overrides config.subagents.defaults.mode.
ABT_SUBAGENTS_TIMEOUT_SECONDS 900 run Hard timeout for async subagent runs. Overrides config.subagents.defaults.timeout_seconds.
ABT_TARGET unset profile Fallback for --target. Order: --target, ABT_TARGET, the profile's target:.
ABT_TARGET__<TARGET>__* — profile Defines a target without profiles.yaml. See env-var-only targets.
ABT_TEST_MAX_CONCURRENCY global budget test Maximum concurrent abt test cases. 1 runs them serially.
ABT_THREADS 4 any Global concurrency budget, as abt --threads N. Invalid values are ignored with a warning.
ABT_TOKEN_BUDGET_SCOPE run run Scope for token_budget when the agent, workflow and abt.yaml leave it unset. thread caps the whole conversation.
ABT_TOOL_ENV_PASSTHROUGH unset git, gh and Datadog tools Comma-separated names of extra host variables that tool subprocesses may inherit, for example GH_ENTERPRISE_TOKEN,AWS_PROFILE. See Environment of tool subprocesses.
ABT_TOOL_EXECUTION_TIMEOUT no cap run Seconds a tool body may run. Used when config.tools.defaults.execution_timeout and frontmatter leave it unset.
ABT_TOOL_MAX_OUTPUT_BYTES 500 KB package tools (Atlassian, Databricks, Datadog, git, Slack) Per-tool output cap in bytes. Subprocess-backed tools (git, gh, Datadog) read at most 10 MB (or this value, if larger) of stdout and stop the command past that, so the saved output ends at that point. The full output is saved to disk (git tools: inside the clone; others: abt_tool_output-<uid> under the system temp dir, owner-only; on Windows the name has no uid and an existing directory's permissions are not checked) and the path is appended to the truncation notice.
ABT_TOOL_RESULT_CACHE_ENABLED unset (YAML decides) run false turns the cache off, even when YAML enables it. true enables it only when YAML leaves enabled unset.
ABT_WATCH_ACKS_LATE off watch Fallback for --acks-late on abt watch consume.
ABT_WATCH_DISPATCH_RETRY_ATTEMPTS 3 watch Attempts per dispatch on transient integration errors.
ABT_WATCH_INVOKE_MAX_QUEUE_LAG 1000 watch The invoke API returns 429 while this many entries wait unread.
ABT_WATCH_INVOKE_MAX_RUN_SECONDS 3600 watch Wall-clock limit per invoked run. Longer runs are cancelled and recorded as failed.
ABT_WATCH_INVOKE_RUN_TTL_SECONDS 86400 watch How long an invoked run stays pollable after its last state change.
ABT_WATCH_QUEUE unset watch Redis Streams URL. Fallback for --queue.
ABT_WORKFLOW_TAGS_INHERIT true run Merges workflow tags into node tags. Overrides config.workflows.defaults.tags_inherit.
ABT_WRITE_CONVERSATION_ARTIFACTS 1 run 0 skips target/conversations/. Prompts and outputs can be sensitive.
AGENT_WORKSPACE_DIR project root run Base for /workspace/ and target/. --workspace wins. Stateless runs ignore it.
ANTHROPIC_API_KEY unset profile Fallback key when the profile does not set api_key.
ATLASSIAN_API_TOKEN unset profile Token name used by the advanced abt init template in an env_var() call. abt reads it only through profiles.yaml.
AWS_DEFAULT_REGION unset run Region for the built-in UploadArtifacts handler when its region is unset.
AWS_PROFILE unset AWS SDK Named profile for boto3 (Bedrock and DynamoDB). abt init writes it to the profile's env: block.
AWS_REGION us-east-1 profile Bedrock region when the profile sets none.
AZURE_OPENAI_API_KEY unset profile Fallback key when the profile does not set api_key.
AZURE_OPENAI_API_VERSION 2024-02-15-preview profile Azure OpenAI API version.
AZURE_OPENAI_ENDPOINT unset profile Fallback endpoint when the profile does not set azure_endpoint.
BEDROCK_MODEL_ID unset profile Fallback Bedrock model_id.
BRAINTRUST_API_KEY unset observability With the braintrust extra installed, attaches Braintrust tracing to agent streams.
BRAINTRUST_PROJECT abt-core observability Braintrust project name.
CONFLUENCE_FETCH_TIMEOUT_SECONDS 5 compile HTTP timeout for Confluence page fetches.
DATABRICKS_CLIENT_SECRET unset Databricks tools OAuth client secret for the Databricks SDK. abt does not read it; databricks-sdk does.
DATABRICKS_GENIE_ASK_REQUEST_TIMEOUT 300 Databricks tools Seconds databricks_genie_ask waits for Genie. A per-call poll_timeout_seconds wins. ABT_-prefixed name also works.
ABT_DATABRICKS_GENIE_MCP_URL unset Databricks tools Full Genie MCP endpoint URL for databricks_genie_ask, replacing the Unity AI Gateway default (…/ai-gateway/mcp-services/system.ai.genie_one_mcp?o=<workspace-id>).
DATABRICKS_HOST unset Databricks tools Workspace URL when credentials.databricks.host is unset.
DATABRICKS_QUERY_EXECUTE_REQUEST_TIMEOUT 150 Databricks tools Seconds databricks_query_execute polls a statement beyond the first wait. ABT_-prefixed name also works.
DATABRICKS_TOKEN unset Databricks tools Personal access token when credentials.databricks.token is unset.
DD_API_KEY unset Datadog tools Set for the pup subprocess from credentials.datadog.api_key. Profiles often pass it with env_var().
DD_APP_KEY unset Datadog tools Set for the pup subprocess from credentials.datadog.app_key. Profiles often pass it with env_var().
DD_TOKEN_STORAGE file Datadog tools Set by the package for the pup subprocess, together with an empty HOME, so no cached pup auth login session can override the configured keys.
GH_TOKEN unset git tools Last fallback of the single GitHub token (credentials.github.token, then GITHUB_TOKEN, then GH_TOKEN) that git, gh and context.github() share.
GITHUB_TOKEN unset git tools Fallback when credentials.github.token is unset, for context.github(), the git tools and the gh tools alike.
MCP_PREFETCH_TIMEOUT_SECONDS 30 compile Timeout for the MCP prefetch phase of a live compile.
NO_COLOR unset CLI output Any non-empty value disables ANSI colors. See no-color.org.
OPENAI_API_KEY unset profile Fallback key when the profile does not set api_key.
OTEL_EXPORTER_OTLP_ENDPOINT unset observability Exports spans and metrics to an OTLP HTTP collector, with the observability extra.
OTEL_EXPORTER_OTLP_HEADERS unset OpenTelemetry Percent-encoded key=value headers, such as authorization=Bearer%20<token>. See OTLP authentication.
OTEL_SERVICE_NAME abt-core observability Service name in OTLP resource attributes.
PACKAGE_ROOT auto packages Package root. Also config.package_root. Auto: the project root if it has abt.yaml, .agents/ or external/; otherwise two levels above it.
SLACK_APP_TOKEN unset watch Fallback for the Slack trigger's app_token (Socket Mode).
SLACK_BOT_TOKEN unset watch Fallback for the Slack trigger's bot_token. Also clears its progress indicator.
TOKEN_AUDIT_WARNING_THRESHOLD 150000 run Estimated token count that triggers context-size warnings in logs.

Scope is the command or subsystem that reads the variable. any means every command.

Stream retries apply to transient errors, such as dropped connections and HTTP 429 or 5xx responses. Budget exhaustion, recursion limits, cancellation and hard timeouts are never retried. A retry resumes from the run's checkpoint, but a subagent call that was running can run again and bill again.

Environment abt sets for your tools

Read-only. abt sets these on project load, mostly from abt.yaml paths:, so tools, hooks, handlers and subprocesses can find the project. Do not set them: abt overwrites them and does not use them as overrides. During a stateless run abt leaves ABT_TARGET_DIR as it was before the run, so it can hold a stale path or be unset.

Name Purpose
ABT_AGENTS_DIR Agent directory, from paths.agents.
ABT_CONTRACTS_DIR Output contract directory, from paths.contracts.
ABT_EXPOSURES_DIR Exposure directory, from paths.exposures.
ABT_EXTERNAL_DIR Vendored assets directory, from paths.external.
ABT_FEW_SHOTS_DIR Few-shot directory, from paths.few_shots.
ABT_HANDLERS_DIR Handler directory, from paths.handlers. Not read as an override.
ABT_MCPS_DIR MCP source directory, from paths.mcps.
ABT_PROMPTS_DIR Prompt directory, from paths.prompts.
ABT_RETRIEVERS_DIR Retriever directory, from paths.retrievers.
ABT_SKILLS_DIRS Colon-separated skill directories, from paths.skills.
ABT_SOURCES_DIR Source directory, from paths.sources.
ABT_TARGET_DIR Resolved <workspace>/target. A stateless run leaves the pre-run value, or leaves it unset.
ABT_TOOLS_DIR Tool module directory, from paths.tools.
ABT_TRANSFORMERS_DIR Transformer directory, from paths.transformers.
ABT_TRIGGERS_DIR Trigger directory, from paths.triggers.
ABT_WORKFLOWS_DIR Workflow directory, from paths.workflows.

Environment of tool subprocesses

The git, gh, rg, cat, sed and other commands run by the git and gh tools, and pup for the Datadog tools, start with an allow-listed environment, not a copy of abt's. Model-provider keys, cloud credentials and other services' tokens in your shell never reach them. They inherit:

Variables Why
PATH, HOME, USER, LOGNAME, TMPDIR, TZ, TERM, LANG, LANGUAGE, LC_* Find programs and the user's git and gh configuration; locale
XDG_CONFIG_HOME, XDG_CACHE_HOME, XDG_DATA_HOME, XDG_STATE_HOME Where gh and git keep their config
HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY (and lower-case forms) Corporate proxies
SSL_CERT_FILE, SSL_CERT_DIR, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE Private CAs
GIT_SSH, GIT_SSH_COMMAND, GIT_ASKPASS, GIT_TERMINAL_PROMPT, GIT_ALLOW_PROTOCOL, GIT_SSL_CAINFO, GIT_SSL_CAPATH, GIT_SSL_CERT, GIT_SSL_KEY, GIT_SSL_NO_VERIFY, GIT_HTTP_LOW_SPEED_LIMIT, GIT_HTTP_LOW_SPEED_TIME, GIT_HTTP_MAX_REQUESTS, GIT_HTTP_PROXY_AUTHMETHOD, GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM, GIT_CONFIG_NOSYSTEM, GIT_AUTHOR_* and GIT_COMMITTER_* name and email, numbered GIT_CONFIG_COUNT/GIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_n Git's transport, identity and config settings. GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and token-like names such as GIT_TOKEN are not passed, so a tool never reads the repository abt was launched from
XDG_RUNTIME_DIR, DBUS_SESSION_BUS_ADDRESS The user bus gh's keyring login goes through (Linux)
SSH_AUTH_SOCK, SSH_AGENT_PID, SSH_ASKPASS, GNUPGHOME, GPG_TTY, KRB5CCNAME, LD_LIBRARY_PATH ssh and signing agents, Kerberos tickets, shared libraries (locations only, no secrets)
GH_HOST, GH_CONFIG_DIR, GH_PROMPT_DISABLED Which GitHub host gh talks to, its config, and no prompts
SYSTEMROOT, COMSPEC, PATHEXT, USERPROFILE, ALLUSERSPROFILE, APPDATA, LOCALAPPDATA, TEMP, TMP, PROGRAMFILES(X86), PROGRAMW6432, COMMONPROGRAMFILES, PROCESSOR_ARCHITECTURE, NUMBER_OF_PROCESSORS and similar Windows needs them to start programs

abt adds the GitHub token to gh and to network git calls as described in Git tools, and the Datadog tools add DD_API_KEY, DD_APP_KEY and DD_SITE from profiles.yaml. A variable not listed, such as GH_ENTERPRISE_TOKEN or a cloud credential helper's variables, is not passed through unless you name it in ABT_TOOL_ENV_PASSTHROUGH. When gh fails with an error that reads like a missing login, the tool result ends with a hint to use ABT_TOOL_ENV_PASSTHROUGH. Child processes also get no stdin, so a command that reads it (cat -) sees an empty input. A helper a command starts on purpose and detaches (git gc --auto, an fsmonitor daemon) is left running when the command ends; a command that times out or passes the output cap is stopped with everything it started.

Secret interpolation

Strings in profiles.yaml can use {{ env_var('VAR') }} or {{ env_var('VAR', 'default') }}. With no default and the variable unset at runtime, the load fails. The same call works in mcps/*.json, approvals config, and the config: of sources/*.yaml, exposures/*.yaml and middleware: entries. In those config: blocks a string that uses env_var() stays unrendered in the manifest and renders when the run starts, so secrets never reach compiled artifacts or caches. Text that a var() call produced in a top-level value is never read as a template, so a variable holding {{ env_var('X') }} cannot read X. Environment variables that a compile reads are part of the partial-parse cache key.

To load a .env file, pass --load-dot-env (or set ABT_LOAD_DOT_ENV=1) before the subcommand: abt --load-dot-env run -s my_agent -p "...". abt loads the nearest .env above the current directory, and real environment variables win. In Python, pass load_dot_env=True to AbtRunner or any abt.sdk.operations function. The search then starts at project_root.

Keep secrets out of env_var() in prompts and frontmatter. See Jinja and template variables.