Frontend

Google releases A2UI Express to speed up AI-generated UIs by up to 3x

Google introduced A2UI Express, a new inference format that reduces latency by up to 3x and token use by two-thirds compared to direct JSON generation for agent-driven interfaces.

3 min readSource: Google Developers Blog

Curated by Kandala Guruprasad. Drafted with AI and checked against the source.

Google releases A2UI Express to speed up AI-generated UIs by up to 3x

TL;DR

  • A2UI Express is a new inference format that reduces latency by up to 3x and uses up to 67% fewer tokens than direct JSON generation
  • Swappable inference formats allow developers to choose trade-offs: Express for full expressivity or decision models like Jev for pre-defined layouts
  • Decision models can reduce latency by up to 80x for structured screens by making fast binary decisions instead of generating text
  • SDKs now support multiple formats through a single argument, with Express available in Python, TypeScript, and Dart
Latency reduction
Up to 3x faster with Express; up
Token efficiency
Express uses up to 67% fewer
Available since
October 2026

What changed: introducing swappable inference formats

Google announced that A2UI now supports swappable inference formats, solving performance problems with the original direct JSON approach. Instead of generating full JSON with every curly brace and nested element, models now generate A2UI Express, an intermediate format optimized for inference speed and accuracy. Deterministic code in the SDK compiles Express into standard A2UI JSON messages. Developers set the inference format with a single argument when creating the generator, and the SDK automatically generates prompt instructions and handles compilation and validation.

python
from a2ui.processor import A2uiGenerator, CatalogConfig
from a2ui.inference_formats import ExpressFormatFactory
catalog = CatalogConfig.from_path("catalog.json")
generator = A2uiGenerator(
[catalog],
examples=few_shot_examples,
inference_format_factory=ExpressFormatFactory(),
)
processor = generator.create_processor(renderer_capabilities)
system_prompt = f"{instructions}\n\n{processor.prompt_snippet}"
parts = processor.parse_response(model_reply)

How A2UI Express works

A2UI Express uses a Python-like syntax where each line assigns a component to a variable; the variable name becomes the component ID and arguments are positional, mapped to catalog schema properties in order. The underscore character skips properties, $/title binds data model values, and Event() declares server actions. This format significantly reduces the tokens needed to express the same UI structures. Express is available in the Python agent SDK (a2ui-agent-sdk 0.9.0), TypeScript SDK (@a2ui/agent on npm), and Dart SDK (a2ui_agent 0.0.1-wip004). The Python and TypeScript SDKs stream Direct JSON chunk by chunk and compile Express from the complete response. Express also works with macros in the Python SDK, allowing models to reference pre-defined data structures by ID rather than regenerating all values.

Performance evaluation and format comparison

Google evaluated four candidate inference formats—Direct JSON, Express, Atom (Lisp-style S-expressions), and Elemental (HTML with custom elements)—across 51 tasks using gemini-3.5-flash in thinking and non-thinking modes. Express emerged as the default because it performed as well with thinking off, enabling the fastest possible inference. The format reduces token generation by up to two-thirds compared to Direct JSON while maintaining the same UI expressivity and model accuracy.

Controlled generation with decision models

For screens with known, pre-defined shapes—such as settings pages, checkouts, or confirmations—Google demonstrated using Jev, a System One decision model from TypeSafe. Jev makes fast, structured decisions instead of generating text, answering calibrated probability questions in 100 to 300 milliseconds. The open-source project Apparite shows one integration pattern: Jev decides the layout structure, code builds the A2UI component tree, and a small model like gemini-3.5-flash-lite writes only the text labels. In an 11-prompt test run, the component tree appeared on screen in 92 to 298 milliseconds and complete screens rendered in 0.8 to 1.7 seconds. Controlled generation can only produce layouts its grammar describes, so screens requiring full flexibility are better suited to Express.

  • Jev answers multiple questions per request with probabilities near 1.0
  • Layout decisions made in ~30 questions per screen
  • Component tree rendered in ~200ms with placeholders for text
  • Text generation streamed via gemini-3.5-flash-lite in remaining time

Choosing the right approach

Developers should select based on how much of the screen structure can be defined ahead of time. Use a decision model for maximum speed when screens follow preset layouts. Use A2UI Express for full expressivity when layouts vary by content. Because inference formats are swappable, new use cases or future syntaxes need only a prompt generator and converter without changing the catalog or renderers.

Getting started

To adopt A2UI Express, install the Python SDK with pip install a2ui-agent-sdk or the TypeScript SDK with npm install @a2ui/agent, pass ExpressFormatFactory() when creating the generator, and run the model with thinking off. Existing catalogs and renderers require no changes. The Express specification documents the full syntax.

Source

Google Developers Bloghttps://developers.googleblog.com/fast-reliable-a2ui/

AI-assisted, verified against the source. This post was drafted with AI from the primary source linked above and checked automatically against it. For anything you depend on, read the original.

  • #a2ui
  • #generativeui
  • #llminference
  • #typescript
  • #python

More in Frontend