Skip to content

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

GoalUse
Send prompts or message lists directly to a model providerchat.completion
Let a model call DAG workflows as functionsTool Calling
Let a model decide which step runs next until stated goals are metAgent DAGs
Run an external coding-agent CLI inside a workflowharness.run
Let an external AI client inspect and operate DaguMCP Server

LLM Completions

Use action: chat.completion for provider API calls, multi-turn sessions, model fallback, reasoning, web search, and response routing.

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.

Dagu is open source under the GNU General Public License v3.0.