Skip to main content

Module state

Module state 

Source
Expand description

State management for LangGraph

This module provides the state abstraction for graph execution. States are data structures that flow through nodes in the graph.

Structs§

AgentState
Common state with messages (agent-style)
AppendMessagesReducer
AgentState Messages Reducer - Appends messages instead of replacing
AppendReducer
Append reducer for vector fields (like add_messages pattern)
AppendStepsReducer
AgentState Steps Reducer - Appends steps instead of replacing
MessageEntry
Message entry for agent state
ReplaceReducer
Default reducer that replaces state entirely
StateUpdate
State update representation
StepEntry
Step entry for intermediate execution steps

Enums§

MessageRole
Message role types

Traits§

Reducer
Reducer trait for merging state updates
StateSchema
State Schema trait