Wizard

Search documentation

Jump to any page or section

Enterprise Configuration Specification

Wizard derives its runtime behavior from environment variables, backend/.env, and local credential stores. This reference specifies all available configuration keys, data types, defaults, and architectural implications.


1. Configuration Resolution Precedence

Settings resolve with deterministic precedence (highest to lowest):

System Architecture & Flow
┌────────────────────────────────────────────────────────┐
│ 1. Process Environment Variables (export KEY=value)    │  (Highest)
├────────────────────────────────────────────────────────┤
│ 2. Environment File (`backend/.env`)                   │
├────────────────────────────────────────────────────────┤
│ 3. Local Secure Credential Store (`credentials.json`)  │
├────────────────────────────────────────────────────────┤
│ 4. Hardware Auto-Sizing Defaults                       │  (Base)
└────────────────────────────────────────────────────────┘

2. Tri-Model Architecture Configuration

VariableTypeDefaultDescription
API_PROVIDERstringollamaDefault inference provider: ollama, lmstudio, gemini, anthropic, openai, or custom_gateway.
DATA_MODEstringlocal-onlySession privacy mode: local-only (100% air-gapped), hybrid (redacted), or cloud-only.
MODEL_NAMEstring""Pins the Manager reasoning model (e.g. qwen3:8b, gemini-2.5-flash). Empty = auto-select.
WORKER_MODEL_NAMEstring""Pins the Worker coding model (e.g. qwen2.5-coder:7b).
EMBEDDING_PROVIDERstring""Pins vector embedding provider: ollama, lmstudio, openai, gemini, custom_gateway, none. Empty follows API_PROVIDER.
EMBEDDING_REMOTE_MODELstring""Pins remote embedding model id (e.g. nomic-embed-text, text-embedding-3-small). Empty = auto-discover.
EMBEDDINGS_REMOTE_ENABLEDbooltrueWhen true, attempts provider or local sentence-transformers before falling back to Blake2b.
EMBEDDINGS_FORCE_FALLBACKboolfalseWhen true, forces deterministic 384-dimensional Blake2b lexical hashing encoder.
RAG_ENABLEDboolfalseEnables semantic document retrieval across uploaded PDF/DOCX attachments.
VISION_MODEL_NAMEstring""Model used for visual chart inspection and aesthetic critique (e.g. llama3.2-vision).
TEMPERATUREfloat0.0Sampling temperature for analytical determinism.
MAX_TOKENSint4096Upper token generation limit per completion turn.
LLM_KEEP_ALIVEstring30mHow long local inference engines (Ollama) keep weights loaded in VRAM between manager/worker turns.
LLM_NUM_THREADint0 (auto)CPU inference threads. Auto-derived from physical core count to eliminate memory bus contention.
LLM_NUM_CTXint0 (auto)KV cache context window requested from Ollama (e.g. 8192 or 16384).
LLM_REQUEST_TIMEOUTint300HTTP client timeout in seconds for long-context inferences.

3. Cloud Provider & Gateway Authentication

VariableTypeDefaultDescription
GEMINI_API_KEYstring""Google Gemini API key. Enables Gemini 2.5 Flash / Pro and Google Embeddings.
ANTHROPIC_API_KEYstring""Anthropic Claude API key for Claude 3.5 Sonnet / Haiku.
OPENAI_API_KEYstring""OpenAI platform API key for GPT-4o and OpenAI text embeddings.
GATEWAY_API_URLstring""Base URL for custom OpenAI-compatible gateways (Groq, Together AI, OpenRouter, vLLM).
GATEWAY_API_KEYstring""Bearer authorization token for the custom gateway endpoint.
OLLAMA_BASE_URLstringhttp://127.0.0.1:11434Local Ollama daemon REST endpoint.
LMSTUDIO_BASE_URLstringhttp://127.0.0.1:1234/v1Local LM Studio OpenAI-compatible endpoint.

4. Sandboxing & Runtime Execution Controls

VariableTypeDefaultDescription
EXECUTION_BACKENDstringhostWhere Python code executes: host (subprocess), docker (container), or inprocess (CI only).
HOST_SANDBOXstringbest-effortOS kernel containment policy: off, best-effort, or require (refuses to start uncontained).
HOST_SANDBOX_NETWORKstringdenyOutbound network egress for generated code: deny or allow. Loopback always permitted.
SANDBOX_TIERstringstandardPre-installed data science image toolkit: core (pandas/duckdb), standard (+scikit-learn/scipy), full (+geopandas/lifelines).
SANDBOX_MEM_LIMITstring2gCgroup memory ceiling for sandbox containers.
SANDBOX_CPU_QUOTAint0CPU quota in microseconds (100000 = 1 core, 0 = unrestricted).
SANDBOX_PIDS_LIMITint256Maximum simultaneous child processes per sandbox.
SANDBOX_EXEC_TIMEOUTint180Wall-clock execution timeout in seconds before code is forcefully interrupted.

5. Agentic Loop, DAG & Grounding Parameters

VariableTypeDefaultDescription
AGENT_TIERstringautoReasoning budget depth: auto (derived from model size), compact (4 steps), balanced (12 steps), full (24 steps).
AGENT_MAX_ITERATIONSint24Hard ceiling for agent turn iterations to prevent runaway gateway billing.
AGENT_REQUIRE_APPROVALboolfalseWhen true, pauses execution after the planning stage for explicit user plan sign-off.
AGENT_PERMISSION_PROFILEstringask-alwaysPolicy for external actions: auto-approve, ask-always, or custom.
AGENT_VERIFYbooltrueWhen true, independently recomputes headline analytical figures via alternative routes.
AGENT_GROUNDING_CHECKbooltrueValidates narrative claims and Markdown table cells against execution DataFrames.
AGENT_TURN_TIMEOUTfloat300.0Total turn wall-clock deadline in seconds.

6. SRE, Observability, Scaling & Queues

VariableTypeDefaultDescription
REDIS_URLstringredis://localhost:6379/0Connection string for distributed job queue, trajectory caching, and pub/sub event bus.
QUEUE_BACKENDstringinprocessJob queue engine: inprocess or redis.
CACHE_BACKENDstringinprocessSemantic trajectory cache engine: inprocess or redis.
BACKUP_INTERVAL_HOURSint6Automated background SQLite online WAL checkpoint and snapshot backup interval.
BACKUP_KEEP_COUNTint5Maximum number of rotating database backups retained in backups/.
IDEMPOTENCY_TTL_SECONDSint300Time window for caching completed turn results by client request hash.
OTEL_EXPORTER_OTLP_ENDPOINTstring""Target OTLP gRPC/HTTP endpoint for OpenTelemetry distributed traces.
OTEL_SERVICE_NAMEstringwizardService identifier reported in distributed trace spans.
PLOT_FORMATstringhtmlChart output format: html (interactive Plotly DOM) or png (static matplotlib).
CORS_ALLOW_ORIGINSstringhttp://localhost:3000Comma-separated allowlist for browser cross-origin requests.
API_KEYstring""When set, all mutating control plane routes require the X-API-Key HTTP header.
SESSION_MAX_ACTIVEint8Maximum concurrent analytical sessions before queueing.
Reviewed for Wizard v1.0.15Edit this page on GitHub