Workflow designer

Build an agent's workflow on a drag-and-drop canvas, draft it from a description, add stages with SLAs, and dry run it with every tool stubbed.

After reading this page you will be able to:
  • Build and change a workflow on the canvas without writing JSON
  • Hand a step to a person with a form, an SLA and an escalation
  • Draft a workflow from a plain description
  • Group steps into stages with entry and exit rules and a time goal
  • Dry run a workflow before it calls anything

A workflow is a versioned, deterministic process that an agent runs step by step. Each step is governed as the agent's own calls are: its tool allow-list, Cedar policies, guardrails, budget and approvals. The designer is where you build one. The drawing is the editor, so you do not need to write JSON.

Open the agent, then Settings › Workflows, and choose New workflow or Open.

Step types

StepWhat it does
agentSends a prompt to the agent's model
toolCalls a tool the agent has attached, with argument rows (=expr works a value out)
conditionChecks an expression and goes to its yes or no step
assignSets a variable
parallelRuns up to 8 branches, each of up to 10 steps
approvalFiles an approval and waits for a person's decision
humanAssigns a task with a form to a person, group or role, and waits for their answers
call_workflowRuns another workflow of the same agent as a child (at most 3 levels deep)
set_outputSets the workflow's result

agent, tool, parallel, approval, human and call_workflow steps can fail, so they take a fallback and a failure path. All of them except approval and human also take a retry and a timeout, because a person's step is decided once.

Schema-checked agent steps

