GoldieBench Blog · 7 min read
Hermes Agent SQLite by the Numbers: Search Speed, Database Growth, Durability Settings and the Tests Worth Running on Your Own state.db
Every number the Hermes docs publish about the session store, what moves it, and a short test plan for your own install.

Hermes Agent SQLite is the storage engine behind the agent's memory of past chats, and the docs publish enough numbers about it to benchmark your own setup.
This page gathers them in one place: search latency, growth, durability trade-offs and the settings that shift each one.
Figures come from the Sessions guide, the memory docs, the configuration reference and the v0.23.3 release.
Benchmarking your website instead? A Backlink Gameplan measures the link gap between you and the pages that outrank you.
The published numbers at a glance
| Metric | Published figure | Source |
|---|---|---|
| FTS5 discovery search | about 20 ms | Memory docs |
| Scroll inside a result | about 1 ms, 1 to 2 ms per call | Memory and Sessions docs |
| Built-in memory budget | about 1,300 tokens | Memory docs |
| Sample stats output | 142 sessions, 3,847 messages, 12.4 MB | Sessions docs |
| Slowdown case | 384 MB, about 1,000 sessions | Sessions docs |
| Growth without pruning | multi-GB within weeks on gateway plus cron | Sessions docs |
| Default retention | 90 days | Sessions docs |
| Low-disk prompt | under 2 GB free, or under 10% with under 20 GB left | Sessions docs |
These are the Hermes team's figures, not ours, so use them as the baseline for your own test.
What is being measured
One SQLite file per profile, ~/.hermes/state.db, records who and where each chat came from, which model ran it, the prompt it started with, all messages including tool activity, token usage and timing.
The messages_fts table is an FTS5 index over message content, and that is what the search figures describe.
The file runs in WAL mode, designed for many concurrent readers and one writer.
Two companion files, state.db-wal and state.db-shm, are part of the same image, so any size check should count all three.
Named profiles each have their own file, which means a multi-agent install needs one baseline per profile, run with -p <profile>.
Search speed: session search against built-in memory
The built-in memory is instant because it is injected into every prompt, but it caps at roughly 1,300 tokens and costs tokens on every turn.
The session_search tool covers every stored session, makes no model calls and returns real messages; its cost is the 20 ms query plus whatever it adds to context when called.
Rank in AI Search or It's FREE →
In practice that makes session search the cheaper way to recall old work, and built-in memory the faster way to hold a few facts that must always be present.
The 384 MB example is the one to watch: the docs tie that size, with about 1,000 sessions, to slower FTS5 inserts and a slower resume list.
Why state.db grows
Every message, tool call and tool result is kept, and auto-prune is off by default.
Compaction does not shrink history either: older rows stay in the file marked inactive, and the originals of pruned tool output remain findable by search.
Gateway chats are designed as one continuous session until /new, so a busy bot keeps adding to a few long sessions.
Deleting rows frees pages inside the file but not on disk; SQLite does not shrink a file on a plain DELETE.
Settings that control growth
| Key | Default | Effect |
|---|---|---|
sessions.auto_prune | false | Deletes ended sessions past retention at startup |
sessions.retention_days | 90 | Age limit for ended sessions |
sessions.vacuum_after_prune | true | Reclaims disk after a prune |
sessions.min_vacuum_interval_days | 30 | Minimum gap between VACUUM runs |
sessions.min_interval_hours | 24 | Minimum gap between prune sweeps |
VACUUM after a prune only runs when both gates pass: the interval has elapsed and more than 25% of pages are reclaimable.
For a manual reclaim, hermes sessions optimize merges FTS5 segments and runs VACUUM without changing data, and hermes sessions optimize-storage migrates the search index to a compact layout that the CLI reference says reclaims a large fraction of big files.
Durability settings and their trade-off
The database: block sets how hard SQLite works to protect each commit:
database:
journal_mode: wal # wal (default) or delete
synchronous: FULL # OFF, NORMAL, FULL, EXTRA; unset = build default
wal_autocheckpoint: 1000
journal_size_limit: 67108864
On macOS anything below FULL is refused, because of how Darwin orders fsync calls; EXTRA is honoured.
Join the AI Profit Boardroom →
Delete mode is the safe pick on network mounts and cross-VM bind mounts, where WAL shared memory can silently corrupt a database that still passes an integrity check.
Tests to run on your own install
- Baseline: run
hermes sessions statsand note sessions, messages and size. - Search latency: ask the agent to
session_searcha topic you know exists and compare the response time with the 20 ms baseline. - Growth rate: rerun stats a week later and divide the change by seven.
- Prune impact:
hermes sessions prune --older-than 90 --dry-runshows how much a rule would remove. - Backup timing: time
hermes backup --quickand confirm it exits 0. - Reclaim: with every Hermes process stopped, run
hermes sessions optimizeand compare sizes before and after.
Never run step 6 under a live gateway; the recovery page explains why maintenance commands refuse in that state.
Backup cost: what goes in the zip
hermes backup copies databases through SQLite's backup API, so it gives a consistent snapshot even while Hermes is writing.
It leaves out the -wal, -shm and -journal sidecars, per-session checkpoints, browser profiles, regenerable caches and downloaded model runtimes, which keeps the archive close to the size of your real data.
--quick narrows it further to config, state.db, .env, auth and cron jobs.
The command exits 1 if any selected file failed to land, so a scheduled job will flag a partial archive instead of reporting success.
--keep trims older full backups to the newest N, three by default.
SQLite memory providers, measured by what they store
Holographic, from the plugin catalog and maintained by itpartypattaya, keeps facts in a separate memory_store.db with FTS5, trust scores starting at 0.5 and moving +0.05 or -0.10 per rating, and nine fact_store actions.
Because it uses its own file, it adds nothing to the size of state.db.
The community hermes-local-memory project stores its data in local_memory.sqlite and is marked alpha by its author.
Neither publishes latency figures in the Hermes docs, so time them yourself on a test profile.
What v0.23.3 changed under the hood
According to the v0.23.3 notes, Hermes split its storage layer behind a persistence interface and kept SQLite as the backend.
The developer Session Storage guide says the gateway is now the only writer of canonical sessions, which removes competing writers from the file.
No new figures came with it; full curated notes are due with v0.24.0.
A per-agent SQL tool, proposed in issue #485, is not in the docs.
Does the model matter here?
No: storage, search and backups behave the same whichever model answers, so there is no model leaderboard for this one.
The only model touch point is the automatic session title, which a fast auxiliary model writes in the background without adding latency to your turn.
Rank in AI Search or It's FREE →
Record your baseline with hermes sessions stats today and rerun it in seven days.
To learn the system join the AI Profit Boardroom, or get your Backlink Gameplan for the SEO side, and use this board as your Hermes Agent SQLite benchmark.
FAQ
How fast is Hermes session search?
The memory docs quote about 20 ms per FTS5 discovery query and about 1 ms per scroll.
How big does state.db get?
It depends on use; the docs show 12.4 MB in a sample and report multi-GB files within weeks on gateway plus cron installs without pruning.
Which synchronous setting should I use?
Leave it unset or FULL; macOS refuses anything below FULL.
Does pruning shrink the file right away?
Not always. VACUUM only runs after a prune when the interval and the 25% reclaimable gate both pass; hermes sessions optimize reclaims it on demand.
- 📺 Video notes + links to the tools
- 🆓 Get a FREE AI course + community + 1,000 AI agents
- 🎥 Learn how I make these videos


