File size: 1,065 Bytes
2e38934 a4b0424 8073bab 2e8bb22 778116a 2e38934 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import operator
from langgraph.graph import MessagesState
from typing_extensions import Annotated, List
class State(MessagesState):
summary: str
question: str
chunked_last_tool_call: bool
file_reference: str # Attachment file reference: a path, URL, or unique ID
class MathAgentState(MessagesState):
"""
State for the math agent containing message history and research metadata.
This state tracks the agent's conversation, iteration count for limiting
tool calls, the research topic being investigated, compressed findings,
and raw research notes for detailed analysis.
"""
tool_call_iterations: int
question: str
compressed_research: str
raw_notes: Annotated[List[str], operator.add]
class MathAgentOutputState(MessagesState):
"""
Output state for the math agent containing final results.
This represents the final output of the solving process with steps
and raw notes from the solving process.
"""
compressed_research: str
raw_notes: Annotated[List[str], operator.add] |