Environment Variables
Sinaptic® DROID+ config files support ${ENV_VAR} substitution. Any value in droid.yaml or agent configs can reference an environment variable.
.env File
Sinaptic® DROID+ automatically loads a .env file from the working directory at startup. Variables set in the environment take precedence over .env values.
# .env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=AIza...
GROK_API_KEY=xai-...
LLM Provider Keys
| Variable | Provider | Required |
|---|---|---|
OPENAI_API_KEY | OpenAI (default) | Yes (if using OpenAI) |
ANTHROPIC_API_KEY | Anthropic (Claude) | Yes (if using Anthropic) |
GEMINI_API_KEY | Google Gemini | Yes (if using Gemini) |
GROK_API_KEY | xAI Grok | Yes (if using Grok) |
Local providers (Ollama, LM Studio, llama.cpp) do not require API keys.
Runtime Variables
| Variable | Description | Default |
|---|---|---|
DROID_CONFIG | Path to the main config file | ./droid.yaml |
DROID_DATA_DIR | Path to the data directory | ./data |
Usage in Config
Reference any environment variable with ${VAR} syntax:
llm:
api_key: ${OPENAI_API_KEY}
server:
api_key: ${DROID_API_KEY}
mcp:
servers:
my-server:
env:
TOKEN: ${MY_SERVICE_TOKEN}
If an environment variable is not set, the ${VAR} string is left as-is (not expanded). This means the config value will be the literal string ${VAR}, which will likely cause an authentication error — making it easy to spot missing variables.