langgraph
etrack.providers.adapters.source.langgraph
providers/adapters/source/langgraph: LanggraphSourceAdapter — a LangGraph run's callbacks reported as span edges.
LangChain reports every runnable it starts with its run id and its parent's; this source reads them inline, on the
caller's thread, and tells a fold what each one is: the root (RUN), a graph node (a chain named after its own
langgraph_node), a model call (LLM), a retriever, a tool — SUBAGENT when it is the tool a deep agent delegates
through (task), MCP when its name is one the host declares — and folds everything else (sequences, middleware
plumbing) away. Streamed pieces are read from LangChain's v1 content blocks, so text, reasoning and tool-call chunks
arrive typed whatever the provider. An interrupt bubbles up as GraphInterrupt: the span it crosses ends cleanly
and one INTERRUPT frame carries what is asked, once, under the span that raised it. bind pins the run's id as the
root run id, so LangChain, LangSmith and the frames name the run alike.
LanggraphHandler
LanggraphHandler(
fold: FoldPort,
mcp: frozenset[str],
subagents: frozenset[str],
)
Bases: BaseCallbackHandler
One run's callbacks, inline: each runnable classified and reported to the fold the moment LangChain announces it.
LanggraphSourceAdapter
The LangGraph source: bind a fold into a RunnableConfig; MCP tool names are the host's to declare.
bind
The host's config with the run's handler appended (inherited ones kept) and the run's id as the root's.