Record a reusable flow (scripted sequence of MCP tool calls) that can be replayed later with a single command. Use when the user asks to create, record, or…
Overview
A flow is a sequence of steps saved to a .yaml file in the .argent/flows/ directory. Each recorded step is executed live as you add it, so you verify it works before it becomes part of the flow. Replay a finished flow with flow-execute, or — for an e2e flow — headlessly with argent flow run <name>.
Flows store no device id: the runner binds a device (the single booted one, or pass device/platform). A recorded coordinate gesture-tap is captured as a portable tap: { selector } step whenever the tapped element has stable text/identifier.
Two flow types
e2e — begins with a launch: step, which starts that app from scratch (terminate + relaunch), so the flow controls its own start state. No executionPrerequisite. May run: other flows, and (on iOS/Android) may itself be a run: target — when nested, its launch runs inline, restarting the app for that sub-scenario. Chromium is the exception: the runner boots one Electron app per run (the top-level flow's), so a nested chromium e2e flow's launch can't boot its own instance and fails the run — keep chromium e2e flows top-level. Record one by adding a restart-app of the app under test as the first step — it is captured as the launch step.
fragment — doesn't begin with a launch; runs against the device's current state. May declare an executionPrerequisite (a documented entry-state contract). Invoked from other flows via a run: step, or directly by you at any time.
Both run via argent flow run <name> — a fragment simply runs against whatever is on screen (its prerequisite is printed as a reminder). Only e2e flows are meaningful CI/suite entries, since only they give a deterministic verdict from a clean start.
Step directives
Beyond raw tool: steps and echo:, flows support declarative directives interpreted by the runner (they are not agent-callable tools). Every directive hard-stops the flow on failure; later steps are reported skip.don't have the plugin yet? install it then click "run inline in claude" again.