The Engine’s brain is a single SQLite file. SQLite gets a lot of grief from people who haven’t run it in production at scale; in practice it handles single-user agentic workloads beautifully. This page covers operating the brain — backup, restore, vacuum, integrity checks, sizing.Documentation Index
Fetch the complete documentation index at: https://septemberai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
What’s in the brain
20+ tables. The full schema lives inmigrations/*.sql. The major
ones:
| Table | What it holds | Growth rate |
|---|---|---|
episodes, episodes_vec | Episodic memory. | Slow |
knowledge_store, knowledge_store_vec | Knowledge facts. | Slow |
social_graph_nodes, _edges, _vec | People and relationships. | Slow |
working_memory_log | Within-task context. TTL-bound. | Fast (but pruned) |
trajectories | Per-task execution traces. | Fast |
conversations | Conversation threading. | Slow |
channel_state_snapshots | SSE checkpoints. TTL-bound. | Fast (but pruned) |
connections, server_registry, action_registry | Asset Directory. | Slow |
learning_signals | User feedback. | Slow |
observability_events | Telemetry. | Fast |
ingestion_chunks | Large media chunks. | Variable |
*_vec tables hold 1536-dim float embeddings; they grow with episodes,
knowledge facts, and social-graph nodes.
Sizing
A working brain for an actively-used agent typically grows at:- A few KB to a few MB per turn (working memory + observability events).
- A few KB per episode (long-term, after Learning Centre processes trajectories).
- A few hundred bytes per knowledge fact.
- A few KB per MCP connection (encrypted credentials are small).
| Time | Brain size (typical user) |
|---|---|
| First week | 5–20 MB |
| First month | 50–200 MB |
| First year | 500 MB – 2 GB |
Backup
Three options, in increasing rigor:/memory/export
The Engine exposes an API endpoint that returns the entire memory as a
portable JSON bundle:
POST /memory/import. Useful for migrating between
Engines or for application-level backups.
Caveat: the export covers memory and connections. It does NOT cover:
- Channel state (transient).
- Observability events.
- Trajectories not yet consolidated.
SQLite .backup
SQLite’s online backup API takes a consistent snapshot without
requiring downtime:
Volume snapshot
If your infrastructure provides volume snapshots (EBS, GCP persistent disks, k8s VolumeSnapshot):Restore
From /memory/export
From .backup
From volume snapshot
Detach the data volume; attach the snapshot; start the Engine. Your infrastructure’s documentation has the specific commands.Integrity check
SQLite has a built-in integrity check:ok. Run after any restore, after a hard kill, or on a
schedule (weekly).
If it returns errors, the brain is damaged. Restore from backup.
Vacuum
SQLite doesn’t reclaim disk space automatically. As rows are deleted (working memory entries expiring, old trajectories cleaned up), the file size doesn’t shrink — the deleted space sits as free pages. To reclaim:Migrations
Migrations run automatically on Engine startup. Each migration file is a SQL script:_migrations_applied table. On startup, it runs any unapplied
migrations in order.
Don’t edit applied migrations. Once a migration is in production,
treat it as immutable. To change a schema, add a new migration with
the change.
Don’t run migrations manually. The Engine is the only thing that
should write to _migrations_applied.
Cleanup
The Engine doesn’t auto-clean old data today. A reasonable retention policy:VACUUM monthly.
Performance tuning
For deployments with high write rates:- WAL mode. The Engine enables WAL by default. Verify:
Should return
wal. - Synchronous mode. Default is
NORMAL. For higher write throughput at the cost of slightly more durability risk on crash, usesynchronous = NORMAL(already the default). - Cache size. The Engine sets a sensible default. Override only if profiling shows cache misses.
When the brain grows too large
A few GB is fine. Tens of GB is fine. Hundreds of GB starts to feel slow. If you’re approaching that scale on a single brain:- Audit retention. Are you keeping data you don’t need?
- Move ingestion_chunks out. Large media chunks are the most common bloat. Consider a separate object store (S3, GCS) and store only references in the brain.
- Consider sharding. Run multiple Engines per user with topic- specific brains. Outside the design today, but possible.
See also
- Database in components — the implementation.
- Production deploy — backup setup at deploy time.
- Memory endpoints —
application-level backup via
/memory/export.

