Provider-key configuration
Self-hosted AGI deployments read operator-managed provider keys from environment variables. The CLI has a local credential flow for user-managed BYOK, and the VS Code extension hands provider keys to that CLI runtime. The CLI and VS Code are coming soon. Hosted Web, Mobile and the Desktop app do not expose BYOK key entry.
Quick start for a self-hosted operator
Create or edit .env.local in the root of your self-hosted deployment (or apps/web/ for local dev), and add the keys for the providers you want to use.
Supported providers and environment variables
Set any combination below. Only providers with a key present will be active.
| Provider | Environment variable |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
GOOGLE_API_KEY | |
| xAI | XAI_API_KEY |
| DeepSeek | DEEPSEEK_API_KEY |
| MiniMax | MINIMAX_API_KEY |
| Perplexity | PERPLEXITY_API_KEY |
| Qwen | QWEN_API_KEY |
| Moonshot | MOONSHOT_API_KEY |
| Zhipu | ZHIPU_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| Groq | GROQ_API_KEY |
| NVIDIA NIM | NVIDIA_NIM_API_KEY |
| Cloudflare Workers AI | WORKERS_AI_API_KEY |
| Vercel AI Gateway | VERCEL_GATEWAY_API_KEY |
Example .env.local
# .env.local - never commit this file
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=AIza...
# Add any others you want active
# DEEPSEEK_API_KEY=...
# PERPLEXITY_API_KEY=pplx-...Desktop takes no provider key
The macOS app runs on your AGI account and carries the hosted app, so it has nowhere private to keep a provider key and does not ask for one. On the same machine the CLI stores a provider key in the operating system keyring, or in owner-only files on Linux or when the keyring is turned off, and the VS Code extension passes provider keys to that CLI runtime instead of keeping its own copy. Provider keys do not sync to Desktop or the hosted apps.
Provider-key clients
The CLI stores provider keys in the operating system keyring, or in owner-only files on Linux or when the keyring is turned off. VS Code support hands keys to the CLI runtime. The CLI and VS Code are coming soon. Self-hosted Web deployments continue to use environment variables. AGI’s hosted Web, Mobile, Desktop, and Chrome surfaces do not accept provider keys.