OCT. 27, 2026 (英语).
我们听到了你对A2UI速度的担忧和基因化的UI体验:人们在模型生成每个屏幕时等待。 这个发布会给你一些杠杆来更快地做,这样你就可以选择适合每个屏幕的权衡。
我们很高兴推出可互换推论格式,与A2UI分享如何利用决策模式的例子,使用我们新的A2UI Express作为推论格式,您可以减少延迟,最多为3x,最多为80x使用像Jev这样的决策模型来做出布局决定。 与Direct JSON相比,快车需要最多3x更少的代币来生成同类UI. 我们将潜入这个博客文章中的细节。
A2UI是基因UI的agent-优化协议,客户端将可信赖组件的目录作为合同进行广告,agent发送A2UI消息描述由该目录构成的有线用户界面,客户端的渲染器绘制UI(参见介绍A2UI).
最初agents直接生成了A2UI JSON的运输信息,每一个卷曲的支架和巢状元素。 结果发现,生成JSON树受到复杂的JSON schema的束缚是缓慢的,对LLMs来说容易出错。 这把A2UI与输出文本的LLMs结合了起来,使得集成更快的System One决策模型变得困难。
现在agents可以生成A2UI Express,一种为推论速度和准确性而优化的中间格式,并依靠A2UI的Agent SDKs中的定型码将其翻译为基于JSON的运输协议。 Agent构建器也可以在任何其他DSL及其相关编译器中自由互换,用于任何特殊的使用大小写,我们的A2UI Agent SDK(s)使其与运输兼容并制作。
模型生成的格式是所谓的推论格式。 当你创建生成器时你用一个参数设置它。 SDK为该格式生成即时指示,并将模型的回复汇编为标准的A2UI消息。 这篇文章涵盖了互换是如何运作的,我们为什么开发A2UI Express作为新的默认推论格式,以及决策模型如何从您预先定义的布局中构建屏幕。
一个推论格式有两个部分,SDK从你的目录的JSON schema中生成两个部分。 即时部分教模型格式的语法,一个编译器将模型的回复汇编成经过验证的A2UI消息。 因为两者都来自计划,一种格式无法描述您目录缺少的组件或属性。
当创建生成器时,您用一个参数选择格式:
从 a2ui.处理器导入 A2uiGenerator, CatalogConfig
从 a2ui.format formats 导入Express Format Factory
catalog = catalogConfig. from path (“ catalog. json ”) (中文(简体) ).
生成器 = A2uiGenerator ()
[目录]
示例=few shot examples, # 曾经写成 A2UI JSON
推论 formaty=ExpressFactory ()
)
处理器 = 生成器。 create processor( render capabilitys)
system prompt = f"{指示}\n\n{处理器.prompt spippet}"
部件 = 处理器.parse response(模型 reply)# 文本部分 + 已验证的 A2UI 消息
Python
复制
A2UI快车在Python agent SDK(PyPI上的a2ui-agent-sdk 0.9.0),TypeScript agent SDK(npm上的@a2ui/agent)和Dart SDK(pub.dev上的a2ui agent 0.0.1-wip004)中均可使用。 在 TypeScript 中,您通过新的ExpressFormatFactory () 作为生成器的第三个参数。 Python和TypeScript SDK既可以逐块流出直流JSON块,也可以从完整回文中编译Express.
Express每行写一个语句,风格接近Python. 每行向变量分配一个组件,变量名称成为组件ID. 参数是位置:编译器将其映射到属性名称,按您的目录计划声明的顺序排列,跳过一个。 $/ title 绑定一个值到数据模型中,Event ("接受") 宣布服务器动作。 这是A2UI画廊在Express中的通知卡:
表面 (“ 邮件通知/ 许可” )
$/description=“获得更改命令状态的提醒”
$/icon=“检查”
$/title=“允许通知”
root=证书(主栏)
主栏=Column([icon,标题,描述,动作],,"中心").
图标=Icon($/icon)
标题=文本(美元/标题)
说明=文本(美元/说明,“机构”)
动作=Row([是 btn, no btn],"中心")
是 btn text=文本 (“ 是”)
是 btn=按钮(是 btn text,,事件("接受", Q))
无 btn 文本=文本 ("否")
no btn=按钮(no btn text,,事件("decline, X")).
纯文本
包括A2UI Express在内的可移动推论格式也与 Python agent SDK 中的宏合作,当屏幕显示数据您系统已经持有时会有所帮助。 模型只写一个ID的呼叫,如 OrderStatus ("ord 42"),您的宏会获取顺序并填充数值,因此屏幕上的每个值都直接来自您的数据。 宏 README 显示设置。
客户的反馈发现JSON一代人存在不成熟和准确的问题。 为了解决这个问题,我们开始设计新的推论格式。 我们尝试了四种选择:
- 直接JSON:这是我们现有的基线,我们发布在2025年12月。
- Express:我们选择的最后`python ' 语法启发格式作为新的默认。
- Atom:写Lisp风格的S-表情,没有任务和关闭标记。
- 元素:写有自定义元素的 HTML,并打赌模型已经写得有多好 HTML。
我们在gemini-3.5-flash上运行了所有四种格式,并把它们比作思维模式:开和关。
我们观察到," Express " 推论格式在思考时同样有效;在与 " A2UI Express " 合作时,它能给你最快的推论时间。
一些屏幕有已知的形状,如设置页面,退票或确认。 对于这些,模型不需要设计一个布局。 它需要在您已经定义的布局中做出选择,为此建造了另一种模型。 为此,你不需要A2UI Express提供的全表达性。
Jev,来自TypeSafe,是被称为System One的模型,用于做出快速,结构化的决定,代码可以直接使用。 Jev不生成文本或JSON. 你发送一个状态和一组打出的问题,它用校准的概率回答每个问题。 一个问题可以问一个语句是真实的(Noul),从列表中哪一个选项适合(Choice),或者某个标题(Score)上的东西如何得分。 Jev在一个请求中回答了许多问题,大约100至300毫秒。
Apparite(jev2ui),一种开源设计工具,显示一种将System One模型连接到A2UI的方法。 Jev决定每个屏幕的结构,代码从这些决定中构建A2UI组件,一个小模型gemini-3.5-flash-lite,只写文字。 这些问题以预先写成的马克登语法进行直播。 一块块引文提出一个问题,子弹是它的选项,每个都有标准。 这个块从语法/屏幕。 md 决定哪个控制设置行获得:
QQ 行控制(每行各行,每组内)
材质:一个开/关的开关,即刻生效。 HIG:打开另一页的行的披露指标。
> `{row}`是所提供屏幕和区域中的一行。 分组行可以代表内容,导航,设置或动作;使用它们的实际文本和上下文来决定。
>
> 什么样的行是{row}?
- **switch** — 一个简单打开或关闭并同时生效的设置:通知,暗模式,自动播放,同步。
- **值**——从若干页中选取一个当前值的设置,在另一页中更改:语言、质量、主题、频率、单位。
- **nav**——与另一页的链接:内容项目,细节,账户,隐私,帮助,关于或管理某事。 它的文本和章节确定了它打开的内容。
- 检查** - 几个选项一起列出,其中一个选项被选择:单一设置的选择,如‘10秒',‘30秒',‘高',‘低'.
- **危险**——最终或破坏性账户行动:签署、删除账户、清晰数据、重置。
在播客app的设置屏幕上,Jev回答跳过前置值,自动下载开关和日志出危险,每个在p ≈ 1.00. apparite在三个步骤中构建了整个屏幕:
- 一个Jev请求回答语法的布局问题,一个屏幕大约30个。
- 代码从目录中构建组件树,并以大约200ms发送创建Surface并更新Conforments,其中将包含文字去处的占位符。
- gemini-3.5-flash-lite 将文本流到更新DataModel中。 随着每个部分的到来,小后续Jev请求解决取决于它的内容,如上面的行控制。
在一次运行的11个提示中,组件树在92至298ms的屏幕上,每个屏幕在0.8至1.7s完成。 文本写作机每个屏幕生成101至341个令牌,Apparite的Jev管道都在所有11个提示上都产生了有效的A2UI. 该项目将这些数字作为第一眼,因为样本很小。
被控制的生成只能产生其语法描述的布局。 Apparite的语法覆盖9个屏幕拱形型和12块,因此没有已知形状的屏幕更适合Express. A2UI Agent SDKs,先不要包括决定模型推论格式;apparite(jev2ui)项目是一个实例
A2UI Express速度快,保持了A2UI的完全表达力,但做出多个独立决定的决策模式仍然更快。 选择您可以提前定义多少屏幕:
- 控制,当一个决定模式能够产生你需要的东西。 如果屏幕遵循设定和定义的布局,一个决定模型可能是最快的选择。
- 完全表达的快递。 当一个屏幕需要基于您的目录更清晰的表达性时,返回 A2UI Express. 它的速度很快,模型仍然写着整个组件树。
- 任何新事物你都有自己的格式因为推论格式是可互换的,所以新使用大小写或未来的语法只需要一个教学模型您的 DSL 的快速生成器和在您的 DSL 和 A2UI 消息之间转换的转换器。 你的目录和制作器都一样
在您的 agent 中使用快车。 安装 Python SDK 用ip安装 a2ui-agent-sdk 或 TypeScript SDK 用 npm 安装@a2ui/agent,在创建生成器时通过ExpressFormatFactory(),并用思维运行模型。 你的目录和渲染器保持不变 Express规格记录了语法
要教Gemini,或者任何其他会加载技能的模型,只用您的组件来写入Express,用 Python SDK 的 SkillGenerator 从您的目录中生成技能:
导入 Json
从 a2ui.core 导入目录
从 a2ui. informat format. 表达式导入快递格式
从 a2ui.skill 导入 SkillGenerator
目录 = catalog.from json(json.load) (打开("catalog.json")).
技能 = skillGenerator(ExpressFormat([目录]))) 遗传技能()
technology.export to directory ("技能") # a2ui-core + 每个目录一个技能
尝试控制生成。 克隆例Jev2ui寄存器,并遵循那里的指示开始。 Apparite(jev2ui)的主机版本运行于apparite.cnfg.ai.
早期的A2UI:引入A2UI(2025年12月),A2UI v0.9(2026年4月)和A2UI + MCP Apps(2026年6月).
- A2UI快车规格
- A2UI元素规格和A2UI原子规格
- A2UI eval中的推论格式基线
- a2ui-agent-sdk changlog(2026年10月17日0.9.0)和npm上的@a2ui/agent(0.0.1)
- Python agent SDK的熟练发电机
- 来自TypeSafe的Jev文档
- 支持(jev2ui) README,"至今为止的成果"和"知识极限",及其屏幕语法
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
OCT. 27, 2026
We've heard your concerns about the speed of A2UI and generative UI experiences: people wait while the model generates each screen. This release gives you levers to make that faster, so you can choose the trade-off that fits each screen.
With this release, we’re happy to introduce swappable inference formats and share examples on leveraging decision models with A2UI, which help building faster and more reliable generative UI experiences. Using our new A2UI Express as an inference format you can reduce latency by up to 3x, and up-to 80x using decision models like Jev to make layout decisions. Express requires up to 3x fewer tokens to generate the same kinds of UI compared to Direct JSON. We'll dive into the details in this blog post.
A2UI is an agent-optimized protocol for generative UI, where a client advertises a catalog of trusted components as a contract, an agent sends A2UI messages describing a bespoke user interface composed from that catalog, and the client's renderer draws the UI (see Introducing A2UI).
Initially agents generated A2UI JSON transport messages directly, every curly brace and nested element. It turns out that generating JSON trees constrained by a complex JSON schema is slow and error-prone for LLMs. This coupled A2UI to LLMs, which output text, and made it difficult to integrate faster System One decision models.
Now agents can generate A2UI Express, an intermediate format optimized for inference speed and accuracy, and rely on deterministic code in A2UI's Agent SDKs to translate it into the JSON-based transport protocol. Agent builders are also free to swap in any other DSL and its associated compiler for any special use-cases, and our A2UI Agent SDK(s) make it compatible with transports and renders.
The format the model generates is what we call inference_format. You set it with one argument when you create the generator. The SDK generates the prompt instructions for that format and compiles the model's reply into standard A2UI messages. This post covers how the swap works, why we developed A2UI Express as the new default inference format, and how a decision model can build screens from layouts you define in advance.
An inference format has two parts, and the SDK generates both from your catalog's JSON schema. A prompt section teaches the model the format's syntax, and a compiler compiles the model's reply into validated A2UI messages. Because both come from the schema, a format can't describe a component or property that your catalog lacks.
You choose the format with one argument when you create the generator:
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, # written once as A2UI JSON
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) # text parts + validated A2UI messages
Python
Copied
A2UI Express is available in the Python agent SDK (a2ui-agent-sdk 0.9.0 on PyPI), in the TypeScript agent SDK (@a2ui/agent on npm), and in the Dart SDK (a2ui_agent 0.0.1-wip004 on pub.dev). In TypeScript, you pass new ExpressFormatFactory() as the generator's third argument. The Python and TypeScript SDKs can both stream Direct JSON chunk by chunk, and they compile Express from the complete reply.
Express writes one statement per line, in a style close to Python. Each line assigns a component to a variable, and the variable name becomes the component ID. Arguments are positional: the compiler maps them to property names in the order your catalog schema declares them, and _ skips one. $/title binds a value to the data model, and Event("accept") declares a server action. This is the A2UI gallery's notification card in Express:
surface("gallery-notification-permission")
$/description="Get alerts for order status changes"
$/icon="check"
$/title="Enable notification"
root=Card(main_column)
main_column=Column([icon, title, description, actions], _, "center")
icon=Icon($/icon)
title=Text($/title)
description=Text($/description, "body")
actions=Row([yes_btn, no_btn], "center")
yes_btn_text=Text("Yes")
yes_btn=Button(yes_btn_text, _, Event("accept", {}))
no_btn_text=Text("No")
no_btn=Button(no_btn_text, _, Event("decline", {}))
Plain text
Swappable Inference formats including A2UI Express also work with macros in the Python agent SDK, which help when a screen shows data your systems already hold. The model writes a call with only an ID, such as OrderStatus("ord_42"), and your macro fetches the order and fills in the values, so every value on screen comes straight from your data. The macros README shows the setup.
Customer feedback uncovered latency and accuracy issues with direct JSON generation. To fix this, we started devising a new inference format. We experimented with four options:
- Direct JSON: This was our existing baseline that we launched with back in December 2025.
- Express: The final `python` syntax inspired format that we picked as the new default.
- Atom: Writes Lisp-style S-expressions with no assignments and no closing tags.
- Elemental: Writes HTML with custom elements, betting on how well models already write HTML.
We ran all four formats through the same 51-task eval on gemini-3.5-flash and compared them for thinking modes: on and off.
We observed that Express inference format works just as well even with thinking off; which can give you the fastest inference times when working with A2UI Express.
Some screens have a known shape, such as a settings page, a checkout or a confirmation. For those, the model doesn't need to design a layout. It needs to choose among layouts you have already defined, and a different kind of model is built for that. For this, you would not need the full expressivity provided by A2UI Express.
Jev, from TypeSafe, is what is called a System One model, built to make fast, structured decisions that code can use directly. Jev doesn't generate text or JSON. You send it a state and a set of typed questions, and it answers each one with calibrated probabilities. A question can ask whether a statement is true (Noul), which option from a list fits (Choice), or how something scores on a rubric (Score). Jev answers many questions in one request, in roughly 100 to 300 ms.
Apparite(jev2ui), an open-source design tool, shows one way to connect a System One model to A2UI. Jev decides the structure of each screen, code builds the A2UI components from those decisions, and a small model, gemini-3.5-flash-lite, writes only the text. The questions live in a Markdown grammar written ahead of time. A blockquote asks a question, and the bullets are its options, each with criteria. This block from grammar/screen.md decides which control a settings row gets:
#### row_control (of each row in rows, within each group in groups)
Material: a switch for one on/off setting that takes effect at once. HIG: a disclosure indicator for a row that opens another page.
> `{row}` is a row in the supplied screen and section. Grouped rows can represent content, navigation, settings or actions; use their actual text and context to decide.
>
> What kind of row is {row}?
- **switch** — A setting that is simply on or off and takes effect at once: notifications, dark mode, autoplay, sync.
- **value** — A setting with one current value picked from several, changed on another page: language, quality, theme, frequency, units.
- **nav** — A link to another page: a content item, details, account, privacy, help, about, or managing something. Its text and section identify what it opens.
- **check** — One of several alternative options listed together, of which one is chosen: the choices of a single setting, such as '10 seconds', '30 seconds', 'High', 'Low'.
- **danger** — A final or destructive account action: sign out, delete account, clear data, reset.
On a podcast app's settings screen, Jev answers Skip forward → value, Auto-download → switch and Log out → danger, each at p ≈ 1.00. Apparite builds a whole screen in three steps:
- One Jev request answers the grammar's layout questions, about 30 for a screen.
- Code builds the component tree from the catalog and sends createSurface and updateComponents at about 200 ms, with placeholders where the text will go.
- gemini-3.5-flash-lite streams the text into updateDataModel. As each part arrives, small follow-up Jev requests settle what depends on it, such as the row controls above.
In one run of 11 prompts, the component tree was on screen in 92 to 298 ms and each screen was complete in 0.8 to 1.7 s. The text writer generated 101 to 341 tokens per screen, and both of Apparite's Jev pipelines produced valid A2UI on all 11 prompts. The project treats these numbers as a first look, since the sample is small.
Controlled generation can only produce the layouts its grammar describes. Apparite's grammar covers nine screen archetypes and twelve blocks, so screens without a known shape are a better fit for Express. A2UI Agent SDKs, don’t include a decision model inference format yet; apparite(jev2ui) project is an example on how A2UI messages could be assembled given a batch of independent decisions from a decision model.
A2UI Express is fast and keeps the full expressivity of A2UI, but a decision model making multiple independent decisions is still faster. Choose by how much of the screen you can define ahead of time:
- Controlled, when a decision model can produce what you need. If your screens follow set and defined layouts, a decision model may be the fastest option.
- Express for full expressivity. When a screen needs more expressivity based on your catalog, fall back to A2UI Express. It's fast, and the model still writes the whole component tree.
- Your own format for anything new. Because inference formats are swappable, a new use case or a future syntax needs only a prompt generator that teaches the model your DSL and a converter that converts between your DSL and A2UI messages. Your catalog and renderers stay the same.
Use Express in your agent. Install the Python SDK with pip install a2ui-agent-sdk or the TypeScript SDK with npm install @a2ui/agent, pass ExpressFormatFactory() when you create the generator, and run the model with thinking off. Your catalog and renderers stay as they are, and the Express specification documents the syntax.
To teach Gemini, or any other model that loads skills, to write Express with only your components, generate skills from your catalog with the Python SDK's SkillGenerator:
import json
from a2ui.core import Catalog
from a2ui.inference_formats.express import ExpressFormat
from a2ui.skill import SkillGenerator
catalog = Catalog.from_json(json.load(open("catalog.json")))
skills = SkillGenerator(ExpressFormat([catalog])).generate_skillset()
skills.export_to_directory("skills") # a2ui-core plus one skill per catalog
Try controlled generation. Clone the example jev2ui repository, and follow the instructions there to get started. A hosted version of Apparite(jev2ui) runs at apparite.cnfg.ai.
Earlier A2UI posts: Introducing A2UI (December 2025), A2UI v0.9 (April 2026) and A2UI + MCP Apps (June 2026).
- A2UI Express specification
- A2UI Elemental specification and A2UI Atom specification
- Inference format baselines in the A2UI eval
- a2ui-agent-sdk changelog (0.9.0, October 17, 2026) and @a2ui/agent on npm (0.0.1)
- Skill generator in the Python agent SDK
- Jev documentation from TypeSafe
- Apparite (jev2ui) README, "Results so far" and "Known limits", and its screen grammar
Auto-fetched and translated by AI Atlas. All rights belong to the original author.