Configuration reference

Environment variables for agentd and its companion services.

Broker

VariableDefaultMeaning
GITHUB_APP_ID—GitHub App ID (required)
GITHUB_PRIVATE_KEY_PATH—App private key file
AGENTGATE_KMS_KEY_ID—Built-in AWS KMS signing (key ID, ARN, or alias); not with a key file
AGENTGATE_KMS_ENDPOINT—KMS endpoint override (VPC or FIPS)
AGENTGATE_SIGN_COMMAND—External signer instead of a key file (any KMS/HSM); takes precedence
AGENTGATE_CONFIGconfig.local.jsonPath to the policy config
AGENTGATE_STATE_DIR.agentgateApprovals, audit, admin socket
AGENTGATE_HOST127.0.0.1Listener address; non-loopback requires TLS
AGENTGATE_PORT7432Listener port
AGENTGATE_PUBLIC_URL—Origin workspaces use; required off loopback
AGENTGATE_CLIENT_TOKEN_FILE—Workspace bearer token (required unless fleet mode)
AGENTGATE_CLIENT_AUTHstaticassertion for fleet mode: no shared token; each request's bearer must be its assertion's bound token
AGENTGATE_TLS_CERT_FILE / _KEY_FILE—Broker TLS
AGENTGATE_MAX_BODY_MIB2048Push size limit (1–4096)
AGENTGATE_MAX_CONCURRENT4Concurrent requests (1–64)
AGENTGATE_RATE_CAPACITY60Token bucket size per client
AGENTGATE_RATE_REFILL_PER_SECOND2Token refill rate
AGENTGATE_RUNTIME_RATE_CAPACITY / _REFILL_PER_SECONDas abovePer-runtime (jti) bucket in assertion mode
AGENTGATE_MIRROR_DIR$STATE_DIR/mirrorsScan mirrors
AGENTGATE_REVOCATIONS_FILE—Local assertion revocations
AGENTGATE_REVOCATIONS_POLL_MS5000How often the file is checked for changes; 0 leaves SIGHUP only
AGENTGATE_LOG_LEVELinfodebug, info, warn, error

Approvals

VariableMeaning
AGENTGATE_REVIEWERCLI reviewer identity (local:<name>)
AGENTGATE_APPROVAL_WEBHOOK_URL_FILESlack-compatible webhook URL file
AGENTGATE_APPROVAL_PUBLIC_URLLink included in notifications
AGENTGATE_APPROVAL_WEB_ADMIN_SECRET_FILEHMAC secret shared by agentd and approval-web
AGENTGATE_APPROVAL_PROXY_SECRET_FILEoauth2-proxy header secret
AGENTGATE_APPROVAL_EMAIL_DOMAINSAllowed reviewer domains
AGENTGATE_APPROVAL_ORIGINExact Origin required on POSTs
AGENTGATE_APPROVAL_HOST / _PORTUI listener (default 127.0.0.1:7433)

Issuer

VariableMeaning
AGENTGATE_ISSUER_KEY_PATHEd25519 private key file
AGENTGATE_ISSUER_KID / AGENTGATE_ISSUER_AUDIENCEMatch the broker's issuer kid and audience
AGENTGATE_ISSUER_ADMINSEmails that see and may revoke every runtime
AGENTGATE_ISSUER_MAX_TTLLongest assertion, seconds (60–86400)
AGENTGATE_ISSUER_DIRECTORY_FILEDirectory export bounding delegable teams
AGENTGATE_ISSUER_ENTITLEMENTS_FILELive static/okta/entra sources for the same
AGENTGATE_ISSUER_BASE_PATH/issuer behind the shared oauth2-proxy

Git LFS

VariableDefaultMeaning
AGENTGATE_LFS_HOSTSgithub-cloud.githubusercontent.comTrusted storage hosts
AGENTGATE_LFS_MAX_OBJECT_MIB5120Object size cap
AGENTGATE_LFS_MAX_TRANSFERS8Transfer slots (1–64)

Audit & metrics

VariableDefaultMeaning
AGENTGATE_AUDIT_MAX_MIB64Rotation size
AGENTGATE_AUDIT_MAX_FILES20Rotated files kept
AGENTGATE_AUDIT_SINK_URL—HTTPS sink
AGENTGATE_AUDIT_SINK_TOKEN_PATH—Sink bearer token
AGENTGATE_AUDIT_FORWARD_INTERVAL_MS5000Poll interval
AGENTGATE_AUDIT_CHECKPOINT_PATH$STATE_DIR/audit-forward.jsonForwarder checkpoint
AGENTGATE_METRICS_PORT—Enables /metrics
AGENTGATE_METRICS_HOST127.0.0.1Metrics listener address

Workspace, egress & model gateway

VariableMeaning
AGENTGATE_URLBroker origin (default http://agentd:7432)
AGENTGATE_CA_FILECA the workspace trusts for the broker
AGENTGATE_RUNTIME_ASSERTION_FILERuntime assertion sent on each request
AGENTGATE_GIT_NAME / _EMAILCommit identity
AGENTGATE_EGRESS_CONFIG_PATHEgress allowlist; add identity (audience, issuers, required) for per-runtime attribution
AGENTGATE_MODEL_GATEWAY_CONFIG_PATHGateway routes, budgets (maxRequestsPerHourPerRuntime), and identity for per-runtime attribution
AGENTGATE_MODEL_GATEWAY_CLIENT_TOKEN_PATHGateway client token
ANTHROPIC_API_KEY_PATHProvider key (mode 600)
AGENTGATE_WORKSPACE_IMAGEPrebuilt workspace image for compose.workspace-image.yaml

Demo-only switches

AGENTGATE_ALLOW_UNAUTHENTICATED, AGENTGATE_ALLOW_PLAINTEXT, AGENTGATE_SKIP_RULESET_CHECK, AGENTGATE_CONTROL_ALLOW_HTTP, and AGENTGATE_FORCE_UNLOCK weaken or bypass protections. Never set them in shared deployments.