Configuration
Environment Variables
Add these to your.env file:
Configuration Priority
Laddr resolves Ollama configuration in this order (highest to lowest priority): For base URL:- Per-agent base URL:
LLM_BASE_URL_RESEARCHER=http://custom:11434 - Global Ollama URL:
OLLAMA_BASE_URL=http://localhost:11434 - Default:
http://localhost:11434
- Per-agent model:
LLM_MODEL_RESEARCHER=gemma2:2b - Global Ollama model:
OLLAMA_MODEL=llama3.2:latest - Global LLM model:
LLM_MODEL=gemma2:2b - Default:
gemma2:2b
Docker Setup
When running Laddr in Docker containers, special network configuration is needed so containers can reach Ollama running on the host machine.Problem: Container Network Isolation
By default,http://localhost:11434 inside a Docker container refers to the container itself, not the host machine where Ollama is running.
Error you might see:
Solution: Use host.docker.internal
Docker provides a special hostnamehost.docker.internal that resolves to the host’s IP address.
Docker Compose Configuration
Update yourdocker-compose.yml:
Key Configuration Points
1. Environment Variable- API server
- Worker containers
- Any agent services
Verification in Docker
Test Ollama connectivity from inside a container:Usage Examples
Example 1: Simple Agent with Ollama
Example 2: Custom Ollama Server
Example 3: Mixed Backends
Example 4: Environment-Based Configuration
Available Models
Popular Ollama models you can use:- gemma2:2b - Fast, lightweight (good for simple tasks)
- llama3.2:latest - Balanced performance and quality
- mistral:7b - Good for writing and analysis
- llama3.1:8b - Strong reasoning capabilities
- qwen2.5:7b - Multilingual support
Troubleshooting
Connection Errors
If you see connection errors:-
Verify Ollama is running:
-
Check Docker network:
-
Verify environment variables:
Model Not Found
If a model is not found:-
Pull the model:
-
List available models:
Performance Issues
If responses are slow:- Use smaller models for simple tasks
- Increase Ollama’s context window if needed
- Check system resources (CPU, RAM)
- Consider using GPU acceleration
Next Steps
- Agent Configuration - Configure agents
- Local Runtime - Local development
- Scaling & Operations - Production deployment