OCT. 27, 2026 (英语).
我们听到了你对A2UI的速度和基因化的UI体验的担忧:人们在模型产生每个屏幕时等待。 这个发布会给你各种杠杆来更快地实现,这样你就可以选择适合每个屏幕的取舍。
我们很高兴推出可互换的推论格式,使用我们新的 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 导入快取Factory
catalog = catalogConfig. from path ("catalog.json") 互联网档案馆的存檔,存档日期2013-12-20.
发电机 = A2uiGenerator(
[目录]
示例=few shot examples, # 曾被写为 A2UI JSON
推论 formaty=ExpressFormat Factory ()
)
处理器 = 生成器。 create processor (resister capabilitys)
系统即时=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 (a2ui agent 0.0.1-wip004 on pub.dev)中均可使用。 在 TypeScript 中,您通过新的ExpressFormatFactory () 作为生成器的第三个参数。 Python和TypeScript SDK既能逐个流出直流JSON块,又能从完整回文中编译快取。
Express每行写一个语句,风格接近Python. 每行向变量分配一个组件,变量名称成为组件ID. 参数为位置:编译器将其映射到属性名称,顺序为您的目录计划声明它们,跳过一个。 $/ title 绑定一个值到数据模型中,Event ("接受") 宣布服务器动作。 这是A2UI画廊的快递通知卡:
平面 (“ 邮件通知/ 许可” )
$/description=“获得更改命令状态的提醒”
$/icon=“检查”
$/title=“允许通知”
root=证书(主栏)
主栏=Column ([icon,标题,描述,动作],,"中心").
图标=Icon(美元/立方厘米)
标题=文本(美元/标题)
说明=文本(美元/说明,“机构”)
动作=Row([是 btn, no btn],"中心")
是 btn text=text ("是")
是 btn=按钮(是 btn text,,事件 ("接受", ))
无 btn text=text ("否")
no btn=按钮( no btn text,, Event ("decline", )).
纯文本
包括 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上运行了所有四种格式的同一种51个任务eval,并把它们比作思维模式:上下。
我们观察到," Express " 推论格式即使在思考时也一样有效;这可以使你在与A2UI Express合作时获得最快的推论时间。
一些屏幕有已知的形状,例如设置页面,取出或确认。 对于这些,模型不需要设计出布局。 它需要在您已经定义的布局中做出选择,为此构建了另一种模式。 为此,你不需要A2UI Express提供的全表达性。
来自TypeSafe的Jev是被称作"系统一号"的模型,它是为了做出快速,结构化的决定而建造的,代码可以直接使用。 Jev不生成文本或JSON. 你发送一个状态和一组打出的问题,它用校准概率来回答每个问题。 一个问题可以问一个语句是真实的(Noul),从列表中哪一个选项适合(Choice),或者某个标题(Score)上的东西如何得分。 Jev在一个请求中回答了许多问题,大约100至300毫秒。
Apparite(jev2ui),一种开源设计工具,显示一种将一个系统一号模型连接到A2UI的方法。 Jev决定了每个屏幕的结构,代码从这些决定中构建了A2UI组件,一个小模型gemini-3.5-flash-lite只写出文本。 问题以预先写成的Markdown语法进行直播。 弹出一个问题,子弹是它的选项,每个都有标准。 这个块从语法/屏幕。 md 决定控制哪个设置行获得:
QQ行控制(每行各行,每组各行)
材质:一个开/关的开关,即刻生效。 HIG:打开另一页的行的披露指标。
> QQrow}`是所提供屏幕和区域中的一行。 分组行可以代表内容,导航,设置或动作;使用其实际文本和上下文来决定。
>
> 什么样的行是{row}?
- **switch** — 一个简单打开或关闭并同时生效的设置:通知,暗模式,自动播放,同步。
- **值**——从若干页中取出一个当前值的设置,在另一页中更改:语言、质量、主题、频率、单位。
- **nav**——另一个页面的链接:内容项目,细节,账户,隐私,帮助,关于或管理某事。 它的文字和章节指明它打开的内容。
- 检查** - 一起列出的几个备选选项之一,其中选取一个:单一设置的选择,如"10秒","30秒","高","低"等。
- **危险**——最终或破坏性账户行动:签署、删除账户、清晰数据、重置。
在播客应用的设置屏幕上,Jev回答跳过前置值,自动下载开关和日志出出危险,每个在p ≈ 1.00. Apparite在三个步骤中构建了整个屏幕:
- 一个Jev请求回答语法的布局问题,一个屏幕大约30个。
- 代码从目录中构建组件树,并发送创建Surface并更新约200 ms的组件,其中将包含文字去处的占位符。
- gemini-3.5-flash-lite将文本流入更新的DataModel. 随着每一部分的到来,小后续Jev请求解决了取决于它的东西,例如上面的行控制。
在一跑出11个快板中,组件树以92至298 ms在屏幕上,每个屏幕以0.8至1.7 s完成。 文字写作机每个屏幕共生成了101到341个令牌,Apparite的Jev管道都在所有11个提示上都产生了有效的A2UI. 该项目将这些数字作为第一眼,因为样本很小。
被控制的生成只能产生其语法描述的布局。 Apparite的语法覆盖了九个屏幕拱形型和十二块,因此没有已知形状的屏幕更适合Express. A2UI Agent SDKs,还不包括决定模型推论格式;apparite( jev2ui) 项目是一个实例
A2UI快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取快取选择您可以提前定义多少屏幕:
- 被控制,当一个决定模型可以产生你需要的东西。 如果屏幕遵循设定和定义的布局,一个决定模型可能是最快的选项。
- 满口快感当屏幕需要基于您的目录更清晰的表达性时,返回 A2UI Express. 速度快,而模型仍会写出整个组件树。
- 你自己的新形式因为推论格式是可互换的,所以新的使用大小写或未来的语法只需要一个能教授您 DSL 模型的即时生成器和在您的 DSL 和 A2UI 消息之间转换的转换器。 你的目录和制造器都一样
在您的 agent 中使用快递。 安装 Python SDK 用ip安装 a2ui-agent-sdk 或 TypeScript SDK 用 npm 安装@a2ui/agent,在创建生成器时通过ExpressFormatFactory(),并关闭思维运行模型。 您的目录和渲染器都保持不变 Express规格记录了语法。
教Gemini,或任何其他能加载技能的模型,只用您组件写入快递,用 Python SDK 的 SkillGenerator 从您的目录生成技能:
导入 json
从 a2ui.core 导入目录
从 a2ui. informat format. 导入快递格式
从 a2ui.skill 导入 SkillGenerator
目录 = catalog.from json (json.load (open ("catalog.json"))).
技能 = SkillGenerator(ExpressFormat ([目录]))). 遗传技能et ()
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 (0.9.0,2026年10月17日)和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 Gem Box. All rights belong to the original author.