LangGraph
The LangGraph integration wraps a compiled graph in an Arclasp Chain and records supported node lifecycle events through the execution hooks exposed by LangGraph.Install
langgraph>=0.2.0,<0.4.0.
Add Arclasp to an existing graph
The following is an integration fragment. It assumes your application already builds and compiles a LangGraph graph.How it works
The current adapter supports two integration paths depending on what the wrapped graph/runtime exposes:- LangGraph event streaming through
astream_events(version="v2"); - callback injection through LangChain-compatible async callbacks as a fallback.
Consequential side effects
Do not assume that generic node observation is a universal pre-side-effect barrier for arbitrary code inside a node. When a node contains an irreversible operation that must not run until Arclasp has allowed or approved it, instrument that exact boundary inside the node:govern(...), choose your Chain boundaries deliberately so the evidence model matches the workflow you actually want to govern. Do not create duplicate instrumentation merely to increase event counts.
Policy errors
Policy and availability errors raised by Arclasp can propagate out of the governed graph.Sync and async
Prefer:Boundaries
- Conditional routing functions are not automatically consequential governance points.
- Tool calls nested inside a node are not automatically separate governed tool events unless you instrument them separately.
- Nested/subgraph execution does not imply a separate automatic parent-child Arclasp Chain hierarchy.
- Streaming behavior remains primarily the underlying graph’s behavior; Arclasp does not redefine the stream protocol.