Env-based BYOK in v1
AGI Workforce v1 supports bring-your-own-key via environment variables. Set the provider key in your environment and AGI picks it up automatically. No UI form required.
Quick start (self-hosted / web)
1. Create or edit .env.local
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 |
| Mistral | MISTRAL_API_KEY | Adapter pending (lane D) |
| Groq | GROQ_API_KEY | Adapter pending (lane D) |
| OpenRouter | OPENROUTER_API_KEY | Adapter pending (lane D) |
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 (OS keychain)
Desktop reads from OS keychain
On macOS the desktop app reads keys from Keychain Access under the service name agiworkforce. On Windows it uses Credential Manager. On Linux it uses the Secret Service API (libsecret). Keys stored there take precedence over PROVIDER_API_KEY environment variables.
UI key entry is coming
UI key entry, OS-keychain write, and revoke-all are launching in Cloud Managed private beta. Until then, env vars are the supported path.
Join the Cloud Managed waitlist →