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-based durability
Write-ahead logging ensures every operation is durable. Recover cleanly from crashes without data loss.
SDK-first integration
Connect from JavaScript with three lines of code. URL + credentials, and you're running CRUD operations instantly.
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.
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.
$ 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/toondbRuns 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.
npm install toondbimport { ToonDBClient } from "toondb";
const client = new ToonDBClient({
baseUrl: "http://localhost:6767",
username: process.env.TOONDB_USERNAME,
password: process.env.TOONDB_PASSWORD,
});POST /v1/collections/{name}/insert
POST /v1/collections/{name}/find
POST /v1/collections/{name}/update
POST /v1/collections/{name}/deleteEnvironment Variables
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.
ToonDB is built on the TOON format — Token-Oriented Object Notation, an open specification for token-efficient data encoding designed for LLM workloads.