Make AgentWorkflows deployed on LlamaDeploy work with useChatWorkflow #25

Closed
opened 2026-02-16 02:17:44 -05:00 by yindo · 0 comments
Owner

Originally created by @thucpn on GitHub (Jul 7, 2025).

Originally assigned to: @thucpn on GitHub.

Description

As we're not using the backend (llamaindexserver) any more - it no longer transforms ToolCallResult events into source_nodes events for the frontend. Instead we're using now LlamaDeploy with useChatWorkflow which sends raw ToolCall and ToolCallResult events directly for a deployed AgentWorkflow to chat-ui.

We need to implement the transformation logic on the frontend side to maintain the ability to display source nodes and their URLs.


Tasks

  • Listen to and correctly handle both ToolCall and ToolCallResult events from the stream.
  • Transform ToolCallResult into source_nodes event format for the UI.
  • Construct valid URLs for each source node in ToolCallResult.tool_output.
  • Add an example that works with local files (add API route that serve the files)
  • Add an example that works with LlamaCloud (the API route must download and cache the LlamaCloud files)
Originally created by @thucpn on GitHub (Jul 7, 2025). Originally assigned to: @thucpn on GitHub. ## Description As we're not using the backend (`llamaindexserver`) any more - it no longer transforms `ToolCallResult` events into `source_nodes` events for the frontend. Instead we're using now `LlamaDeploy` with `useChatWorkflow` which sends raw `ToolCall` and `ToolCallResult` events directly for a deployed AgentWorkflow to `chat-ui`. We need to implement the transformation logic on the frontend side to maintain the ability to display source nodes and their URLs. --- ## ✅ Tasks - [x] Listen to and correctly handle both `ToolCall` and `ToolCallResult` events from the stream. - [x] Transform `ToolCallResult` into `source_nodes` event format for the UI. - [x] Construct valid URLs for each source node in `ToolCallResult.tool_output`. - [x] Add an example that works with local files (add API route that serve the files) - [x] Add an example that works with LlamaCloud (the API route must download and cache the LlamaCloud files)
yindo closed this issue 2026-02-16 02:17:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/chat-ui#25