Try another path without starting over.
page.fork() copies the current page — its HTML, cookies, localStorage and sessionStorage — into a new page. An agent can explore one option on the copy while the original stays exactly where it was.
const branch = page.fork(); // copy, no network request
branch.click('@4'); // try "Forgot password?"
page.click('@3'); // main path: submit the formHow it works.
Snapshot the state
Memora captures the page HTML, URL, cookies, localStorage and sessionStorage.
Restore into a new page
A fresh page is created and the captured state is loaded into it, without fetching the URL again.
Act independently
Clicks and typing on the copy don’t touch the original. Keep the branch that worked and drop the rest.
What you get.
No extra request
The copy is built from state already in memory, so the site doesn’t see a second visit.
Session comes along
Cookies and web storage are copied too, so a logged-in session stays logged in on the copy.
About 5 ms
Median fork time was 4.9 ms for a test page with 400 interactive elements on a laptop. Larger pages take longer.
Fork from the library or from MCP.
Agents connected through MCP can call the memora_fork tool to open the copy in a new tab.
const page = browser.newPage();
await page.goto('https://shop.example.com/cart');
const tryCoupon = page.fork();
tryCoupon.type('@5', 'WELCOME10');
tryCoupon.click('@6');
// Compare results, then continue on whichever page you prefer.Common questions.
Does the copy run the page scripts again?
How fast is it?
More in Memora Browser.
Put Page forking to work.
The docs walk you through starting the server and connecting your first agent.