Loading…
Loading…
Self-hosted AGI deployments read operator-managed provider keys from environment variables. Desktop, CLI, and VS Code each provide a local credential flow for user-managed BYOK. Hosted Web and Mobile do not expose BYOK key entry.
Quick start (self-hosted operator)
In the root of your self-hosted deployment (or apps/web/ for local dev), create or edit .env.local and add the keys for the providers you want to use.
Supported providers and env vars
Set any combination below. Only providers with a key present will be active.
| Provider | Environment variable | Notes |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY | Active in v1 |
| OpenAI | OPENAI_API_KEY | Active in v1 |
GOOGLE_API_KEY | Active in v1 | |
| xAI | XAI_API_KEY | Active in v1 |
| DeepSeek | DEEPSEEK_API_KEY | Active in v1 |
| Perplexity | PERPLEXITY_API_KEY | Active in v1 |
| Qwen | QWEN_API_KEY | Active in v1 |
| Moonshot | MOONSHOT_API_KEY | Active in v1 |
| Zhipu | ZHIPU_API_KEY | Active in v1 |
| OpenRouter | OPENROUTER_API_KEY | Active in v1 |
| Groq | GROQ_API_KEY | Active in v1 |
| NVIDIA NIM | NVIDIA_NIM_API_KEY | Active in v1 |
| Cloudflare Workers AI | WORKERS_AI_API_KEY | Active in v1 |
| Vercel AI Gateway | VERCEL_GATEWAY_API_KEY | Active in v1 |
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 (encrypted local storage)
Tauri Desktop encrypts provider keys in local application storage and activates the selected direct-provider route without sending the key to AGI managed cloud. The CLI uses the operating system keyring; VS Code uses SecretStorage. These stores are surface-local and do not sync provider keys between apps.
Desktop key entry
Desktop can add provider keys during onboarding or in Settings → Models & Keys. The native runtime writes them to secure local storage; self-hosted Web deployments continue to use environment variables. BYOK is not configured in AGI’s hosted Web or Mobile apps.
Compare supported BYOK surfaces →