All pages
Lesson 4.3 · Automate · 14 min
Workflows and tab monitors
Runbooks, recorded browser actions, and rules that fire on terminal output.
After this lesson you can turn an agent session into a reusable runbook, replay a recorded browser sequence without the model, and set up rules that react when a terminal prints something you care about.
Time: 14 minutes · Works on: macOS app. The cloud workspace stores runbooks through the runbooks_* tools.
The Flows tab
Show the right sidebar with ⌘⇧\, open More ▾ and choose Flows. It
collects three kinds of saved automation:
- Runbooks: saved agent sessions you can run again.
- Browser actions: recorded browser steps that replay without the model.
- Tab-monitor rules: a trigger paired with an action.
The search field, Search runbooks, actions, rules, and the tag filters narrow the list. Every run records a one-line log entry with its outcome and how long it took, shown on the row.
Save a session as a runbook
A runbook is a saved sequence of steps for the agent.
- In the Agent tab, have a short session that does something you'll want again. For example: "Run the tests. If any fail, explain why in one paragraph each."
- Open Flows and click Save current session, or press
⌘⇧S. TRMNLY turns the session into a runbook. - Find it under Runbooks. The row shows its name and how many steps it has.
- Click its play button. A new agent session opens and runs the runbook's prompts.
You can also save from the agent's session menu with Save as Runbook…, or start from a ready-made loop with From Template, such as build, test and fix, or debugging.
The row's menu has Edit…, Reveal source session, Edit tags…, Export… and Delete….
What a runbook can do
Edit… opens a window with the runbook's name, notes, and its prompts, replayed in order. That covers most runbooks.
A runbook can also hold other kinds of steps. They come from From Template,
or from the agent when you ask it to build one with its save_runbook tool:
| Step | Does |
|---|---|
| Prompt | Sends a prompt to the agent |
| Browser action | Replays a saved browser sequence |
| Runbook | Runs another runbook |
| Shell command | Runs a command |
| Wait | Pauses for a number of seconds |
| Repeat | Runs the steps inside it a set number of times |
| Loop until | Repeats until the agent says a marker phrase or a file exists, up to a limit |
For example: "Save a runbook called Fix tests that runs npm test, then keeps
asking the agent to fix the failures until it says ALL GREEN, at most five times."
Ask for input when it runs
A prompt step can include placeholders:
{cwd},{project}and{date}are filled in from the active window and project.{?name:"Label":"default"}asks you for a value in a sheet before the runbook starts. Leave out the default with{?name:"Label"}.
For example, a release runbook could start with: Prepare release {?version:"Version number"} for {project}.
Replay a browser sequence
A browser action is a recorded series of steps in the built-in browser.
- Ask the agent: "Start recording a saved browser action called Login." Then have it log in to your local app, and ask it to stop recording.
- The action appears under Browser actions in Flows.
- Click its play button. The steps replay directly, with no model involved, so it's fast and costs nothing.
The row's menu also offers Ask agent to replay…, Convert to runbook and Export…. Convert one when you want a runbook to log in before it does anything else.
React to terminal output
A tab-monitor rule pairs a trigger with an action. TRMNLY starts you with two example rules, Build failed and Waiting for input.
Make one that tells you when tests fail:
- Under Tab-monitor rules, click Open editor….
- Click + to add a rule.
- Fill it in:
- Rule name: "Tests failed".
- Pattern:
failed. - Match: Contains. Choose Regex for a regular expression.
- The
aAbox: leave it off so the match ignores case. - Action: Notify.
- Project: Any project, or one project.
- Paste a few sample lines into Live preview. Matching lines are highlighted, so you can check the pattern before saving.
- Click Save.
- In a pane, run
echo "3 tests failed". A notification appears when the command finishes.
Line-match rules check a command's output when the command finishes. A command that never finishes, like a dev server, isn't checked until it exits. For those, ask the agent to watch the pane instead.
Triggers and actions
| Trigger | Fires |
|---|---|
| Line match (default) | A finished command printed a matching line |
| Cron interval | Every N seconds. The engine checks every 30 seconds. |
| File change | A watched file or folder changed |
| Tab idle | A tab has been quiet for N seconds |
| Git commit | A commit landed in the rule's project. Needs a project. |
| Action | Does |
|---|---|
| Notify | Posts a macOS notification with the matched line |
| Bell | Beeps and lights up the tab in the tab list |
| Send to agent sidebar | Sends the line to the agent, which answers in the sidebar |
| Mark tab for attention | Lights up the tab without a notification |
Each rule row in Flows has a switch to turn it on or off, and a menu with Edit in full editor…, Test fire, Edit tags…, Export… and Delete. Test fire runs the action right now, so you can check it without waiting for real output.
TRMNLY refuses regular expressions that could freeze the app, such as (a+)+,
and tells you what to write instead. A rule that's too slow while running is
switched off, with the reason shown.
Check yourself
- A runbook you saved from a session runs again from its play button.
- Your "Tests failed" rule fired on
echo "3 tests failed". - Test fire on a rule sends its action immediately.
- You can explain why a dev server's output doesn't trigger a line-match rule.
Go further
- Workflows — run logs, import and export, and URL links that start a runbook
- Tab Monitor — pattern examples and the limits that keep the app responsive
- Custom shortcuts — run a runbook from a key chord