Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a Genkit server that serves A2UI protocol. Now, it's not an A2A server, so that's kind of weird, but it's a start.
Summary of Changes
This pull request establishes the foundational
a2ui_server
package, a critical server-side component for the GenUI framework. It integrates the Genkit framework to enable dynamic UI generation by an LLM, which processes conversation history and a client's widget catalog to produce real-time UI updates. The server specifically implements the A2UI protocol, translating LLM-generated tool calls into a stream of UI modification messages for the client. This initial setup provides a robust, scalable, and well-documented backend for interactive, AI-driven user interfaces.Highlights
a2ui_server
Package: Introduces a new server-side component for the GenUI framework, built with Genkit.generateUiFlow
: Implements a streaming Genkit flow (generateUiFlow
) for real-time UI updates.IMPLEMENTATION.md
andREADME.md
files covering architecture, API, and usage.Changelog
a2ui_server
package, ignoring common build artifacts and dependencies.a2ui_server
.a2ui_server
, including prerequisites, installation, running instructions, logging configuration, and API details.generateUiFlow
logic, including defining UI-related tools (updateSurface, deleteSurface), dynamically generating system prompts based on the widget catalog, transforming client conversation messages into an LLM-compatible format, and streaming A2UI protocol responses.gemini-1.5-flash
model.generateUiFlow
.generateUiFlow
, covering input validation, conversation mapping, tool call transformation, and response handling.startSession
endpoint with a predefined widget catalog.