SurfSense/surfsense_backend/app/agents/researcher/sub_section_writer/state.py
DESKTOP-RTLN3BA\$punk 3e1db2ac6b Revert "docs"
This reverts commit 707ed7e05f.
2025-07-03 14:09:36 -07:00

24 lines
760 B
Python

"""Define the state structures for the agent."""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import List, Optional, Any
from sqlalchemy.ext.asyncio import AsyncSession
@dataclass
class State:
"""Defines the dynamic state for the agent during execution.
This state tracks the database session and the outputs generated by the agent's nodes.
See: https://langchain-ai.github.io/langgraph/concepts/low_level/#state
for more information.
"""
# Runtime context
db_session: AsyncSession
chat_history: Optional[List[Any]] = field(default_factory=list)
# OUTPUT: Populated by agent nodes
reranked_documents: Optional[List[Any]] = None
final_answer: Optional[str] = None