# What is A2UI in Google? Agent-to-User Interface Explained

> Discover A2UI, Google's open-source framework for LLM-driven agents. Learn how it creates secure contracts for agent generation and client-side rendering via streaming JSON.

- Repository: [Google/A2UI](https://github.com/google/A2UI)
- Tags: overview
- Published: 2026-03-13

---

**A2UI (Agent-to-User Interface) is Google's open-source framework that enables LLM-driven agents to declare user interfaces through a streaming JSON protocol, creating a secure contract between agent generation and client-side rendering.**

The `google/A2UI` repository implements the **Agent-to-User Interface** protocol, allowing AI agents to produce declarative UI components that render progressively across web, mobile, and future platforms. This framework separates interface generation from execution, enabling secure, framework-agnostic user experiences driven by large language models.

## Core Architecture of the A2UI Framework

The architecture enforces a strict separation between **generation** (the LLM produces JSON) and **execution** (the client renders native widgets). This design delivers three critical advantages: LLM-friendly streaming generation, security through catalog-based rendering, and complete framework independence.

### Transport and Protocol Layer

At the transport layer, A2UI transmits **line-delimited JSON (JSONL)** over **Server-Sent Events (SSE)**. The `A2uiSchemaManager` class in [`agent_sdks/python/src/a2ui/core/schema/manager.py`](https://github.com/google/A2UI/blob/main/agent_sdks/python/src/a2ui/core/schema/manager.py) constructs schema constraints that guide LLM output, ensuring generated JSON adheres to the protocol specification while enabling real-time streaming.

### UI Description and Component Catalog

The protocol defines three primary message types that structure the interface declaration:

- **`surfaceUpdate`**: Declares component definitions as a flat adjacency list
- **`dataModelUpdate`**: Transfers data bindings and state changes
- **`beginRendering`**: Triggers the client to render buffered components

The **component catalog** enumerates permissible widget types (e.g., `Text`, `Button`, `Card`). According to [`agent_sdks/python/src/a2ui/basic_catalog/provider.py`](https://github.com/google/A2UI/blob/main/agent_sdks/python/src/a2ui/basic_catalog/provider.py), the `BasicCatalog` class supplies the standard catalog for version 0.8, which agents negotiate via A2A extension metadata.

### Agent Extension and Client Rendering

Agents advertise UI capabilities through the `get_a2ui_agent_extension` function in [`agent_sdks/python/src/a2ui/a2a.py`](https://github.com/google/A2UI/blob/main/agent_sdks/python/src/a2ui/a2a.py). This utility builds extension descriptions specifying supported catalog IDs and whether inline catalogs are accepted. Client implementations (located in `renderers/lit/` and related directories) buffer these components, resolve data bindings, and construct native widgets without executing arbitrary agent code.

## Implementing A2UI in Python Applications

The Python SDK provides concrete utilities for integrating A2UI into A2A (Agent-to-Agent) compatible systems.

### Parsing LLM Output into A2UI Parts

When an LLM generates UI descriptions wrapped in `<<A2UI>>` tags, the `parse_response_to_parts` function extracts valid JSON payloads. The `create_a2ui_part` helper wraps Python dictionaries into `DataPart` objects with the MIME type `application/json+a2ui`, enabling the A2A runtime to recognize UI data:

```python
from a2ui.a2a import create_a2ui_part, parse_response_to_parts

# Example LLM output with A2UI delimiters

llm_output = """
Here is the UI for the restaurant list:
<<A2UI>>
[
  {"surfaceUpdate": {"components": [{"id":"root","component":{"Column":{"children":{"explicitList":["list"]}}}}]},
  {"surfaceUpdate": {"components": [{"id":"list","component":{"List":{"template":{"dataBinding":"/restaurants","componentId":"card"}}}}]},
  {"catalogId": "https://a2ui.org/specification/v0_8/standard_catalog_definition.json"}
]
<<A2UI>>
"""

parts = parse_response_to_parts(llm_output, fallback_text="No UI generated.")

```

### Configuring the Schema Manager

The `A2uiSchemaManager` validates UI generation against protocol schemas and manages catalog configurations:

```python
from a2ui.core.schema.manager import A2uiSchemaManager
from a2ui.basic_catalog.provider import BasicCatalog
from a2ui.core.schema.common_modifiers import remove_strict_validation

schema_mgr = A2uiSchemaManager(
    version="0.8",
    catalogs=[BasicCatalog.get_config(version="0.8", examples_path="examples")],
    schema_modifiers=[remove_strict_validation],
)

```

This manager loads server-to-client and common-types schemas, applies modifiers such as `remove_strict_validation`, and prepares catalog definitions for prompt injection.

### Advertising A2UI Capabilities

Agents must declare their UI support in their AgentCard metadata using the extension builder:

```python
from a2ui.a2a import get_a2ui_agent_extension

extension = get_a2ui_agent_extension(
    accepts_inline_catalogs=True,
    supported_catalog_ids=[
        "https://a2ui.org/specification/v0_8/standard_catalog_definition.json"
    ],
)

```

This extension object informs clients which catalogs the agent recognizes and whether it accepts inline catalog definitions beyond the standard set.

### Complete Agent Implementation

The `RestaurantAgent` sample in [`samples/agent/adk/restaurant_finder/agent.py`](https://github.com/google/A2UI/blob/main/samples/agent/adk/restaurant_finder/agent.py) demonstrates end-to-end implementation:

```python
self._schema_manager = (
    A2uiSchemaManager(
        VERSION_0_8,
        catalogs=[BasicCatalog.get_config(version=VERSION_0_8, examples_path="examples")],
        schema_modifiers=[remove_strict_validation],
    )
    if use_ui else None
)

instruction = (
    self._schema_manager.generate_system_prompt(
        role_description=ROLE_DESCRIPTION,
        ui_description=UI_DESCRIPTION,
        include_schema=True,
        include_examples=True,
        validate_examples=True,
    )
    if use_ui else get_text_prompt()
)

```

This implementation creates a schema manager, generates system prompts that include UI schemas and examples, and streams validated UI JSON to clients for real-time rendering.

## Key Source Files and Their Roles

Understanding the repository structure helps developers navigate the implementation:

- **[`agent_sdks/python/src/a2ui/a2a.py`](https://github.com/google/A2UI/blob/main/agent_sdks/python/src/a2ui/a2a.py)**: Contains `create_a2ui_part`, `parse_response_to_parts`, and `get_a2ui_agent_extension` for A2A integration
- **[`agent_sdks/python/src/a2ui/core/schema/manager.py`](https://github.com/google/A2UI/blob/main/agent_sdks/python/src/a2ui/core/schema/manager.py)**: Implements `A2uiSchemaManager` for schema loading, catalog selection, and prompt generation
- **[`agent_sdks/python/src/a2ui/basic_catalog/provider.py`](https://github.com/google/A2UI/blob/main/agent_sdks/python/src/a2ui/basic_catalog/provider.py)**: Provides `BasicCatalog` for the standard v0.8 widget catalog
- **[`samples/agent/adk/restaurant_finder/agent.py`](https://github.com/google/A2UI/blob/main/samples/agent/adk/restaurant_finder/agent.py)**: Full-stack example showing UI generation, validation, and streaming
- **[`specification/v0_8/docs/a2ui_protocol.md`](https://github.com/google/A2UI/blob/main/specification/v0_8/docs/a2ui_protocol.md)**: Complete protocol specification defining message types, data binding, and event handling
- **[`renderers/lit/README.md`](https://github.com/google/A2UI/blob/main/renderers/lit/README.md)**: Reference client implementation consuming A2UI streams in Lit/web components
- **[`tools/build_catalog/build_catalog.py`](https://github.com/google/A2UI/blob/main/tools/build_catalog/build_catalog.py)**: Utility for generating resolved schemas embedding specific catalogs for prompt engineering

## Summary

- **A2UI** provides a JSON-based, streaming protocol for LLM agents to declare user interfaces declaratively
- The architecture separates **generation** (agent produces JSONL over SSE) from **execution** (client renders from trusted catalogs)
- The Python SDK in `google/A2UI` offers `A2uiSchemaManager` for validation and `get_a2ui_agent_extension` for capability advertisement
- Security is enforced through **catalog-based rendering**, where clients only instantiate pre-defined component types
- The framework supports **progressive streaming**, enabling real-time UI generation as the LLM produces content

## Frequently Asked Questions

### What does A2UI stand for in Google's implementation?

A2UI stands for **Agent-to-User Interface**. It represents an open-source protocol and SDK that enables AI agents to generate user interface descriptions in JSON format, which client applications render into native widgets without executing arbitrary code from the agent.

### How does A2UI differ from traditional UI generation methods?

Unlike traditional server-side rendering or direct code generation, A2UI uses a **declarative JSON protocol** transmitted over Server-Sent Events. This approach allows **progressive streaming** of UI components as the LLM generates them, while maintaining security through a strict **component catalog** system that prevents code injection.

### What programming languages support A2UI development?

Currently, Google provides an official Python SDK in the `agent_sdks/python/` directory, featuring modules like [`a2a.py`](https://github.com/google/A2UI/blob/main/a2a.py) and [`schema/manager.py`](https://github.com/google/A2UI/blob/main/schema/manager.py). Client renderers exist for web platforms (Lit, Angular) and mobile (Flutter), with the protocol specification being language-agnostic JSON.

### Where can I find the complete A2UI protocol specification?

The complete protocol definition resides in [`specification/v0_8/docs/a2ui_protocol.md`](https://github.com/google/A2UI/blob/main/specification/v0_8/docs/a2ui_protocol.md) within the `google/A2UI` repository. This document details message types including `surfaceUpdate`, `dataModelUpdate`, and `beginRendering`, along with catalog negotiation and event handling specifications.