Skip to content

Environment variables

The framework is env-driven so a fresh user can clone + run without editing source. Every variable listed here is honoured by agent_runner.py, install.sh, deploy.sh, or the rendered launchd plists.

For the operator-config template, see .alfredrc.example.

VarUsed byDefaultNotes
GH_ORGagent_runner._full_repo (every gh helper)(none: raises)Bare repo slugs (backend) get resolved to <GH_ORG>/<slug>.
VarUsed byDefaultNotes
OPERATOR_NAMEagent prompts(blank → “the operator”)Substituted via load_prompt(..., extra_vars=...).
OPERATOR_EMAILagent prompts(blank)Same.
OPERATOR_GH_HANDLEsome prompts(blank)Used when distinct from GH_ORG.

HERMES_HOME is the alfred-os runtime root. The name is historical; it does not mean hermes-agent is installed or required.

VarUsed byDefault
HERMES_HOMEeverything$HOME/.hermes
WORKSPACE_ROOTagent_runner.WORKSPACE = WORKSPACE_ROOT/product$HOME/code
CLAUDE_BINagent_runner.claude_invokeclaude (PATH)
CLAUDE_CONFIG_DIRclaude auth profile selection(Claude default)
CODEX_BINagent_runner.codex_invokecodex (PATH)
CODEX_MODELoptional model override for codex exec(Codex default)
CODEX_SANDBOXcodex exec --sandboxread-only
CODEX_APPROVAL_POLICYcodex exec -c approval_policy=...never
VarUsed byDefault
ALFRED_<CODENAME>_ENGINEper-agent engine choicerunner default
ALFRED_ENGINEfleet-wide engine override(none)
ALFRED_REVIEW_ENGINElegacy review-agent override(none)
ALFRED_<CODENAME>_MAX_TURNSoptional per-agent Claude turn caprunner default
ALFRED_<CODENAME>_CODEX_SANDBOXper-agent Codex sandboxCODEX_SANDBOX
ALFRED_<CODENAME>_CODEX_WRITEshortcut for workspace-write0

bin/alfred engine status/set persists per-agent engine choices under $HERMES_HOME/state/engines/<codename>.

VarUsed byDefault
ALFRED_SHIPPED_SUMMARY_REPOSalfred shipped / alfred-shipped-summary.py watched repo list(none)
ALFRED_SHIPPED_SUMMARY_QUERY_LIMITper-window GitHub query limit1000
VarUsed byDefault
ALFRED_DISABLE_CLAUDE_AUTH_REPAIRdisables automatic Claude auth refresh attempts0
CLAUDE_CONFIG_DIRbin/hermes-claude and launchd env(primary Claude profile)
VarUsed byDefault
SLACK_WEBHOOK_URLslack_post (env-var path, highest priority)(none)
SLACK_WEBHOOK_SECRET_IDslack_post (AWS path)alfred/slack-webhook
SLACK_WEBHOOK_SECRET_REGIONslack_post (AWS path)us-east-1
SLACK_BOT_TOKENBlock Kit / thread helpers(none)
SLACK_BOT_TOKEN_SECRET_IDbot token AWS pathalfred/slack-bot-token
SLACK_BOT_TOKEN_SECRET_REGIONbot token AWS regionus-east-1
SLACK_HOME_CHANNELdefault bot channelalfred
BATMAN_APPROVAL_CHANNELlegacy alias for SLACK_HOME_CHANNEL(none)

Resolution order: env -> 30-day disk cache at $HERMES_HOME/state/slack-webhook.cache -> AWS Secrets Manager. First hit wins.

VarUsed byDefault
ALFRED_HUNTRESS_AWS_PROFILE, ALFRED_GORDON_AWS_PROFILErole runners that touch AWS(none: AWS checks disabled or use default chain)
AWS_PROFILEset by role runners around owned aws ... calls(none)
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_SECURITY_TOKENstripped before aws ... calls in agents that need pure-profile auth(operator’s SSO leakage)
VarUsed byDefault
HERMES_DOCTORevery agent’s doctor_mode() check0

Set to 1 and any agent runner will emit [<NAME>-DOCTOR-OK] and exit 0 without side effects.

VarUsed byDefault
ALFRED_SPEND_RETENTION_DAYSagent-cleanup.py (in consumer fleets)90
ALFRED_TRANSCRIPT_RETENTION_DAYSsame30
ALFRED_EVENTS_RETENTION_DAYSsame30
ALFRED_CLAIM_MAX_AGE_HOURSstale-claim sweep4
VarUsed byDefault
ALFRED_NONINTERACTIVEinstall.sh (use defaults for every prompt)(interactive)
ALFRED_SKIP_NPMskip Claude Code install(run)
ALFRED_SKIP_BREWskip brew install(run)
ALFRED_FORCE_LINUXoverride the macOS check(refuse)
VarUsed byDefault
LABEL_STATE_SWEEP_REPOSexamples/bin/label_state.py sweep-claims (default repo set)(must pass --repo)
LABEL_STATE_BINpre-push hook(resolves via PATH then $HERMES_HOME/bin/)
LABEL_STATE_SKIP_DEDUP_CHECKpre-push hook(enforce)
VarUsed byDefault
ALFRED_OS_PUBLISH_PAGES.github/workflows/site.yml deploy gate(unset: build only)
ALFRED_OS_SITE_URLsite/astro.config.mjshttps://alfred.luminik.io
ALFRED_OS_SITE_BASEsame/

Override these to deploy under a custom domain (e.g. ALFRED_OS_SITE_URL=https://alfred-os.dev + ALFRED_OS_SITE_BASE=/).

The path-resolution block at the top of lib/agent_runner.py is the canonical contract. Every other config file (install.sh, _template.plist, agents.conf) renders into the same env-var shape.