ForcePilot/src/agents/multiAgent/state.py

23 lines
646 B
Python
Raw Normal View History

"""Define the state structures for the agent."""
from __future__ import annotations
from collections.abc import Sequence
from dataclasses import dataclass, field
from typing import Annotated
from langchain.messages import AnyMessage
from langgraph.graph import add_messages
from src.agents.common.state import BaseState
@dataclass
class State(BaseState):
"""Defines the input state for the agent, representing a narrower interface to the outside world.
This class is used to define the initial state and structure of incoming data.
"""
messages: Annotated[Sequence[AnyMessage], add_messages] = field(default_factory=list)