Read after a write
Define the saved-state postcondition, then inspect it before claiming completion or attempting another mutation.
Open-source patterns for browser-agent builders
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
The project focuses on failure points that can turn a normal browser task into a duplicate write, an unsafe batch, or a lost place.
Define the saved-state postcondition, then inspect it before claiming completion or attempting another mutation.
Classify failures, retry only eligible reads, and count high-risk writes across resumed sessions.
Carry verified progress into a new process and keep the completed action ID from being dispatched again.
Run the host-side demo
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.
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.