Reference

Environment variables

Every environment variable the Gray AI agent reads at startup, from the context window to the API key, registry URL and log level.

Source: crates/gray/src/config.rs

VariableMeaning
GRAY_HOMEconfig root (default ~/.gray)
GRAY_API_KEY / OPENAI_API_KEYAPI key — env beats stored keys
GRAY_MODELdefault model before ~/.gray/config.json is consulted
GRAY_BASE_URLdefault base URL
GRAY_CONTEXT_WINDOWoverride the window — 128000, 128k, 1m, or auto
GRAY_NO_UPDATE_CHECK=1silence the startup update check
GRAY_AUTO_UPDATE=1self-update in the background
GRAY_PARALLEL_READS0 runs every tool sequentially (default: read-only tools run concurrently)
GRAY_REGISTRY_URLpoint the plugin registry somewhere else
GRAY_LOGlog level: error…trace (default info)

Logs are written to ~/.gray/logs/gray.log. Set GRAY_LOG=debug for the firehose.