Browser agent interface
When to use—and when not to
Use the interface to read authored chapters, navigate the workbook, select the fictional illustration, open disclosures, inspect tutorial state or operate an explicitly requested local lesson checklist. Do not use it to search, save, correct or erase actual OMP memories, run terminal commands, authenticate to OMP or establish database health. No REST endpoint or MCP service is provided by this site.
Open the canonical homepage in a JavaScript-capable browser and evaluate in the page’s main JavaScript world. The API is window.memoryTutorial, version 1. A fetch-only document reader, an isolated extension world or a support page does not expose this object. If it is absent, use the authored Markdown for reading; do not invent a network API.
Call discover() for the live schemas, permissions, exact control IDs, enabled states and gaps. These schemas, not guesses from visible labels, define the currently loaded page’s interface.
| Operation | Input | Result |
|---|---|---|
discover() | None | Scope, permissions, schemas, controls and gaps. |
inspect() | None | Authoritative page revision, content revision, current chapter, illustration, checklist/storage, clipboard, disclosures and stable controls. |
query({text, limit}) | Text of at most 240 characters; optional integer limit 1–10, default 5. | Searches authored chapter text, including closed disclosures, never memories. Status is matched, empty or empty-query; unavailable content is a structured failure. |
act({id, action, expectedRevision, …}) | Exact registered control ID, supported action and a fresh revision. | performed or unchanged, changed, current revision and optional clipboard outcome. |
wait({afterRevision, timeoutMs, match}) | Existing revision from this document; optional integer 0–5000 milliseconds, default 1500; optional match with chapterId and/or demoStep (1, 2 or 3). | matched only after a newer revision satisfying every supplied condition, otherwise timed-out; includes current revision and state. |
diagnose() | None | Tutorial runtime, storage, clipboard capabilities and control integrity—not OMP health. |
query() matches all whitespace-separated search terms case-insensitively within a chapter. Results have a chapter ID, title, anchor, navigation control ID and excerpt. A chapter excerpt is not the full source text.
Read, act, observe
Run this JavaScript in the homepage’s main world. It selects only a fictional stage:
const t = window.memoryTutorial;
const capabilities = t.discover();
const chapters = t.query({ text: "compaction", limit: 3 });
const before = t.inspect();
const result = await t.act({
id: "demo-recall",
action: "click",
expectedRevision: before.revision
});
const observed = result.ok && result.changed
? await t.wait({
afterRevision: before.revision,
timeoutMs: 1000,
match: { demoStep: 3 }
})
: t.inspect();
const diagnostics = t.diagnose();
An already selected stage or another unchanged action does not guarantee a newer revision. Do not interpret a wait timeout as a successful transition, or a successful stage selection as a successful real memory operation.
Action shapes and revision rules
- Use
action: "click"for a discovered click control, such as a navigation, illustration, copy or reset control. - Use
action: "setChecked"with a booleancheckedonly for a checkbox control. This changes self-reported local progress, not verified OMP state. Do not tick it without the reader’s actual completion or explicit request. - Use
action: "setOpen"with a booleanopenonly for a disclosure’s summary control ID, such assettings-extra-toggle, not its containing details ID. - Supply
checkedonly forsetChecked, andopenonly forsetOpen. Extra or unsupported fields are rejected. - Inspect immediately before every action. Pass that response’s opaque
revisionasexpectedRevision; do not usecontentRevisionor manufacture a token. - Revisions expire on reload. User actions, scrolling and asynchronous clipboard results can change them. On
STALE_REVISION, inspect again and reassess the intended action. - Honor
enabledandunavailableReason. Disabled, hidden, inert or closed-disclosure targets are not actionable. Open the appropriate discovered disclosure first, then inspect again. Never bypass a disabled control by editing the DOM. - Actions use the same native click/change paths as human controls. A structured success is not permission to claim unobserved effects.
For example, open the configuration disclosure without changing a setting:
const t = window.memoryTutorial;
const before = t.inspect();
await t.act({
id: "config-options-toggle",
action: "setOpen",
open: true,
expectedRevision: before.revision
});
Failures and boundaries
Failures use {ok:false, error:{code,message}}, with revision/scope metadata and optional details. The discovery schema lists INVALID_ARGUMENT, STALE_REVISION, STALE_DOCUMENT, INVALID_REVISION, UNKNOWN_TARGET, AMBIGUOUS_TARGET, DISABLED_TARGET, UNSUPPORTED_ACTION, ACTION_FAILED, UNAVAILABLE and BUSY.
Clipboard access depends on browser policy and user activation. Inspect the returned outcome; copying may require manual selection. A timed-out attempt is unconfirmed, not proof that a later browser write is impossible. Saved checklist state reports the last local observation, without multi-tab locking.
The API requires no login, API key, authentication or payment. It operates the tutorial only: no OMP, filesystem, credentials, real memories, command execution or network requests from its script. diagnose() cannot assess your OMP installation.
Memory and reusable knowledge · Source chapter: memory/browser-agent-interface. Original evidence remains scoped to its recorded snapshot.