The database built for agent memory

TOON-native document storage with WAL durability, tenant isolation, and ~40% fewer tokens than JSON.

< 1ms

Write latency

~40%

Fewer tokens

Tenant isolation

Features

Everything you need for document storage in agent and SaaS workloads.

TOON-first document storage

Store documents in TOON (Token-Oriented Object Notation) — a compact, schema-aware encoding that uses ~40% fewer tokens than JSON. Lossless round-trips with native JSON compatibility.

wal.log
#001WRITEusers.insert
#002APPENDidx.email
#003COMMITwal.flush
#004WRITEsessions.insert
#005APPENDidx.token
#006SYNCwal.fsync
syncedhead

WAL-based durability

Write-ahead logging ensures every operation is durable. Recover cleanly from crashes without data loss.

terminal
$ npm install toondb
added 1 package in 0.8s
import { ToonDBClient } from "toondb";
const client = new ToonDBClient({
baseUrl: "http://localhost:6767",
});

SDK-first integration

Connect from JavaScript with three lines of code. URL + credentials, and you're running CRUD operations instantly.

WAL OperationsDurable writes with append-only log
99.9%
OldestLatest

Indexed equality lookups

Hash-based indexing for fast equality queries. Find documents by any indexed field without scanning entire collections.

Tenant-isolated storage

Each tenant gets its own directory with separate collections, indexes, and WAL. Zero cross-contamination by design.

stdin
bridge
stdout

Bridge-compatible action API

Use the REST API for HTTP access or the bridge protocol for stdin/stdout integration in CI, testing, and automation pipelines.

How It Works

Three steps. One connection. Zero complexity.

ToonDB is designed to be deployed fast and connected instantly from any application through the SDK or REST API.

Step 01

Deploy an instance

Run ToonDB locally with a single docker run command. Ready in seconds.

Step 02

Connect with the SDK

Install the JavaScript SDK, initialize the client with your instance URL and credentials, and target your collections.

Step 03

Store and query documents

Insert, find, update, and delete documents using the SDK or REST API. Filter by any field for precise retrieval.

Step 04

Scale per tenant

Each tenant gets isolated storage. Deploy new instances for new customers with zero cross-contamination.

Quick Start — Docker
$ docker run -d \
  --name toondb \
  -p 6767:6767 \
  -e TOONDB_TENANT=acme \
  -e TOONDB_USERNAME=myuser \
  -e TOONDB_PASSWORD=mypassword \
  -v toondb_data:/var/lib/toondb/data-go \
  amitdey13/toondb

Runs on http://localhost:6767 — configure tenant, credentials, and persistent volume in one command.

JS SDK

Connect from any app

The ToonDB SDK handles authentication, serialization, and all CRUD operations. Install it and connect in seconds.

Install
npm install toondb
Initialize
import { ToonDBClient } from "toondb";

const client = new ToonDBClient({
  baseUrl: "http://localhost:6767",
  username: process.env.TOONDB_USERNAME,
  password: process.env.TOONDB_PASSWORD,
});
.create().insert().find().update().delete().dump()
REST API
POST /v1/collections/{name}/insert
POST /v1/collections/{name}/find
POST /v1/collections/{name}/update
POST /v1/collections/{name}/delete

Environment Variables

TOONDB_USERNAMETOONDB_PASSWORDTOONDB_TENANT

FAQ

Frequently asked questions

Start building with ToonDB

Deploy locally in one command, connect with the SDK, and have your first collection running in under two minutes. Open source, always.

View on GitHub

ToonDB is built on the TOON format — Token-Oriented Object Notation, an open specification for token-efficient data encoding designed for LLM workloads.

© 2026 Lythe Labs