From 6bfaefed78b9ce7d104ef0b9e9b8210e49349988 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Thu, 31 Jul 2025 22:55:40 -0400 Subject: [PATCH] default compiled name --- libs/langgraph/langgraph/graph/state.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/langgraph/langgraph/graph/state.py b/libs/langgraph/langgraph/graph/state.py index e7854b900..9f9d595e2 100644 --- a/libs/langgraph/langgraph/graph/state.py +++ b/libs/langgraph/langgraph/graph/state.py @@ -128,6 +128,7 @@ class StateGraph(Generic[StateT, ContextT, InputT, OutputT]): Use this to expose immutable context data to your nodes, like user_id, db_conn, etc. input_schema: The schema class that defines the input to the graph. output_schema: The schema class that defines the output from the graph. + name: The default name to use when compiling the graph. !!! warning "`config_schema` Deprecated" The `config_schema` parameter is deprecated in v0.6.0 and support will be removed in v2.0.0. @@ -177,7 +178,7 @@ class StateGraph(Generic[StateT, ContextT, InputT, OutputT]): managed: dict[str, ManagedValueSpec] schemas: dict[type[Any], dict[str, BaseChannel | ManagedValueSpec]] waiting_edges: set[tuple[tuple[str, ...], str]] - + name: str = "StateGraph" compiled: bool state_schema: type[StateT] context_schema: type[ContextT] | None @@ -874,7 +875,7 @@ class StateGraph(Generic[StateT, ContextT, InputT, OutputT]): debug=debug, store=store, cache=cache, - name=name or "LangGraph", + name=name or self.name, ) compiled.attach_node(START, None)