Skip to main content

Pages your agent can act on by number.

Memora Browser turns a loaded page into a short list of numbered actions plus clean Markdown. Your agent reads the list, then clicks or types with @1, @2, @3 instead of guessing CSS selectors.

Action map for a login page
=== INTERACTIVE ACTION MAP (4 elements) ===
[@1] [input] "Work email" type="email" (selector: #email)
[@2] [input] "Password" type="password" (selector: #password)
[@3] [button] "Sign in" type="submit" (selector: #btn-submit)
[@4] [link] "Forgot password?" href="/forgot" (selector: .forgot-link)

How it works.

  1. Load the page

    Memora fetches the page, runs its scripts in a sandbox and builds the document, without drawing anything on screen.

  2. Number what you can use

    Links, buttons, inputs, selects and other controls are listed in page order and given an ID: @1, @2, @3.

  3. Act by ID

    Call click("@3") or type("@1", text). Memora resolves the ID to the exact element and fires the input, change and click events.

What you get.

No selector guessing

Agents stop inventing XPath or CSS that breaks on the next deploy. Two identical "Add to cart" buttons get two different IDs.

Markdown alongside

The readable content of the page comes back as Markdown, with scripts, styles and tracking markup stripped out.

Token estimate included

Each snapshot reports an estimated token count, so you can decide how much of the page to send to the model.

Read, then act.

Use the snapshot from the library, the Memora.getSemanticSnapshot CDP method or the /memora/snapshot HTTP endpoint.

Example
import { MemoraBrowser } from 'memora-browser';

const browser = new MemoraBrowser();
const page = browser.newPage();
await page.goto('https://app.example.com/login');

const snapshot = page.getSemanticSnapshot();
console.log(snapshot.actionMapText); // numbered actions
console.log(snapshot.tokenEstimate);

page.type('@1', 'agent@example.com');
page.click('@3');

Common questions.

Do action IDs stay the same between snapshots?
IDs are assigned in page order each time a snapshot is taken. If the page changes, take a new snapshot before acting so the IDs match what is on screen.
Can I still use CSS selectors?
Yes. click and type accept either an action ID like @3 or a normal CSS selector, and each action in the map also shows the selector it resolved to.

Put Action map to work.

The docs walk you through starting the server and connecting your first agent.