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

@assim98/typesense-langgraph-checkpointer

v0.1.7

Published

LangGraph checkpointer backed by Typesense

Readme

🔍 typesense-langgraph-checkpointer

LangGraph checkpoint saver backed by Typesense — for Python and JavaScript/TypeScript.

JS CI Python CI PyPI version npm version License: MIT

Features · Installation · Quick Start · API Reference · Development · Contributing


✨ Features

  • Drop-in LangGraph saver — implements the full BaseCheckpointSaver interface
  • Dual-language — first-class Python and TypeScript packages from the same repo
  • Blazingly fast search — leverages Typesense's in-memory engine for sub-millisecond checkpoint retrieval
  • Thread management — full CRUD for threads, checkpoints, and pending writes
  • Automatic schema setup — call setup() once and collections are created for you
  • Zero-config local dev — Docker Compose included for instant Typesense instance

📦 Installation

Python

pip install langgraph-checkpoint-typesense

JavaScript / TypeScript

npm install @typesense-langgraph/checkpoint

🚀 Quick Start

Python

import typesense
from langgraph_checkpoint_typesense import AsyncTypesenseSaver

# 1. Create the saver
saver = AsyncTypesenseSaver.from_config(
    host="localhost",
    port=8108,
    api_key="your-api-key",
    protocol="http",
)

# 2. Initialize collections (run once)
await saver.setup()

# 3. Use with any LangGraph graph
from langgraph.graph import StateGraph

graph = StateGraph(...)
# ... define your nodes & edges ...
app = graph.compile(checkpointer=saver)

# 4. Invoke with a thread
config = {"configurable": {"thread_id": "my-thread"}}
result = await app.ainvoke({"input": "hello"}, config)

JavaScript / TypeScript

import { TypesenseSaver } from "@typesense-langgraph/checkpoint";

// 1. Create the saver
const saver = TypesenseSaver.fromConfig({
  host: "localhost",
  port: 8108,
  apiKey: "your-api-key",
  protocol: "http",
});

// 2. Initialize collections (run once)
await saver.setup();

// 3. Use with any LangGraph graph
import { StateGraph } from "@langchain/langgraph";

const graph = new StateGraph(...)
  // ... define your nodes & edges ...
  .compile({ checkpointer: saver });

// 4. Invoke with a thread
const config = { configurable: { thread_id: "my-thread" } };
const result = await graph.invoke({ input: "hello" }, config);

⚙️ Configuration

| Parameter | Python | JS/TS | Default | Description | | --- | --- | --- | --- | --- | | Host | host | host | localhost | Typesense server hostname | | Port | port | port | 8108 | Typesense API port | | API Key | api_key | apiKey | — | Typesense API key | | Protocol | protocol | protocol | http | http or https | | Timeout | connection_timeout_seconds | connectionTimeoutSeconds | 5 | Connection timeout in seconds |

You can also pass a pre-configured Typesense Client directly to the constructor.


📖 API Reference

Python — AsyncTypesenseSaver

| Method | Description | | --- | --- | | from_config(cls, **kwargs) | Create a saver from connection parameters | | setup() | Create Typesense collections if they don't exist | | aget_tuple(config) | Retrieve a checkpoint tuple | | aput(config, checkpoint, metadata, new_versions) | Store a checkpoint | | aput_writes(config, writes, task_id) | Store pending writes | | alist(config, *, filter, before, limit) | List checkpoint tuples | | adelete_thread(thread_id) | Delete all data for a thread |

JavaScript / TypeScript — TypesenseSaver

| Method | Description | | --- | --- | | fromConfig(config) | Create a saver from connection parameters | | setup() | Create Typesense collections if they don't exist | | getTuple(config) | Retrieve a checkpoint tuple | | put(config, checkpoint, metadata, newVersions) | Store a checkpoint | | putWrites(config, writes, taskId) | Store pending writes | | list(config, options?) | Async-generator of checkpoint tuples | | deleteThread(threadId) | Delete all data for a thread |


🏗️ Architecture

graph LR
    A["LangGraph Runtime"] -->|checkpoint & writes| B["TypesenseSaver"]
    B -->|upsert / search| C["Typesense"]
    C --> D[("checkpoints collection")]
    C --> E[("writes collection")]
    B -->|getTuple / list| A

The saver manages two Typesense collections:

  • langgraph_checkpoints — stores serialized checkpoint state, metadata, and channel versions
  • langgraph_writes — stores pending writes keyed by (thread_id, checkpoint_id, task_id, idx)

Both collections are created automatically by setup() with optimized schemas and sorting fields.


🛠️ Development

Prerequisites

  • Docker
  • Python ≥ 3.9
  • Node.js ≥ 22

Start Typesense

docker compose up -d

Default API key: test-api-key (override with TYPESENSE_API_KEY env var).

Python

cd python
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v

JavaScript / TypeScript

cd js
npm ci
npm run build
npm test

🤝 Contributing

Contributions are welcome! Please read the Contributing Guide and the Code of Conduct before opening a PR.


📄 License

This project is licensed under the MIT License.