The AX Tree

A linearized semantic interface layer analogous to an accessibility tree.

A blind person browsing with a screen reader never sees the page. The screen reader reads something else: the accessibility tree, a structure the browser builds alongside the visual layout. Each node has a role (button, link, heading), a name ("Checkout") and a state (disabled, expanded). When the developer used real buttons and labels, the tree is clean and the page is easy to use by ear. When they built everything from unlabeled boxes, the screen reader announces "group, group, clickable" and the user is lost.

The AX tree is the same idea built for agents. It's a deliberately designed text layer that describes an interface's current state as roles, names, states and actions, in reading order. It's produced from the same underlying data as the visual interface, so the two always agree. And it's linearized, which means flattened into one sequence: the agent reads it top to bottom, the way it reads everything else.

The alternatives are a screenshot, which the agent has to interpret, or the raw page markup, which can run to thousands of tokens of layout the agent has no use for.

In practice

Here is a project board, the kind people use by dragging cards between columns, rendered as an AX tree:

board "Q4 Launch" (3 columns, 11 cards)
  column #col1 "To do" (4 cards)
    card #c1 "Pricing page copy"  assignee=ana   due=2026-12-01
    card #c2 "Refund flow QA"     assignee=none  due=2026-11-28
    ... 2 more, expand(#col1)
  column #col2 "In progress" (5 cards, collapsed)
  column #col3 "Done" (2 cards, collapsed)
actions: move(card, column), assign(card, user), expand(column)

That's roughly 85 tokens. Notice three things. Every object has a short handle like #c2 that the agent can copy back without error. Collapsed branches still show their counts, so the agent knows what it isn't seeing. And the available actions are listed at the end, so the agent doesn't have to guess what drag-and-drop means in text.

Why it matters

Agents read every token they're given. A raw page dump makes them pay for layout they can't use, and a screenshot makes them guess at structure the software already knew. An AX tree hands over that structure directly. Because it's rendered from shared state, it can't drift out of sync with what the human sees, which also makes the agent's actions easier for a person to follow.

What to do about it

H-07 Local Handles & Progressive Disclosure supplies the short handles and the collapsed, expandable branches. H-03 Token Hygiene & High Observation Yield strips presentation details that carry no meaning. H-01 Continuous State Anchoring re-renders the current tree after each action, so the agent never has to replay its history to know where things stand.

Agent legibilityLexicon · 06Agent LegibilityHow cleanly an interface exposes semantic structure to non-human minds. is the quality an AX tree is built to deliver. Literal exhaustive readingLexicon · 10Literal Exhaustive ReadingIngesting every returned token without human visual skimming. is why the tree has to be compact: the agent reads all of it. Inference distanceLexicon · 33Inference DistanceProbabilistic effort of accurately generating arguments across token span. explains why short local handles like #c2 are safer than long IDs copied from far back in the session.

esc

Try “tokens”, “errors”, “stale”, “handoff” or “blast radius”.