symfonic.core.state¶
state ¶
BaseAgentState — typed conversation + context state contract.
Per TDD §2.2: Nodes never mutate state directly. They return partial dicts that LangGraph merges via reducers.
BaseAgentState ¶
Bases: TypedDict
Typed state contract for all nodes in the graph.
Used as a TypedDict schema for LangGraph's StateGraph.
total=False makes all fields optional at construction time.
add_context ¶
Returns partial state dict. Caller is responsible for non-overlapping keys.
append_message ¶
Returns partial state dict for LangGraph merge. Never mutates state directly.