Last Updated: 2025-11-24
Version: 2.1 (Unified API + Vision Intelligence)
Mimir uses split configuration with base URLs and paths. This provides maximum flexibility while keeping configuration explicit and simple. No URL parsing or manipulation - just straightforward concatenation.
- Explicit over Implicit: Base URL + paths (simple concatenation, no parsing)
- Separation of Concerns: LLM and embeddings configured independently
- Provider Agnostic: Works with Ollama, OpenAI, Copilot, or any OpenAI-compatible API
- Flexible Paths: Different providers can use different endpoint paths
Required: Yes
Type: String (Base URL)
Default: http://ollama:11434
Base URL of the LLM server (no paths).
# Ollama
MIMIR_LLM_API=http://ollama:11434
# Copilot API
MIMIR_LLM_API=http://copilot-api:4141
# External OpenAI-compatible
MIMIR_LLM_API=http://host.docker.internal:8080
# OpenAI
MIMIR_LLM_API=https://api.openai.comRequired: No
Type: String (Path)
Default: /v1/chat/completions
Path to the chat completions endpoint.
MIMIR_LLM_API_PATH=/v1/chat/completionsRequired: No
Type: String (Path)
Default: /v1/models
Path to the models list endpoint.
MIMIR_LLM_API_MODELS_PATH=/v1/modelsRequired: No (depends on provider)
Type: String
Default: dummy-key
API key for authentication.
# Local Ollama (no auth needed)
MIMIR_LLM_API_KEY=dummy-key
# OpenAI
MIMIR_LLM_API_KEY=sk-...
# Copilot
MIMIR_LLM_API_KEY=sk-copilot-...Required: Yes (if embeddings enabled)
Type: String (Base URL)
Default: http://ollama:11434
Base URL of the embeddings server (no paths).
# Ollama
MIMIR_EMBEDDINGS_API=http://ollama:11434
# Copilot API
MIMIR_EMBEDDINGS_API=http://copilot-api:4141
# OpenAI
MIMIR_EMBEDDINGS_API=https://api.openai.comRequired: No
Type: String (Path)
Default: /api/embeddings (for Ollama)
Path to the embeddings endpoint.
# Ollama native format (default)
MIMIR_EMBEDDINGS_API_PATH=/api/embeddings
# OpenAI-compatible format
MIMIR_EMBEDDINGS_API_PATH=/v1/embeddingsRequired: No
Type: String (Path)
Default: /api/tags (for Ollama)
Path to the models list endpoint for embeddings.
# Ollama native format
MIMIR_EMBEDDINGS_API_MODELS_PATH=/api/tags
# OpenAI-compatible format
MIMIR_EMBEDDINGS_API_MODELS_PATH=/v1/modelsRequired: No (depends on provider)
Type: String
Default: dummy-key
API key for embeddings authentication.
MIMIR_EMBEDDINGS_API_KEY=dummy-keyType: String
Default: copilot
Options: copilot | ollama | openai
Default provider for model discovery.
Type: String
Default: gpt-4.1
Default model name.
# Examples
MIMIR_DEFAULT_MODEL=gpt-4.1
MIMIR_DEFAULT_MODEL=qwen2.5-coder:14b
MIMIR_DEFAULT_MODEL=gpt-4-turboType: Number
Default: 128000
Maximum context window size in tokens.
Type: Boolean
Default: true
Type: String
Default: ollama
Options: ollama | openai | copilot | llama.cpp
Type: String
Default: Architecture-dependent
- ARM64:
mxbai-embed-large - AMD64:
text-embedding-3-small
Type: Number
Default: Architecture-dependent
- ARM64:
1024 - AMD64:
1536
Type: Number
Default: 512
Type: Number
Default: 50
Mimir supports Vision-Language (VL) models for indexing images by generating text descriptions, which are then embedded alongside text content. This enables semantic search across both text and images.
Architecture:
Image File → llama.cpp (qwen2.5-vl) → Text Description →
nomic-embed-text (embed description) → Neo4j (vector + description)
Type: Boolean
Default: false
Enable image indexing and embeddings.
MIMIR_EMBEDDINGS_IMAGES=true # Enable
MIMIR_EMBEDDINGS_IMAGES=false # Disable (default)Why disabled by default?
- Image processing is resource-intensive (2-8GB RAM for VL models)
- Prevents accidental indexing of personal/sensitive images
- Requires separate VL model server setup
Type: Boolean
Default: true
Use VL model to generate text descriptions (recommended).
MIMIR_EMBEDDINGS_IMAGES_DESCRIBE_MODE=true # VL description mode
MIMIR_EMBEDDINGS_IMAGES_DESCRIBE_MODE=false # Direct image embedding (not supported)Note: Direct image embedding is not supported. Always use true for VL description mode.
Type: String
Default: llama.cpp
Options: llama.cpp | ollama
VL model provider.
MIMIR_EMBEDDINGS_VL_PROVIDER=llama.cppType: String (Base URL)
Default: http://llama-vl-server:8080
Base URL of the VL server.
# Docker internal
MIMIR_EMBEDDINGS_VL_API=http://llama-vl-server:8080
# External VL server
MIMIR_EMBEDDINGS_VL_API=http://host.docker.internal:8081Type: String (Path)
Default: /v1/chat/completions
Path to VL chat completions endpoint (OpenAI-compatible).
Type: String
Default: dummy-key
API key for VL server (not required for local llama.cpp).
Type: String
Default: qwen2.5-vl
VL model name.
# Recommended models
MIMIR_EMBEDDINGS_VL_MODEL=qwen2.5-vl-2b # 2B parameters (~2GB RAM)
MIMIR_EMBEDDINGS_VL_MODEL=qwen2.5-vl-7b # 7B parameters (~6GB RAM) ⭐ Best balance
MIMIR_EMBEDDINGS_VL_MODEL=qwen2.5-vl # Generic nameType: Number
Default: 131072 (128K tokens)
Maximum context window for VL model.
MIMIR_EMBEDDINGS_VL_CONTEXT_SIZE=32768 # 32K tokens (2B model)
MIMIR_EMBEDDINGS_VL_CONTEXT_SIZE=131072 # 128K tokens (7B/72B models)Type: Number
Default: 2048
Maximum tokens to generate for image descriptions.
MIMIR_EMBEDDINGS_VL_MAX_TOKENS=512 # Brief descriptions
MIMIR_EMBEDDINGS_VL_MAX_TOKENS=2048 # Detailed descriptions (recommended)
MIMIR_EMBEDDINGS_VL_MAX_TOKENS=4096 # Very detailed descriptionsType: Number (0.0-1.0)
Default: 0.7
Sampling temperature for VL generation.
MIMIR_EMBEDDINGS_VL_TEMPERATURE=0.0 # Deterministic (factual)
MIMIR_EMBEDDINGS_VL_TEMPERATURE=0.7 # Balanced (recommended)
MIMIR_EMBEDDINGS_VL_TEMPERATURE=1.0 # Creative (more varied)Type: Number
Default: Falls back to MIMIR_EMBEDDINGS_DIMENSIONS
Embedding dimensions for VL descriptions (falls back to text embedding dimensions).
Type: Number
Default: 3211264 (~1792×1792 pixels, 3.2 MP)
Maximum pixel count for images before auto-resizing.
Qwen2.5-VL native limit: 3,211,264 pixels
MIMIR_IMAGE_MAX_PIXELS=3211264 # Qwen2.5-VL limit (recommended)
MIMIR_IMAGE_MAX_PIXELS=2073600 # Full HD limit (1920×1080)Supported Image Sizes:
- ✅ 1920×1080 (Full HD) = 2.07 MP → No resize needed
- ✅ 1792×1792 (Square) = 3.21 MP → No resize needed
⚠️ 2560×1440 (2K) = 3.69 MP → Auto-resized to fit⚠️ 3840×2160 (4K) = 8.29 MP → Auto-resized to fit
Type: Number (pixels)
Default: 1536
Target dimension for longest edge when resizing.
MIMIR_IMAGE_TARGET_SIZE=1024 # Conservative
MIMIR_IMAGE_TARGET_SIZE=1536 # Recommended (preserves detail)
MIMIR_IMAGE_TARGET_SIZE=2048 # Maximum detail (slower processing)Example resizing:
- Input: 3840×2160 (4K) → Output: 1536×864 (aspect ratio preserved)
- Input: 2560×1440 (2K) → Output: 1536×864
Type: Number (1-100)
Default: 90
JPEG quality after resizing (higher = better quality, larger file).
MIMIR_IMAGE_RESIZE_QUALITY=80 # Good quality
MIMIR_IMAGE_RESIZE_QUALITY=90 # Excellent quality (recommended)
MIMIR_IMAGE_RESIZE_QUALITY=95 # Maximum qualityDefault: bolt://neo4j_db:7687
Default: neo4j
Default: password
Default: 3000
Default: production
Default: /workspace
Container's internal workspace path. All file operations inside the container use this path.
Required: Yes (for file operations)
Type: String (absolute or tilde path)
Example: ~/src, /Users/john/code, or C:\Users\you\code
Host machine's workspace directory. This is automatically mounted to WORKSPACE_ROOT in the container.
Tilde Expansion Support:
- ✅ Automatic:
~/srcis expanded usingHOST_HOME(passed from host's$HOME) - ✅ Cross-Platform: Works on macOS, Linux, and Windows (WSL)
⚠️ Requires:HOST_HOMEmust be set (automatically injected by docker-compose)
Required: No (automatically set by docker-compose)
Type: String (absolute path)
Default: ${HOME} (from host environment)
Example: /Users/john, /home/user, C:\Users\you
Host machine's home directory for expanding tilde (~) in HOST_WORKSPACE_ROOT.
Purpose:
- Enables automatic tilde expansion in Docker containers
- Without this,
~/srccannot be resolved (container's home ≠ host's home)
Behavior:
- ✅ If set:
HOST_WORKSPACE_ROOT=~/src→ expands to/Users/john/src ⚠️ If missing: Warning logged with helpful solutions, path translation disabled
Docker Compose automatically sets this:
environment:
- HOST_HOME=${HOME} # Passes host's home to containerManual Override (if needed):
HOST_HOME=/Users/john docker compose upType: Boolean
Default: true
Auto-index documentation on startup.
Type: Boolean
Default: false
Enable Ecko orchestration mode.
Type: Boolean
Default: false
Enable PM model suggestions feature.
Type: Integer
Default: 100
Maximum number of steps (tool calls + responses) an agent can take before stopping.
Controls how many iterations the LangGraph agent can execute before hitting the recursion limit. Each step typically includes:
- Agent thinking/reasoning
- Tool call execution
- Tool response processing
When to adjust:
- Increase (150-200): For complex multi-step tasks requiring many tool calls
- Decrease (50-75): To save costs or prevent runaway agents
- Keep default (100): Suitable for most GPT-4.1 tasks
Error handling: If the limit is reached, the UI will display a user-friendly message:
"I'm sorry, but this task is too complex for me to complete in one go. Please try breaking it down into smaller, more focused subtasks."
Cost implications: Higher limits allow more tool calls but consume more tokens. Monitor your usage when increasing this value.
Example values:
# Conservative (cost-saving)
MIMIR_AGENT_RECURSION_LIMIT=50
# Default (recommended for GPT-4.1)
MIMIR_AGENT_RECURSION_LIMIT=100
# Complex tasks (research, multi-file refactoring)
MIMIR_AGENT_RECURSION_LIMIT=150
# Very complex tasks (full system analysis)
MIMIR_AGENT_RECURSION_LIMIT=200Note: This is separate from the circuit breaker limit (MAX_TOOL_CALLS), which is set by the PM agent based on task complexity estimates.
# LLM
MIMIR_LLM_API=http://ollama:11434
MIMIR_LLM_API_PATH=/v1/chat/completions
MIMIR_LLM_API_MODELS_PATH=/v1/models
MIMIR_LLM_API_KEY=dummy-key
# Embeddings
MIMIR_EMBEDDINGS_API=http://ollama:11434
MIMIR_EMBEDDINGS_API_PATH=/api/embeddings
MIMIR_EMBEDDINGS_API_MODELS_PATH=/api/tags
MIMIR_EMBEDDINGS_API_KEY=dummy-key
MIMIR_EMBEDDINGS_PROVIDER=ollama
MIMIR_EMBEDDINGS_MODEL=mxbai-embed-large
MIMIR_EMBEDDINGS_DIMENSIONS=1024
# Provider
MIMIR_DEFAULT_PROVIDER=ollama
MIMIR_DEFAULT_MODEL=qwen2.5-coder:14b# LLM
MIMIR_LLM_API=https://api.openai.com
MIMIR_LLM_API_PATH=/v1/chat/completions
MIMIR_LLM_API_MODELS_PATH=/v1/models
MIMIR_LLM_API_KEY=sk-...
# Embeddings
MIMIR_EMBEDDINGS_API=https://api.openai.com
MIMIR_EMBEDDINGS_API_PATH=/v1/embeddings
MIMIR_EMBEDDINGS_API_MODELS_PATH=/v1/models
MIMIR_EMBEDDINGS_API_KEY=sk-...
MIMIR_EMBEDDINGS_PROVIDER=openai
MIMIR_EMBEDDINGS_MODEL=text-embedding-3-small
MIMIR_EMBEDDINGS_DIMENSIONS=1536
# Provider
MIMIR_DEFAULT_PROVIDER=openai
MIMIR_DEFAULT_MODEL=gpt-4-turbo# LLM (Local Ollama)
MIMIR_LLM_API=http://ollama:11434
MIMIR_LLM_API_PATH=/v1/chat/completions
MIMIR_LLM_API_MODELS_PATH=/v1/models
MIMIR_LLM_API_KEY=dummy-key
# Embeddings (Cloud OpenAI)
MIMIR_EMBEDDINGS_API=https://api.openai.com
MIMIR_EMBEDDINGS_API_PATH=/v1/embeddings
MIMIR_EMBEDDINGS_API_MODELS_PATH=/v1/models
MIMIR_EMBEDDINGS_API_KEY=sk-...
MIMIR_EMBEDDINGS_PROVIDER=openai
MIMIR_EMBEDDINGS_MODEL=text-embedding-3-small
MIMIR_EMBEDDINGS_DIMENSIONS=1536
# Provider
MIMIR_DEFAULT_PROVIDER=ollama
MIMIR_DEFAULT_MODEL=qwen2.5-coder:14bPrerequisites:
- Uncomment
llama-vl-serverservice indocker-compose.yml - Choose model size: 2B (faster, 2GB RAM) or 7B (best quality, 6GB RAM)
# LLM
MIMIR_LLM_API=http://ollama:11434
MIMIR_LLM_API_PATH=/v1/chat/completions
MIMIR_LLM_API_KEY=dummy-key
# Text Embeddings
MIMIR_EMBEDDINGS_API=http://ollama:11434
MIMIR_EMBEDDINGS_API_PATH=/api/embeddings
MIMIR_EMBEDDINGS_PROVIDER=ollama
MIMIR_EMBEDDINGS_MODEL=mxbai-embed-large
MIMIR_EMBEDDINGS_DIMENSIONS=1024
# Image Embeddings (Enable)
MIMIR_EMBEDDINGS_IMAGES=true
MIMIR_EMBEDDINGS_IMAGES_DESCRIBE_MODE=true
# Vision-Language Model (Qwen2.5-VL 7B)
MIMIR_EMBEDDINGS_VL_PROVIDER=llama.cpp
MIMIR_EMBEDDINGS_VL_API=http://llama-vl-server:8080
MIMIR_EMBEDDINGS_VL_API_PATH=/v1/chat/completions
MIMIR_EMBEDDINGS_VL_API_KEY=dummy-key
MIMIR_EMBEDDINGS_VL_MODEL=qwen2.5-vl-7b
MIMIR_EMBEDDINGS_VL_CONTEXT_SIZE=131072 # 128K tokens
MIMIR_EMBEDDINGS_VL_MAX_TOKENS=2048 # Detailed descriptions
MIMIR_EMBEDDINGS_VL_TEMPERATURE=0.7 # Balanced
# Image Processing
MIMIR_IMAGE_MAX_PIXELS=3211264 # Qwen2.5-VL limit (3.2 MP)
MIMIR_IMAGE_TARGET_SIZE=1536 # Resize target (longest edge)
MIMIR_IMAGE_RESIZE_QUALITY=90 # JPEG quality
# Provider
MIMIR_DEFAULT_PROVIDER=ollama
MIMIR_DEFAULT_MODEL=qwen2.5-coder:14bFor 2B model (less RAM): Change to MIMIR_EMBEDDINGS_VL_MODEL=qwen2.5-vl-2b and MIMIR_EMBEDDINGS_VL_CONTEXT_SIZE=32768
See also: Qwen VL Setup Guide
- ❌
LLM_API_URL→ UseMIMIR_LLM_API - ❌
OLLAMA_BASE_URL→ UseMIMIR_LLM_APIorMIMIR_EMBEDDINGS_API - ❌
COPILOT_BASE_URL→ UseMIMIR_LLM_API - ❌
OPENAI_BASE_URL→ UseMIMIR_LLM_API - ❌
OPENAI_API_KEY→ UseMIMIR_LLM_API_KEYorMIMIR_EMBEDDINGS_API_KEY - ❌
FILE_WATCH_POLLING→ Removed (unused) - ❌
FILE_WATCH_INTERVAL→ Removed (unused)
# OLD (v1.x)
OLLAMA_BASE_URL=http://ollama:11434
COPILOT_BASE_URL=http://copilot-api:4141/v1
# NEW (v2.0) - For Ollama
MIMIR_LLM_API=http://ollama:11434
MIMIR_LLM_API_PATH=/v1/chat/completions
MIMIR_LLM_API_MODELS_PATH=/v1/models
MIMIR_LLM_API_KEY=dummy-key
MIMIR_EMBEDDINGS_API=http://ollama:11434
MIMIR_EMBEDDINGS_API_PATH=/api/embeddings
MIMIR_EMBEDDINGS_API_MODELS_PATH=/api/tags
MIMIR_EMBEDDINGS_API_KEY=dummy-keyProblem: 404 page not found when generating embeddings
Solution: Check that MIMIR_EMBEDDINGS_API_PATH is set correctly:
- Ollama native (default):
MIMIR_EMBEDDINGS_API_PATH=/api/embeddings - OpenAI-compatible:
MIMIR_EMBEDDINGS_API_PATH=/v1/embeddings
Problem: invalid input error from Ollama embeddings
Solution: You're using Ollama with OpenAI-compatible path. Switch to native:
MIMIR_EMBEDDINGS_API_PATH=/api/embeddings
MIMIR_EMBEDDINGS_API_MODELS_PATH=/api/tagsProblem: LLM returns "model not supported"
Solution:
- Verify model exists:
curl http://localhost:11434/v1/models - Update
MIMIR_DEFAULT_MODELto match available model
Problem: 401 Unauthorized
Solution: Set correct API key in MIMIR_LLM_API_KEY or MIMIR_EMBEDDINGS_API_KEY
- LLM Provider Guide
- Pipeline Configuration
- Docker Compose Examples
- Qwen VL Setup Guide - Vision-Language models
- Metadata Enriched Embeddings - Image indexing details