StateGuard
An open-source Python library that provides a transactional reliability layer on top of LangGraph. It supports pre-commit invariant validation, LIFO Saga compensation rollback, checkpoint wrapping, and audit capabilities, applying database transaction concepts to agent workflows.
Timeline (last 90 days)
StateGuard (stateguard-core) is an open-source library that provides reliability guarantees on top of LangGraph, bringing transactional concepts from the database domain into agent workflows.
StateGuard's @guarded_node decorator subjects node state output to pre-commit invariant validation before returning it to the graph executor; upon validation failure, it aborts the checkpoint write, restores state to pre-validation status, and triggers Saga compensating actions.
StateGuardCheckpointer is a wrapper around any standard LangGraph checkpoint that enforces centralized invariant rules on every put checkpoint call.
StateGuard maintains a last-in-first-out (LIFO) undo stack; each time a node produces an API side effect, the corresponding compensating action is pushed onto the stack, and rollback executes the compensating actions in reverse order.
StateGuard's drift detection uses rolling Z-score anomaly tracking, continuously monitoring the statistical distribution of state metrics to identify abnormal fluctuations.
StateGuard's audit store records key events to SQLite and provides the stateguard log command-line tool for developers to inspect after the fact.
StateGuard is open-sourced under the MIT license.
All Facts (7)
StateGuard (stateguard-core) is an open-source library that provides reliability guarantees on top of LangGraph, bringing transactional concepts from the database domain into agent workflows.
50%UnverifiedStateGuard's @guarded_node decorator subjects node state output to pre-commit invariant validation before returning it to the graph executor; upon validation failure, it aborts the checkpoint write, restores state to pre-validation status, and triggers Saga compensating actions.
50%UnverifiedStateGuardCheckpointer is a wrapper around any standard LangGraph checkpoint that enforces centralized invariant rules on every put checkpoint call.
50%UnverifiedStateGuard maintains a last-in-first-out (LIFO) undo stack; each time a node produces an API side effect, the corresponding compensating action is pushed onto the stack, and rollback executes the compensating actions in reverse order.
50%UnverifiedStateGuard's drift detection uses rolling Z-score anomaly tracking, continuously monitoring the statistical distribution of state metrics to identify abnormal fluctuations.
50%UnverifiedStateGuard's audit store records key events to SQLite and provides the stateguard log command-line tool for developers to inspect after the fact.
50%UnverifiedStateGuard is open-sourced under the MIT license.
50%