New video: Build a streaming @langchain agent in @nextjs using useStream + memory π Youβll learn:
- stream AI replies into your UI with useStream
- Minimal API route serving SSE
- Add conversation memory via thread id + checkpointer
π₯ Watch now: https://t.co/3X4vEeO5J9
#Nextjs #LangChain #LangGraph #AI #React #Anthropic
Everyone wants a better model.
But actually most teams would get a bigger improvement from a better harness.
@LangChain has great primitives to start an agent harness from scratch and gives you all building blogs you need to build a world class agent harness!
Prompting agents to "do better" is unreliable π Giving them a rubric, a grader, and a correction loop is much closer to how you get your agent do what you want!
Similar to /goal in Claude Code or other agents just more flexible bc grading is done by a dedicated subagent π€
One thing I like about this approach is that it doesnβt force you to choose between agents and workflows.
The model still decides when a skill applies, what inputs to use, and what to do with the result. But once youβve identified a procedure that should be deterministic, you can move it into tested code instead of hoping the model follows 20 prompt instructions correctly.
Agent discretion on the outside. Determinism on the inside.
As someone who contributed to this: the goal wasnβt βmore streaming APIs.β π
It was one streaming mental model that scales from a bare model call, to an in-process agent, to a deployed LangGraph app behind the SDK.
Same projections. Same async iteration. Less glue code.
Streaming in LangChain/LangGraph now has one mental model across the stack: start a model, agent, or SDK stream, then read the same projections: .text, .reasoning, .output. Same async iteration, same final value.
One flow, everywhere. That's the win π₯
As an upcoming parent, I keep imagining all the tiny routines ahead ππΌ
One I am especially excited for: using AI for making up bedtime stories.
So I built an app that creates one on demand: story, illustrations, and narration all streaming in together with @LangChain_JS β€οΈ
I put the full demo in our streaming cookbook if you want to build your own version or just use it for your bedtime routines:
π§βπ»Bedtime Story App: https://t.co/8dK74IrKO6
π Docs on our React SDK: https://t.co/Ob7m6DZdmx
The nice part is the streaming UI.
Each page subscribes to the stream namespace for its own image + narration workers, so text, illustrations, and audio can arrive independently without parsing raw events.
The audio player can start as soon as the first audio chunk streams back from the model, instead of waiting for the full narration file.
π£οΈ New in @LangChain_JS 1.4.3: register streamTransformers on middleware.
Your reusable agent extensions can now ship their own v3 streaming channels alongside hooks and tools, merged at compile time with full TypeScript inference on run.extensions.
Same composability as middleware tools. Better encapsulation for packaged agent features π¦
@stevencheng@LangChain π― we ran testbeds with 150+ subagents and still had less data traffic than a single ReAct agent before π€ excited to push out more demos soon!
Agent streaming has outgrown token deltas.
Real apps need to render tools, state, subagents, media, interrupts, and reconnects without parsing a firehose of raw events.
The new @LangChain streaming protocol turn agent runs into typed projections apps can subscribe to.
Streaming is no longer just text π
The new primitives are content-block based, so the same architecture can handle messages, reasoning, tool calls, images, audio, video, and custom app data π π΅π₯
The multimodal storybook demo shows where agent UIs are heading π
Code: https://t.co/mjvbkGZNn6
One of my favorite parts of the new @LangChain streaming primitives: subagent streams are first-class π₯
Instead of flattening every worker into one transcript, UIs can discover subagents, show their status, and subscribe only to the messages/tool calls they render
Code: https://t.co/SBWeDwHCoh