Skip to content

Environment variables

The canonical template is .env.example at the repository root. After cloning:

bash
cp .env.example .env

Edit .env for your machine; never commit real secrets.

  • Docker Compose: defaults for Postgres and the app are set in docker-compose.yml. See Docker guide for container-specific usage.
  • Local pnpm dev: set DATABASE_URL, OLLAMA_URL (often http://localhost:11434), and WORKFLOW_LOCAL_DATA_DIR as described in .env.example.
  • Onboarding / first run: open /setup in the app. The wizard (DB-backed + provider steps) configures keys and creates the first admin; it does not write .env for you — keep using root .env.example as the template and sync values manually if needed.

Cross-links (optional): NUXT_PUBLIC_DOCS_SITE_URL points the Nuxt app header to your published docs (defaults to the GitHub Pages URL). For the VitePress build, VITEPRESS_DEMO_URL sets the hosted chat URL used in the nav and social icon; the default lives in docs/.vitepress/demo-app-url.ts and should match the Try demo hero link in docs/index.md. In GitHub Actions you can set repository variable VITEPRESS_DEMO_URL (see .github/workflows/pages.yml).


Provider selection

Two variables control which AI providers are active. If omitted, the runtime falls back to detecting the first present API key.

VariableValuesDescription
EMBEDDING_PROVIDERgemini openai voyage ollama-localExplicit embedding provider. Overrides key-presence detection.
LLM_PROVIDERanthropic openai mistral ollama-cloud ollama-localExplicit chat/LLM provider. Overrides key-presence detection.

Embedding providers

VariableProviderDescription
GOOGLE_API_KEYGeminiAPI key from Google AI Studio. Uses gemini-embedding-001 by default.
OPENAI_API_KEYOpenAIAPI key from OpenAI. Shared with OpenAI LLM if both are configured.
VOYAGE_API_KEYVoyage AIAPI key from Voyage AI. Uses voyage-3 by default.
OLLAMA_URLOllamaBase URL, e.g. http://localhost:11434. Used for both embedding and LLM.
OLLAMA_MODELOllamaEmbedding model name (default: nomic-embed-text).
EMBEDDING_MODELallOverride the model for the active embedding provider.
EMBEDDING_DIMENSIONSallVector size — must match the pgvector column (default: 768).

Fallback order (when EMBEDDING_PROVIDER is not set): Gemini → OpenAI → Voyage → Ollama.


LLM / chat providers

VariableProviderDescription
ANTHROPIC_API_KEYAnthropicAPI key from Anthropic console.
ANTHROPIC_MODELAnthropicModel name (default: claude-sonnet-4-6).
OPENAI_API_KEYOpenAIShared with embedding if both are configured.
OPENAI_LLM_MODELOpenAIChat model name (default: gpt-4.1-mini).
MISTRAL_API_KEYMistralAPI key from Mistral console.
MISTRAL_MODELMistralModel name (default: mistral-medium-latest).
OLLAMA_API_KEYOllama CloudAuth key for Ollama Cloud.
OLLAMA_LLM_MODELOllamaChat model (default: tinyllama local / kimi-k2.5:cloud cloud).
OLLAMA_CHAT_TIMEOUT_MSOllamaLLM response timeout in ms (default: 180000).
OLLAMA_PLANNER_TIMEOUT_MSOllamaPlanner/tool step timeout in ms (default: 60000).

Fallback order (when LLM_PROVIDER is not set): Anthropic → Mistral → OpenAI → Ollama.


Database

VariableDescription
DATABASE_URLFull Postgres connection string. Required.

Self-hosted pgvector example:

DATABASE_URL=postgresql://postgres:password@localhost:5432/rag_db

Supabase Vector example (direct):

DATABASE_URL=postgresql://postgres:password@db.<project-ref>.supabase.co:5432/postgres

Supabase Vector example (transaction pooler — recommended for serverless):

DATABASE_URL=postgresql://postgres.<project-ref>:password@aws-0-<region>.pooler.supabase.com:6543/postgres

The setup wizard (step 2) can help you pick a Postgres connection style; still copy the final string into .env yourself.


Application

VariableDefaultDescription
MEMORY_SCOPElocal_per_userlocal_per_user / global / disabled
MEMORY_PROACTIVEtrueAuto-save user facts to memory
ADMIN_API_KEYOptional key to protect admin endpoints
WORKFLOW_LOCAL_DATA_DIR./data/workflowDurable workflow state directory

For runtime-configurable values stored in the database (model, chunking, search, RAG tunables) see Settings. Anything in this file is read once at boot from the environment.