Skip to content

docs: add Google Genkit A2UI integration guide and framework references - #2686

Draft
chrisraygill wants to merge 2 commits into
a2ui-project:mainfrom
chrisraygill:docs/genkit-integration
Draft

chrisraygill wants to merge 2 commits into
a2ui-project:mainfrom
chrisraygill:docs/genkit-integration

Conversation

@chrisraygill

@chrisraygill chrisraygill commented Sep 17, 2026

Copy link
Copy Markdown

Summary

Adds first-class documentation for Google Genkit (@genkit-ai/a2ui, github.com/firebase/genkit/go/plugins/a2ui/exp, and package:genkit_a2ui) across the A2UI documentation site, and standardizes the framework guide naming under Guides:

  1. New Guide (docs/public/guides/genkit.md):

    • Building A2UI Agents with Genkit: Covers server-side middleware setup across JavaScript/TypeScript (@genkit-ai/a2ui), Go (github.com/firebase/genkit/go/plugins/a2ui/exp), and Dart (package:genkit_a2ui).
    • Covers client-side surface rendering and two-way action handling (a2uiEnvelopesFromParts and actionToMessage) for both Web (@a2ui/lit + @genkit-ai/a2ui/client) and Flutter (genui + package:genkit_a2ui/client.dart).
    • Covers custom catalog registration (loadCatalog / a2uix.LoadCatalog) and Developer UI observability (genkit start).
    • Links to official Genkit A2UI documentation (https://genkit.dev/docs/agents/a2ui) and runnable sample applications across all supported SDKs.
  2. Standardized Framework Guides (mkdocs.yaml & docs/public/guides/):

    • Renamed guides/agent-development.mdguides/adk.md (Building A2UI Agents with ADK) with redirect mapping in mkdocs.yaml.
    • Renamed guides/a2ui-with-any-agent-framework.mdguides/copilotkit.md (Building A2UI Agents with CopilotKit) with redirect mapping in mkdocs.yaml.
  3. Ecosystem & Navigation Updates:

    • Added Google Genkit: Full-Stack AI Framework section to docs/public/ecosystem/a2ui-in-the-world.md (above Google ADK) and added the Genkit + Flutter Dining Concierge sample under Open Source Examples.
    • Added Genkit SDK options and sample links in docs/public/introduction/how-to-use.md, docs/public/reference/agents.md, and docs/public/roadmap.md.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive documentation for integrating Google Genkit with A2UI, including new guides, updated ecosystem references, and roadmap updates. The review identified three technical issues in the provided code snippets: an incorrect struct literal usage for inline prompts in the Go example, and the use of provider-specific, fragile content access patterns in both the TypeScript and Dart client examples. These should be updated to use the recommended idiomatic function calls and provider-agnostic content access methods.

Comment on lines +97 to +101
aix.InlinePrompt{
ai.WithModelName("googleai/gemini-flash-latest"),
ai.WithSystem("You help users. Render UI when it is clearer than prose."),
ai.WithUse(&a2uix.Surfaces{}),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Genkit Go, the standard option to define an inline prompt is aix.WithInlinePrompt(...) (a function call) rather than aix.InlinePrompt{...} (a struct/slice literal). Using the function call is idiomatic and ensures correct compilation.

Suggested change
aix.InlinePrompt{
ai.WithModelName("googleai/gemini-flash-latest"),
ai.WithSystem("You help users. Render UI when it is clearer than prose."),
ai.WithUse(&a2uix.Surfaces{}),
},
aix.WithInlinePrompt(
ai.WithModelName("googleai/gemini-flash-latest"),
ai.WithSystem("You help users. Render UI when it is clearer than prose."),
ai.WithUse(&a2uix.Surfaces{}),
)

message: actionToMessage(action as unknown as A2uiClientAction),
});
for await (const chunk of turn.stream) {
const envelopes = a2uiEnvelopesFromParts(chunk.raw.modelChunk?.content);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Accessing chunk.raw.modelChunk?.content is provider-specific and fragile. In Genkit, the standard, provider-agnostic way to access the content parts of a chunk is via chunk.content.

Suggested change
const envelopes = a2uiEnvelopesFromParts(chunk.raw.modelChunk?.content);
const envelopes = a2uiEnvelopesFromParts(chunk.content);

// Stream prose deltas and A2UI envelopes
final turn = chat.sendStream(text: 'Book a table for 4 tomorrow evening');
await for (final chunk in turn.stream) {
for (final envelope in a2uiEnvelopesFromParts(chunk.raw.modelChunk?.content)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Accessing chunk.raw.modelChunk?.content is provider-specific and fragile. In Genkit Dart, the standard, provider-agnostic way to access the content parts of a chunk is via chunk.content.

Suggested change
for (final envelope in a2uiEnvelopesFromParts(chunk.raw.modelChunk?.content)) {
for (final envelope in a2uiEnvelopesFromParts(chunk.content)) {

@github-actions github-actions Bot added the status: needs-triage auto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs label Sep 17, 2026
@josemontespg josemontespg added the status: needs-team-input Gardener needed the team's input to get it out of triage queue. label Sep 22, 2026
@josemontespg

Copy link
Copy Markdown
Collaborator

Thanks for putting this together. Two requests before this is ready for review: please open an issue that describes the Genkit docs plan (the new guide, the ADK and CopilotKit guide renames, and the Guides nav order) and link it from the PR description so the team can prioritize and assign it, and mark the PR ready for review once it is complete. The guide renames and the nav order are a docs structure decision, so expect input from the docs owners on those parts.

@github-actions github-actions Bot removed the status: needs-triage auto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs label Sep 22, 2026
@josemontespg josemontespg removed the status: needs-team-input Gardener needed the team's input to get it out of triage queue. label Sep 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants