devmodetest2 / perm /agents /.ipynb_checkpoints /agent_state-checkpoint.py
tengel's picture
Upload 56 files
9c9a39f verified
raw
history blame contribute delete
472 Bytes
from typing import Annotated, Any, Dict, List, Optional, Sequence, TypedDict
from langchain_core.messages import BaseMessage
import operator
# The agent state is the input to each node in the graph
class AgentState(TypedDict):
# The annotation tells the graph that new messages will always
# be added to the current states
messages: Annotated[Sequence[BaseMessage], operator.add]
# The 'next' field indicates where to route to next
next: str