Skip to main content

Crate tirea_extension_a2ui

Crate tirea_extension_a2ui 

Source
Expand description

A2UI (Agent-to-UI) extension for Tirea.

Provides a tool-based interface for agents to emit A2UI declarative UI messages. The LLM calls A2uiRenderTool with A2UI JSON payloads; the tool validates the structure and returns the validated payload as its result, which flows through the AG-UI event stream to the frontend.

§Protocol overview

A2UI defines four server-to-client message types:

  • createSurface — initialize a rendering surface
  • updateComponents — define/update the component tree
  • updateDataModel — populate or change data values
  • deleteSurface — remove a surface

Each message carries "version": "v0.9" and exactly one of the above keys.

Structs§

A2uiPlugin
A2UI behavior plugin that injects A2UI schema and usage instructions into the system prompt before LLM inference.
A2uiRenderTool
Tool for rendering A2UI declarative UI.
A2uiValidationError
A2UI validation error.

Functions§

validate_a2ui_messages
Validate an array of A2UI messages.