Reference
Workflow reference
Triggers, step kinds, templates and conditions — the complete definition language.
A workflow is a YAML document with a trigger, optional inputs, an optional budget, an optional on_failure, an optional egress, and a list of steps.
Steps run one after another in dependency order. A step runs only when every step it depends on succeeded,
and only when its optional if condition is met; otherwise it is skipped, and so are the steps that depend on it.
trigger:
kind: manual
inputs:
repo: { type: string, required: true, description: "owner/name" }
number: { type: integer, required: true }
steps:
- key: pr
kind: tool
tool: github.get_pull_request
args: { repo: "{{ inputs.repo }}", number: "{{ inputs.number }}", include_diff: true }
- key: review
kind: llm
system: You are a meticulous senior reviewer.
prompt: |
Review this pull request and list concrete risks.
{{ steps.pr.output }}
schema:
type: object
properties:
risk: { type: string, enum: [low, medium, high] }
summary: { type: string }
required: [risk, summary]
- key: comment
kind: tool
if: steps.review.output.data.risk in ["medium", "high"]
tool: github.create_comment
args:
repo: "{{ inputs.repo }}"
number: "{{ inputs.number }}"
body: "**Risk: {{ steps.review.output.data.risk }}**\n\n{{ steps.review.output.data.summary }}"
Triggers
| kind | keys | payload available as trigger |
|---|---|---|
manual |
— | { inputs }. Fired from the UI, MCP run_workflow, or another client. |
schedule |
cron (5-field cron, required), timezone (IANA, e.g. America/Toronto) |
{ scheduled_at, inputs } (inputs use their defaults) |
webhook |
— | { body, query, headers }. POST JSON to the workflow's webhook URL. |
form |
title, description, submit_label, message (shown after submitting), all optional text |
{ inputs, submitted_at }. A public page at the workflow's form URL asks for the workflow's inputs; anyone with the link can submit it while the workflow is enabled. |
github |
connection (required), events (e.g. [pull_request, issue_comment]), actions (e.g. [opened, synchronize]), repos ([owner/name]) |
The GitHub webhook payload plus event (the X-GitHub-Event header). |
linear |
connection (required), events ([Issue, Comment, Project, ...]), actions ([create, update, remove]), teams ([team keys]), states ([state names]; on update, only when the state changed), include_self (default false) |
Linear's webhook body: type, action, data (the issue or comment, e.g. data.identifier, data.state.name, data.team.key), updatedFrom, url, actor. |
slack |
connection (required), events (default [app_mention]; also message, reaction_added), channels ([channel IDs]), include_bots (default false) |
The Slack event object (type, user, text, channel, ts, thread_ts, ...) plus team_id. |
any other connection kind with trigger events (stripe, shopify, zendesk, gitlab, pagerduty, ...) |
connection (required), events (names from the connection's trigger_events), plus the connection's other trigger_keys from list_connections, each a list of values matched case-insensitively (e.g. projects: [acme/api]) |
The provider's webhook JSON body plus event, the event name as listed in trigger_events. |
Inputs
inputs maps a name to { type, description, required, default }. Types: string, number, integer, boolean, object, array.
Inputs are shown as a form when a person runs the workflow (and on the public page of a form trigger) and are available to templates as inputs.<name>.
Four more keys shape the form field, and a run whose values don't fit them is refused:
label— the field's label (default: the name, humanized);placeholder— hint text inside the field.options— a list of strings or numbers for a string, number or integer input; the field becomes a dropdown and the value must be one of them.format— for a string input:multiline(a text area),email,url(http or https) ordate(YYYY-MM-DD).
Form fields never get templates; a blank optional field takes its default. A form-triggered workflow should treat every input as untrusted text written by a stranger: don't put it in a shell command or let it choose a connection, and say in an llm or agent prompt that it is data from a form, not instructions.
trigger:
kind: form
title: Request a demo
description: Tell us a little about your team and we'll be in touch.
message: Thanks! We'll reply within a day.
inputs:
email: { type: string, format: email, required: true, label: Work email }
team_size: { type: string, options: ["1-10", "11-50", "51+"], required: true }
notes: { type: string, format: multiline, placeholder: What are you hoping to automate? }
On failure
on_failure: disable turns the workflow's trigger off when a run fails, whichever step failed and whether or not a budget stopped it. Nothing fires again until someone enables it, and the workflow page says which run and step turned it off. The default, continue, leaves the trigger on. Use disable for scheduled or event-driven workflows whose failures would repeat on every trigger, such as an expired sign-in or a changed API. Manual runs still work while it is off.
trigger: { kind: schedule, cron: "0 7 * * *" }
on_failure: disable
steps: ...
Egress
egress picks where every request the workflow's tools make leaves from, so the sites and APIs it reaches see that address instead of Murmurator's. That covers builtin.*, connection tools (databases included) and the pages web.*, browser.* and screenshot.* load. Calls to AI models and push notifications are not affected: they always go direct, so a workflow with an egress can still use them.
direct(the default) uses Murmurator's own address.- The slug of a
mullvadconnection goes out through Mullvad's VPN, from the country the connection names, for a site that should not see where requests come from. - The slug of a
tailscaleconnection with an exit node goes out from that device, such as a computer at the person's home, for sites that block data-centre and VPN addresses alike. It works only while the device is online.
Use anything but direct only when the person asks for it, and look the slug up with list_connections: there is no fixed vpn or home, only the account's own connections, though people often name them that. A request the egress can't carry fails; it never goes out directly instead. Nothing private is reachable through an egress — not the person's home network, nor the tailnet's devices — so for those use a tailnet (below). A workflow with an egress can't use workspace tools or an email server connection (SMTP, IMAP), and validation says so.
egress: vpn
trigger: { kind: schedule, cron: "0 * * * *" }
steps: ...
Tailnets
A tailscale connection puts Murmurator on the account's own tailnet, to reach services that live there — on a device's Tailscale address or MagicDNS name (http://nas:8080, 100.64.0.2), or on a home network behind a subnet router (192.168.1.20) — without them being open to the internet. Only what the tailnet's access rules let that machine reach is reachable, and nothing outside the tailnet is: a request through it never falls back to the internet, whatever the workflow's egress. (A tailscale connection with an exit node can also be a workflow's egress, above; that is separate, and reaches only the internet.)
<tailscale slug>.deviceslists the tailnet's devices (name,dns_name,ips,os,online,routes); passonline: truefor only those online. Use it to find a device's name before reaching it.<tailscale slug>.getsends a GET to aurlon the tailnet, withparamsandheaders. It holds no credentials, so it suits status pages and open APIs.- For a service that needs a key, the person makes an
http,postgresormysqlconnection with the tailscale connection's slug in itstailnetsetting; that connection's own tools then reach it through the tailnet. Connections to commonly self-hosted services (home_assistant,gotify,mattermost,matrix,umami,wordpress) take the same setting. Checklist_connectionsfor atailnetsetting before assuming a connection reaches the internet. web.open,web.extract,browser.openandscreenshot.capturetaketailnet, a tailscale connection's slug, to load pages on the tailnet. A session opened with it stays on the tailnet, so its pages can't load anything from the internet.
steps:
- key: status
kind: tool
tool: home.get
args: { url: "http://homeassistant:8123/api/" }
Budgets
An optional top-level budget caps what one run may use, and what all of the workflow's runs may use in a calendar month (UTC).
llm, agent and for_each steps can also have their own budget; a for_each budget covers every item it runs.
budget:
tokens: 200000 # input (cached prompt tokens included) + output tokens across the run
cost_usd: 2.50 # Murmurator AI spend across the run
iterations: 40 # agent turns across every agent step in the run
duration: 15m # wall-clock time since the run started: 90s, 15m, 2h (up to 24h)
monthly_tokens: 5000000 # tokens across all of this workflow's runs this month
monthly_cost_usd: 50 # Murmurator AI spend across all of this workflow's runs this month
steps:
- key: triage
kind: agent
budget: { tokens: 50000, cost_usd: 0.50, duration: 5m }
- Every key is optional. A step
budgetacceptstokens,cost_usdandduration; cap a single agent's turns withmax_iterations. - Budgets are checked before every model request, every agent tool call and every
for_eachitem. The request that crosses a limit finishes; the next one is refused and the step fails. - A step over its own budget fails, and the steps that depend on it are skipped. A run over its run or monthly budget stops: the step in progress fails and every remaining step is skipped.
cost_usdandmonthly_cost_usdonly count Murmurator AI models. Steps on the account's own models are limited by the token budgets only; validate_definition warns about this.
Steps
Every step has key (lowercase, underscores, unique), kind, and optionally name (display label), depends_on (list of keys), if (condition) and, on llm, agent and for_each steps, budget (see Budgets).
Dependencies are also inferred from {{ steps.<key>... }} references and the steps an if reads, so depends_on is only needed for ordering without data flow.
tool — call one tool
tool:<connection slug>.<tool name>, e.g.slack.post_message, or one of the built-ins below. Use list_connections to see what exists and each tool's arguments, and list_connections withconnectionfor one connection's full argument schemas. Anmcpconnection's tools are the remote server's own and keep their names, dots included:universalis.universe.listis theuniverse.listtool of theuniversalisconnection. Anmcpconnection can have atoken_toolsetting: calling that tool saves the token in its answer as the connection's credential, for every workflow on the account, and the step's output shows[saved on the <slug> connection]in its place. Never pass a token throughbuiltin.rememberor a template; to run sign-up only once,builtin.remembera flag such assigned_up: trueafter the token tool's step and skip the sign-up steps withifwhenbuiltin.recallfinds it.args: mapping of arguments; values may be templates.- Output: whatever the tool returns (usually an object).
llm — one model call
prompt(required),system,model(an account model name; omit for the account default),temperature,max_tokens.schema: a JSON Schema withtype: object. When present, the model must answer with matching JSON.- Output:
{ text, data }wheredatais the parsed JSON whenschemais set.
agent — a model that can call tools in a loop
- Everything
llmaccepts, plustools(list of<connection>.<tool>orbuiltin.<tool>names, or<connection>.*for all of one connection's tools) andmax_iterations(default 10, max 50). - Output:
{ text, data, tool_calls }. - Prefer
toolandllmsteps when the sequence of calls is known in advance; useagentwhen the model must decide. - Don't use an agent to work through a list of pages one by one: it re-reads everything it has seen on every turn and runs out of iterations and tokens. Use
for_each(below).
javascript — run code in a sandbox
code(required): JavaScript that definesfunction main(inputs) { ... }and returns a plain object.inputs: mapping passed tomain; values may be templates (whole-value templates keep their type, so"{{ steps.pr.output }}"passes an object).outputs: optional mapping of name → type (string, number, integer, boolean, object, array, any). The returned object must contain these keys with these types or the step fails.timeout_ms: default 2000, max 10000. Memory is capped at 64 MB.- The sandbox is pure V8: no network, filesystem,
require, timers or async/await.console.logoutput appears in the step's logs. - Output: the object returned by
main.
- key: tally
kind: javascript
inputs: { rows: "{{ steps.orders.output.rows }}" }
outputs: { total: number, count: integer }
code: |
function main({ rows }) {
const total = rows.reduce((sum, r) => sum + Number(r.amount), 0);
console.log(`summed ${rows.length} rows`);
return { total, count: rows.length };
}
for_each — run one step for every item of a list
over(required): a single template that resolves to a list, e.g."{{ steps.feed.output.links }}".step(required): the step to run per item, atool,llmorjavascriptstep written withoutkey,name,depends_onorbudget(those go on thefor_eachstep). It may have its ownif. Notagent, andfor_eachcan't be nested.- Inside
step, templates andifalso seeitem(the current element) andindex(from 0):"{{ item.href }}",if: index < 5 && item.text.contains("Rails"). limit: how many items to take from the start of the list, 1 to 50. A for_each runs at most 50 items; a longer list is cut to its first 50 and the step's log says so.continue_on_error(default false): when false, the first failed item fails the step and the rest don't run. When true, a failed item is recorded inerrorsand the loop carries on; the step still fails if every item failed.- Items run one at a time, in order. Each is saved as it finishes, so a run that resumes after a restart never runs a finished item again. The step's log shows each item as it starts.
- Output:
{ items, errors, count, succeeded, failed, skipped }.items[i]is the inner step's output for itemi, ornullwhen it failed or itsifskipped it;errorsis[{ index, error }]. - Hand the results to one
llmstep ("{{ steps.posts.output.items }}") rather than summarizing inside the loop when a single overview is the goal.
- key: feed
kind: tool
tool: web.extract
args: { url: "https://news.example.com/", markdown: false, selectors: { stories: "h2.title a" } }
- key: stories
kind: for_each
over: "{{ steps.feed.output.matches.stories }}"
limit: 10
continue_on_error: true
step:
kind: tool
if: has(item.href)
tool: web.extract
args: { url: "{{ item.href }}", links: false }
- key: digest
kind: llm
prompt: |
Summarize each story in two sentences, with its link.
{{ steps.stories.output.items }}
Built-in tools
Every account has these without setting up a connection. Use them in tool steps and in an agent's tools list, or builtin.* for all of them.
| tool | arguments | output |
|---|---|---|
builtin.fetch_url |
url (required), params |
Parsed JSON, or the page as plain text with the markup removed. GET only, and it sends no credentials, so use a connection's tools for anything needing a key or a sign-in — an http connection covers any HTTP API with a key. |
builtin.extract |
url or html, selectors (name → CSS selector), links (boolean), limit (per selector, default 50) |
{ title, matches: { name: [{ text, href, src }] }, links: [{ text, href }] }, with links made absolute |
builtin.parse_feed |
url or content (RSS, Atom or JSON Feed), since (ISO 8601), limit (default 20) |
{ title, link, items: [{ id, title, link, published, summary }] } |
builtin.json_query |
query (required, JMESPath), data or url with params |
Only what the query selects |
builtin.check_url |
url (required), method (GET or HEAD), contains |
{ ok, status, final_url, latency_ms, redirects, headers, contains }. An error or an unreachable address gives ok: false and error, not a step failure. |
builtin.run_javascript |
code (required, defines function main(inputs)), inputs |
{ output, logs }, where output is what main returned. The same sandbox as a javascript step. |
builtin.now |
timezone (IANA name, default UTC) |
{ iso8601, date, weekday, formatted, timezone } |
builtin.date_math |
date (ISO 8601 or Unix time, default now), timezone, start_of (day, week starting Monday, month, year), add ({ years, months, weeks, days, hours, minutes, seconds }, negative to go back), compare_to |
Applied in that order. The result as now returns it, plus difference: { seconds, hours, days } from it to compare_to |
builtin.wait |
seconds (required, at most 300), reason |
{ waited_seconds, now } |
builtin.remember |
key (required), value (required, any JSON up to 100 KB) |
{ key, bytes, updated_at } |
builtin.recall |
key (omit to list keys) |
{ key, found, value, updated_at }, or { keys } |
builtin.forget |
key (required) |
{ key, forgotten } |
Prefer a javascript step to an agent calling builtin.run_javascript when you already know the transformation. Give an agent extract or json_query with a url rather than fetch_url when it needs only part of a large page or response, so that less of it reaches the model.
remember, recall and forget keep values per workflow across runs: up to 200 keys, the last write winning. Use them so a scheduled workflow only acts on what is new, for example by recalling last_checked_at, passing it as parse_feed's since, then remembering {{ run.started_at }}. They work only inside a run, so you cannot call them while authoring.
Workspace tools
Also there for every account, and also needing no connection, but only inside a run: workspace.* provisions a folder for the run, isolated in a Docker sandbox, and deletes it — with everything in it — as soon as the run finishes. Use them for work on a repository or on files: clone, change, run the tests, commit, push.
| tool | arguments | output |
|---|---|---|
workspace.create |
name (default main), repo (owner/name or an https URL), branch, connection (a github connection's slug, needed for a private repository and for pushing), depth (default 1, 0 for full history), agent (opencode, codex or claude, default opencode) |
{ workspace, agent, repo, branch, head } |
workspace.read_file |
workspace, path (required), max_bytes, start_line, line_count (default 200) |
The file as text, truncated; with start_line or line_count, { path, content, start_line, end_line, total_lines } |
workspace.write_file |
workspace, path (required), content (required) |
{ path, bytes } |
workspace.list_files |
workspace, path, depth (default 2) |
A list of { path, kind, bytes }, ignoring .git |
workspace.find_files |
workspace, pattern (file-name glob, e.g. *_test.rb), path, limit (default 200) |
{ files, truncated }, paths from the workspace root, skipping ignored files |
workspace.search |
workspace, pattern (required, extended regex), path, glob (e.g. *.rb), ignore_case, fixed (plain text), limit (default 100) |
{ matches: [{ path, line, text }], truncated }, skipping .git, binary and ignored files |
workspace.query_file |
workspace, path (required, JSON or YAML), query (required, JMESPath) |
Only what the query selects |
workspace.detect_project |
workspace, path |
{ path, stacks: [{ language, manifest, manager, test, lint, build }], make_targets, ci }. The commands are guesses from manifest files. |
workspace.exec |
workspace, command (required), timeout |
{ exit_code, output }. A failing command comes back as a non-zero exit_code, not a step failure. |
workspace.agent |
workspace, prompt (required), model, continue, timeout |
{ text, session_id, files_changed, exit_code } |
workspace.diff |
workspace, path, stat, base (e.g. origin/main) |
The uncommitted changes as a patch, new files included; with base, everything since the branch left it |
workspace.log |
workspace, ref, path, since (a date or "2 weeks ago"), limit (default 20, max 100) |
[{ sha, author, date, subject }], newest first |
workspace.show |
workspace, ref (default HEAD), path, stat |
The commit's message and patch, or with path the file's contents at ref |
workspace.blame |
workspace, path (required), start_line (required), end_line (at most 100 lines) |
[{ line, text, sha, author, date, summary }] |
workspace.commit |
workspace, message (required), paths |
{ sha, branch, files } |
workspace.push |
workspace, branch, connection |
{ branch, repo } |
workspace.destroy |
workspace |
{ destroyed } |
- To find your way around a repository, use
search,find_files,read_filewithstart_lineanddetect_projectrather thanexecwith grep or cat. They return structured results and change nothing.log,blameanddiffwithbaseneeddepth: 0onworkspace.create, because a shallow clone has one commit and one branch. workspace.agentruns the workspace's coding agent over the folder: it reads and edits files itself and runs commands in the sandbox. Give it work you would describe to a developer ("make the failing test in test/orders_test.rb pass"), and useexec,diffandread_fileafterwards to check what it did. It takes any of the account's models, a self-hosted Ollama one included. A Murmurator AI model works with the opencode agent (the default), metered as the step's spend and counted againstcost_usdbudgets; codex and claude refuse one.- Every
workspace.agentcall is recorded as an agent session — the prompt, each command and file edit, failures and tokens — which outlives the run's sandbox.list_agent_sessionsandget_agent_sessionread them, and they are the evidence for improving an agent's prompt. - The agent is chosen on
workspace.create:opencode(the default) works with every provider an account can add;codexspeaks only the OpenAI responses API, so it takes an OpenAI or Ollama model;claudeis Claude Code, which speaks only the Anthropic Messages API, so it takes an Anthropic or Ollama model. - Paths are relative to the workspace root, and nothing outside it can be read or written.
- Cloning and pushing use a github connection's token and obey that connection's allowed repositories.
- A run gets at most four workspaces. Steps in the same run share them by name, so
createonce and useworkspace: mainafterwards.
- key: fix
kind: tool
tool: workspace.create
args: { repo: acme/api, branch: main, connection: github, agent: opencode }
- key: work
kind: tool
tool: workspace.agent
args:
prompt: "The test in test/orders_test.rb fails. Find out why and fix it without changing the test."
- key: verify
kind: tool
tool: workspace.exec
args: { command: "bin/rails test test/orders_test.rb" }
Artifact tools
Also there for every account with no connection: artifact.* keeps markdown documents that belong to the account and outlive the run that wrote them — a weekly report, a running log, a brief. Each has a slug (lowercase letters, numbers and dashes) and every change is saved as a new version, which people can read, with its history, on the Artifacts page. Use them for anything a person or a later run should read after this run is over; use builtin.remember for small values only the workflow itself needs.
| tool | arguments | output |
|---|---|---|
artifact.create |
title (required), slug (default made from the title, so a new one each run), body |
{ slug, title, version, bytes, url, updated_at }. Fails if the slug is taken. |
artifact.write |
slug (required), body (required, the full markdown), title |
The same. Creates the artifact if the slug is new, otherwise replaces its body. |
artifact.read |
slug (required), section (a heading), version |
The same plus headings: [{ level, text }] and body, only that section's when section is given |
artifact.append |
slug (required), content (required), section, title |
The same as write. Adds to the end of the artifact, or of section. Creates the artifact if the slug is new. |
artifact.edit_section |
slug (required), section (required), content (required) |
The same. Replaces what is under the heading, up to the next heading of the same or a higher level. |
artifact.list |
query (text in the title or slug), limit (default 50) |
{ artifacts: [...] }, most recently changed first |
artifact.import |
slug (required), path (required), workspace, title |
The same as write, with the workspace file's text as the new body. Only inside a run. |
- A
sectionis matched by its heading text, ignoring case and the leading#s. One that does not exist is added at the end, as##unless you write the#s yourself ("### Notes"). - Prefer
appendandedit_sectionto reading a long artifact and writing it all back. An item appended under a list or a table joins it rather than starting a new paragraph. - A step repeating the same call with nothing changed in between is treated as a retry, and returns the version it already saved.
- To give a step an artifact's text, use a template such as
{{ artifacts.ops-weekly.body }}instead of anartifact.readstep (see Templates).
- key: log
kind: tool
tool: artifact.append
args:
slug: deploy-log
section: "{{ trigger.repository.name }}"
content: "- {{ trigger.head_commit.id }} by {{ trigger.pusher.name }}"
Charts
A fenced block whose language is chart is drawn as a chart on the Artifacts page; the block itself is YAML. Give either data or table:
| key | meaning |
|---|---|
type |
line (default), bar or area |
title |
Caption above the chart |
data |
Rows, each [x, value, value, ...]. Needs series. |
series |
The names of the values after x. With table, the columns to draw (default every column of numbers but x). |
table |
A heading: the chart draws the first markdown table under it |
x |
Label for the x axis; with table, the column to use as x (default the first) |
y |
Label for the y axis |
- x values that are all dates (
2026-10-05, or ISO times) make a time axis, numbers a numeric one, and anything else one category per row, kept in order. Dates are drawn as written, in UTC. - Values may be written
1,234,$5or12%; an empty cell,-ornullis a gap. Anything else that isn't a number is an error. - A chart that charts a growing table is the way to keep a running chart: write the block and the table's header once, then
appendone row a run under the table's heading. Don't rewrite the block to add data. - A save with a chart that can't be drawn fails with the reason, so fix the block and save again. A
tablewhose heading or table doesn't exist yet is allowed.
```chart
type: line
title: Signups per week
table: Signups
```
## Signups
| Week | Signups | Churned |
|---|---|---|
| 2026-10-05 | 42 | 3 |
Screenshot tools
Also there for every account with no connection: screenshot.* loads web pages in a headless browser and keeps a PNG of each in the account's Screenshots gallery, where people can see them after the run. Pages load signed out, from the public internet: addresses on a private network are refused, and so is every request a page makes to one, including a redirect. Pass tailnet to capture pages on a tailnet instead (see Tailnets).
| tool | arguments | output |
|---|---|---|
screenshot.capture |
urls (list of pages), or hosts (variant name → base URL) with paths (each starting with /); devices (desktop (default), laptop, tablet, mobile, android, or a size such as 1024x768), full_page, wait_until (load, domcontentloaded, networkidle), delay_ms (up to 10000), timeout_ms (up to 90000), title, tailnet (a tailscale connection's slug, for pages on that tailnet) |
{ slug, title, url, captured, failed, created_at, captures: [...], text }. Each capture has page, variant, device, url, final_url, status, error, http_status, refused_hosts, link and image_url. |
screenshot.read |
slug (required) |
The same |
screenshot.list |
query (text in the title or slug), limit (default 50) |
{ screenshots: [...] }, newest first |
hostscaptures every path on every host, and the gallery shows them side by side in the order written, so{ before: ..., after: ... }reads left to right. Each call makes a new set, with a slug made fromtitle.- One call takes at most 12 captures, counted as pages × hosts × devices.
- A page that fails to load is recorded with its error and the rest carry on; the call fails only when every capture failed. A page answering 404 or 500 is still captured, with its
http_status. textis a markdown table linking to each capture in the gallery, ready forgithub.create_commentorslack.post_message. The gallery and image links need a signed-in member of the account, so post the links rather than embedding the images.
- key: shots
kind: tool
tool: screenshot.capture
args:
title: "PR {{ trigger.pull_request.number }}"
hosts: { before: "https://example.com", after: "https://pr-{{ trigger.pull_request.number }}.preview.example.com" }
paths: [ /, /pricing ]
devices: [ desktop, mobile ]
Web tools
Also there for every account with no connection: web.* reads web pages as Markdown and acts on them by number — following links, filling in and submitting forms, finding something behind a search. Reach for web.* first whenever an agent has to read or use a site. A page comes back as the Markdown you would write by hand, with navigation, cookie banners and hidden elements dropped, so it costs a fraction of the tokens of a browser.* snapshot. Pages run their JavaScript, Hotwire and single-page apps included, and load signed out (unless given a profile), from the public internet, through the same gateway as screenshots.
Every session call answers with { session, url, title, status, markdown, links, page, pages, notes }. links lists the links in this part of the page as [{ n, text, href }], with href absolute, so a for_each can loop over "{{ steps.<key>.output.links }}" without a model reading them. In markdown, links read [about us][3] (their URLs are only in links, never repeated in the Markdown) and form fields [input: Email][f2], [checkbox: Remember me][f5], [select: Country = Canada (12 options)][f6] or [button: Sign in][f7], showing their current values. The next call names a link or field by its number. Numbers only hold for the latest answer. A page longer than 40,000 characters comes in parts: pages says how many, and page: 2 on any call answers with the second.
| tool | arguments | output |
|---|---|---|
web.open |
url (required), profile (slug of a browser_profile connection, to start signed in), tailnet (a tailscale connection's slug, for pages on that tailnet), javascript (default true), user_agent (the User-Agent header and navigator.userAgent for the whole session; by default it names itself as mdbrowse, which a few sites turn away) |
The page, with the new session id |
web.extract |
url (required), selectors (name → CSS selector, at most 20), links (default true), markdown (default true), limit (most links, and most matches per selector), profile, tailnet, javascript, user_agent, wait_for (a CSS selector), wait_timeout (seconds, default 120, at most 300) |
{ url, title, status, markdown, truncated, links: [{ n, text, href }], matches: { name: [{ text, href, src }] }, shown, notes }. One call, no session to close. links is left out when links: false, and the Markdown then keeps its [n]: url list instead, matches when there are no selectors, and a match's href or src when it has none (an element without its own takes the first link or image inside it). An invalid selector fails the call. |
web.follow |
link (required, the link's number) |
The page it leads to |
web.fill |
values (required, field numbers to values: text, true/false for checkboxes and radios, an option's number or label for a select), submit (a button's number to press afterwards) |
The page |
web.submit |
field (required, a button, or any field of the form to submit) |
The page |
web.navigate |
url, or go (back, forward, reload) |
The page |
web.scroll |
— | The page after it loads more, for a feed that loads as you reach its end; notes say whether anything more came. Not for reading further in a long answer: use page |
web.read |
— | The page as it is now, with anything it changed by itself |
web.close |
— | { session, status, url, title, profile, notes, ... } |
web.list |
query (text in the title or url), limit (default 50) |
{ sessions: [...] }, newest first |
web.extractis for reading, not using, a page: a feed or listing to take links or items from, or each page afor_eachvisits. It runs the page's JavaScript, whichbuiltin.extractdoes not. Turnmarkdownoff when the links or selectors are all you need, so less reaches the next step.- Some pages load as empty placeholders and fill in their results a minute or more later — a flight search, a dashboard. Pass
wait_for, a selector for one of the results (Kayak's.nrc6-price-section), and the page runs until a visible element matches orwait_timeoutpasses;shownsays whether it did, and without it the page is read as it was. Searches like these take 45–90 seconds each, so loop over them with afor_eachrather than handing them to an agent. - Every tool but
open,extractandlisttakessession, and every one butextract,closeandlisttakespage. Inside a runsessiondefaults to the run's latest open session, so an agent seldom needs it. Over MCP it is required. - A session keeps its cookies between calls, so a form's result, a search or a sign-up flow carries on across pages. Confirmations the page asks for are accepted and reported in
notes. - An account can have 3 sessions open at once, and a session is closed after ten idle minutes or 30 minutes in all. Close it when done.
- To read a site as an account the person owns, pass
profiletoweb.openorweb.extract: abrowser_profileconnection holding a sign-in they saved themselves, held to the hosts it lists. Its cookies and headers go only to those hosts. Closing aweb.opensession saves the cookies the site refreshed back to the profile (notessays so);web.extractreads with the sign-in as it is and saves nothing back. When the site's sign-in came from a particular browser, pass that browser'suser_agenttoo, so the session doesn't look like a different one. web.*can't take screenshots, record video or traces, or upload files; usebrowser.*for those. A page that needs real layout (a canvas, a map, infinite scroll) reads poorly inweb.*too. For a page that only needs reading once, with nothing to click, useweb.extract, orbuiltin.fetch_urlorbuiltin.extractwhen the page needs no JavaScript.
- key: find_price
kind: agent
model: balanced
tools: [ web.* ]
prompt: |
Open https://example.com, search for "{{ inputs.product }}" and report the first result's price.
Close the session when you are done.
Browser tools
Also there for every account with no connection: browser.* opens a headless Chromium that an agent drives one action at a time, for what web.* can't do — screenshots along the way, a video or a Playwright trace of the session, a page that needs real layout. Give an agent tools: [ browser.* ] and describe the task; it reads each page and acts on what it sees. Pages load signed out, from the public internet, through the same gateway as screenshots.
Every action answers with { session, url, title, http_status, tabs, snapshot, truncated, refused_hosts, notes }. snapshot is the page as an accessibility tree in which each element carries a ref, such as - button "Sign in" [ref=e6]; the next action names it with ref: e6. Refs only hold for the snapshot they came from. notes reports dialogs that were accepted and tabs that opened.
| tool | arguments | output |
|---|---|---|
browser.open |
url, device (desktop (default), laptop, tablet, mobile, android, or a size such as 1024x768), record_video, trace, wait_until, profile (slug of a browser_profile connection, to start signed in), tailnet (a tailscale connection's slug, for pages on that tailnet), headers (object, sent only to the url's host; needs url) |
The page, with the new session id |
browser.navigate |
url, or go (back, forward, reload); wait_until |
The page |
browser.click |
ref (or selector), double, button |
The page |
browser.fill |
ref, text (required), submit (press Enter after) |
The page |
browser.select |
ref, values (required, list of values or labels) |
The page |
browser.check |
ref, checked (default true) |
The page |
browser.press |
key (required, e.g. Enter, Escape, Control+A), ref (default the page) |
The page |
browser.scroll |
screens (default 1, negative scrolls up), or ref to scroll to |
The page |
browser.wait |
text, text_gone, ref, or ms (up to 10000) |
The page |
browser.snapshot |
— | The page |
browser.tab |
index (from 0), or close: true for the current tab |
The page |
browser.screenshot |
full_page |
{ session, url, title, width, height, link, image_url, gallery }, kept in the Screenshots gallery in one set per session |
browser.export_trace |
— | { session, trace: { file, viewer }, notes }, the trace since the last export |
browser.close |
— | { session, status, url, title, page, videos: [...], traces: [{ file, viewer }], screenshots, ... } |
browser.read |
session (required) |
The same as close |
browser.list |
query (text in the title or url), limit (default 50) |
{ sessions: [...] }, newest first |
- Every tool but
open,readandlisttakessession. Inside a run it defaults to the run's latest open session, so an agent seldom needs it. Over MCP it is required. Element tools also takeselector(a Playwright selector such astext=Sign in) for an element without a ref, andtimeout_ms(default 15000, at most 60000). record_videokeeps a video of each tab;tracekeeps a Playwright trace of every action, with the DOM and network at each step, viewable in the browser atviewer. Both are collected when the session closes — bybrowser.close, when the run finishes, or after ten idle minutes — and outlive the run. The links need a signed-in member of the account.- An account can have 2 sessions open at once, and a session is closed after 30 minutes. Close it when done.
- A trace records whatever the pages showed, including what was typed, so don't record one on a page you fill with a secret.
- To work in an account the person owns, pass
profile: abrowser_profileconnection holding a sign-in they saved themselves, held to the hosts it lists. The session starts signed in, and its refreshed cookies are saved back to the profile on close. A session with a profile can't record a trace. Never put secrets inheaders, which sit in the definition; a profile can carry them. - An action that fails or times out says why; take a
snapshotand try again with a fresh ref rather than repeating it blindly.
- key: signup
kind: agent
model: balanced
tools: [ browser.* ]
prompt: |
Open https://example.com/signup with record_video and trace. Sign up as test+{{ run.number }}@example.com,
then report whether the welcome page appeared. Close the session when you are done.
Templates
{{ path }} inserts a value from the run context:
-
trigger.*— the trigger payload -
inputs.*— resolved inputs -
steps.<key>.output.*,steps.<key>.status,steps.<key>.error -
run.number,run.trigger_kind,run.started_at,workflow.name,workflow.slug -
artifacts.<slug>.body,.title,.version,.url,.updated_at— an artifact as it is when the step starts. Only artifacts a step names are loaded, a missing one resolves to nothing (soif: '!("<slug>" in artifacts)'checks for it), and a step reading one that an earlier step writes needs that step independs_on. -
item,index— inside afor_eachstep'ssteponly: the current element of the list and its position from 0.
Array elements are addressed by index: steps.search.output.0.title.
When a string is exactly one template, the value keeps its type (object, number, ...). Inside a longer string, objects and arrays are inserted as JSON.
There are no filters or expressions: use a javascript step to reshape data.
Conditions (if)
if is a CEL expression that must return true or false. It sees the same context as templates, without the braces: trigger, inputs, steps, run, workflow and artifacts, plus item and index on a for_each step's inner step.
- Compare with
==,!=,<,<=,>,>=; combine with&&,||,!andcond ? a : b. x in ["a", "b"]tests membership;"key" in maptests whether a map has a key (use it for artifact slugs and keys with dashes).- Strings:
.startsWith(),.endsWith(),.contains(),.matches(regex),.lowerAscii(). - Lists:
size(list),list.exists(x, <test>),list.all(x, <test>),list.filter(x, <test>),list.map(x, <expr>), andlist[0]for an index (not.0as in templates). has(a.b)is true when fieldbis present. Reading a field that is absent is an error, and fails the step rather than skipping it, so guard anything that may be missing:has(steps.review.output.data) && steps.review.output.data.risk == "high".has()takes a field, nevermap["key"].- Numbers compare across integer and decimal (
count > 0works whethercountis 3 or 3.0), but a string is never equal to a number:"3" == 3is false. - Quote the whole expression in single quotes when it starts with
!,[,{or", or contains:or#, so it stays one YAML string.
if: trigger.action == "opened" && !trigger.pull_request.draft && trigger.pull_request.base.ref == "main"
if: 'steps.tests.output.exit_code != 0 || !("release-notes" in artifacts)'
if: trigger.pull_request.labels.exists(l, l.name == "automate")
Guidance
- Never put secrets in a definition. Credentials live on connections; refer to connections by slug.
- Slack channels and GitHub repositories should be explicit values or come from the trigger/inputs.
- Keep prompts specific and ask for structured output (
schema) whenever a later step or condition reads the result. - For an indexer or digest (read a feed, pick items, read each, summarize), write a short pipeline, not an agent. If the site has an RSS, Atom or JSON feed, read it with
builtin.parse_feed. Otherwise take the links withweb.extract(selectorsfor the item links,markdown: false), read each with afor_eachoverweb.extract, and summarize everything in onellmstep. On a schedule,builtin.recallthe ids or links already seen, drop them with ajavascriptstep before thefor_each, andbuiltin.rememberthe new list at the end, so each run only reads what is new. - Validate a definition before saving it, then describe the change you made.