Skip to content

docs(blueprints): agent functions and renderer fallback routing - #3798

Open
nan-yu wants to merge 2 commits into
feat/python-a2a-adk-agent-function-rpcfrom
docs/blueprints-agent-functions
Open

nan-yu wants to merge 2 commits into
feat/python-a2a-adk-agent-function-rpcfrom
docs/blueprints-agent-functions

Conversation

@nan-yu

@nan-yu nan-yu commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #3795. Review only the top two commits (docs(blueprints): specify agent functions and renderer fallback routing and docs(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 outside blueprints/ changes.

  1. New feature blueprint 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:
    1. Core: the agent function entry (a function definition plus a handler), agentFunctions on Catalog, kept consistent with functions through copyWith, derive and pruning, the name-collision error (unless the agent function is built from the declared entry), the pre-1.0 error, and serialization without handlers.
    2. Agent SDK: the registry's error mapping as a table, including the missing-catalogId rules and agentOnly, argument validation with defaults, the handler context, and the concurrency, timeout (on the registry, not per function), cancellation and DISPOSED rules. Then the renderer function call helper (CANCELLED on dispose, DISPOSED afterwards, TOO_MANY_PENDING, DUPLICATE), the renderer message router, and the rule that a null value must survive serialization.
    3. Validation on both sides, including the two options for strict renderers.
    4. Implementation steps, with the A2A/ADK wiring described generically: answer RPC-only requests without a model turn, end those tasks completed, and keep RPC messages out of the model prompt but in the session history.
  2. a2ui_core module blueprint (diff):
    1. §D gets a "Renderer Fallback Routing (v1.0+)" lifecycle step: when a call routes, the surface's agent function caller (installed by MessageProcessor only with an outbound listener), the resolved catalogId, schema-only functions, nested pending and failed arguments, sharing and caching, and cancelling a surface's calls on deleteSurface. RpcHandler gets cancelSurfaceCalls. The rules link to the protocol doc instead of restating it.
    2. §C ValidationConfig: what allowUnknownElements: false means for agent functions, and the schema-only alternative.
    3. The conformance test plan points at conformance/core/agent_function_routing.yaml.
  3. Codebase blueprints (diff):
    1. python/a2ui_core and python/a2ui_agent pin agent_functions to the feature blueprint's commit. python/a2ui_agent gets a note on asyncio and asyncio.to_thread.
    2. module_blueprint_commit moves to the commit that specifies routing only for a renderer core that also had every module change between its old pin and that commit:

Validation

  1. python3 blueprints/validate_blueprints.py passes.
  2. python3 scripts/fix_licenses.py --check passes.
  3. prettier --check passes on every changed file.
  4. blueprints/skills/a2ui-blueprint-compliance/scripts/check_compliance.py reports python/a2ui_core and typescript/core/web_core at 0 commits behind on a2ui_core.

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>

@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 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

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.

1 participant