Local AI
Use Dagu with local model servers such as Ollama, vLLM, or LM Studio when they expose an OpenAI-compatible chat API.
This applies to both:
- the Web UI steward
- workflow steps that use
action: chat.completion
What Dagu Expects
For local models, Dagu expects an OpenAI-compatible /v1 base URL.
Typical value:
http://localhost:11434/v1Dagu then calls the normal chat-completions route under that base URL.
WARNING
Enter the base URL, not a full endpoint. Do not paste vendor-native endpoints such as /api/generate.
Correct And Incorrect Base URLs
| Value entered in Dagu | Result |
|---|---|
http://localhost:11434/v1 | Correct |
| empty | Correct for a local Ollama server on the same machine as the Dagu process |
http://localhost:11434/api/generate | Wrong |
http://localhost:11434/v1/chat/completions | Wrong |
Web UI AI agent Setup
- Start your local model server
- Make sure the model you want is already available there
- Open
/agent-settings - Add a model with:
- Provider:
Local - Model: your installed model tag
- Base URL: leave empty or set
http://localhost:11434/v1
- Provider:
- Set that model as the default if you want the built-in steward to use it
Typical Ollama Example
- Provider:
Local - Model:
llama3.2 - Base URL:
http://localhost:11434/v1
Workflow Example
steps:
- action: chat.completion
with:
provider: local
model: llama3.2
base_url: http://localhost:11434/v1
messages:
- role: user
content: "Summarize this repository in one paragraph."
output: RESULTDagu also accepts aliases such as ollama, vllm, and llama in workflow YAML, but they all follow the same local-model path.
Important Networking Note
localhost means the machine or container running Dagu, not the browser.
Examples:
- if Dagu runs directly on your laptop,
localhostusually means your laptop - if Dagu runs in Docker or Kubernetes,
localhostmeans that container or pod - if a remote node runs the step,
localhostmeans that remote node
Current Limits On This Path
The local-model path is intended for normal text chat use.
Plan around these limits:
- Dagu expects the OpenAI-compatible route, not vendor-native endpoints
- provider-specific knobs such as Ollama native
thinkoptions are not configured from this path - multimodal/image message content is not the target use case here
If you need vendor-specific behavior, put that behind a compatible proxy or use the vendor tool directly outside this path.
Troubleshooting
404 From Ollama
Most often the base URL is wrong. Use:
http://localhost:11434/v1Do not use:
http://localhost:11434/api/generatehttp://localhost:11434/v1/chat/completions
model not found
The model name in Dagu must exactly match the model tag available in your local server.
Works On My Laptop, Fails In Dagu
Check where Dagu is actually running. If Dagu runs in Docker, Kubernetes, or on a remote node, the local server must also be reachable from there.
