LangGraph 1 · Running and streaming
Stream model tokens
Stream the model's output token by token, with the metadata about where it came from.
for token, metadata in graph.stream(inputs, stream_mode="messages"):
print(token.content, end="", flush=True)
Official LangGraph 1 documentation