← All posts
A2UI: Rendering Dynamic, Agent-Driven Interfaces in React
TUTORIALSFebruary 19, 2026· 4 min read

A2UI: Rendering Dynamic, Agent-Driven Interfaces in React

By Karsten Wade
# A2UI: Rendering Dynamic, Agent-Driven Interfaces in React We have spent decades building interfaces that are essentially static maps. We define the buttons, we wire up the routes, and we hope the user finds the path we paved. But as we move into the era of the agentic web, that map is starting to dissolve (and honestly, it's about time). We are no longer just building apps; we are building workbenches where agents can forge their own tools on the fly. This is where the A2UI protocol (Agent-to-UI) enters the workshop. It is a declarative bridge between the reasoning of a Large Language Model and the rendering power of React. Instead of sending back blocks of text or raw Markdown, our agents can now send instructions to build an interface that fits the immediate context of the conversation. It is a shift from telling to showing. ## The Shift to Generative UI If you have been following the rise of personal AI frameworks like OpenClaw, you have seen the "Monday Morning Amnesia" problem. Agents struggle to remember context across sessions because we treat their output as ephemeral text (a mistake we won't repeat twice). But what if the output wasn't just a message? What if it was a persistent, interactive _surface_? A2UI moves us away from legacy tech with AI bolted on and toward a truly AI-native architecture. In this model, the agent is UI-aware. It doesn't need to know the specifics of your Tailwind config or your component library — though it can certainly appreciate them if the tokens match. Instead, it speaks a standard language of declarative JSON that our React application understands how to translate into reality. We provide the components; the agent provides the intent. ## Understanding the Architecture The core of the `ai-kit-a2ui` implementation is built around the concept of _Surfaces_. Think of a surface as a claim in a prospecting field — a dedicated space where the agent has the authority to render and update components. It is a confined, secure sandbox for creativity. ```text +-----------+ A2UI (JSON) +----------------+ | | ---------------------> | | | Agent | | A2UIProvider | | | <--------------------- | | +-----------+ Bidirectional +----------------+ Sync | | V +------------------+ | | | A2UISurface | | (React/Svelte) | | | +------------------+ ``` (Prompt for image generation: A clean, technical diagram showing a bidirectional flow between an "AI Agent" and a "React A2UIProvider", which then renders an "A2UISurface" containing modular UI components. Style: Minimalist, architectural, blueprint-like.) ## Getting Your Hands on the Tools To start building, we first need to set up our workbench. The `@ainative/a2ui-react` package provides the hooks and components needed to bind our React app to the agent's stream (and protect our knowledge in case the team gets eaten by raptors). First, we wrap our application in the `A2UIProvider`. This is the keystone of our architecture — it manages the protocol state and delegates rendering to our component catalog. ```tsx import { A2UIProvider, shadcnRenderers } from 'a2ui-react'; import 'a2ui-react/theme.css'; function App() { return ( ); } ``` Once the provider is in place, we can drop an `A2UISurface` anywhere in our app. The agent can then "target" this surface by ID, sending components like layouts, charts, or input forms directly into the user's view. It's like giving the agent its own set of screwdrivers. ```tsx import { A2UISurface } from 'a2ui-react'; function Workbench() { return (
{/* The agent can now dynamically build this main area */}
); } ``` ## Why This Matters for the OpenClaw Generation We are seeing a trend where agents are becoming the primary users of our software. In the OpenClaw collective, agents are already building "throwaway apps" — small, purpose-built interfaces that solve a single problem and then evaporate. A2UI provides the standard jig for this process. By using a declarative protocol, we ensure that the agent remains "UI-aware" without creating a security nightmare of executed code on the client. The agent says, "I need a bar chart with these three data points," and our React app provides the vetted, secure, and beautiful implementation. It is a partnership of consent. It is the snicker-snack of the vorpal blade against the jabberwock of complexity. ## An Invitation to Nurture the Stream We are still in the early seasons of agentic UI. The patterns we are pruning today will become the perennials of tomorrow's web architecture. We invite you to stop guessing what your users might need and start building interfaces that can listen. There is a certain joy in seeing an agent realize it needs a tool and then watching it manifest that tool on your screen. It feels less like using software and more like collaborating with a peer at a shared workbench. It's messy, it's organic, and it's exactly where we need to be. If you are ready to start prospecting in this new territory, we recommend checking out the [ai-kit-a2ui-core](https://github.com/AINative-Studio/ai-kit-a2ui-core) repository. We are building this in the open, and your friction — your challenges and your successes — is the energy that drives the cycle forward. We are all contributors-in-waiting. Let's see what we can build, together. #AI #React #A2UI #AgenticUI #GenerativeUI #OpenSource --- #AIAgents #LLMs #SDKs #AI #Workshop
AI DevelopmentZeroDB

Check your site's AX Score

Free scan, 6 categories, under 60 seconds. See how your site ranks on the agentic web.

Run a free audit →