LangGraph 1 · Building graphs

Use the built-in messages state

Use MessagesState when you only need a list of messages.

from langgraph.graph import MessagesState, StateGraph

builder = StateGraph(MessagesState)

Official LangGraph 1 documentation

More building graphs commands

All building graphs commands · LangGraph 1 cheatsheet

Was this page helpful?