mémoire French for memory GitHub

Agents forget.

memoire gives them a memory. SQLite databases an agent creates in one command, shares with its team, and lets expire.

v1 in progress Drag a finger across the page. Move across the page. It stays warm for a moment, then it is gone.

The life of a database

Four moments, in the order an agent meets them.

  1. Create

    One command makes one SQLite file on the gateway's host. Burstable is the default, scratch space with an idle TTL.

    memoire db create scratch --burstable --ttl 24h

    memoire db create notes --persistent

    201 POST /v1/memoire/databases

    name
    scratch
    kind
    burstable
    idle_ttl_seconds
    86400
    expires_at
    2026-11-20T10:00:00Z
  2. Query

    Ask from the CLI, or POST statements as JSON. Reads run on a read-only connection, and every query restarts a burstable database's idle clock.

    memoire query notes "select id, body from notes" --json

    200 2 rows

    id INTEGERbody TEXT
    1hello
    2world
  3. Share

    A database belongs to a team. People join by invitation. Each machine or agent gets its own API key, narrowed to what it needs.

    memoire keys create --name build-bot --read-only

    201 key printed once

    key
    mzk_…
    permissions
    memoire.databases.read
    expires
    in 90 days
  4. Expire, or keep

    Idle scratch expires and its file is removed. A persistent database lives until it is deleted, with a snapshot every 6 hours.

    memoire snapshots ls notes

    200 newest first

    idcreated_atreason
    snap_…c4111-19 18:00Zscheduled
    snap_…9be11-19 12:00Zscheduled
    snap_…27a11-19 06:00Zscheduled

Scratch, or keep

Two kinds of database. Watch a week go by.

burstable
persistent

Burstable

  • Expires after an idle TTL, 24 hours by default. Set it from 1 minute to 7 days.
  • Each query restarts the clock, but never past 7 days from creation.
  • No backups. Connections close after 5 minutes idle and reopen on the next request.

Persistent

  • Lives until you delete it.
  • Snapshotted every 6 hours. Snapshots are kept 7 days.
  • Restore any snapshot. The current contents are snapshotted first.

Shared by a team, scoped by key

A team owns its databases. Members sign in and invite others. Machines and agents hold their own mzk_… keys, with all five permissions or fewer.

memoire keys create --name build-bot --read-only

  • memoire.databases.read list, read queries, schema, rows, export, snapshot list
  • memoire.databases.write write queries, extend, import
  • memoire.databases.create create
  • memoire.databases.delete delete
  • memoire.databases.snapshots snapshot restore

This key holds all five permissions.

Plain HTTP, JSON in and out

No driver to install. Send up to 100 statements in one request, with parameters, in read or write mode, as one transaction if you ask.

POST /v1/memoire/databases/notes/query
{
  "mode": "write",
  "transaction": true,
  "statements": [
  {"sql": "INSERT INTO notes (body) VALUES (?)",
   "params": ["hello"]},
  {"sql": "SELECT id, body FROM notes"}
  ]
}
200 one result per statement
{
  "results": [
  {"columns": [], "rows": [],
   "rows_affected": 1,
   "last_insert_rowid": 1},
  {"columns": [
     {"name": "id", "decltype": "INTEGER"},
     {"name": "body", "decltype": "TEXT"}],
   "rows": [[1, "hello"]],
   "rows_affected": 0,
   "last_insert_rowid": null}
  ]
}

Guardrails

1 GiB
per database
50
active databases per team
5 s
default deadline per statement, 30 s at most
read-only
connections for read mode; a write fails
refused
ATTACH, load_extension, VACUUM INTO

Timed from the client, network included

One Python client in a datacenter, about 3 ms from the hosted service, on 21 November 2026. One burstable database holding 1.4 million synthetic rows. Each figure is a whole HTTP request and its response, so the round trip in the first row is inside every other row.

