Statefold – Event-sourced state, replay and time travel for LangGraph agents

Hi everyone,

I’m sharing Statefold, an open-source, framework-agnostic state and observability platform for AI agents.

GitHub: GitHub - ioteverythin/statefold: Framework-agnostic, event-sourced state platform for AI agents (LangGraph, CrewAI, Agno, MCP) · GitHub

LangGraph provides strong orchestration and checkpointing capabilities, but agent state can still become difficult to inspect, replay, branch or move across frameworks as applications grow more complex.

Statefold takes an event-sourced approach: agent state is not stored as a mutable blob. Instead, it is derived by folding over an append-only event log containing messages, state changes, tool calls, LLM calls, traces and memory events.

For LangGraph applications, Statefold can provide:

  • Durable crash recovery and resume
  • Time travel to any step in a graph execution
  • Replay of previous agent runs
  • Branching for alternative or what-if executions
  • Optimistic concurrency for safe state updates
  • Tracing of nodes, tools and LLM calls
  • Token, latency and cost tracking
  • Working, semantic, episodic and procedural memory
  • Tamper-evident, hash-chained event history
  • PostgreSQL and in-memory backends
  • A local observability console with a run waterfall and time-travel slider
  • Export of production sessions into Promptfoo regression tests

Statefold is intended to sit underneath LangGraph rather than replace it. LangGraph continues to manage graph orchestration, nodes, edges and execution flow, while Statefold acts as a durable, portable and replayable state layer.

Basic installation:

pip install "statefold[langgraph]"

The project is licensed under Apache 2.0 and is currently in active development.

I would especially appreciate feedback from LangGraph users on:

  • Which checkpointing and state-management workflows are hardest to debug
  • Whether full event-level replay would complement existing LangGraph checkpointers
  • Which graph, node and tool events should be captured automatically
  • Whether branching historical runs would help with testing and agent evaluation
  • What capabilities would be required before using this in production

Contributions, issues and integration feedback are welcome.