Memory
Memory is the team's notebook. Each entry has a visibility scope that decides who can read it.
Mental model
Think of memory as a shared pinboard. Anyone can pin a note. Each note is tagged for who can see it: just you, just this Space, or the whole org. AI agents and the people you invite read from the same pinboard, filtered by what they're allowed to see.
Visibility levels
PRIVATE— only the user who saved it. Used for personal preferences ("I prefer Tailwind over plain CSS").SPACE— every member of one Space. Used for project-specific facts ("launch date is Apr 30").ORG— every member of the org, across every Space. Used for company-wide truths ("our deploy region is europe-west1").
Visibility is enforced in the SQL layer, not at the application layer. Changing a memory's visibility from PRIVATE to ORG requires the user to be authorised to write at the new visibility — Switchy never silently widens access.
Key properties
- Every memory has an immutable
ownerUserId, the human who first saved it. Even when visibility goesORG, ownership stays. - Memory writes go through one helper:
addMemoryForUser. Both the web UI and the MCP server use it. There's no second path. - Embeddings are computed per memory + stored as pgvector for semantic search. Substring search works without embeddings as a fallback.
- Retrieval cap defaults to 20 rows. The MCP layer further truncates each result to 50 KB before the LLM sees it.
Common patterns
- "Remember for the team" — type something like "@claude remember for the org that we picked Ably for realtime" and Claude will call
add_memorywith visibilityORG. - "Remember for this Space" — "Remember in this Space that the launch date is Apr 30" → visibility
SPACE. - Personal sticky notes — type a memory directly via the API or the SDK with
visibility: 'PRIVATE'. Only you ever see it.
What this isn't
Memory is not chat history. The chat transcript is preserved separately and fully searchable, but it's the conversation log — not curated knowledge. Memory is what you decided was worth keeping after the conversation ended.
Memory is not a vector DB you BYO. Switchy stores embeddings + provides retrieval; you don't configure pgvector indexes or pick distance metrics. If you want to ship a separate retrieval system, hit our REST API and use Switchy as the source of truth.
Next
- Agents — how the LLMs read memory automatically.
- MCP — same memory, exposed to Claude Desktop / Cursor / etc.
- Create your first Space and try saving a memory.