Chat & LLM
TIP
AI Overview compares Dagu's model-powered workflow and external-client surfaces. This page covers the completion-focused subset.
Dagu can call language models from workflows, let models invoke DAGs as tools, or run external agent CLIs. This section helps choose the right approach; exact chat.completion syntax lives in the LLM action reference.
Choose an Approach
| Goal | Use |
|---|---|
| Send prompts or message lists directly to a model provider | chat.completion |
| Let a model call DAG workflows as functions | Tool Calling |
| Let a model decide which step runs next until stated goals are met | Agent DAGs |
| Run an external coding-agent CLI inside a workflow | harness.run |
| Let an external AI client inspect and operate Dagu | MCP Server |
LLM Completions
Use action: chat.completion for provider API calls, multi-turn sessions, model fallback, reasoning, web search, and response routing.
- LLM Completion — quick start and complete field reference
- Providers & Endpoints — credentials, shared defaults, and compatible endpoints
- Local Models — Ollama, vLLM, and LM Studio
- Agent DAGs & Completions — the step-by-step path from one completion to LLM-directed workflows
- Reasoning & Web Search — provider reasoning and search capabilities
- Reliability — provider retries and model fallback
Agents and Tools
Tool calling turns selected DAGs into functions that a model can invoke during a completion. Use it when the model should choose and sequence workflow operations.
Agent DAGs go one step further: type: agent makes the model the scheduler, picking one declared step per turn until every stated goal is settled. The Agent DAG examples build the feature up capability by capability.
Use harness.run instead when the workflow should launch a supported external coding-agent CLI such as Claude Code, Codex, Gemini CLI, Cursor, or DeepSeek Harness. Use the MCP server for the inverse relationship: an external AI client connects to Dagu and operates workflows through Dagu's tools and resources.

