Workflows
Compose multi-step execution flows with visual editing, reusable logic, and app-scoped execution.
Overview
Workflows let you compose multi-step execution flows that orchestrate agent behavior, data transformations, and connected-service actions. They go beyond single-event routines and are useful for handoffs, conditional branching, retries, and longer-running business processes.
Workflows are stored as versioned configs and can be referenced by agent routines and automations.
Building workflows
Portal editor
The developer portal provides a visual workflow builder:
- Navigate to Workflows under your app.
- Click New Workflow and enter a name.
- Add nodes to the canvas.
- Connect nodes to define execution order.
- Click Save to create a new version.
The editor includes:
- Run as User selector for scoped execution context
- Debug mode for inspecting workflow inputs and outputs
- Auto-versioning for safe iteration and rollback
Workflow execution
Workflows can be triggered three ways:
- Agent routines — attach a workflow to an agent event
- Automations — execute a workflow on a schedule or app event
- Direct API call — run a workflow immediately through the API
{
"config_id": "cfg_workflow_abc",
"input": {
"thread_id": "thr_xyz",
"action": "triage"
}
}
When triggered by a routine, the workflow receives the triggering event and its input payload.
Node types
Script nodes
Use script nodes for custom data transformation, business logic, or service integration steps.
Template nodes
Render templates for structured output such as emails, messages, or payloads.
Data nodes
Transform and reshape data between steps.
Scripts and expressions inside workflows
Workflows support both scripts and lightweight expressions:
- Scripts for custom logic and multi-step data handling
- Expressions for simple conditions and field access
From an external developer perspective, the important point is that workflows let you mix declarative flow design with custom logic where needed, while still operating inside your app's authorization boundaries.
API reference
The full external API surface is published at /openapi.json.
Typical workflow operations in the reviewed public docs surface include:
- running a workflow
- listing available workflow node types
- retrieving the published workflow script language metadata
Internal-only execution helpers and validation/debug endpoints are intentionally omitted from the public docs artifact.
When to use workflows vs routines
| Scenario | Use |
|---|---|
| Single event → single action | Routine |
| Multi-step orchestration | Workflow |
| Conditional branching | Workflow |
| Data transformation pipeline | Workflow |
| Scheduled batch processing | Automation → workflow |
| Human approval gate | Workflow |
Routines decide when work should run. Workflows define what should happen once execution begins.