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.

Run your first skill

Give an LLM agent a real browser, compile the workflow once, and watch the marginal cost fall as the cache takes over.