from typing import TypedDict from langgraph.prebuilt import create_react_agent from typing import ( Annotated, Sequence, TypedDict, ) from langchain_core.messages import AnyMessage from langgraph.graph.message import add_messages import json from src.config.llm import model class State(TypedDict): """The state of the agent.""" messages: Annotated[Sequence[AnyMessage], add_messages]