Browser Agent Blueprint

Open-source patterns for browser-agent builders

The click is not the proof.

A browser agent says it saved. The response disappears. Before it clicks again, read the state that actually persisted.

Browser Agent Blueprint pairs copyable prompt modules with a runnable Playwright demo for verified writes, bounded retries, and resumable tasks.

Independently authored · MIT license · Scope and limits explained below

12 prompt modulesPlain-text files you can copy and adapt

4 workflow templatesSmaller task profiles assembled on demand

6 demo scenariosReproducible checks for recovery and risk gates

Make the next action depend on evidence.

The project focuses on failure points that can turn a normal browser task into a duplicate write, an unsafe batch, or a lost place.

Read after a write

Define the saved-state postcondition, then inspect it before claiming completion or attempting another mutation.

Bound retries and batches

Classify failures, retry only eligible reads, and count high-risk writes across resumed sessions.

Resume from a checkpoint

Carry verified progress into a new process and keep the completed action ID from being dispatched again.

Run the host-side demo

See the recovery check in a fresh process.

Install Node.js 20+, then use the included Playwright runner. The separate prepare and resume commands demonstrate that a saved draft survives process exit without replaying the completed write.

npm install
npx playwright install chromium
npm test
npm run demo:prepare
npm run demo:resume

The online synthetic page only tests browser-local save and readback. The Playwright runner checks the host-side ledger and checkpoint.

Know what this demonstrates

The fixture and runner use synthetic content and deterministic rules. They do not connect to a live model, Muse, Grok, Codex, social account, or production site, and they do not establish model obedience. The prompt modules are original templates based on public model capabilities and engineering practice; they are not leaked vendor prompts. Read the full scope and disclaimer.