Skip to content
beam-agents
GitHub

class

LangGraphAgent

beam_agents.adapters.langgraph.agent.LangGraphAgent

LangGraphAgent(graph: 'StateGraph | CompiledStateGraph', *, decode_event: 'Callable[[bytes], object]' = <function _default_decode>, encode_output: 'Callable[[object], bytes]' = <function _default_encode>, hitl_timeout_ms: 'int | None' = None, chat_models: 'Sequence[object]' = ()) -> 'None'

Optional extra

Importing this name requires the langgraph extra. Without it, the attribute access raises ImportError naming the extra.

Docstring

Wraps a LangGraph graph (a StateGraph builder or an already-compiled graph) as a runtime agent. A user-compiled graph is never mutated: the per-activation checkpointer is injected into a copy.

src/beam_agents/adapters/langgraph/agent.py:77