Skip to content

feat(dojo): A2UI demos for the Microsoft Agent Framework (.NET) integration#1943

Open
ranst91 wants to merge 8 commits into
mainfrom
claude/bold-panini-33a097
Open

feat(dojo): A2UI demos for the Microsoft Agent Framework (.NET) integration#1943
ranst91 wants to merge 8 commits into
mainfrom
claude/bold-panini-33a097

Conversation

@ranst91

@ranst91 ranst91 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Wires the AG-UI Dojo for the microsoft-agent-framework-dotnet integration's A2UI features, and fixes one A2UI middleware edge case.

What's in here

  • Dojo wiring for four A2UI demos on the microsoft-agent-framework-dotnet integration: a2ui_fixed_schema, a2ui_dynamic_schema, a2ui_advanced (zero-config, client-injected render tool), and a2ui_recovery. Adds the menu features, the agent endpoints, and the runtime a2ui config (with injectA2UITool scoped to the zero-config agent only, so the schema-driven agents are not handed a redundant render tool).
  • e2e specs for the four features (cloned from the LangGraph TypeScript suite; aimock fixtures are prompt-matched and integration-agnostic).
  • a2ui-middleware fix: tolerate a double-serialized recovery envelope. Hosts that JSON-encode a string tool result once more (for example the Microsoft Agent Framework serializing an AIFunction's string return) deliver the recovery hard-failure envelope as a JSON-encoded string; tryParseRecoveryFailure now mirrors the double-parse tolerance tryParseA2UIOperations already had, so the exhausted envelope is not silently dropped.

Depends on

The .NET backend that serves these endpoints (the A2UI toolkit, the A2UIAgent adapter, and the AGUIDojoServer sample) lives in the Microsoft Agent Framework PR: microsoft/agent-framework#6494.

This PR awaits that one. The dojo microsoft-agent-framework-dotnet integration points at the MAF AGUIDojoServer sample; until a MAF preview package ships the A2UI pieces, these demos run against the backend from that PR. Hold merge until #6494 lands (or the package is published).

@ranst91
ranst91 requested a review from a team as a code owner June 12, 2026 10:34
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ag-ui-dojo Ready Ready Preview, Comment Jun 15, 2026 3:20pm

Request Review

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Python Preview Packages

Version 0.0.0.dev1781536605 published to TestPyPI.

Warning: These packages are built from contributor code that may not yet have been vetted for correctness or security. Install at your own risk and do not use in production.

Install with uv

Add the TestPyPI index to your pyproject.toml:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

Then install the packages you need:

# Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1781536605' --index testpypi

# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1781536605' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1781536605' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1781536605' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1781536605' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1781536605' --index testpypi

Install with pip

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  ag-ui-protocol==0.0.0.dev1781536605

Use --extra-index-url https://pypi.org/simple/ so pip can resolve
transitive dependencies (pydantic, fastapi, etc.) from real PyPI.


Commit: 3d7cb60

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ag-ui/a2a-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a-middleware@1943

@ag-ui/a2ui-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-middleware@1943

@ag-ui/event-throttle-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/event-throttle-middleware@1943

@ag-ui/mcp-apps-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-apps-middleware@1943

@ag-ui/mcp-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-middleware@1943

@ag-ui/a2a

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a@1943

@ag-ui/adk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk@1943

@ag-ui/ag2

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/ag2@1943

@ag-ui/agno

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/agno@1943

@ag-ui/aws-strands

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/aws-strands@1943

@ag-ui/claude-agent-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-agent-sdk@1943

@ag-ui/crewai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/crewai@1943

@ag-ui/langchain

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langchain@1943

@ag-ui/langgraph

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langgraph@1943

@ag-ui/llamaindex

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/llamaindex@1943

@ag-ui/mastra

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mastra@1943

@ag-ui/pydantic-ai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/pydantic-ai@1943

@ag-ui/vercel-ai-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/vercel-ai-sdk@1943

@ag-ui/watsonx

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/watsonx@1943

@ag-ui/a2ui-toolkit

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-toolkit@1943

create-ag-ui-app

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/create-ag-ui-app@1943

@ag-ui/client

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@1943

@ag-ui/core

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@1943

@ag-ui/encoder

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/encoder@1943

@ag-ui/proto

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/proto@1943

commit: f5eeef7

ranst91 added 7 commits June 12, 2026 12:42
Adds a2ui_fixed_schema, a2ui_dynamic_schema, and a2ui_recovery to the
Microsoft Agent Framework (.NET) integration: menu features, HttpAgent
endpoints, and e2e specs cloned from the LangGraph TypeScript suite (the
aimock fixtures are prompt-matched and integration-agnostic). The demo
endpoints are served by the MAF AGUIDojoServer sample carrying the A2UI
toolkit (fork branch feat/a2ui-toolkit-dotnet) until the next MAF preview
package ships them in the in-repo example server.
Hosts that JSON-serialize a string tool result once more (e.g. the Microsoft
Agent Framework serializing an AIFunction's string return) deliver the
recovery hard-failure envelope as a JSON-encoded string. tryParseA2UIOperations
already parses such content twice; tryParseRecoveryFailure did not, so the
exhausted envelope was silently dropped and no failed lifecycle snapshot was
emitted. Mirror the double-parse tolerance and cover it with a test.
…work-dotnet

Maps the a2ui_advanced feature to the integration's plain /a2ui_chat endpoint
and enables injectA2UITool on the runtime's A2UI middleware config for this
integration only: the middleware injects render_a2ui + usage guidelines, the
.NET hosting layer auto-binds the tool, and the streamed tool arguments paint
the surface progressively. Adds the advanced e2e specs (11 total now green).
Fixes:

- a2ui_advanced spec prompts no longer name the generate_a2ui tool — the
  dotnet zero-config endpoint exposes render_a2ui; the aimock fixtures match
  on tool presence plus a keyword, so the tool-agnostic wording still routes
  to the same fixtures.
- The exhaustion tests now assert the follow-up user message is visible, so
  the 'conversation stays usable' claim is backed by an assertion.
- recovery-gate tests assert the hard-failure snapshot's maxAttempts
  derivation (attempts.length, with fallback to the configured cap on an
  empty array).
- Dropped an unused import.
…only

The runtime-level a2ui config applied injectA2UITool to every a2ui agent of
the Agent Framework (.NET) integration, handing the model an extra render
tool on agents that carry their own A2UI flows (fixed-schema direct tools,
the generate_a2ui subagent, the recovery loop) — letting it bypass them.

a2ui_advanced now gets its own A2UIMiddleware (injection + dynamic catalog)
in agents.ts, and route.ts excludes it from the runtime middleware list for
this integration so the middleware is not applied twice.

Also harden the multi-surface fixed-schema e2e: re-assert the first surface
with a retrying locator before the point-in-time surface count.
Replace hardcoded 3s with the toolkit constant so the assertions track the
source of truth instead of breaking when the default cap changes.
… specs

The asserted data values are deterministic only because aimock serves
recorded fixtures; say so at the top of each spec (matching the recovery
spec's existing convention) so nobody runs them against a live model and
chases phantom flakes.
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.

1 participant