Thanks to visit codestin.com
Credit goes to docs.toondb.dev

Skip to main content
Version: 0.3.1

ToonDB Documentation

Welcome to the official ToonDB documentation. ToonDB is The LLM-Native Database — a high-performance embedded database designed specifically for AI applications.


Key Features

FeatureDescription
40-66% Fewer TokensTOON format optimized for LLM consumption
Namespace Isolation (v0.3.0)Type-safe multi-tenancy with per-tenant data isolation
Hybrid Search (v0.3.0)Vector + BM25 keyword search with RRF fusion
ContextQuery Builder (v0.3.0)Token-aware retrieval with budgeting and deduplication
Blazing FastRust-powered with zero-copy and SIMD
Vector SearchBuilt-in HNSW indexing for embeddings
EmbeddableIn-process or client-server mode
Multi-LanguageNative SDKs for Rust, Python, Node.js, Go
MCP ReadySeamless Claude/LLM agent integration

Quick Install

cargo add toondb
use toondb::Database;

fn main() -> anyhow::Result<()> {
let db = Database::open("./my_app_db")?;

db.with_transaction(|txn| {
txn.put(b"users/alice", br#"{"name": "Alice", "role": "admin"}"#)?;
Ok(())
})?;

if let Some(user) = db.get(b"users/alice")? {
println!("{}", String::from_utf8_lossy(&user));
}

Ok(())
}

Full Quick Start Guide


Documentation Sections

🚀 Getting Started

Step-by-step guides to get you up and running quickly.

📖 Guides

Task-oriented guides for specific use cases.

Language SDKs:

Features:

💡 Concepts

Deep dives into ToonDB's architecture and design.

📋 API Reference

Complete technical specifications.

🛠️ Server Reference

Deep technical documentation for ToonDB servers and tools.

🍳 Cookbook

Recipes for common tasks.


I want to...Go to...
Get started in 5 minutesQuick Start
Use SQL queriesSQL Guide
Use the Rust SDKRust Guide
Use the Python SDKPython Guide
Use the Node.js SDKNode.js Guide
Use the Go SDKGo Guide
Add vector searchVector Search
Understand the architectureArchitecture
See the SQL API referenceSQL API