agenticonsult logoagent i /consultDocs
Agentic infrastructureMCP servers

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_searchhybrid mode by default, fusing keyword and semantic results; keyword mode 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_add with a type, tags, and file references — or memory_supersede if the new fact replaces an older entry, which keeps the lineage between the two.
  • "What did the fleet learn this week?" memory_recent returns the latest entries; memory_tag_search pulls 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

ToolParametersWhat it does
memory_addcontent*: string, entry_type*: string, domain: string, source: string, tags: array, file_refs: array, summary: stringPersist 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_searchquery*: string, mode: string, domain: string, entry_type: string, limit: integerSearch 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_supersedeentry_id*: string, new_content*: string, reason*: string, source: string, summary: stringMark 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_recentdomain: string, limit: integerGet 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_searchtags*: array, limit: integerFind memory entries by exact tag match. Faster than semantic search for known keywords.
memory_updateentry_id*: string, content: string, summary: string, entry_type: string, domain: string, source: string, project: string, tags: array, file_refs: arrayEdit 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_deleteentry_id*: stringPERMANENTLY 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

On this page