shared-agent-memory
The fleet's shared long-term memory — persisting, searching, and curating what your agents learn.
This server is the shared memory layer described in Memory layers: the store where any agent — your main session, a dispatched specialist, a fleet worker, a routine run — persists findings, decisions, and patterns for every future session to find. Unlike most servers in the fabric it is not a proxy: it owns its store directly, a single local database file under the server's data folder, indexed two ways at once — a keyword index for exact matches and a vector index for meaning. The store is a file on your disk; it survives restarts, and it is covered by the Data Layer backup surface.
Agents reach for it constantly, by doctrine: at session start to brief themselves on what is already known, before writing to avoid duplicate entries, and at the end of any work that produced something durably worth remembering. The write tools are deliberately split by intent — add for new knowledge, update for a correction in place, supersede when a fact has evolved and the history should stay linked, delete as the curator-only hard remove.
How your agents use it
- "Before you start, check what we know about the render pipeline." The
agent calls
memory_search—hybridmode by default, fusing keyword and semantic results;keywordmode when the query is an exact name, path, or error string. - "Remember that the staging build needs the feature flag set." The
agent searches first to rule out an existing entry, then calls
memory_addwith a type, tags, and file references — ormemory_supersedeif the new fact replaces an older entry, which keeps the lineage between the two. - "What did the fleet learn this week?"
memory_recentreturns the latest entries;memory_tag_searchpulls everything under a tag.
Prerequisites
Works out of the box for keyword search and all curation. The semantic
and hybrid search modes and every new entry's embedding use your Gemini
API key — set it once in Settings ▸ API Keys (see the
configuration reference). Without the key,
keyword mode still works in full.
Tool reference
| Tool | Parameters | What it does |
|---|---|---|
memory_add | content*: string, entry_type*: string, domain: string, source: string, tags: array, file_refs: array, summary: string | Persist a new finding, pattern, decision, bug fix, or architectural insight to long-term agent memory. Call this when you discover something persistently valuable — a confirmed pattern, a recurring bug type, an architectural decision, or a security finding. NOT for session-specific state. |
memory_search | query*: string, mode: string, domain: string, entry_type: string, limit: integer | Search agent memory. Use this to find relevant patterns, past findings, or decisions before starting work. Modes: 'hybrid' (default — keyword + meaning fused, best general recall), 'keyword' (exact lexical — use for names, IDs, file paths, error strings the embedding can't surface), 'semantic' (meaning-only). Results past the relevance gate are dropped, so a no-match query honestly returns nothing rather than noise. |
memory_supersede | entry_id*: string, new_content*: string, reason*: string, source: string, summary: string | Mark an existing memory entry as outdated and replace it with updated content. Use when a pattern changes, a bug is fixed, or a decision is revised. |
memory_recent | domain: string, limit: integer | Get the most recently written memory entries. Use at the start of a task to brief yourself on recent learnings, or to check what was captured last session. |
memory_tag_search | tags*: array, limit: integer | Find memory entries by exact tag match. Faster than semantic search for known keywords. |
memory_update | entry_id*: string, content: string, summary: string, entry_type: string, domain: string, source: string, project: string, tags: array, file_refs: array | Edit an existing memory entry's fields IN PLACE (a correction — keeps the same id, writes no supersession lineage; use memory_supersede instead when a fact evolved and you want history). Only the fields you pass change. Changing `content` automatically re-embeds the entry. Use for fixing tags/type/domain/source/project or correcting wording. Get the entry_id from memory_search/memory_recent. |
memory_delete | entry_id*: string | PERMANENTLY delete a memory entry (hard delete — removes the row, its vector, and its FTS index; any entry it superseded is reactivated). Irreversible. Use for clearing junk/duplicates/obsolete entries during curation; prefer memory_supersede when you want to keep history. |
Where to go next
- Memory — the human surface over the same store: browse, search, and curate entries yourself
- Memory (infrastructure) — the full memory architecture, layer by layer
- Memory layers — why the layers exist