๐งถ StateWeave
git for agent brains.
When your agent goes wrong, see exactly where and why. Then rewind.
StateWeave is git for agent brains โ debug, time-travel, and migrate agent state across 10 frameworks. When a 20-step autonomous workflow derails at step 15, see exactly what changed, rewind to step 14, and replay. Export from LangGraph, import into CrewAI with zero data loss. Checkpoint, rollback, diff, encrypt, sign โ all through a single Universal Schema.
When your agent hallucinates, crashes, or drifts โ stateweave why shows you the exact state transition that went wrong. When your enterprise needs to audit agent behavior, every state change is versioned, signed, and encrypted.
Why StateWeave?
StateWeave solves three critical problems in the AI agent ecosystem:
๐ Debugging โ Agent workflows are non-deterministic. When they go wrong, you need to pause, rewind, inspect, and replay โ not restart. stateweave why shows you the exact state transition that caused the failure. Version control for agent cognition.
๐ Security โ Agent state contains the agent's entire cognitive history. StateWeave encrypts at rest (AES-256-GCM), signs payloads (Ed25519), strips credentials on export, and enforces compliance policies.
๐ Portability โ Every framework has persistence, none have portability. StateWeave's Universal Schema โ a canonical representation of agent cognitive state โ lets you move state between any of 10 frameworks. One schema, N adapters, zero data loss (with explicit warnings for anything non-portable).
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ LangGraph โ โ MCP โ โ CrewAI โ โ AutoGen โ
โ Adapter โ โ Adapter โ โ Adapter โ โ Adapter โ
โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ
โ โ โ โ
โโโโโโโโโโโโโฌโโโโโโโโดโโโโโโโโโโโโฌโโโโโโโโ โ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐งถ Universal Schema v1 โ
โ โ
โ conversation_history ยท working_memory ยท goal_tree โ
โ tool_results_cache ยท trust_parameters ยท audit_trail โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Star topology, not mesh. N adapters, not Nยฒ translation pairs. Adding a new framework = one adapter, instant compatibility with everything else.
See it working
$ pip install stateweave
$ python examples/full_demo.py
โโ 1. Export from LangGraph โโ
โ Exported 4 messages
โ Source framework: langgraph
โโ 2. Import into MCP โโ
โ Imported into mcp
โ Messages preserved: 4
โโ 3. Verify Round-Trip โโ
โ Zero data loss: YES
โโ 4. Diff Agent States โโ
Summary: 7 added, 4 removed, 7 modified
โโ 5. Time Travel โโ
โ Checkpoint v1 (initial-research)
โ Checkpoint v2 (after-drug-discovery)
โ Rolled back โ 4 msgs
โโ 6. Encryption (AES-256-GCM) โโ
โ 1,733 bytes โ 1,749 bytes encrypted
โ Decrypted: 4 messages intact
โโ 7. Non-Portable Warnings โโ
โ No non-portable warnings (clean export)
7/7 steps passed. Everything runs from PyPI.
Try it now:
pip install stateweave && stateweave quickstartโ zero-code demo in 10 seconds.Or run the full 7-step demo:
python examples/full_demo.py
One-Command Migration
$ stateweave migrate --from langgraph --to crewai --agent my-agent
๐งถ StateWeave Migrate: langgraph โ crewai
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโ Step 1: Export from langgraph โโ
โ Exported 12 messages, 5 memory keys (0.01s)
โโ Step 2: Validate payload โโ
โ Payload valid โ all schema checks passed
โโ Step 3: Import into crewa
Tools 4
checkpointCreate a versioned snapshot of the current agent state.rollbackRevert the agent state to a previous checkpoint.migrateTransfer agent state between different frameworks.diffCompare two agent states to identify changes.Environment Variables
STATEWEAVE_ENCRYPTION_KEYKey used for AES-256-GCM encryption of agent state at rest.