Migrating from LangGraph
Migrating from LangGraph to Lumen + Kova
SqliteSaver → LumenCheckpointer + LumenTracer, deploy your Agent to a Kova cluster—no changes to your business code.
What you get
| Before (plain LangGraph) | After |
|---|---|
| SqliteSaver single-node persistence | LumenCheckpointer + Kova microsecond-level WAL recovery |
| No tracing | LumenTracer automatic capture |
| No cost tracking | CostTracker aggregated per node |
| Manual replay | Replay.from_run_id() in one line |
Migration steps
Replace the Checkpointer —
LumenCheckpointerimplementsBaseCheckpointSaver100%, with no changes to your business code.diff- from langgraph.checkpoint.sqlite import SqliteSaver + from lumen_ai import LumenCheckpointer - graph = wf.compile( - checkpointer=SqliteSaver.from_conn_string("./state.db") - ) + graph = wf.compile( + checkpointer=LumenCheckpointer() + )Add the Tracer — once running locally, visit
http://localhost:7070to see the trace timeline.diff+ from lumen_ai import LumenTracer graph = wf.compile( checkpointer=LumenCheckpointer(), + callbacks=[LumenTracer()], )Deploy to Kova
yaml# agent.yaml name: research-agent entry: python my_agent.py checkpointer: lumen replicas: 3bashlumen deploy --target kova://prod-cluster
Local verification
bash
python my_agent.py # runs normally
kill -9 $(pgrep -f my_agent) # simulate a crash
python my_agent.py # resumes from the interruption point, no LLM re-callPerformance comparison
| Metric | Before | After |
|---|---|---|
| Recovery latency | 8ms | microsecond-level |
| Multi-process | needs locking | native |
| Cross-datacenter | manual | async replication |
| LLM re-call | sometimes | never |
Rollback
Keep the old SqliteSaver code commented out; revert the diff at any time to return to the original state. The data is not shared, but they can run in parallel.