Persistent memory for AI agents — pgvector + BM25 keyword search with RRF fusion, credential scrubbing, auto-consolidation.
Strong foundation with 13 well-structured tools, comprehensive parameter documentation, and clear descriptions. Tools follow verb_noun naming (brain_store, brain_search, brain_delete, etc.) and most parameters include type constraints and descriptions. Primary gaps: output schemas are not explicitly documented in the source code provided (only inferred from descriptions), and some tools lack error handling guidance. Tool annotations are present (destructiveHint/readOnlyHint evident in Risk fields), which aligns with current MCP patterns. The server demonstrates careful API design with resource-specific tools, pagination support (limit/format), and composition awareness (tools chain together via IDs). However, without seeing the actual JSON Schema response definitions in the source, output schema documentation cannot be fully verified.
Get a session briefing: what happened since a given time across all agents. Excludes entries from the requesting agent by default. Returns compact format (truncated content) to save tokens — use format="full" only when you need complete content.
Consolidate (abstract and deduplicate) the corpus: read old memories, call the LLM to summarize redundant entries, store consolidated facts, then soft-delete originals. Runs on a cron schedule (CONSOLIDATION_INTERVAL, default every 6h) if corpus > CONSOLIDATION_MIN_CORPUS (default 1500). Can be called manually. Timeout: 120s.
Delete a memory by ID. Cascades to entity links (soft-delete if other memories reference the entity). Irreversible. Returns { deleted: true/false }.
Extract entities (people, orgs, places, topics) from a text string. Returns extracted entities with their types and normalized surface forms. Optionally link them to existing entities in the knowledge graph by specifying entity IDs.
Export all memories in the corpus (or filtered by type/agent/client/time range) as a JSON array. Each record includes id, type, content, metadata, timestamps, and embedding (if requested). Useful for backup, migration, or audit.
Output schemas not explicitly documented in source. Descriptions infer structure (e.g., brain_stats returns 'corpus statistics', brain_search returns results merged with RRF) but JSON response schemas are not visible in the provided code excerpt. This makes it difficult for LLMs to plan downstream field access and causes context loss if format/structure varies.
Error handling guidance missing. Tools like brain_import (destructive bulk operation) and brain_delete (irreversible) describe what they do but provide no recovery hints (e.g., 'What should I do if import fails on row 5 of 1000?'). Agents lack actionable next steps on failure.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 69 | 2026-07-28+ | v2 |
Bulk import memories from a JSON array (e.g., exported via brain_export). Preserves caller-supplied IDs and deduplicates by content_hash. Destructive: requires explicit operator_approved=true to prevent accidental overwrites. Returns { imported: N, skipped: M, errors: E }.
Structured query (not search): filter memories by type, source_agent, client_id, category, timestamps, or exact fact keys/status subjects. Returns full content by default.
Agentic reflection loop: read recent memories, synthesize insights, and optionally store conclusions back into the brain. Calls the configured LLM to generate meta-observations (e.g., "3 clients asked about API uptime this week"). Requires BRAIN_MCP_SOURCE_AGENT or source_agent argument.
Agentic research loop: take a user query or research goal, search the brain, run multi-step reasoning with the LLM, iteratively refine, and store findings. Returns structured research report. Requires RESEARCH_ENABLED=true and LLM provider configured.
Multi-path search across all shared memories. Runs vector (semantic) and full-text keyword retrieval in parallel, merged with Reciprocal Rank Fusion into a blended ranking. Returns compact format by default to save tokens. Use format="full" to see which retrieval paths contributed to each result.
Corpus statistics. Returns total memories, breakdown by type/agent/client, entity counts, recent activity timeline, and index health metrics (vector/keyword index dimensions and cardinality).
Store a memory in the Shared Brain. Use this to record events (something happened), facts (persistent knowledge), decisions (choices made and why), or status updates (current state of systems/workflows). All agents share this memory. Duplicate content is automatically detected and deduplicated. Facts and statuses with matching keys/subjects automatically supersede older versions. source_agent is optional and defaults to BRAIN_MCP_SOURCE_AGENT (then "claude-code"); multi-agent fleets should set BRAIN_MCP_SOURCE_AGENT per agent so writes are correctly attributed.
Patch a memory (by ID) with new fields: type, content, importance, category, knowledge_category, valid_from, valid_to, etc. Overwrites only the specified fields; omitted fields remain unchanged.
brain_reflect and brain_research require LLM provider configuration (BRAIN_MCP_SOURCE_AGENT, LLM provider env vars) but descriptions do not warn about prerequisites or what happens if the provider is misconfigured. Agents may invoke these tools expecting output when configuration is incomplete.
brain_consolidate and brain_reflect are agentic tools that call the LLM internally. No dry-run or confirmation mechanism is documented. These tools can perform side effects (consolidate will delete old memories, reflect will store conclusions if save=true) but agents cannot preview the effect before committing.
Pagination and result limits vary by tool. brain_search has limit (default 10), brain_query has limit (default 100), but brain_export and brain_stats do not explicitly cap results. Large corpora could return unbounded responses, exhausting context windows.