Glossary · Page model

DOM indexed state

A compact, numerically-indexed map of a page’s interactive elements that an agent acts on by index instead of raw HTML.

What is dom indexed state?

DOM indexed state is the output of Twin’s DOM → indexed-state compiler: it scans a live page and emits a numbered list of the elements an agent can actually act on — buttons, inputs, links — under a token budget. The planner and compiled skills reference elements by stable index (“click 12”, “type into 7”) rather than fragile selectors or full markup.

Why it matters

Raw HTML is enormous and noisy; feeding it to a model is slow and expensive. Indexing the page to its interactive surface keeps prompts small, makes plans portable across minor layout changes, and is what lets a 50-step flow fit in a few thousand tokens.

See it in context: read how Twin compiles and replays a run, follow the cost-cutting guide, or browse use cases and comparisons.

Put your agent to work

Give your agent a real browser, connect the accounts you authorize, and keep control of every step. Repeated runs compile into skills that replay at near-zero cost.