Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

Set these in your shell profile (.bashrc, .zshrc, config.fish) or in CI.

State and staging

AGENTPACK_HOME

The user-wide root for cache, the metadata index, the local/ mirror, and per-project bookkeeping.

Default: $XDG_DATA_HOME/agentpack (or $HOME/.local/share/agentpack) on Unix; %LOCALAPPDATA%\agentpack on Windows.

export AGENTPACK_HOME=/data/agentpack

Point it at a network mount for a shared cache, or somewhere project-specific for isolation.

AGENTPACK_STAGING_ROOT

Root for per-harness, per-mode staging trees.

Default: <temp_dir>/agentpack-<project-hash>.

export AGENTPACK_STAGING_ROOT=/tmp/agentpack-staging

Set this for a stable path when your OS rotates temp directories, or to put staging on a fast local disk in CI.

Behavior toggles

AGENTPACK_KEEP_ATTRIBUTION

Default: unset. Set to 1 / true / yes to keep your existing AI-attribution settings (Co-Authored-By trailers, “Generated with X” footers) in staged harness configs. By default agentpack forces attribution off in staging. See Overrides and Attribution.

AGENTPACK_DOT_AGENTS

Default: enabled. Set to 0 to skip merging the project’s ./.agents/ overlay into harness staging.

Claude proxy diagnostics

AGENTPACK_PROXY_LOG_DIR

Directory for agentpack --proxy claude JSONL diagnostics.

Default: $AGENTPACK_HOME/projects/<project-hash>/proxy-logs.

AGENTPACK_PROXY_LOG_PAYLOADS

Default: unset. Set to 1 / true / yes to include truncated upstream error bodies and payload snippets in proxy logs. Leave unset for sanitized metadata-only logs.

AGENTPACK_PROXY_LOG_MAX_BODY_BYTES

Maximum bytes retained for any payload snippet when payload logging is enabled.

Default: 4096.

AGENTPACK_PROXY_WS_CONNECT_TIMEOUT_SECS

WebSocket TCP connect timeout for proxy upstream connections.

Default: 15.

AGENTPACK_PROXY_WS_IDLE_TIMEOUT_SECS

WebSocket read/write idle timeout for proxy upstream connections.

Default: 300.

Proxy transport, endpoint, and model overrides

VariableDefaultPurpose
AGENTPACK_PROXY_TRANSPORTinferred from authhttp, websocket, or auto
AGENTPACK_PROXY_PORT0Loopback listen port; 0 selects a free port
AGENTPACK_PROXY_REQUEST_TIMEOUT_SECS300Complete upstream request timeout
AGENTPACK_PROXY_UPSTREAM_URLCodex auth endpointOverride the OpenAI Responses endpoint
AGENTPACK_PROXY_AUTH_JSONCodex auth discoveryExplicit Codex-compatible auth JSON path
AGENTPACK_PROXY_BIG_MODELgpt-5.5Upstream model for Opus-class requests
AGENTPACK_PROXY_MIDDLE_MODELgpt-5.4Upstream model for Sonnet-class requests
AGENTPACK_PROXY_SMALL_MODELgpt-5.4-miniUpstream model for Haiku-class requests

GitHub access

GITHUB_TOKEN / GH_TOKEN

Default: unset. When set, agentpack sends it as a bearer token for GitHub ref/tag lookups and authenticated downloads. Set one to resolve private repositories or to avoid anonymous API rate limits during heavy resolution. GITHUB_TOKEN takes precedence over GH_TOKEN.

Binary paths

Override the path to each harness’s executable when it isn’t on PATH or you need a specific build:

VariableBinary
CLAUDE_CODE_PATHclaude
OPENCODE_PATHopencode
CODEX_PATHcodex
CURSOR_AGENT_PATHcursor-agent
GROK_PATHgrok
AGY_PATHagy

Summary

VariableDefaultPurpose
AGENTPACK_HOMEXDG / %LOCALAPPDATA%Cache and state root
AGENTPACK_STAGING_ROOT<temp>/agentpack-<hash>Staging root
AGENTPACK_KEEP_ATTRIBUTIONunsetKeep AI attribution in staging
AGENTPACK_DOT_AGENTSenabledMerge ./.agents/ overlay
AGENTPACK_PROXY_LOG_DIRproject state dirClaude proxy JSONL diagnostics
AGENTPACK_PROXY_LOG_PAYLOADSunsetInclude truncated payload snippets in proxy logs
AGENTPACK_PROXY_LOG_MAX_BODY_BYTES4096Payload snippet byte cap
AGENTPACK_PROXY_TRANSPORTinferredProxy upstream transport
AGENTPACK_PROXY_PORT0Proxy loopback port
AGENTPACK_PROXY_REQUEST_TIMEOUT_SECS300Proxy request timeout
AGENTPACK_PROXY_UPSTREAM_URLauth endpointOverride proxy upstream URL
AGENTPACK_PROXY_AUTH_JSONautoOverride proxy auth JSON
AGENTPACK_PROXY_BIG_MODEL / MIDDLE_MODEL / SMALL_MODELbuilt inOverride proxy model mapping
GITHUB_TOKEN / GH_TOKENunsetGitHub auth for private repos and rate limits
CLAUDE_CODE_PATHAGY_PATHOverride harness binary paths