Files
iot-device-management-service/app/services/agent/state.py

22 lines
697 B
Python
Raw Normal View History

"""
Agent 状态定义
"""
from typing import Annotated, List
from typing_extensions import TypedDict
from langgraph.graph.message import AnyMessage, add_messages
class AgentState(TypedDict):
"""LangGraph Agent 状态
messages: 对话消息列表append-onlyLangGraph 自动合并
user_id: 企微 userid图入口注入工具通过 config 读取
pending_images: 工具执行期间收集的待发图片 URL告警截图等
user_uploaded_images: 用户上传的图片 COS 永久 URL用于工单结单
"""
messages: Annotated[list[AnyMessage], add_messages]
user_id: str
pending_images: List[str]
user_uploaded_images: List[str]