From b43107ec99afc26a8b0acc83e1f6ec5b591128fb Mon Sep 17 00:00:00 2001 From: Quanzheng Long Date: Sat, 14 Mar 2026 17:50:55 -0700 Subject: [PATCH] rewrite-state-graph --- langgraph-go/advancedgraph/graph.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/langgraph-go/advancedgraph/graph.go b/langgraph-go/advancedgraph/graph.go index 57d645d85..620abece2 100644 --- a/langgraph-go/advancedgraph/graph.go +++ b/langgraph-go/advancedgraph/graph.go @@ -29,6 +29,9 @@ func NewAdvancedStateGraph[StateT any]() *AdvancedStateGraph[StateT] { } } +// AddNode keeps `fn` as `any` because advanced graph nodes can have different +// input argument types per node, while only `StateT` is globally constrained. +// We validate and adapt node signatures at runtime in compileNodeExecutor. func (g *AdvancedStateGraph[StateT]) AddNode(fn any) string { name := NodeName(fn) return g.AddNodeAs(name, fn)