Skip to content

Feature Request: Expose a Versioned UI State API in Microsoft Edge for AI Agent Integration #1399

Open

Description

@CharlesFrayer

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

  1. Hronom commented on Sep 19, 2026

    @Hronom

    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:

    • Negotiate schemaVersion separately from a monotonic snapshotRevision, scoped context identity and document/renderer generations. An activeTabId should be opaque and scoped to the browser profile/workspace; it should not be reusable across profiles or after a context reset.
    • Give events sequence numbers and make gaps detectable. A timestamp alone cannot establish ordering. After a reconnect, missed event, browser restart, tab/document navigation, profile switch, renderer replacement or human takeover, prior snapshots and handles should become stale and require a fresh snapshot.
    • Keep browser-chrome state, page/document state, renderer/paint/accessibility readiness and action authorization distinct. A blocking modal can tell an agent to wait, but it should not imply that a save, submit or permission check succeeded. Page-provided labels and capability flags are evidence, not authority.
    • Let capability negotiation cover supported fields, semantics and privacy scope, while effective permission remains a separate decision. Incognito/private state, titles and URLs need explicit scope and redaction rules; “state-only” can still disclose sensitive context.
    • Test event and snapshot contracts against lost, duplicated and out-of-order events; same-document route changes; full navigation; modal races; a human changing the active tab; renderer loss; reconnect; and a sidebar transition. Useful result states include fresh, stale, gap and unknown, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions