DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

How to Stream LangGraph Agent Events to a Live UI

Separate assistant text, graph updates, and custom progress into clear UI signals with LangGraph streaming. See the Python v2 envelope and React tool-progress options.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a live LangGraph interface, stream separate signals for assistant text, graph progress, and any app-defined progress your users need. The current LangGraph docs recommend event streaming for new applications; stream modes remain useful when you need direct runtime projections such as message chunks, state updates, or custom events. In either approach, translate runtime data into intentional UI updates instead of displaying raw graph state.

Choose the stream API that matches the UI

LangGraph documents two approaches: event streaming, described as the recommended approach for new applications, and the stream-mode API for direct access to runtime events or a particular stream-mode output. Event streaming is a typed-projection API introduced in LangGraph v1.2, with separate iterators for projections such as messages, values, subgraphs, and output. Check the installed LangGraph version and its documentation before implementing: the version requirements differ between these APIs.

As an Amazon Associate I earn from qualifying purchases.

For many agent interfaces, the useful distinction is what the user needs to see: generated text, a concise indication of the current graph step, or a progress signal specific to your application. These are different projections; a state update is not a token, and an internal checkpoint is not automatically suitable UI copy.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand the stream-mode projections

The Python stream-mode API offers several kinds of output. The JavaScript documentation also describes a tools mode for tool lifecycle events.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Mode What it provides Typical UI use
messages Message chunks paired with metadata from model calls Append relevant assistant text as it arrives.
updates Changed state keys after a graph step; multiple updates in a step may arrive separately Map known node or state changes to a short progress label.
values The full state after each step Use only if the interface actually needs a complete state snapshot.
custom Data emitted by nodes or tools through the stream writer Render explicitly approved app-specific progress fields.
tools (JavaScript) Tool start, progress/event, finish, and error activity Show a tool’s lifecycle without exposing raw arguments.
tasks, checkpoints, debug Execution, checkpoint, or diagnostic information Usually reserve for developer inspection or carefully filtered views.

Checkpoint and task modes require a checkpointer. Debug output combines execution details. Full-state snapshots and diagnostic data can contain fields the user interface should not display, so select a projection based on what the interface needs rather than forwarding everything.

Consume chunks with the v2 envelope

With version="v2", each Python chunk has a consistent envelope across modes and subgraphs: type identifies the projection, ns carries the namespace (populated for subgraph events), and data contains the mode-specific payload. The documentation says v2 output requires LangGraph 1.1 or later. In Python, explicitly request v2 and branch on the chunk type:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
for part in graph.stream(
    inputs,
    stream_mode=["messages", "updates", "custom"],
    version="v2",
):
    if part["type"] == "messages":
        message_chunk, metadata = part["data"]
        # Append intended text to the active response.
    elif part["type"] == "updates":
        # Map known changes to a safe progress label.
        pass
    elif part["type"] == "custom":
        # Render only fields defined for the UI.
        pass

This is an illustrative consumer sketch, not a complete transport implementation. The documented Python pattern uses graph.stream(...) or graph.astream(...) with one or more modes and processes each yielded chunk. In JavaScript, the docs show await graph.stream(inputs, { streamMode: "updates" }) followed by iteration over the result. See the LangGraph streaming documentation for the release-specific examples and details.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Send intentional progress from a node or tool

When built-in state changes do not express useful user-facing progress, emit an app-defined event. In Python, LangGraph documents getting a writer with get_stream_writer() inside a node or tool, sending a serializable payload, and requesting custom mode on the consumer. Keep the event contract small and distinct from internal graph state—for example, a status code, display label, and optional progress fraction.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

There is an async Python caveat: the docs say get_stream_writer does not work in async Python below 3.11. Their documented alternative is to add a writer parameter to the node or tool and pass it manually. Follow the example for the graph API and version you are running; see the Python streaming examples.

Connect stream events to a React interface

The JavaScript documentation describes tools events for tool start, progress/event, finish, and error. The React useStream hook from @langchain/langgraph-sdk/react exposes a toolProgress array when tools is included among the stream modes. The React SDK reference also exposes stream running status and a submit method, which can support a pending state and incremental response in the interface.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

For example, a UI might translate an approved tool event into “Searching documents,” then show completion or failure. Avoid showing raw tool arguments, internal prompts, or detailed runtime data without reviewing what those fields contain. The hook and its available fields are documented in the useStream reference and the BaseStream reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan the boundary between graph events and the browser

LangGraph’s stream APIs describe graph output; they do not dictate one universal browser transport or hosting design. Choose transport, persistence, reconnection, cancellation, and error handling for your own stack. Keep the rendering layer focused on the three user-facing signals, and filter events before they cross into the UI:

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
  • Assistant answer: append relevant message chunks and use metadata where needed to associate them with a node or run.
  • Workflow progress: translate known node names or changed fields into concise labels; do not dump full state.
  • Custom progress: render only fields in a deliberately defined event contract.
  • Diagnostics: keep tasks, checkpoints, and debug details in developer-facing surfaces unless you have explicitly filtered them.

For broader context on structuring a graph around agent decisions, tools, and state, see LangGraph’s Thinking in LangGraph.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.