Create the A2UI v0.9 AgentExtension for an A2A Agent Card.
This extension declaration tells clients that the agent supports A2UI output. Include it in the agent's A2A card extensions.
| PARAMETER | DESCRIPTION |
accepts_inline_custom_catalog | Whether the agent accepts inline custom catalogs from the client. TYPE: bool DEFAULT: False |
| RETURNS | DESCRIPTION |
AgentExtension | A configured AgentExtension for A2UI v0.9. |
Source code in autogen/agents/experimental/a2ui/a2a_helpers.py
| @require_optional_import(["a2a"], "a2a")
def get_a2ui_agent_extension(
accepts_inline_custom_catalog: bool = False,
) -> AgentExtension:
"""Create the A2UI v0.9 AgentExtension for an A2A Agent Card.
This extension declaration tells clients that the agent supports
A2UI output. Include it in the agent's A2A card extensions.
Args:
accepts_inline_custom_catalog: Whether the agent accepts inline
custom catalogs from the client.
Returns:
A configured ``AgentExtension`` for A2UI v0.9.
"""
params: dict[str, Any] = {}
if accepts_inline_custom_catalog:
params["acceptsInlineCustomCatalog"] = True
return AgentExtension(
uri=A2UI_EXTENSION_URI,
description="Provides agent-driven UI using the A2UI v0.9 JSON format.",
params=params if params else None,
)
|