Give an agent step an output_schema (a JSON schema) to get structured data back instead of free text. The prompt includes the schema, and the answer is parsed (a fenced ``` `json `` block is fine) and checked against it. If the answer does not match, the step sends it back for repair. It tells the model where the answer failed, by JSON path and keyword but never the failing value, and asks again, up to repair_attempts times (0 to 3, default 1). If it is still invalid, the step fails with invalid_output. Its fallback or failure path handles that, or a retry whose on lists invalid_output. Every repair and failure is audited as agent.workflow.output_invalid`.

{"id": "classify", "type": "agent", "prompt": "Classify: {{ input.text }}",
 "output_schema": {"type": "object", "required": ["category"],
                   "properties": {"category": {"enum": ["network", "hardware", "access"]}}},
 "repair_attempts": 2, "save_as": "triage"}

The schema is checked when you save. It must be a valid JSON schema of at most 20,000 characters, and every $ref must point inside it.

Human steps

A human step hands a piece of the work to a person. It is a task assigned to user:<name>, or to anyone in group:<name> or role:<name>, with a form to fill in. The run waits, sealed like any wait, until the form is submitted. The submitted values are then the step's output, so later steps read steps.<id>.output.values.<field> (or vars.<save_as>.values.<field>).

{"id": "grade", "type": "human", "assignee": "group:hr",
 "title": "Grade the new role for {{ input.team }}",
 "instructions": "Use the 2026 grading matrix.",
 "form": [{"name": "grade", "type": "choice", "choices": ["G5", "G6", "G7"], "required": true},
          {"name": "notes", "type": "textarea"}],
 "sla_s": 86400, "escalate_to": "role:hr-lead", "on_error": "fallback_grade", "save_as": "graded"}
  • Form fields have a name, an optional label, required and a type: text, textarea, number, boolean, choice (with choices) or date. Up to 20 fields. Submitted values are checked against the step in the run's own workflow version, so editing a stored task cannot change what is accepted.
  • Where it shows: the assignee sees it in the Inbox under Workflow tasks, and on Home under Needs attention. Only the person it is assigned to now can submit it. Anyone else is refused, and the refusal is audited. A task completes once, however many people press Submit.
  • SLA and escalation: sla_s (60 seconds to 30 days) sets how long the assignee has. When it passes, a task with escalate_to is reassigned once with a fresh SLA (on_timeout: escalate, the default when escalate_to is set). Past that, or with on_timeout: fail, the step fails as timeout, and its fallback or failure path takes over. The check runs every minute.
  • Audit: agent.workflow.human.assigned, .escalated, .completed (the field names and a sha256 of the values, never the values themselves, and whether it was late), .refused and .expired.
  • Dry run: nobody is assigned anything. The form comes back empty unless you stub the step.

Canceling a waiting run closes its task.

Per-step egress

Give an agent or tool step an egress list to say which hosts its calls may reach. Each entry is a host name and also allows its subdomains, so corp.example allows api.corp.example. [] allows no destinations at all. A call's destinations are every URL host and email domain in its arguments, plus the server's own host: a remote MCP server's URL, or a managed connector's API base.

A tool step that would reach a host not on the list is refused before anything is sent. In an agent step, each call the agent makes is checked, and a call to a host not on the list is refused and the model is told why. Every refusal is audited as agent.workflow.egress_denied. A step without egress is unrestricted, as before.

Build on the canvas

  • Add a step. Drag a palette card onto a gap on the canvas. A line shows where it lands. A palette card is also a button: press it to add the step after the selected one.
  • Move a step. Drag it to another place, or focus it and press Alt+Up or Alt+Down.
  • Connect steps. Each step has ports: its next step, a condition's yes and no, and a failure path. Drag a port onto the step it should go to, or onto End. From the keyboard, press Enter on a port and then on a step. Escape cancels.
  • Edit a step. Select it to open its fields: the prompt, the server and tool (listed from the agent's own tools), arguments, the check a condition makes, what an approver reads, a parallel step's branches, and the fallback or failure path. Then go to chooses where it goes next.
  • Rename or delete. A rename updates every reference to the step. Deleting a step (Delete key) sends whatever led to it on to where it went.
  • Undo and redo. Undo and Redo, or Ctrl/Cmd+Z, Shift+Ctrl/Cmd+Z and Ctrl+Y, cover every edit.

Pointer events drive the canvas, so mouse, pen and touch all work. The JSON view shows the same document if you prefer to read or paste it.

Every edit is checked by the server's validator (POST /api/agents/{key}/workflows/validate), and each problem is marked on the step it names.

Autosave

Autosave is on by default; the toggle is on the toolbar. Once the workflow has a name, each change that passes the validator is saved as a new version after a short pause. The status line reads "Autosaved as version N", or says why it was not saved. Turn it off to save by hand with Save.

Draft from a description

Choose Draft from a description, describe the process, and choose Draft the steps (POST /api/agents/{key}/workflows/draft, up to 4,000 characters). The draft is validated and loaded into the designer with every problem listed. It is never saved until you save it.

  • With the agent's model (TICKETIQ_WORKFLOW_DRAFT_WITH_MODEL, default true): the agent's own model writes the draft in one governed call, so its budget, guardrails and transcript apply. Conditions and arguments are included. Each draft is a paid model call.
  • As an outline: when the setting is off, or the agent's model cannot answer (no model bound, budget spent), the text is outlined instead and model_fallback says why. Lines or sentences become steps. "If ..." becomes a condition, "otherwise ..." its other branch, "approve" or "sign off" an approval step, a tool or workflow named by name a tool or child step, and "return ..." the result. An outline never writes the expression a condition checks: that is marked for you to fill in.

Stages and case types

A workflow can group its top-level steps into stages, up to 20. A workflow with stages is a case type: a claim, an onboarding or a change request that moves through Intake, Review, Fulfilment and so on. Open Stages: make this a case type and choose Add a stage.

FieldMeaning
Stage name, LabelThe stage's id and the name people see
Steps in this stageTop-level steps; each step is in one stage at most. A step in no stage keeps the run in the stage it is in
May start whenEntry expression, checked when the run first reaches the stage from outside it
Is done whenExit expression, checked when the run leaves the stage or finishes
Time goal (minutes)The stage's SLA
Counted in the working hours ofAn SLA policy whose calendar (business hours, holidays, time zone) the goal is counted in. Leave it empty to count every hour

A criterion that does not hold fails the case, named, while it is still in its stage. To route around a stage instead, use a condition step. Time spent waiting in a stage, for example on an approval, counts toward its goal.

The policy list reads GET /api/sla/policies (tickets.read); without that permission the field is free text. Create a policy under IT service desk › Setup › SLA policies. Only its calendar is used, not its priority targets.

Runs show the stage each case is in, and each stage's start, end, deadline and breach. A stage past its deadline reads as late before it ends. Entering and leaving a stage is audited as agent.workflow.stage.

Note

Stage breaches are computed, not alerted. Nothing notifies anyone when a stage goes late, and there is no case list across workflows, case owner or stage-level pause.

Dry run

Choose Dry run (POST /api/agents/{key}/workflows/dry-run) to walk the workflow before it does anything. Expressions are evaluated for real. Every tool call, agent reply, approval and child run is stubbed:

StepIn a dry run
toolShows the server, tool and resolved arguments; returns the stub's result, or echoes the request
agentShows the resolved prompt; returns the stub's reply, or a placeholder
approvalShows what the approver would read; approved unless the stub says otherwise
call_workflowDry runs the child's latest saved version in turn, unless a stub gives its result

A stub is {"output": value} or {"error": type, "message": text} for one step id (up to 200 stubs). An error stub fails the step, so you can walk retries, fallbacks and failure paths as easily as the happy path. The designer shows each step's input, result and next step, and outlines the path on the drawing.

Nothing is called, filed or stored, and no run is written.

Warning

A dry run does not apply governance. A tool the agent would be refused at run time is still stubbed. The validator catches tools that are not attached; Cedar, guardrails and data policies are only met in a real run or in the playground.

Step budgets and limits

LimitValue
Steps in a definition, branch steps included100
Steps one run may execute200 (a loop that never ends fails the run with workflow_error)
Steps one dry run may walk, children included1,000
Retry attempts per step10
Step timeout600 s
Child workflow depth3
Stages20

Routes and permissions

TaskEndpointPermission
List workflowsGET /api/agents/{key}/workflowsagents.get
Validate, draft, dry runPOST .../workflows/validate, /draft, /dry-runagents.update
Save a new versionPUT /api/agents/{key}/workflows/{name}agents.update
Read a versionGET /api/agents/{key}/workflows/{name}?version=agents.get
Delete every versionDELETE /api/agents/{key}/workflows/{name}agents.update
RunPOST /api/agents/{key}/workflows/{name}/runsagents.run
Run historyGET /api/agents/{key}/workflow-runsagents.read
An agent's human tasksGET /api/agents/{key}/workflow-tasks?status=agents.read
My human tasksGET /api/workflow-tasks?status=opensigned in (lists only the caller's)
Submit a task's formPOST /api/workflow-tasks/{id}/complete with {"values": {...}}signed in, and the current assignee

Each route also checks Cedar on the agent: update for designing, invoke for running, read for history.

Workflows are also code. An agent's bundle carries a workflows section, and liya workflows list | get | validate | dry-run | draft | run | runs drives them from the CLI. See GitOps.

What the designer does not do yet

  • Free layout and zoom: the drawing is the step order as one column.
  • Changing a step's type in place (delete it and add another), or editing per-step model and tool overrides outside the JSON view.
  • Saving a dry run's input and stubs as a reusable test.