Core Concepts

Workflow Automation

Deterministic execution of multi-step pipelines including LLM reasoning, HTTP calls, and file operations.

How Workflows Work

Workflows are defined as ordered collections of steps. Each step represents a discrete action, which can be an AI agent reasoning task, a system tool execution, or a control flow operation.

Step-by-Step Execution

Every step is executed in sequence with full input/output validation. If a step fails, the entire workflow lifecycle is managed according to defined error policies.

Structured Data Flow

Each step receives a shared execution context. Outputs from previous steps are automatically injected into later steps using template variables such as {{last}} or {{steps[n].output}}.

Execution Lifecycle

  1. A workflow is created and stored with its step definitions.
  2. When triggered (manual, scheduler, or webhook), a new task is generated.
  3. The task is picked up by the Step Runner and executed sequentially.
  4. Each step produces an output that is stored and passed forward.
  5. Execution logs are persisted for inspection and debugging.
  6. The workflow completes with a final status: completed or failed.

Supported Step Types

LLM Reasoning & Chat
HTTP Request (GET/POST/PUT)
Email Automation (SMTP/IMAP)
File System (Read/Write/Append)
Browser Automation (Playwright)
Delay & Control Steps

Example Definition

workflow.json
{
  "name": "Daily Research Workflow",
  "steps": [
    {
      "type": "browser",
      "action": "scrape",
      "url": "https://news.ycombinator.com"
    },
    {
      "type": "llm",
      "prompt": "Summarize the top 5 news items from: {{steps[0].output}}"
    },
    {
      "type": "email",
      "to": "admin@example.com",
      "subject": "Daily Tech Digest",
      "body": "{{steps[1].output}}"
    }
  ]
}

Failure Handling

If any step fails during execution, the workflow is immediately marked as failed. The runner records the error, preserves all previous outputs, and stops further execution to ensure deterministic behavior.

  • Failed steps are logged with stack traces
  • Previous step outputs remain accessible
  • No silent retries or hidden state changes

Data Flow & Templating

Workflow steps communicate through a shared execution context. Each step can reference previous outputs using template variables, enabling powerful data pipelines without writing custom glue code.