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
| Variable | Meaning |
|---|---|
| GRAY_HOME | config root (default ~/.gray) |
| GRAY_API_KEY / OPENAI_API_KEY | API key — env beats stored keys |
| GRAY_MODEL | default model before ~/.gray/config.json is consulted |
| GRAY_BASE_URL | default base URL |
| GRAY_CONTEXT_WINDOW | override the window — 128000, 128k, 1m, or auto |
| GRAY_NO_UPDATE_CHECK=1 | silence the startup update check |
| GRAY_AUTO_UPDATE=1 | self-update in the background |
| GRAY_PARALLEL_READS | 0 runs every tool sequentially (default: read-only tools run concurrently) |
| GRAY_REGISTRY_URL | point the plugin registry somewhere else |
| GRAY_LOG | log level: error…trace (default info) |
Logs are written to ~/.gray/logs/gray.log. Set GRAY_LOG=debug for the firehose.