Environment Variables¶
Playbooks reads configuration primarily from environment variables. The loader searches for .env
and .env.<environment>
files automatically.
Environment file loading¶
At import time, Playbooks loads environment variables in this order:
.env
in the project root (the directory where you run CLI).env.<environment>
if present, where<environment>
is taken fromENV
orENVIRONMENT
(defaults todevelopment
)
Model selection and API keys¶
MODEL
: Language model to use. Default:claude-sonnet-4-20250514
.
Claude Sonnet 4.0 is the only LLM currently supported by Playbooks.
- Provider API keys (set the one matching your
MODEL
): ANTHROPIC_API_KEY
for Claude modelsOPENAI_API_KEY
for OpenAI modelsGEMINI_API_KEY
for Google Gemini modelsGROQ_API_KEY
for Groq models-
OPENROUTER_API_KEY
for OpenRouter models -
COMPILER_MODEL
: Override the model used by the compiler stage (defaults toMODEL
if unset)
LLM response cache (optional)¶
LLM_CACHE_ENABLED
("true"/"false"): Enable caching. Default: falseLLM_CACHE_TYPE
:disk
(default) or other supported typesLLM_CACHE_PATH
: Directory path for disk cache whendisk
is used
Langfuse tracing (optional)¶
LANGFUSE_SECRET_KEY
LANGFUSE_PUBLIC_KEY
LANGFUSE_HOST
(e.g.,http://localhost:3000
)