Skip to main content

SQLite checkpointer

A durable checkpointer in a single SQLite file. A parked interrupt survives a process restart, a deploy, or a crash.

Install​

@ilmek/checkpoint-sqlite — zero dependencies, on Node's built-in node:sqlite.

npm install @ilmek/core @ilmek/checkpoint-sqlite

Requires Node ≥ 22.5 (for the built-in node:sqlite module).

Usage​

Open the file and hand it to the run — it creates and migrates the database on first use, so there is no separate setup step.

import { run } from "@ilmek/core";
import { SqliteCheckpointer } from "@ilmek/checkpoint-sqlite";

const cp = await SqliteCheckpointer.open("./agent.db"); // creates + migrates
await run(graph, input, { threadId, checkpointer: cp });

Bring your own driver​

It talks to a duck-typed database (exec / prepare), so better-sqlite3 drops in unchanged if you would rather use it than the built-in module.

When to reach for Postgres instead​

SQLite gives you single-process durability. For threads that must be read and resumed from more than one process — a web tier plus a worker tier, say — use @ilmek/checkpoint-postgres instead (TypeScript today; a .NET Postgres checkpointer is on the roadmap).