Build agent UIs that feel instant: stream *custom events* from LangChain tool calls (progress, status, file operations) straight into React as they happen. In this video we walk through the a demo using useStream + onCustomEvent, and show how to correlate updates to a specific tool call so your UI updates in-place while tools run.
*What you’ll learn*
How to emit custom streaming events from tools via config.writer
How to receive them in React with useStream(..., onCustomEvent)
How to render progress + status cards tied to a tool call ID
A simple pattern for “streaming UX” instead of “spinner UX”
🧑💻 Example: https://github.com/langchain-ai/langg...
📚 Docs: https://docs.langchain.com/oss/javasc...