Skip to main content

Workflows

A workflow is a defined sequence of steps that DAEMI executes automatically. Each step calls a tool from the tool graph — including agent calls, file operations, web searches, or any plugin tool.

Workflows are how you turn recurring, multi-step tasks into one-click (or scheduled) automations.


When to Use a Workflow

Use a workflow when:

  • A task has more than two or three steps and you run it repeatedly
  • You want to chain outputs from one tool into inputs for another
  • You need scheduled, automated execution
  • You want to stream step-by-step results to the Console

Use direct agent chat when:

  • The task is exploratory or conversational
  • You don't yet know the full shape of what you need

What a Workflow Looks Like

Workflows are JSON documents stored in DAEMI. Here's a simple research → summary → email workflow:

{
"id": "weekly_research",
"name": "Weekly Research Digest",
"steps": [
{
"id": "search",
"tool": "web_search",
"params": {
"query": "AI safety latest developments",
"limit": 10
}
},
{
"id": "summarize",
"tool": "agent_call",
"params": {
"agent_id": "aria",
"prompt": "Summarize these search results into a 3-paragraph digest"
}
},
{
"id": "send",
"tool": "email_send",
"params": {
"to": "kevin@example.com",
"subject": "Research Digest",
"body": "See the attached summary"
}
}
]
}

Inputs

Workflows accept inputs when triggered:

{
"inputs": {
"topic": "AI safety",
"recipient": "kevin@example.com"
}
}

Execution Model

When a workflow runs:

  1. Steps execute in order
  2. Each step's output is stored and available to subsequent steps
  3. A run_id is returned immediately
  4. Results stream via SSE: GET /api/workflows/{id}/runs/{run_id}/stream

The non-blocking run model means workflows can run for minutes without blocking the Console.


Go Deeper