Skip to main content

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

VariableProviderRequired
OPENAI_API_KEYOpenAI (default)Yes (if using OpenAI)
ANTHROPIC_API_KEYAnthropic (Claude)Yes (if using Anthropic)
GEMINI_API_KEYGoogle GeminiYes (if using Gemini)
GROK_API_KEYxAI GrokYes (if using Grok)

Local providers (Ollama, LM Studio, llama.cpp) do not require API keys.

Runtime Variables

VariableDescriptionDefault
DROID_CONFIGPath to the main config file./droid.yaml
DROID_DATA_DIRPath 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.