From dd09d92645caf52eec4a4d721ce2ac6bec4f0eee Mon Sep 17 00:00:00 2001 From: goulustis Date: Thu, 13 Nov 2025 00:23:18 +0800 Subject: [PATCH] make new graph state --- lang_agent/graphs/graph_state.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lang_agent/graphs/graph_state.py diff --git a/lang_agent/graphs/graph_state.py b/lang_agent/graphs/graph_state.py new file mode 100644 index 0000000..665c754 --- /dev/null +++ b/lang_agent/graphs/graph_state.py @@ -0,0 +1,12 @@ +from typing import Type, TypedDict, Literal, Dict, List, Tuple, Any + +from langchain_core.messages import SystemMessage, HumanMessage + +class State(TypedDict): + inp: Tuple[Dict[str, List[SystemMessage | HumanMessage]], + Dict[str, Dict[str, str|int]]] + messages: List[SystemMessage | HumanMessage] + decision: str + subgraph_states: Dict[str, Any] # NOTE: Naively assuming subgraphs + # won't be so complicated +