The database that grows with your data everywhere.

Keep real SQLite as your app grows: replication, failover, offline device sync, and a database for every user and every AI agent. Sirannon embeds in Node.js, Bun, the browser, and React Native, or answers HTTP and WebSocket behind its own server, all from a single package.

  • Claude Code
  • Codex
  • Cursor
  • Copilot
  • Gemini CLI
  • Antigravity
  • Grok Build
  • OpenCode
See what your agent does with it

See Sirannon in 69 seconds

Pick a driver, open a database, and query it

Parameterised queries and typed results behave the same on an embedded file as on a replicated cluster, so the code that you start with can be the code that you deploy.

One driver API covers Node.js, Bun, the browser, and React Native, which is how the same database opens in all four. The bundled server answers your clients over HTTP and WebSocket, while the nodes of a cluster replicate to each other over gRPC.

Read the getting started guide
database.ts
import { Sirannon } from '@delali/sirannon-db'
import { betterSqlite3 } from '@delali/sirannon-db/driver/better-sqlite3'
 
const driver = betterSqlite3()
const sirannon = new Sirannon({ driver })
const db = await sirannon.open('app', './data/app.db')
 
await db.execute(
  'CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)'
)
await db.execute('INSERT INTO users (name, email) VALUES (?, ?)', [
  'Ada',
  'ada@example.com',
])
 
const users = await db.query<{ id: number; name: string }>('SELECT * FROM users')

You can keep the same database from your laptop to your cluster

Sirannon can open your database as a file on your laptop, serve that same file over HTTP and WebSocket from its own server, or replicate it across a cluster of nodes that fails over through a coordinator. The query code that you write on the first day can stay unchanged when you move to a cluster, because you change only the configuration as your product grows.

The line that opens a database is identical in every one of the three deployments.

One codebasethree deployments
const db = await sirannon.open('app', path)

Laptop

one file on disk

app.db

Server

HTTP and WebSocket

4 readers

Cluster

three nodes with failover

coordinator
The line above stays the same in all threeno rewrite

You can restore a terabyte to any moment that you name

Sirannon copies the whole database on the first backup, after which it sends only the write-ahead log frames that SQLite wrote since the previous backup. When you name the moment that you want back, Sirannon rebuilds the database from the full copy and every piece of change that it captured up to that moment. During a restore, Sirannon fetches one piece and applies it before it requests the next, so it holds only one piece in memory however large the database is.

Backup chainrestore to 14:02
02:00Full copy1.0 TB
06:00WAL frames412 MB
10:00WAL frames96 MB
14:00WAL frames233 MB
14:02Rebuilt to this momentone piece in memory
Every piece up to 14:02 replays in orderrestoreBackup

Every customer and every AI agent can have their own database

A resolver maps any identifier to a file path, so Sirannon opens a database for a new customer or a new AI agent the first time that your code requests it, with no provisioning call. The lifecycle manager closes idle handles and evicts the least recently used one once the open count reaches your cap, which lets the number of files on disk grow while the number of open handles stays where you set it. Sirannon applies your migrations to each database as it opens the file, so the database of a tenant that you add long after the last schema change still opens on the current schema.

Instancescustomers and AI agents

brightwood-legal

data/tenants/brightwood-legal.db

4 connsActive

drafting-agent-04

data/ai-agents/drafting-agent-04.db

2 connsActive

patel-associates

data/tenants/patel-associates.db

12 minIdle

volta-tours

data/tenants/volta-tours.db

freedEvicted
Opening a file is what creates oneLRU eviction
See what you can build

Sirannon processes up to 32 times as many operations a second as PostgreSQL

Over 10M rows, with both engines writing every commit to disk, Sirannon holds 32,000 operations a second on a read-heavy workload, against 1,000 for PostgreSQL. The benchmark harness drives each engine through its own client on one machine, with each engine on dedicated cores under the same memory limit. Each figure below is the median of five runs.

32×

PostgreSQL's rate

32,000operations a second

On a workload of 95 per cent reads and 5 per cent updates, Sirannon holds 32,000 operations a second.

  • Sirannon32,000
  • PostgreSQL1,000

Each rate is the fastest at which the engine completes 99 per cent of requests within 25 ms.

One dependency covers the whole database

You install the drivers, migrations, backups, change capture, the network server, device sync, and replication together as one package.

Pluggable drivers
One API covers better-sqlite3, the Node.js built-in driver, wa-sqlite in the browser, Bun, and Expo on React Native.
Registered operations
By default, a server executes only the reads and writes that you register by name, so a browser or an AI agent can reach only those.
Change capture and live queries
Clients can subscribe to row-level changes as they commit, while a live query sends its results again whenever the rows behind it change.
Offline device sync
A device writes to its own database file while it is offline, then reconciles with the server through the conflict rules that Sirannon uses for replication.
Replication and failover
A primary replicates its changes over gRPC and stamps each one with a hybrid logical clock. When that primary goes down, Sirannon promotes another node automatically in coordinator mode.
Migrations, backups, and hardening
Sirannon loads versioned migrations from SQL files and can rebuild a database to any moment from its continuous backups. Its core also enforces parameterised queries and checks every file path.

Start building with Sirannon

Sirannon is free and open source under the Apache 2.0 licence.