Operations
Latent is local-first. The reference runtime runs on one machine, binds loopback, and stores everything in a local SQLite file. That is the deployment model the security claims are written against.
What runs
| Process | Role |
|---|---|
CLI (pnpm latent) |
Capture, develop, answer, decide, brief, memory. |
Fastify API (pnpm dev) |
/v1 routes and the contact sheet at /ui. |
SQLite (LATENT_DB_PATH) |
Fragments, ideas, claims, gates, briefs, events. |
The API binds 127.0.0.1 only. There is no application-layer login today: the loopback binding is the access control.
The model boundary
A private fragment is local by default. It is refused before it reaches a provider unless the whole process opts in:
export LATENT_MODEL_SEND_PRIVATE=true
That is a single process-wide switch, not a per-request checkbox. The model adapter also enforces the claim contract and refuses to mark a claim verified. A model is not a source.
Prompt injection is treated as a data problem: retrieved content is a data-only channel, the system prompt tells the model not to follow instructions inside it, and no tool calls are made from retrieved text.
What is not implemented yet
The honest list matters more than the marketing list:
- Encryption at rest is planned (#168), not shipped.
- Runtime log redaction is planned (#205).
- Cross-tenant isolation is planned (#170). Today the store is single-owner (
owner_id="local"by convention). - The loopback API has no caller identity (#164). Any local process can act as the owner.
- There is no hosted multi-tenant service.
Do not expose the API to a network you do not control.
Backup and export
- Back up the SQLite file with the service stopped, or use SQLite's online backup.
memory exportwrites the open JSON graph; use it as the portable copy.- A delete blocks while references remain. Export before pruning.
- Keep the database and exports out of git.
Keys and secrets
- Model keys live in the environment, never in git.
- Do not log request bodies or fragment text.
- The event log is the audit trail; keep it append-only.
- A restored database should still answer the same queries. If it does not, the restore is wrong.
Deployment checklist
- Node 22.9+, pnpm 11+, a writable
LATENT_DB_PATH. - Keep the API on loopback; put anything public behind an authenticated proxy.
- Leave
LATENT_MODEL_SEND_PRIVATEunset unless the provider and the data are both acceptable. - Back up the database and test a restore.
- Re-run the schema validation after an upgrade.
- Treat the missing tenant isolation as a hard boundary, not a TODO you can ignore.
Read next
- Reconstruction: the model contract this boundary protects.
- Evidence and gates: what must survive a restore.