Memory & persistence

Alfred Memory is a vendor-agnostic persistent store for the decisions, conventions, and gotchas your agents accumulate over time. Choose a hosting mode per tenant.

Hosting modes

ModeStoreWhen to pick it
coding SQLite Local dev, single user, no network.
web Postgres Memory shared with ChatGPT / Claude / Gemini.
self-hosted Postgres + TLS Production, multi-machine, HTTPS.
human Postgres (managed) Memory for a human agent. Postgres only.

Workspaces & tenants

A workspace is a directory with an Alfred install. A tenant is a memory partition. Workspaces are not tenants — tenant_access is many-to-many with explicit inheritance.

Memory API

curl
# Save a memory
curl -X POST http://localhost:3000/v1/memories \
  -H "x-api-key: alk_..." \
  -H "content-type: application/json" \
  -d '{"title":"BCrypt cost=12","tags":["security","perf"]}'

# Search memories
curl -G http://localhost:3000/v1/memories/search \
  -H "x-api-key: alk_..." \
  --data-urlencode "q=bcrypt cost"

Web console

The web console (packages/console-web) lists tenants, rotates keys, and renders copy-paste snippets for every adapter. It can be hosted on Vercel/Netlify pointing at a self-hosted API.

Migrating

Switching modes is a one-shot, traceable migration:

migrate
# Migration is handled by Alfred Memory tooling
Target backend: postgres://user:pass@host/db?sslmode=require