Skip to content
Lumen × LangGraph × Kova

Lumen × LangGraph × Kova

Goal: swap a LangGraph Agent's Checkpointer from SqliteSaver to LumenCheckpointer, deploy to Kova, and observe the crash-recovery comparison.

Before / After ​

Before — Plain LangGraph

Single machine, no remote backup · Cross-process requires locking · Millisecond crash recovery · No cost tracking.

After — Lumen + Kova

Microsecond crash recovery (Kova WAL engine) · Native multi-process safety · Automatic Trace + Cost · Remote persistence.

Before ​

python
from langgraph.checkpoint.sqlite import SqliteSaver

graph = wf.compile(checkpointer=SqliteSaver.from_conn_string("./state.db"))

After ​

python
from lumen_ai import LumenCheckpointer, LumenTracer
from kova import KovaClient

kova = KovaClient("kova://prod-cluster")

graph = wf.compile(
    checkpointer=LumenCheckpointer(kova_client=kova),
    callbacks=[LumenTracer()],
)

Local Verification ​

  1. Start a local Kova

    bash
    docker run -d --name kova -p 9999:9999 ghcr.io/hanmahong5-arch/kova:latest
  2. Run your Agent

    bash
    python my_agent.py
  3. Simulate a crash

    bash
    kill -9 $(pgrep -f my_agent)
  4. Restart — resume from the breakpoint

    bash
    python my_agent.py

Deploy to Kova ​

yaml
# agent.yaml
name: my-research-agent
entry: python my_agent.py
replicas: 3
checkpointer: lumen
wal:
  retention: 7d
bash
lumen deploy --target kova://prod-cluster

Crash-Recovery Comparison Experiment ​

MetricSqliteSaverLumen + Kova
Recovery latency8ms (single machine)Microsecond
Multiple replicasRequires extra lockingNative
Cross-datacenterManual replicationAsync replication built in
LLM re-invocationRe-invokes if SQLite write failsNever re-invokes
TraceNoneAuto-correlated

Where the microsecond recovery comes from

The Kova engine's scheduling latency is as low as 3μs (full FIFO pipeline Criterion benchmark of 3.17μs, 315K ops/s). LumenCheckpointer hands LangGraph's checkpoint writes to the Kova WAL — recovery uses engine-level WAL replay instead of SQLite file-level recovery, so it is microsecond-scale, far faster than single-machine SQLite's millisecond scale.

Next Steps ​

Next steps

Powered by Lurus Technologies