Live CortexUI Surface
This block renders live CortexUI contract metadata in the docs DOM so AI View can inspect real machine-readable elements instead of only code examples.
| Item | State |
|---|---|
| Search docs | Ready |
| Inspect metadata | Visible in AI View |
The Future of AI + Browsers
The relationship between AI agents and browser-based interfaces is in its earliest, most chaotic phase. Agents are operating UIs built for humans, using heuristics and vision models to navigate interfaces that were never designed for them. The results are promising enough to drive rapid adoption and fragile enough to drive significant engineering cost.
What happens next is not mysterious — the trajectory is already visible in how previous interface paradigms evolved. A period of heuristic workarounds, followed by structural solutions, followed by ecosystem standardization, followed by the structural solution becoming the new default. We are at the beginning of that arc.
Near Term: 1-2 Years
Browser automation tools adopt data-ai-* as a first-class selector strategy.
Playwright, Puppeteer, and Selenium already support custom attribute selectors. The step from "supported" to "first-class" is a matter of adoption and tooling. As CortexUI patterns prove out in production and teams begin publishing stable AI contracts alongside their visual designs, automation tools will build native support for contract-based targeting — syntax sugar, type definitions, helper methods that make [data-ai-action] as natural as getByRole or getByTestId.
Design tools generate AI contracts alongside visual specs.
Figma already exports component specifications to developers. The next version of that workflow includes AI contract annotations: when a designer creates a button component, they also specify its action name, its valid states, its entity context. The handoff document includes both the visual spec and the machine-readable contract. Developers implement both simultaneously, because the tooling makes it natural to do so.
Testing frameworks use contract validation as a first-class feature.
The @cortexui/testing library provides the foundation. As teams adopt it, test suites shift from "find the element by visual heuristic" to "verify the contract is honored." CI pipelines include a contract validation step that fails the build if interactive elements lack required data-ai-* attributes or if action events are missing from the runtime event log.
Companies publish AI-readable specs alongside their visual design systems.
The same way teams publish API documentation, they will begin publishing interaction contracts: a machine-readable specification of every action available in the application, every form schema, every entity context. Third-party agents can read these specs to understand the application before ever opening a browser.
Medium Term: 3-5 Years
Browser vendors add native support for interaction contracts.
Chrome DevTools already has an "Accessibility" panel that exposes the accessibility tree. The equivalent for AI contracts is a natural extension: a panel that shows the data-ai-* contract for any element, validates it against a schema, and highlights elements that lack contract coverage. Beyond DevTools, browser APIs evolve to include native methods for querying UI contracts: document.getElementByAiId(), document.getAvailableActions(), document.getScreenContext().
AI agents negotiate with UIs directly through the contract.
Rather than an agent sending instructions to an external orchestration layer that then operates the browser, the agent communicates directly with the UI through standardized contract APIs. Ambiguity resolution moves from "scrape and infer" to "query the contract." When an agent encounters an action it doesn't understand, it reads the contract description rather than trying to infer meaning from the label.
Multi-agent coordination: different agents own different sections simultaneously.
Complex tasks decompose naturally along section boundaries. One agent handles the navigation — finding the right page, maintaining session state, managing authentication. Another handles data entry — filling forms, managing field validation. Another handles verification — confirming that operations completed successfully, detecting error states. CortexUI's section-based architecture makes this decomposition explicit and reliable. Agents can operate simultaneously on different data-ai-section regions without interference.
"AI-audited" becomes a UX quality mark alongside "WCAG compliant."
Accessibility compliance is now a standard requirement for production web applications. The industry recognized that designing for assistive technology users is both ethically required and legally mandated. The equivalent recognition for AI operability is coming. An "AI-audited" certification — verifying that an application exposes a complete, correct machine-readable interaction contract — becomes a quality mark that enterprises require of software vendors, that government procurement standards include, and that users can look for as a signal that the application supports AI-assisted operation.
CortexUI's vision: Every web app exposes a machine-readable interaction contract as naturally as it exposes a URL structure. The same way you don't think twice about every page having a URL, you won't think twice about every action having a contract name.
Long Term: The Infrastructure Layer
UI that generates itself from a contract specification.
Invert the current workflow: instead of building a UI and then annotating it with contracts, write the contract first and generate the UI from it. The contract specification declares what actions are available, what entities are in scope, what states are possible. A UI generation layer renders this as a human-usable interface. Different renderings for different contexts: desktop, mobile, voice, agent. One contract, multiple representations.
Bidirectional contracts: AI both reads and writes UI contracts.
Currently, contracts flow one direction: the developer writes the contract, the agent reads it. The next step is bidirectional. AI analyzes existing interfaces and generates contract annotations — a migration path for legacy codebases. AI proposes contract changes when behavioral specifications change. AI verifies that implemented contracts match design intent. The contract becomes a living artifact maintained collaboratively between humans and machines.
The web as a machine-operable API surface by default.
The endpoint of this trajectory is the web as infrastructure for autonomous operation. Not a parallel "machine web" separate from the human web — the same web, with the same interfaces, but with a complete and standardized contract layer that makes every application operable by any sufficiently capable agent. The web's original promise — universal access to information — extends to universal access to operation.
CortexUI's Role
CortexUI's contribution is to the beginning of this arc, which is the most important part. The vocabulary and patterns established now will shape what the ecosystem converges on. The concept being proved in production now provides the evidence that browser vendors, design tool makers, and testing framework maintainers need to invest in native support.
Building the ecosystem means making it easy for any team to adopt the contract, any tool to read it, and any agent to use it. The more applications that adopt the pattern, the more tools can be built that rely on it. The more tools that rely on it, the more valuable the pattern becomes. This is how technical standards achieve critical mass.
Closing
The web is becoming infrastructure for AI. That transformation is already underway — the agents are already here, operating interfaces that weren't designed for them, doing the best they can with the information available in a visual medium designed for human perception.
The question is whether that infrastructure was designed for its operators — or whether AI has to work around an interface that was never meant for it. The answer is not determined by the quality of future AI models. It is determined by the choices that developers and designers make today, about whether to treat machine operability as a first-class concern or an afterthought.
The web that was designed for users became the infrastructure for commerce, communication, and information. The web that is designed for operators — for the AI agents that will increasingly take action on behalf of those users — could become something larger still.