LangChain: From token streams to agent streams — typed channels replace classic streaming for multi-agent UI
LangChain published a post on 21 May 2026 by authors Christian Bromann and Nick Hollon describing a paradigmatic evolution from token streams to structured agent streams. Modern AI agents plan tasks, delegate to sub-agents, call tools, and pause for human review — classic text token streaming is insufficient for displaying that work. LangChain proposes typed channels transmitting messages, tool calls, state changes, sub-agent activity, and custom events. Applications subscribe only to relevant event types, making the UI efficient for long-running workloads.
This article was generated using artificial intelligence from primary sources.
LangChain published on 21 May 2026 an engineering post by authors Christian Bromann and Nick Hollon arguing that token streaming — the paradigm that dominated the UX of generative AI applications since 2022 — has reached its limits and needs to be replaced by a typed agent streaming model. The post is published simultaneously with an update to the LangGraph library that implements the new approach.
What went wrong with token streaming?
Classic token streaming is simple: the model generates one token after another, the frontend displays them incrementally as they arrive, and the user sees the text building up in real time. This worked brilliantly for ChatGPT-style applications where the main activity is text generation.
The problem is that modern AI agents do far more than generate text. A typical agentic workflow includes:
- Tool calling — the agent decides which tool to call (web search, file read, API call), waits for the result, then continues
- Sub-agent delegation — the main agent spawns sub-agents for parallel subtasks
- State — the agent updates internal data structures (plans, tracking lists, draft outputs)
- Human review pause — the agent stops and waits for user approval before taking the next irreversible step
- Custom signals — debug logs, progress updates, performance metrics
Token streaming shows only the text the agent generates between those activities. In practice the user sees an empty window with a spinning loader, while the agent works for minutes or hours in the background with no visible signals. This is poor UX.
What is a typed agent stream?
LangChain proposes a model where the agent emits different event types through the same channel, but each event is typed. The client (UI application) chooses which types to subscribe to and how to display each type.
Examples of event types:
message— text token (classic)tool_call— tool call with argumentstool_result— result of a tool callstate_update— change in agent statesubagent_event— event from a sub-agent (recursive)human_review_request— agent pauses and requests approvalcustom— arbitrary event type defined by the developer
This gives the UI layer the ability to present agent work as a multi-pane visualisation — chat text in the main window, tool calls in a sidebar, state in another panel, sub-agent activity as a tree visualisation. Cursor and Claude Code already implement variants of this approach internally; LangChain now formalises it as an API.
How does this work in LangGraph?
LangGraph — the LangChain stateful graph orchestration library — receives native support for agent streams. The development team defines graph nodes, edges, and state. During execution, LangGraph automatically emits typed events for all graph activities.
The client subscribes using the standard async iterator pattern:
- Subscribe to all events → typical dashboard mode
- Subscribe only to
message→ classic chat UI mode - Subscribe to
message + tool_call→ useful for debug UI
This eliminates the need for custom WebSocket protocols or polling patterns that have until now dominated agentic frontends.
What does this mean for the agentic AI tools ecosystem?
Agent streams are an architectural step forward that converges on a pattern already implemented internally by Anthropic (Claude Code Agent View), OpenAI (Operator), and others. A standardised API means smaller developer teams will be able to rely on LangGraph instead of building their own variants from scratch.
Long-term, agent streams may become a de facto standard just as REST API and SSE became standards for web applications. It is worth watching whether other agent frameworks (Microsoft AutoGen, CrewAI, OpenAI Swarm) adopt similar typed-event models in upcoming versions.
Frequently Asked Questions
- What is an agent stream in LangChain terminology?
- An agent stream is a structured, typed channel that emits different event types in real time — messages, tool calls, state changes, sub-agent activities, and custom signals — rather than just a sequence of text tokens.
- Why is classic token streaming insufficient for modern agents?
- Agents do much more than generate text — they call tools, wait for human review, delegate to sub-agents, and modify state. Token streaming shows only text, leaving the user in the dark about what is actually happening.
- How does an application subscribe to agent stream event types?
- LangGraph provides an API through which a client subscribes only to the desired event types, avoiding overload when an agent is running a long-running workload.
Related news
AWS: Nova Act receives HIPAA eligibility — agentic ePHI automation for healthcare workflows
Anthropic: Claude Code v2.1.147 introduces Workflow tool for deterministic multi-agent orchestration
Microsoft Research: MagenticLite + Fara1.5 (4B/9B/27B) — agentic AI optimised for small models achieves SOTA