LangGraph — Conditional Workflow with Decision Routing
LangState and StateGraph are different, but directly linked . This is actually one of the most important concepts in LangGraph. LangState StateGraph │ │ │ defines │ uses ▼ ▼ "What data does "How does the the workflow carry?" workflow run?" class LangState ( TypedDict ): messages : Annotated [ list , add_messages ] LangState = the data/state structure , "Every state in my graph has a messages field." StateGraph = the workflow that operates on that state builder = StateGraph ( LangState ) There is the...