Platform
Configuration
Start with the root .env.example. This page summarizes selected settings; the example file and each chart's values are the sources for the complete configuration.
apps/console and apps/siteare separate frontends. The public website needs no authentication or backend configuration. Services consume different subsets of environment settings. The local make dev-all target checks database, Supabase, and signing values; console production builds also need public API and documentation URLs.
Core runtime
| Variable (local startup requirements marked) | Default | Description |
|---|---|---|
ENVIRONMENT | development | Environment label used across logs and startup behaviour. |
DEBUG | true | Enables debug-oriented behaviour in local development. |
LOG_LEVEL | DEBUG | Application log level. |
LOG_FORMAT | text | Log formatter. Local development uses plain text by default. |
SECRET_KEYreq | change-this-in-production | JWT signing key. Replace the example value before deployment. |
FIELD_ENCRYPTION_KEY | empty | Fernet key for encrypting stored secrets and other sensitive fields. Local setup can generate one. |
ACCESS_TOKEN_EXPIRE_MINUTES | 30 | Access token lifetime. |
REFRESH_TOKEN_EXPIRE_DAYS | 7 | Refresh token lifetime. |
Ports and browser URLs
| Variable (local startup requirements marked) | Default | Description |
|---|---|---|
API_PORT | 8000 | Local FastAPI port. |
CONSOLE_PORT | 3000 | Local port for apps/console. |
SITE_PORT | 3001 | Local port for apps/site. |
WORKER_PORT | 5000 | Legacy Makefile value used in its printed worker health URL; the worker health server uses WORKER_HEALTH_PORT (default 8081). |
DASHBOARD_PORT | 8080 | Taskiq dashboard port. |
NEXT_PUBLIC_SITE_URL | http://localhost:3001 | Site URL used by the console; set for production builds. |
SITE_URL | http://localhost:3000 | Console URL used by local Supabase Auth redirect configuration. |
NEXT_PUBLIC_API_URL | http://localhost:8000 | Browser-facing API URL; set for production builds. |
Database and Supabase
| Variable (local startup requirements marked) | Default | Description |
|---|---|---|
DATABASE_URLreq | placeholder in .env.example | Primary superuser connection used by migrations and seed scripts. |
DATABASE_URL_APPreq | placeholder in .env.example | Runtime database connection for the API role. |
DATABASE_URL_WORKERreq | placeholder in .env.example | Runtime database connection for the worker role. |
DATABASE_POOL_SIZE | 20 | Async SQLAlchemy pool size. |
DATABASE_MAX_OVERFLOW | 10 | Allowed burst connections above the base pool size. |
SUPABASE_URLreq | placeholder in .env.example | Supabase project URL used by the configured auth provider. |
SUPABASE_ANON_KEYreq | placeholder in .env.example | Public Supabase key used by browser auth. |
SUPABASE_SERVICE_ROLE_KEYreq | placeholder in .env.example | Privileged key used by setup and seed scripts. Keep it server-side. |
Redis and worker control
| Variable (local startup requirements marked) | Default | Description |
|---|---|---|
REDIS_URL | redis://localhost:6379/0 | Primary Redis connection string. |
REDIS_MAX_CONNECTIONS | 10 | Redis client connection cap. |
REDIS_PASSWORD | empty | Production password injected into REDIS_URL at startup. |
TASKIQ_DASHBOARD_URL | http://localhost:8080 | Worker event dashboard endpoint. |
TASKIQ_DASHBOARD_TOKEN | empty | Dashboard auth token. |
EMBEDDING_MAX_CONCURRENCY | 2 | Caps concurrent embedding work per worker process. |
EMBEDDING_TIMEOUT_SECONDS | 30.0 | Timeout for one embedding batch. |
WORKER_MAX_ASYNC_TASKS | 8 | Taskiq worker concurrency ceiling. |
WORKER_MAX_PREFETCH | 8 | How many jobs a worker pulls ahead from Redis. |
LLM and retrieval
| Variable (local startup requirements marked) | Default | Description |
|---|---|---|
LLM_MODEL | anthropic/claude-3-haiku-20240307 | Model routing target shown in the checked-in .env.example. |
LLM_MAX_TOKENS | 1024 | Default completion token budget. |
OLLAMA_API_BASE | http://localhost:11434 | Base URL for local or internal Ollama inference. |
ANTHROPIC_API_KEY | empty | Required when routing to anthropic/* models. |
OPENAI_API_KEY | empty | Required when routing to openai/* models. |
GEMINI_API_KEY | empty | Required when routing to gemini/* models. |
GROQ_API_KEY | empty | Required when routing to groq/* models. |
EMBEDDING_MODEL | local/all-MiniLM-L6-v2 | provider/model for chunk and query vectors (local/... or voyage/...). |
RERANKER_MODEL | local/cross-encoder/ms-marco-MiniLM-L-6-v2 | provider/model for reranking. Empty disables reranking. |
EMBEDDING_API_KEY | empty | Required for hosted embedding or rerank providers (voyage/*). |
PARSER_MODEL | local/docling | Provider/name for document parsing: local/docling or llamaparse/<tier>. Managed parsing sends documents to the provider. |
PARSER_API_KEY | empty | Required for managed parsers (llamaparse/*). |
CHUNK_SIZE | 512 | Default chunk length for ingestion. |
CHUNK_OVERLAP | 50 | Token overlap between adjacent chunks. |
RETRIEVAL_TOP_K | 5 | How many retrieved chunks are fed into answer generation. |
EMBEDDING_DIMENSION | 384 | Output size of the embedding model. Startup fails if it does not match the stored vectors. |
MCP_TIMEOUT_SECONDS | 30 | Timeout for MCP tool execution. |
MCP_MAX_RETRIES | 3 | Retry cap for MCP tool execution. |
Feature flags and rate limits
| Variable (local startup requirements marked) | Default | Description |
|---|---|---|
ENABLE_RAG | true | Master switch for retrieval and answer generation features. |
ENABLE_MCP | true | Enables MCP capability plumbing. |
ENABLE_AUDIT_LOGGING | true | Turns on audit logging. |
REQUIRE_APPROVAL_FOR_WRITES | true | Forces HITL approval before write actions execute. |
RATE_LIMIT_ENABLED | true | Master switch for API rate limiting. |
RATE_LIMIT_AUTH_PER_MINUTE | 5 | Auth request cap per IP per minute. |
RATE_LIMIT_QUERY_PER_MINUTE | 60 | Query request cap per IP per minute. |
RATE_LIMIT_UPLOAD_PER_HOUR | 20 | Document upload cap per IP per hour. |
RATE_LIMIT_CONNECTOR_PER_HOUR | 10 | Connector sync cap per IP per hour. |
Model examples
Examples below are provider/model identifiers from .env.example. Set the matching provider key. Hosted model, embedding, and parser requests send data to those providers.
anthropic/claude-3-haiku-20240307Example configured in .env.exampleanthropic/claude-sonnet-4-6Anthropic model exampleopenai/gpt-4oOpenAI model examplegemini/gemini-2.0-flashGemini model examplegroq/llama-3.3-70b-versatileGroq model exampleollama/llama3.1Ollama example; requires a reachable service and pulled model