Repository navigation
Conversation
Add the agent_functions feature blueprint (agent functions on the catalog, AgentFunctionRegistry, RendererFunctionCalls, RendererMessageRouter and framework wiring), and describe renderer fallback routing as required v1.0 behavior in the a2ui_core module blueprint (RPC lifecycle, ValidationConfig, conformance plan). Signed-off-by: Nan Yu <nanyu@google.com>
…base blueprints Pin agent_functions in the python/a2ui_core and python/a2ui_agent codebase blueprints, and move typescript/core/web_core and python/a2ui_core to the a2ui_core module blueprint commit that specifies fallback routing. dart/a2ui_core (no schema-only functions) and swift/core (behind on earlier module changes) keep their pins, with a note. Signed-off-by: Nan Yu <nanyu@google.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the 'Agent Functions' feature blueprint and updates several codebase blueprints (Dart, Python, Swift, TypeScript) and the core module blueprint to specify renderer fallback routing and agent-side function execution. It details how renderers route unexecutable function calls to the agent, how the agent registers and handles these calls, and how the agent can invoke renderer functions. As there are no review comments, I have no feedback to provide.
This branch has not been deployed
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.
Stacked on #3795. Review only the top two commits (
docs(blueprints): specify agent functions and renderer fallback routinganddocs(blueprints): record agent functions and fallback routing in codebase blueprints).Part of #3536. Related: #3415, #3535.
Description
The renderer stack (#3735, #3739–#3742) changed required v1.0 behavior in every renderer core, and #3792–#3795 added agent functions to the Python SDKs, but none of them touched
blueprints/. This PR brings the blueprints up to date with the code on #3795. Nothing outsideblueprints/changes.agent_functions.blueprint.md(module_blueprints: a2ui_core, a2ui_agent). It is written without Python names so that TypeScript and Dart can implement from it:agentFunctionsonCatalog, kept consistent withfunctionsthroughcopyWith,deriveand pruning, the name-collision error (unless the agent function is built from the declared entry), the pre-1.0 error, and serialization without handlers.catalogIdrules andagentOnly, argument validation with defaults, the handler context, and the concurrency, timeout (on the registry, not per function), cancellation andDISPOSEDrules. Then the renderer function call helper (CANCELLEDon dispose,DISPOSEDafterwards,TOO_MANY_PENDING,DUPLICATE), the renderer message router, and the rule that anullvaluemust survive serialization.a2ui_coremodule blueprint (diff):MessageProcessoronly with an outbound listener), the resolvedcatalogId, schema-only functions, nested pending and failed arguments, sharing and caching, and cancelling a surface's calls ondeleteSurface.RpcHandlergetscancelSurfaceCalls. The rules link to the protocol doc instead of restating it.ValidationConfig: whatallowUnknownElements: falsemeans for agent functions, and the schema-only alternative.conformance/core/agent_function_routing.yaml.python/a2ui_coreandpython/a2ui_agentpinagent_functionsto the feature blueprint's commit.python/a2ui_agentgets a note on asyncio andasyncio.to_thread.module_blueprint_commitmoves to the commit that specifies routing only for a renderer core that also had every module change between its old pin and that commit:typescript/core/web_core(pinned at2e3d9bc4): moved. The changes since then are theagent_renderer_appsplit (which only removes text), refusingagentOnlyfunctions inDataContext(web_core already did, fix(web_core): refuse agentOnly functions in the catalog invoker #3557) and extension metadata (feat(metadata): implement v1.0 extension metadata APIs across SDKs #3757 implemented it in web_core).python/a2ui_core(pinned atab3954fd): moved. Fill API gaps for Python and Swift. #3716 filled the2e3d9bc4gaps for Python (derive, nested binder resolution, and per-callExecutionContextalready existed) and documented them, but did not move the pin. fix(python): refuse agentOnly functions in DataContext, and add a conformance case #3773 and feat(metadata): implement v1.0 extension metadata APIs across SDKs #3757 implemented the rest in Python.dart/a2ui_core: kept, with a note. Dart implements routing, but a Dart catalog holdsFunctionImplementations, so it can't declare schema-only functions, and its routing conformance runner skips those cases as a known divergence.swift/core(pinned atab3954fd): kept, with a note. Swift implements routing, but it hasn't caught up with earlier module changes. For example,processMessagestakes no per-callExecutionContextwithisUserActivated, which2e3d9bc4added.Validation
python3 blueprints/validate_blueprints.pypasses.python3 scripts/fix_licenses.py --checkpasses.prettier --checkpasses on every changed file.blueprints/skills/a2ui-blueprint-compliance/scripts/check_compliance.pyreportspython/a2ui_coreandtypescript/core/web_coreat 0 commits behind ona2ui_core.