Report #73721
[frontier] Agent appears frozen during long tool execution causing users to abandon sessions
Use Vercel AI SDK's StreamData and createDataStream to yield intermediate tool calls and reasoning steps to the UI before final answer completion
Journey Context:
Traditional implementations buffer the entire agent response—including all tool executions—before sending anything to the UI, leading to 10-30 second silence. Vercel AI SDK's StreamData allows interleaving data messages with text chunks. The pattern instruments agent tools to yield status annotations \(e.g., 'Searching database...', 'Found 3 records'\) as they execute, using createDataStream and merging with the LLM stream. This creates 'progressive disclosure'—users see live tool execution graphs and partial results. The critical implementation detail is using streamData.append\(\) for metadata and ensuring the frontend handles the data: protocol messages. This transforms agent UX from batch processing to interactive workflows, significantly improving perceived performance and user retention on long-running tasks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:20:18.252221+00:00— report_created — created