You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: AG-UI frontend tools miss TOOL_CALL_ARGS when streamed name is __fragment__ #2873
Describe the bug
When emitToolCallArgs is disabled, frontend tools still need TOOL_CALL_ARGS so CopilotKit / AG-UI clients can invoke them. ToolCallEventConverter currently matches frontend tools with delta.getToolCallName(). Streaming argument chunks use the placeholder name __fragment__, so the frontend-tool check fails and no args are emitted.
This is different from #498, which was about accumulating streamed args in general and is already closed.
To Reproduce
Register a frontend tool via RunAgentInput.tools (for example lookup).
Set AguiAdapterConfig.emitToolCallArgs(false) so backend tool args are hidden.
Observe that TOOL_CALL_ARGS events are missing, so the frontend cannot call the tool.
Expected behavior
Frontend tools should emit TOOL_CALL_ARGS even when the streamed delta name is __fragment__. The real tool name is already known from ToolCallStart and should be resolved by toolCallId. Backend tools should still hide args when emitToolCallArgs=false.
Error messages
No exception. The AG-UI stream only contains TOOL_CALL_START / TOOL_CALL_END, so the client cannot reconstruct tool parameters.
Environment
AgentScope-Java Version: main
Java Version: 17+
OS: Windows
Additional context
Fix: record the real tool name on ToolCallStart in AguiStreamContext, then decide whether to emit args with isFrontendToolCall(toolCallId) instead of the placeholder delta name.
Activity
fix(agui): emit frontend tool args from fragment deltas (agentscope-a…