-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.py
More file actions
23 lines (18 loc) · 767 Bytes
/
state.py
File metadata and controls
23 lines (18 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from typing import Annotated, Literal, List, Optional
from typing_extensions import TypedDict
from langgraph.graph.message import add_messages
class AgentState(TypedDict):
"""
State schema for the Research Assistant.
"""
# Conversation history
messages: Annotated[List[dict], add_messages]
# Clarity Agent Metadata
clarity_status: Optional[Literal["clear", "needs_clarification"]]
# Research findings (raw text or list of results)
research_findings: Optional[str]
# Validation / Quality control
confidence_score: Optional[float] # 0.0 to 10.0
validation_result: Optional[Literal["sufficient", "insufficient"]]
# Loop control
attempt_count: int # Starts at 0, max 3