-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description
Description
The AGUIRequest model in agent_framework_ag_ui/_types.py is missing several fields defined in the RunAgentInput specification (specifically tools , context , and forwarded_props ).
This omission causes Pydantic to filter out these fields during request validation. Consequently, downstream logic in _orchestrators.py fails to retrieve client-side tools, breaking the Copilot Actions functionality.
References
- Documentation : https://docs.ag-ui.com/sdk/python/core/types (See RunAgentInput )
- Code Location 1 (Root Cause) : agent_framework_ag_ui/_types.py (Line 46, AGUIRequest )
- Code Location 2 (Impact) : agent_framework_ag_ui/_orchestrators.py (Lines 394)
Technical Details & Impact Analysis
- Data Loss at Ingestion :
In _endpoint.py , the request is parsed using AGUIRequest :
# _endpoint.py
input_data = request_body.model_dump(exclude_none=True)Since AGUIRequest lacks the tools field, model_dump excludes it from input_data .
- Logic Failure in Orchestrator :In _orchestrators.py , the code attempts to retrieve tools from input_data :
# _orchestrators.py L394-395
client_tools = convert_agui_tools_to_agent_framework(context.input_data.get("tools"))
approval_tool_name = select_approval_tool_name(client_tools)Because tools was stripped earlier, context.input_data.get("tools") returns None . As a result, client_tools is empty, and the agent is unaware of any client-side capabilities.
Suggested Fix
Update AGUIRequest in agent_framework_ag_ui/_types.py to include the missing fields:
class AGUIRequest(BaseModel):
"""Request model for AG-UI endpoints."""
# ... existing fields ...
# Add missing fields to match RunAgentInput
tools: list[dict[str, Any]] | None = Field(
None,
description="List of tools available to the agent"
)
context: list[dict[str, Any]] | None = Field(
None,
description="List of context objects provided to the agent"
)
forwarded_props: dict[str, Any] | None = Field(
None,
description="Additional properties forwarded to the agent"
)
parent_run_id: str | None = Field(
None,
description="Optional parent run identifier"
)Code Sample
Error Messages / Stack Traces
Package Versions
agent-framework-core: python-1.0.0b260116
Python Version
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status