Skip to content

Agents and exploring ​

Your Blocks are also a menu. waygraph auto lets a person pick the next Block by hand; a session lets a coding agent do the same, one JSON call at a time, using only Blocks you have already checked.

By hand: auto ​

WantCommand
a menu in the terminalnpx waygraph auto --cli
the same menu as a panel in the browsernpx waygraph auto
find a route from one Checkpoint to another, then play itnpx waygraph auto --blocks LoginPage OrderComplete
try it on Sauce Demo, nothing written to your foldernpx waygraph try auto · npx waygraph try auto:cli

The menu has Methods for this page, Also on this page (one row per item a Method lists in its instanceOptions, plus Add all / Remove all), Navigate and Go back. Keys a Block needs come from --data, else the project's mem stubs.

For an agent: a session ​

A session is a browser that keeps running in the background. Every command takes its id and answers with JSON.

sh
npx waygraph pilot start [--data '{...}']      # browser + the whole graph + where it is; --data: whose keys (else mem stubs)
npx waygraph pilot status  <id>                # the menu, no side effects
npx waygraph pilot send    <id> submit-login   # run one Block (a menu index or a name); --data '{...}' sets keys first
npx waygraph pilot reach   <id> OrderComplete  # find the route and play it, checking every step
npx waygraph pilot read    <id> catalog.items  # what the page shows (a page's `read`)
npx waygraph browser stop  <id>                # done
CommandAnswers
status, send, reachthe Checkpoint, the menu, read for the page it landed on, and mem: where each key's value came from (data, stub, step)
read [path] [--where f=v] [--rows a:b]what the page shows, all of it or one part (What a page shows)
dom [--mode full] [--selector s]the accessibility tree (small), or the DOM (bounded)
tracethe Blocks this session ran and where each landed
consoleconsole and network errors, and links or buttons no Block covers yet
watchevery step, read and snapshot as JSON lines, live
resyncwhere am I, checked again against the real page (after a person clicked around)

No Blocks yet: blind pilot ​

An agent can start on an app with no Blocks: act on the raw page, then write the Block it just used and pick it up without restarting.

sh
npx waygraph browser start --goto /login
npx waygraph auto goto  <id> /login
npx waygraph auto type  <id> "#username" "standard_user"
npx waygraph auto click <id> "#login-button"
npx waygraph auto reload <id>                  # loads the Block files just written

Session commands at a glance ​

PrefixIs
waygraph autothe interactive picker (and the raw click / type / goto)
waygraph browsersessions: start, sessions, stop, attach
waygraph pilotstart = browser start + the graph; then the same commands

All three reach the same session by the same id. browser sessions lists the live ones; close every session you start.

Skills for coding agents ​

waygraph init puts three skills in .agents/skills/: waygraph-convention (where files go, how Blocks are written), waygraph-pilot (driving a session) and waygraph-blind-pilot (starting from nothing).

sh
npx waygraph agent-dive --loop claude      # also opencode, cursor, vscode: planner / author / healer agents
npx waygraph --skill-convention            # print a skill
npx waygraph upgrade --skills              # refresh them after updating waygraph

Every command and the session protocol (for a client of your own): Pilot, CLI.

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed