flow_run
Execute a recorded JSON browser-session script deterministically, filling placeholders and asserting expected outcomes, while reusing live sessions.
Instructions
Run a flow — a recorded, editable JSON browser-session script — deterministically, with zero model tokens. Steps are {op, args, expect?, save?}: ops cover navigate/click/click_xy/input/scroll/eval/wait/screenshot/state/cookies; {{var}} placeholders in args are filled from vars; expect asserts (url_contains | selector | text_contains | eval_truthy) abort with evidence on failure; save collects a step's output into the receipt. Source the flow inline via "flow", or by "name" from the server's workflow//flow.json (unknown name → error lists installed workflows). Pass session_id to reuse a live session (e.g. from import_curl) so login state and flows compose. The receipt carries status ok/failed, saved outputs, the session_id (kept alive), and on failure the failing step, reason and a diagnostic screenshot — fix the flow or take the session over from there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | No | Inline flow document: {create?, vars?, steps:[{op, args, expect?, save?}]} | |
| name | No | Or run a server-side workflow/<name>/flow.json asset. An unknown name errors back with the list of installed workflows — that error is the discovery call. | |
| vars | No | Values for {{placeholders}} in step args; wins over the flow's own vars defaults. | |
| max_steps | No | Override the run's step-execution budget (branch loops re-run steps, so every revisit counts). Default 1000, clamped 1..=100000. A flow document may also declare its own max_steps; this wins. | |
| session_id | No | Reuse a live session (e.g. from import_curl) instead of creating a fresh one — that's how login state and flows compose. |