TinyStore documentation
TinyStore documentation
TinyStore gives an application SQL databases, key-value state, background jobs, files, search, channels, locks, settings, logs and metrics in one directory on its own disk. The core is written in Rust. Rust programs call it directly, and Bun, Node, Python and Go programs reach the same core through their SDK.
The documentation has four parts, each for a different moment:
- Learn from scratch: the Handbook builds one application, an AI chat, chapter by chapter, from a first store to copies in another region, and explains why TinyStore is built the way it is.
- Explore the engines: the Guides cover each engine, a page per feature, for when you know what you need: expiry in KV, retries in Jobs, filters in Search.
- Browse the API: the Reference lists every call of every SDK, generated from the source.
- See what changed: the Releases show what each version added and renamed, with code.
Every example is shown in TypeScript, Python, Go and Rust.
Handbook
Start
- Learn TinyStore
- Why TinyStore
- Your first store
- One directory, many engines
- Rust with async
- The chat we build
Building the chat
- Messages
- Sessions and limits
- Replies in the background
- Attachments
- Finding old messages
- Live updates
- Settings
- What it is doing
- How fast it is
- Keeping it
Under the hood
- The journey of a write
- SQLite as TinyStore runs it
- One budget of memory
- Time and errors
- How a job lives
- How logs and metrics pack
- How search finds
- One core, four languages
Beyond one machine
Production
Guides
Engines
SQL
- Overview
- Migrations
- Writes and transactions
- Stopping a slow query
- Tables and queries
- Deleted rows and versions
- Rows that include rows
- Mirrors
- Buckets and queues in a database
- FTS5 and R*Tree
KV
Jobs
- Overview
- Ids
- Gather and quiet hours
- Schedules and cron
- Concurrency and rate
- Watching a job
- Steps
- Jobs in your database
- Testing
Blobs
Search
- Overview
- Fields and weights
- Typos
- As you type
- Keyboard layouts
- Show what matched
- Abbreviations and synonyms
- Filters
- Vectors
- Words and vectors together
- A table's index
- Ask several indexes at once
- Rebuilds
Channels
Locks
Config
- Overview
- Layers and files
- Settings whose shape is known at run time
- Secrets and required settings
- Live settings
- Watching
- Explain and validate
Records
- Overview
- Logging
- Console output
- Events
- An audit that commits with the change
- Reading
- Traces
- Tail and poll
- Other programs' output
- Deleting events
- Repair
Metrics
- Overview
- Instruments
- Reading
- Aggregates
- Compare now with usual
- Ingesting
- To Prometheus
- The store's own metrics
- The metrics crate
Backup
Command line
- Overview
- serve
- status and logs
- kv, sql and schema
- jobs
- files
- channels
- lock
- config
- metrics
- events
- Backup and restore
- Nodes
- AI agents
- Your own MCP server