npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gbyte.tech/langgraph-checkpoint-scylladb

v1.0.0

Published

ScyllaDB checkpoint saver for LangGraph.js

Readme

@gbyte.tech/langgraph-checkpoint-scylladb

CI npm version License: MIT TypeScript ScyllaDB

A production-ready ScyllaDB checkpoint saver for LangGraph.js. Enables persistent, high-performance state management for LangGraph agents and workflows using ScyllaDB — the real-time big data database compatible with Apache Cassandra.

Built and maintained by GBYTE TECH — AI-powered software engineering.


Features

  • 🚀 High Performance — Leverages ScyllaDB's shard-per-core architecture for low-latency reads and writes
  • 📋 Prepared Statements — All CQL queries use prepared statements for optimal query planning and caching
  • ⏱️ TTL Support — Optional automatic data expiration via ScyllaDB's native USING TTL
  • 🔒 Idempotent Writes — Lightweight transactions (IF NOT EXISTS) for safe write deduplication
  • 📊 Efficient Listing — Clustering order DESC enables O(1) "get latest checkpoint" queries
  • 🔍 Filtered Queries — Secondary indexes on metadata fields (source, step) for fast filtered listing
  • Fully Validated — Passes all 710+ official @langchain/langgraph-checkpoint-validation spec tests
  • 🏭 Production Ready — LeveledCompactionStrategy, configurable replication, graceful shutdown

Installation

npm install @gbyte.tech/langgraph-checkpoint-scylladb
# or
pnpm add @gbyte.tech/langgraph-checkpoint-scylladb
# or
yarn add @gbyte.tech/langgraph-checkpoint-scylladb

Peer Dependencies

npm install @langchain/core @langchain/langgraph-checkpoint

Quick Start

import { ScyllaDBSaver } from "@gbyte.tech/langgraph-checkpoint-scylladb";

// Option 1: From connection string (single node)
const saver = await ScyllaDBSaver.fromConnString("localhost", {
  keyspace: "langgraph",
  setupSchema: true, // Auto-create keyspace & tables
});

// Option 2: From full config (multi-node cluster)
const saver = await ScyllaDBSaver.fromConfig({
  contactPoints: ["node1.scylla.local", "node2.scylla.local"],
  localDataCenter: "datacenter1",
  keyspace: "langgraph",
  credentials: { username: "admin", password: "secret" },
  ttlConfig: { defaultTTLSeconds: 86400 }, // 24h TTL
});

// Option 3: BYO client (advanced)
import { Client } from "cassandra-driver";

const client = new Client({
  contactPoints: ["localhost"],
  localDataCenter: "datacenter1",
  keyspace: "langgraph",
});
await client.connect();

const saver = new ScyllaDBSaver(client);

Use with LangGraph

import { StateGraph } from "@langchain/langgraph";
import { ScyllaDBSaver } from "@gbyte.tech/langgraph-checkpoint-scylladb";

const checkpointer = await ScyllaDBSaver.fromConnString("localhost", {
  keyspace: "langgraph",
});

const graph = new StateGraph({
  /* your graph definition */
}).compile({ checkpointer });

// Run with thread persistence
const result = await graph.invoke(
  { messages: [{ role: "user", content: "Hello!" }] },
  { configurable: { thread_id: "my-thread" } },
);

// Graceful shutdown
await checkpointer.end();

Schema

The library uses two tables optimized for ScyllaDB's distributed architecture:

-- Checkpoints: partitioned by (thread_id, namespace), clustered by checkpoint_id DESC
CREATE TABLE checkpoints (
  thread_id text, checkpoint_ns text, checkpoint_id text,
  parent_checkpoint_id text, checkpoint blob, metadata blob,
  source text, step int, created_at timestamp,
  PRIMARY KEY ((thread_id, checkpoint_ns), checkpoint_id)
) WITH CLUSTERING ORDER BY (checkpoint_id DESC);

-- Writes: partitioned by (thread_id, namespace, checkpoint_id), clustered by task
CREATE TABLE checkpoint_writes (
  thread_id text, checkpoint_ns text, checkpoint_id text,
  task_id text, idx int, channel text, type text,
  value blob, created_at timestamp,
  PRIMARY KEY ((thread_id, checkpoint_ns, checkpoint_id), task_id, idx)
);

Schema Setup

Option A: Docker Compose (development)

docker compose up -d  # Applies docker/scylla-init.cql automatically

Option B: Programmatic (production)

const saver = await ScyllaDBSaver.fromConnString("localhost", {
  setupSchema: true, // Creates keyspace, tables, and indexes
});

Option C: Manual CQL — see docker/scylla-init.cql

API Reference

ScyllaDBSaver

Extends BaseCheckpointSaver from @langchain/langgraph-checkpoint.

| Method | Description | | ------------------------------------------------ | ---------------------------------------- | | getTuple(config) | Get a specific or latest checkpoint | | put(config, checkpoint, metadata, newVersions) | Save a checkpoint | | putWrites(config, writes, taskId) | Store pending writes for a checkpoint | | list(config, options?) | List checkpoints with optional filtering | | deleteThread(threadId) | Delete all data for a thread | | setup() | Create keyspace, tables, and indexes | | end() | Gracefully shut down the connection |

Static Factory Methods

| Method | Description | | ---------------------------------------------- | ------------------------------- | | ScyllaDBSaver.fromConfig(config, options?) | Create from full cluster config | | ScyllaDBSaver.fromConnString(host, options?) | Create from single host string |

Configuration

interface TTLConfig {
  defaultTTLSeconds?: number; // TTL in seconds for all inserts
}

interface ScyllaDBSaverConfig {
  contactPoints: string[]; // ScyllaDB cluster nodes
  localDataCenter: string; // DC name (e.g., "datacenter1")
  keyspace?: string; // Default: "langgraph"
  ttlConfig?: TTLConfig; // Optional TTL
  credentials?: { username; password }; // Optional auth
}

Development

Prerequisites

  • Node.js ≥ 18
  • Docker & Docker Compose
  • pnpm

Setup

git clone https://github.com/GByteTech/langgraph-checkpoint-scylladb-js.git
cd langgraph-checkpoint-scylladb-js
pnpm install

Running Tests

# Start ScyllaDB
docker compose up -d --wait

# Run all tests (integration + spec validation)
pnpm test

# Watch mode
pnpm test:watch

# Build
pnpm build

Test Suite

| Suite | Tests | Description | | --------------- | ------- | ----------------------------------------------------------------------- | | Integration | 17 | Custom tests for all CRUD operations, TTL, namespaces, factory methods | | Spec Validation | 710 | Official @langchain/langgraph-checkpoint-validation conformance suite | | Total | 727 | All passing ✅ |

ScyllaDB vs Other Backends

| Feature | ScyllaDB | Redis | SQLite | PostgreSQL | | ---------------------- | ----------- | -------------- | -------------- | ---------- | | Horizontal scalability | ✅ Linear | ❌ Single-node | ❌ Single-file | ⚠️ Complex | | Latency (p99) | < 1ms | < 1ms | ~1ms | ~5ms | | Data persistence | ✅ Durable | ⚠️ AOF/RDB | ✅ Durable | ✅ Durable | | TTL support | ✅ Native | ✅ Native | ❌ Manual | ❌ Manual | | Multi-DC replication | ✅ Built-in | ❌ | ❌ | ⚠️ Complex | | Operational overhead | Medium | Low | None | Medium |

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE for details.