Repository navigation
Description
Summary
AI agents increasingly operate inside the browser — copilots, automation systems, accessibility assistants, and enterprise workflow agents. These agents require stable, structured, semantic UI state to reason about the browser's current configuration and determine safe, predictable actions.
Edge currently exposes DOM, accessibility trees, and automation primitives, but no versioned UI State API that reflects the browser's internal UI model. This forces agents to rely on brittle heuristics, screen scraping, or accessibility inference, which breaks across versions and UI changes.
This explainer proposes a Versioned UI State API to provide structured, backward-compatible UI state for safe agent operation.
1. Goals
1.1 Provide semantic UI state
Agents need structured information about:
- Active tab
- Sidebar visibility and active pane
- Modal presence and blocking state
- Browser mode (normal, incognito, sidebar-focused, etc.)
- Navigation affordances (canGoBack, canGoForward)
- UI transitions
1.2 Ensure stability through versioning
The API must support:
- Backward compatibility
- Predictable schema evolution
- Safe deprecation cycles
- Agent capability negotiation
1.3 Align with existing standards
The API should follow patterns established by:
- WebDriver BiDi
- Accessibility APIs
- WebExtensions manifest versioning
- Chromium UI state models
2. Non-Goals
- Exposing direct UI control
- Allowing agents to manipulate browser chrome
- Replacing accessibility APIs
- Providing pixel-level UI information
This API is state-only, not control.
3. Proposed API Surface
Namespace: edge.uiState.v1
3.1 State Snapshot
A structured JSON object describing the current UI state.
{
"version": "1.0",
"browser": {
"mode": "normal",
"activeTabId": 3,
"sidebar": {
"isOpen": true,
"activePane": "copilot"
}
},
"modals": [
{
"id": "permissions",
"blocking": true
}
],
"navigation": {
"canGoBack": true,
"canGoForward": false
}
}3.2 State Events
Events emitted when UI transitions occur.
{
"event": "sidebar.changed",
"timestamp": 1726680000,
"details": {
"isOpen": false
}
}3.3 Version Negotiation
Agents declare supported schema versions. Edge returns the highest mutually supported version.
3.4 Capability Flags
Agents declare which UI states they can safely handle.
4. Use Cases
4.1 AI Copilots
Copilots need to know whether a modal is blocking input, which tab is active, whether the sidebar is open, and what navigation actions are possible.
4.2 Enterprise Automation
Enterprise agents require predictable UI state to trigger workflows, validate user context, and ensure safe execution.
4.3 Accessibility Assistants
Assistive agents benefit from clear modal state, sidebar transitions, and navigation affordances.
4.4 Autonomous Agents
Agents performing multi-step tasks need stable state transitions.
5. Security Considerations
- The API exposes state only, not control
- No new privileged actions are introduced
- Modal detection improves safety by preventing unsafe automation
- Versioning prevents breakage from UI changes
6. Implementation Notes
- Schema should be minimal and additive
- Events should be throttled to avoid excessive firing
- State should reflect browser chrome, not page content
- Versioning should follow WebExtensions manifest patterns
7. Conclusion
A Versioned UI State API is foundational infrastructure for safe, predictable AI agent integration in Microsoft Edge. It aligns with existing standards, supports Edge's strategic direction toward contextual AI assistance, and provides the stability required for developers building agent-powered experiences.
This proposal is submitted for engineering and standards review.
Filed as part of the MSEdgeExplainers community feedback campaign — September 2026
Activity
Hronom commentedon Sep 19, 2026
This is a useful proposal, especially the explicit state-only boundary. One addition I would make is to version the observation, not only the schema:
schemaVersionseparately from a monotonicsnapshotRevision, scoped context identity and document/renderer generations. AnactiveTabIdshould be opaque and scoped to the browser profile/workspace; it should not be reusable across profiles or after a context reset.fresh,stale,gapandunknown, with a prescribed fresh-snapshot recovery path.I maintain Hronaut, a local visible browser workspace, and used AI assistance for this comment. This is independent design feedback, not an Edge integration or compatibility claim.