> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentruntime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow Studio

> Author, validate, version, and run workflow graphs in the AgentRuntime Console.

**Workflow Studio** is the visual editor for designing agent workflows. Open it from the Console sidebar at **Workflow Studio** (`/workflow`).

## The authoring loop

<Steps>
  <Step title="Create a workflow">
    Click **New workflow** and give it a name. The canvas opens with an empty graph.
  </Step>

  <Step title="Add steps">
    Drag step types onto the canvas and connect them with dependencies. Each step needs a unique `id`, a `type`, and type-specific configuration.
  </Step>

  <Step title="Wire dependencies">
    Steps run when their `depends_on` predecessors complete. Independent branches run in parallel automatically.
  </Step>

  <Step title="Validate">
    Click **Validate** to run a server-side dry-run. Validation checks graph structure, dependency cycles, Lua syntax, and MCP bindings — without executing tools. Chained `{{steps.*}}` templates are checked for wiring and syntax only; they do not require upstream step outputs. See [Dry-run semantics](/workflows/dry-run).
  </Step>

  <Step title="Import (optional)">
    Use **Import** to load a shared graph from JSON — canvas `{ "nodes", "edges" }` or backend `{ "steps": [] }`. The review step shows a read-only preview and, for MCP steps, lets you map each `server_url` to an instance in your workspace before applying to the canvas.
  </Step>

  <Step title="Edit as JSON (optional)">
    Switch the center panel to **JSON** mode to edit the backend graph with IntelliSense, **Apply to canvas**, and **Edit script** for Lua steps. See [JSON editor](/workflows/json-editor).
  </Step>

  <Step title="Publish">
    Publish an immutable version when the graph is ready. Runs always execute a published snapshot, not draft edits.
  </Step>

  <Step title="Run">
    Start a run from the workflow configuration panel (**Run setup**). Configure **shared input** (`trigger_payload`) and optional per-step overrides (`trigger_steps`), then **Run** or **Dry-run**. Use **Save defaults** to persist start values on the workflow version (separate from canvas Save).
  </Step>
</Steps>

## Template variables

Steps pass data downstream through template strings:

```
{{steps.fetch-leads.result.contacts}}
{{input.customer_email}}
```

Use these in `tool_args`, LLM `prompt` fields, `for_each_items`, and Lua `script` inputs. Upstream step results are available under `steps.<step-id>.result`.

Studio suggests variables as you type — see [Template intellisense](/workflows/template-intellisense) for search tips, the variable picker, and the **Variables** reference tab.

**Run-start input** uses `{{input.*}}` (from `trigger_payload` and optional `trigger_steps`). See [Run setup and start input](/workflows/run-setup).

## Versioning

Each publish creates a new immutable version. You can list versions, roll back runs to a specific version, and compare graphs. Draft edits do not affect in-flight runs.

## Live streaming

While a run is active, Workflow Studio subscribes to a WebSocket event stream (`/v1/workflows/{id}/stream`). You see step start, progress, completion, failure, and human-task pause events as they happen.

## Autopilot assistance

The Console **Chat** panel (Autopilot) can scaffold starter workflows, create graphs from natural language, and navigate you to Workflow Studio. Autopilot actions include `create_workflow`, `scaffold_starter`, and `run_workflow`.

## Archive workflows

From the workflow list, select a workflow and click **Archive** to remove it from your active Studio list. Archive is **soft** — the definition is retained for run history and audit, not permanently erased.

<Note>
  A dedicated **Archived** view and **Restore** action are planned but not available yet. True permanent delete will be a separate action from archive in a future release.
</Note>

## Next steps

* [JSON editor](/workflows/json-editor) — Canvas vs JSON mode, IntelliSense, script overlay
* [Template intellisense](/workflows/template-intellisense) — inline variable suggestions
* [Step types reference](/workflows/step-types) — MCP, LLM, human, Lua, and for-each
* [Run setup and start input](/workflows/run-setup) — trigger\_payload, saved defaults, API merge flag
* [Runs and Command Center](/workflows/runs-and-command-center) — run controls and observability
* [Human tasks](/workflows/human-tasks) — approval gates
* [JSON schema cookbook](/workflows/json-schema-cookbook) — copy-paste graph examples
