custom chunks. Values are state snapshots the runtime records, including the entrypoint return value. You do not call a writer for values.
For concepts, see the Functional API overview. For messages and other typed projections, see event streaming.
Emit custom data
The Functional API uses the same stream as the Graph API. Emit with a writer, then consumecustom chunks. For stream modes, see Streaming.
View example trace
Open a public LangSmith run for this example.
- Import
get_stream_writerfromlanggraph.config. - Call it inside the entrypoint to get a writer.
- Emit custom data before and after the computation.
- Call
stream(..., stream_mode="custom")and iterate the chunks.
Stream values
Reuse themain entrypoint from Emit custom data. Iterate stream.values for state snapshots. For messages and other projections, see event streaming.
See also
- Functional API overview
- Build checklist for the Functional API
- Event streaming
- Streaming
- Add human-in-the-loop with the Functional API
Connect these docs to your agent of choice via MCP for real-time answers.

