Skip to content
Lumen × LangGraph × Kova

Lumen × LangGraph × Kova

Objectif : faire passer le Checkpointer d’un Agent LangGraph de SqliteSaver à LumenCheckpointer, le déployer sur Kova et observer la comparaison de récupération après crash.

Avant / Après ​

Avant — LangGraph seul

Mono-machine, sans sauvegarde distante · verrouillage requis entre processus · récupération après crash de l’ordre de la milliseconde · aucun suivi des coûts.

Après — Lumen + Kova

Récupération après crash de l’ordre de la microseconde (moteur WAL de Kova) · sécurité multi-processus native · Trace + Cost automatiques · persistance distante.

Avant ​

python
from langgraph.checkpoint.sqlite import SqliteSaver

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

Après ​

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()],
)

Validation locale ​

  1. Démarrer Kova en local

    bash
    docker run -d --name kova -p 9999:9999 ghcr.io/hanmahong5-arch/kova:latest
  2. Exécuter votre Agent

    bash
    python my_agent.py
  3. Simuler un crash

    bash
    kill -9 $(pgrep -f my_agent)
  4. Redémarrer — reprise depuis le point d’interruption

    bash
    python my_agent.py

Déployer sur 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

Expérience comparative de récupération après crash ​

IndicateurSqliteSaverLumen + Kova
Latence de récupération8 ms (mono-machine)niveau microseconde
Multi-réplicasverrouillage supplémentaire requisnatif
Multi-datacentercopie manuelleréplication asynchrone intégrée
Réappel LLMréappel si l’écriture SQLite échouejamais de réappel
Traceaucunecorrélation automatique

D’où vient la récupération en microsecondes

La latence d’ordonnancement du moteur Kova descend jusqu’à 3 μs (pipeline FIFO complet, benchmark Criterion à 3,17 μs, 315 K ops/s). LumenCheckpointer confie l’écriture des checkpoints de LangGraph au WAL de Kova — la récupération passe par un rejeu WAL au niveau du moteur plutôt que par un fichier SQLite, d’où un niveau microseconde, bien plus rapide que la milliseconde d’un SQLite mono-machine.

Étapes suivantes ​

Étapes suivantes

Powered by Lurus Technologies