# Flows and the flow editor

A flow is a saved sequence of steps for a phone. Write it, record it from a chat, edit it in the app, export it as a file, and run it by hand or on a schedule.

A flow is a saved list of steps that Silan runs on a phone the same way every time. Steps can be exact (tap this, type that), agent steps (a goal in words), checks, waits and notes. You can write a flow from scratch, keep a finished chat as one, or edit one the app already has. A flow lives as a `.silan.yaml` file and shows up under **Flows** with its runs beneath it.

## What it does

**New flow** offers three ways in: write the steps yourself, keep a finished task from a chat, or record on a phone, which the current release marks as later. A flow made from a chat keeps a **Made from a chat** link back to it.

The editor shows the name, the steps with line numbers and problems per line. Problems appear about 300 ms after you stop typing and name the line. Command S saves. If the id you chose is taken, Silan adds `-2`. Closing with changes asks before it discards them. If the file changed on disk while you edited, Silan offers **Load the saved file** or **Save mine anyway**, and tells you when the file was deleted.

**Change steps** edits in place without the file view. Each step has a chip for its kind and you can add a step before any line.

| Step kind | What it does |
| --- | --- |
| Exact | A fixed action: tap, type, swipe, press, launch, open a link. |
| Agent | A goal in words. The agent works it out on the day. |
| Check | Something that must be true on the screen. |
| Wait | Wait for an element or a time. |
| Note | Words for the reader, no action. |

The flow menu has **Show the file**, **Export as a file**, **Duplicate** and **Delete flow**. Export writes `<id>.silan.yaml`. Deleting a flow keeps its runs and stops its schedule.

A flow saved from a chat keeps the agent as a fallback. When an exact step no longer matches the screen, the agent takes that step over, finishes it, and the run report marks the step as healed. See [test runs](/features/test-runs/).

## Step by step

1. Open **Flows** and click **New flow**. Pick **Write the steps**.
2. Give it a name. Type the steps. Watch the problem lines and fix them.
3. Press Command S. The flow appears in the list.
4. Click **Run** and pick a phone for each role. Watch the run under the flow.
5. To change a step later, open the flow and click **Change steps**, or **Show the file** for the raw text.

The spec has a `silan run <flow>.silan.yaml` command and the MCP tools `validate_scenario` and `run_scenario` ([validate-scenario](/reference/mcp/validate-scenario/), [scenarios REST group](/reference/rest/scenarios/)). On the current release the engine answers them with `the scenario engine is not available in this engine` (seen 4 Nov 2026), and `silan mcp` does not list the flow tools. Run flows from the app for now.

## Limits

- Recording a flow by doing it on the phone is marked later in the current release.
- **Save as a flow** and replay work with one phone. A chat that used several devices saves the steps for one.
- **Change steps** in the app, Command S from the app and screen-reader use of the editor were proved by unit tests and offscreen pictures. Not yet proved on a real device.
- A flow's runs are capped at the newest 200 unless a run is kept. See [test runs](/features/test-runs/).

## Proof

:::note[Proof]
Proved on an iPhone 11 (iOS 27) on a cable, 15 Oct 2026, by a Silan worker: a flow written in the editor ran as `run_17v4jfrg0yd` and passed 3 of 3 steps, the conflict card showed for a deleted flow, runs `20261015-045213-86795` and `20261015-061605-36722`. The editor, Save, id clash and Discard with no phone, 14 Oct 2026, run `20261014-195837-10250`. Export as a file, run `20261014-205949-26538`. Duplicate and Delete flow, run `20261014-121649-56841`. A chat kept as a flow and run, 14 Oct 2026: `run_ppgf8jnbq0`, 3 of 3 steps in 29 s. Source: verify-silan feature map, flow-editor and app-lists.
:::

<figure class="shot"><img src="/media/flow-editor.webp" alt="The flow editor: the steps file on the left, the kinds of step and Run once on the right, and the check line under the editor." width="1440" height="900" loading="lazy" /><figcaption>The flow editor: the steps file on the left, the kinds of step and Run once on the right, and the check line under the editor.</figcaption></figure>
<figure class="shot"><img src="/media/flow-new.webp" alt="New flow: record it on a device, write the steps, or keep a finished task." width="1440" height="900" loading="lazy" /><figcaption>New flow: record it on a device, write the steps, or keep a finished task.</figcaption></figure>

<figure class="shot"><img src="/media/flow-page.webp" alt="A flow page: Run, Schedule and Change steps, the step list with its kinds, then the runs and the devices." width="1440" height="900" loading="lazy" /><figcaption>A flow page: Run, Schedule and Change steps, the step list with its kinds, then the runs and the devices.</figcaption></figure>