Latency per request in milliseconds. 3,000 requests of each kind, taken in turn on one open connection.
Request p50 p95 p99
Round trip alone GET /health/live, no key, no database 2.88.418.0
Credential check alone GET /v1/memoire/whoami, a key and no database 7.718.942.1
Read one row by primary key 13.030.555.6
Read one customer's orders through an index 13.231.468.0
Join three tables for one order 13.231.564.8
Read a page of 1,000 rows 14.132.972.7
Insert one row 13.331.279.5
Update and insert in one transaction 13.333.168.1
Each bar is the median, on one scale. The notch marks the median round trip on the same scale. A small request costs about 13 ms whatever it reads or writes. SELECT 1, which touches no table, takes 12.1 ms.

Larger work

A range spans the two runs at this size.

48,000 to 77,000 rows/s
Loading 421,000 rows over HTTP as multi-row INSERTs, in requests of up to 1 MiB.
465,000 to 609,000 rows/s
Generating 1,000,000 rows inside SQLite with one statement.
350 to 380 requests/s
Reads of one row over 16 connections at once. One connection alone does about 80.
1.7 to 1.8 s
A join and group over about 100,000 orders and their 300,000 items. With four times the data it took 13.6 s, past the 5 s default deadline.
100 MB in 5 to 9 s
Exporting the whole database as a SQLite file.

What these numbers leave out

  • Capacity. This is one client, one database and one small server. Nothing here says how many teams or databases it carries at once.
  • Your network. An earlier trial with an older version of the script ran from a home connection with 3% packet loss and 13 to 99 ms of ping. The same reads took 36 to 82 ms at the median and 0.9 to 3.7 s at the 99th percentile.
  • A new connection. TCP and TLS add 16 to 20 ms, and a command-line call pays that every time.
  • Where the tails come from. The server, the proxy and the client were all shared. A second run moved the medians by up to 14% and the 99th percentiles by up to 32%.
  • A cold database, persistent databases and their snapshots, import and the memory routes. None of them is timed.

Limits in force

100
statements per request
999
parameters per statement
1 MiB
per request body
10,000
rows per statement, and 16 MiB per response
30 s
at most per statement, 5 s by default
1 GiB
per database

Method, full results and the raw files The script, to run it yourself

Get started

From nothing to a signed-in CLI. The hosted service at app.memoire.network is invite-only for now, so you need an invitation to get an account. You can also run your own gateway.

  1. Install the CLI

    There are no release binaries yet, so Cargo builds the CLI from source. That needs Rust 1.98 or later. The binary is memoire.

    your terminal

    cargo install --locked --git https://github.com/ligerian-labs/memoire memoire-cli

  2. Sign in and create a team

    Open app.memoire.network, sign in and create a team. Databases, machines and keys belong to it.

  3. Create a key for this machine

    In the web app, open Machines and API keys and add a machine. The app then offers a key for it. Pick read-only access if the machine only needs to read. The app shows the key (mzk_…) once, so copy it now.

  4. Sign the CLI in

    login asks for the key and does not echo it. Paste it at the prompt. The CLI checks the key with the service, then stores it in ~/.config/memoire/credentials.json with mode 0600.

    your terminal

    memoire login --server https://app.memoire.network

    Then check who the CLI is signed in as.

    your terminal

    memoire whoami

  5. Teach your agents optional

    This installs the memoire skill, which teaches Claude Code and Codex the commands. It needs no login.

    your terminal

    memoire skill install --claude --codex

  6. Agents and CI

    An agent or a CI job skips login and reads two variables. Give each machine its own key.

    MEMOIRE_SERVER
    https://app.memoire.network
    MEMOIRE_API_KEY
    the machine's key, from your secret store

    Once signed in, a team owner or admin can mint those keys from the CLI. It asks for your email and password without echo and prints only the key, so the key goes straight to a file and never into an argument. The umask keeps that file readable by you alone.

    a signed-in machine

    (umask 077 && memoire keys create --name ci-runner > ci-runner.key)

    Move the file to the new machine, store the key and remove the file.

    the new machine

    memoire login --server https://app.memoire.network --key-file ci-runner.key && rm ci-runner.key

Early, and in the open

v1 is in progress. The gateway, the CLI and the web client are in the repository. The hosted service is invite-only, and the CLI has no release binaries yet.

Rust, Apache-2.0. One always-on gateway; the SQLite files live on its host.