feat(a2ui): unified in-band action handlers — ag-ui toolkit slice (OSS-165) - #2239
Draft
contextablemark wants to merge 2 commits into
Draft
feat(a2ui): unified in-band action handlers — ag-ui toolkit slice (OSS-165)#2239contextablemark wants to merge 2 commits into
contextablemark wants to merge 2 commits into
Conversation
…ator support (OSS-165)
Ag-ui side of unified in-band A2UI action handlers (OSS-165 v2):
- setValue/toggleValue authoring builders emitting native `action.functionCall`
with the `agui.*` data-write vocabulary (centralises the wire name).
- validateA2UIComponents: accept `action.functionCall` — do not mis-flag a
write-target `path` as an unresolved binding, still validate nested `{path}`
read-bindings in arg values, and fail loud (`invalid_function_call`) on an
unknown `agui.*` fn or a missing required arg.
- generation guidance teaches the local-swap functionCall shape.
Renderer-side registration of the agui.* functions is the CopilotKit handoff.
Verified against real @a2ui/web_core and real LLMs (OpenAI + Gemini).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tract Regression test for how a forwarded `a2uiAction.userAction` is lowered into synthetic messages the agent reads (log_a2ui_event tool call + human-readable result), and that render_a2ui is available on that turn. Deterministic half of the forward round-trip verified during OSS-165 v2. See PNI-106 for formalizing this consumption + the v1.0 actionResponse/actionId round-trip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Python Preview PackagesVersion
Install with uvAdd the TestPyPI index to your [[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = trueThen install the packages you need: # Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1784854400' --index testpypi
# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1784854400' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1784854400' --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.dev1784854400' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1784854400' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1784854400' --index testpypiInstall with pippip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
ag-ui-protocol==0.0.0.dev1784854400
Commit: ea7a28b |
@ag-ui/a2a-middleware
@ag-ui/a2ui-middleware
@ag-ui/event-throttle-middleware
@ag-ui/mcp-apps-middleware
@ag-ui/mcp-middleware
@ag-ui/a2a
@ag-ui/adk
@ag-ui/ag2
@ag-ui/agno
@ag-ui/aws-strands
@ag-ui/claude-agent-sdk
@ag-ui/crewai
@ag-ui/langchain
@ag-ui/langgraph
@ag-ui/llamaindex
@ag-ui/mastra
@ag-ui/pydantic-ai
@ag-ui/vercel-ai-sdk
@ag-ui/watsonx
@ag-ui/a2ui-toolkit
create-ag-ui-app
@ag-ui/client
@ag-ui/core
@ag-ui/encoder
@ag-ui/proto
commit: |
contextablemark
marked this pull request as draft
July 26, 2026 06:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Ag-ui–side slice of unified in-band A2UI action handlers (OSS-165). Lets an agent ship a local, no-round-trip interaction by authoring a native
action.functionCallreferencing a smallagui.*data-write vocabulary, delivered in-band in the component JSON (one path for static + dynamic; no side-channel).Renderer-side registration of the
agui.*functions is the CopilotKit handoff (separate repo) — this PR is the framework-agnostic ag-ui layer.Commits
setValue/toggleValueauthoring builders (emitaction.functionCall, centralise theagui.*name);validateA2UIComponentsnow acceptsaction.functionCall— doesn't mis-flag a write-targetpathas an unresolved binding, still validates nested{path}read-bindings in arg values, and fails loud (invalid_function_call) on an unknownagui.*fn / missing required arg; generation guidance teaches the local-swap shape.a2uiAction.userAction→ syntheticlog_a2ui_event+ human-readable result +render_a2uiavailable on the turn).Verification
@ag-ui/a2ui-toolkit: 111 tests, typecheck + build clean.@ag-ui/a2ui-middleware: 100 tests (incl. the new forward-contract test) — no downstream breakage.@a2ui/web_core(headless): the prototypedagui.*functions execute against a real surface — setValue (literal + path-bound copy), toggleValue (boolean + List show/hide), reactive notify; the shipped builder's output executes end-to-end.agui.*local swaps under the new guidance; validator accepts/rejects correctly; web_core executes them.Scope / follow-ups
agui.setValue/agui.toggleValuein the renderer catalog (shared, framework-agnostic module → React first, Angular/Vue fast-follow), Python helpers, docs (#4821).actionResponse/actionId) tracked separately as PNI-106.Related: OSS-165 · PNI-106 · CopilotKit#4821
🤖 Generated with Claude Code