ScalebrowserDOCS

Workflows

Record a stretch of ordinary agent work and replay it later: what a stored routine deliberately does not contain, and why two runs of the same routine never share a timeline.

An agent does the same thing on twenty profiles. Doing it by reasoning twenty times is slow and expensive; doing it by replaying a recorded macro is fast and is exactly how a fleet gets caught.

Workflows are the middle: the agent records itself doing the work once, and the replay finds everything again on the page as it is now, at a rhythm drawn fresh from each profile.

The three tools are in the opt-in workflows set.

The loop

record_workflow brackets the work. Start it, work normally, stop it.

ActionWhat it does
startBegin recording.
stopEnd it and keep the recording.
statusWhether one is running, and how many steps it has so far.
cancelThrow it away without keeping anything.

compile_workflow turns a stopped recording into a named, stored routine. This is where the agent marks which steps may run in any order and where a person would stop to read.

run_workflow replays it on a leased profile.

What a routine does not contain

Three things, and each absence is the feature.

No element references. Elements are described by role and accessible name, and found again on the page as it is at replay time. A stored reference would be dead the moment the page changed, which is most of the time.

No typed text. What was typed becomes a named input slot the caller fills. That is what makes one routine usable on twenty accounts, and it is also why a recording never carries somebody's password.

No timing. Not the pauses, not the typing cadence, not the gaps between steps. Every pause is drawn fresh from the profile at replay.

The agent's lease handle is out of the recording too, for the same reason it is out of the run trail.

What the agent marks at compile time

Two kinds of annotation, and both are about meaning rather than about time:

  • Which steps may run in any order. Filling three independent fields is not a sequence, and a replay that insists it is will break on a page that reorders them.
  • Where a person would stop to read. A confirmation screen is a place where a human pauses; the replay draws a longer pause there, from the profile.

Never how long anything takes. Those numbers come from the profile.

When to use one

A workflow pays for itself when the same procedure runs many times and the page is stable enough that role and name still find the elements.

It does not pay when the work differs per profile, when the page changes shape between visits, or when the sequence is short enough that the agent can just do it. Recording, compiling and maintaining a routine is real effort; three clicks are not.

Next