
Reverie
ai.knowall由 knowall.ai 發布v0.5.4更新於 Nov 7, 2026
Graph memory that dreams: Neo4j knowledge-graph memory for AI agents with hybrid search
概覽
Reverie 為助理提供以 Neo4j 為基礎的持久圖譜記憶:儲存實體與其關係,並以關鍵字、語意和模糊混合搜尋找回。
- 可以做什麼
- 以混合、關鍵字、語意、模糊或精確模式搜尋與擷取記憶,可依類型、日期、深度和排序篩選
- 建立、更新和刪除記憶及它們之間具型別的關係,支援屬性與自動時間戳
- 列出記憶標籤、彙總圖譜統計資料,並執行唯讀 Cypher 查詢
- 用 dream 工具清理與整併圖譜:合併重複項目、正規化標籤、更新向量並標記屬性過多的節點
- 回傳關於標籤、關係和最佳實務的內建指引
- 適用情境
- 適合需要助理跨對話記住人物、組織、專案及其關聯,並透過走訪圖譜而非文字比對來回答問題的情境。也適合已經自行運行或願意自行運行 Neo4j 資料庫、希望記憶留在本機的使用者。
- 執行需求
- 需要 Node.js 18 或更新版本來執行這個 npm 套件,以及 Neo4j 5.9 或更新版本的資料庫(合併重複項目需要 APOC)。必要的環境變數為 NEO4J_URI、NEO4J_USERNAME 和 NEO4J_PASSWORD;NEO4J_DATABASE 僅企業版可選用。向量預設使用首次使用時下載的本機模型,遠端供應商則需要各自的金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Reverie,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Reverie — graph memory that dreams
[CodeRabbit Pull Request Reviews]
Reverie is KnowAll AI's Neo4j knowledge-graph memory for AI agents, served over MCP. It is published on npm as @knowall-ai/reverie (successor to the legacy package @knowall-ai/mcp-neo4j-agent-memory). The GitHub repository is now knowall-ai/mcp-reverie, and old URLs redirect.
[Reverie — graph memory that dreams]
Reverie turns an agent's memory from a pile of facts into a map of the entities in its world and how they relate, and keeps that map healthy. It is an MCP server, so any agent that speaks the Model Context Protocol (Claude Desktop, OpenClaw, Azure AI Foundry, Cursor…) gets the same graph; a Hermes Agent memory-provider flavour lives in hermes-reverie.
Why Reverie
- A typed entity graph, not a fact store. People, organisations, projects, places, concepts, meetings and decisions are nodes with typed relationships. "Who at the Irish FA have we talked to about Winnie?" is a graph walk, not a similarity search.
- Search that finds "Ben" when you say "Benjamin". Hybrid keyword + semantic + fuzzy name search, with local embeddings by default (no API key) and OpenAI, Azure OpenAI, Ollama or Voyage a config switch away.
- It dreams. A
dreamtool merges duplicates safely, canonicalises labels, re-embeds, counts orphans and flags nodes that have become property dumps, so a nightly job can keep the graph clean. - One graph, any agent. KnowAll runs Sallie (OpenClaw) and Poppie (Hermes) against the same conventions; Reverie is how they share what they know.
- LLM-driven, transparent tools. Simple atomic operations; the model does the entity recognition and conflict resolution, and every action is explicit.
- Yours to run. Neo4j on your own machine or VM. Nothing leaves it unless you choose a remote embedding provider.
Quick Start 🚀
You can run this MCP server directly using npx:
Or add it to your Claude Desktop configuration:
Features
- 🧠 Persistent Memory Storage - Store and retrieve memories across conversations
- 🔗 Semantic Relationships - Create meaningful connections between memories (KNOWS, WORKS_AT, CREATED, etc.)
- 🔍 Hybrid Search - Keyword plus semantic search across all memory properties, with local embeddings by default
- 🏷️ Flexible Labeling - Use any label for memories (person, place, project, idea, etc.)
- ⏰ Temporal Tracking - Automatic timestamps and date-based queries
- 🌐 Graph Exploration - Traverse relationships to discover connected information
- 🎯 Context-Aware - Search with depth to include related memories
- 🔧 LLM-Optimized - Simple tools that let the AI handle the complexity
- 🏢 Enterprise Ready - Supports multiple Neo4j databases
- 📚 Built-in Guidance - Get help on best practices and usage patterns
Philosophy: LLM-Driven Intelligence
Unlike traditional approaches that embed complex logic in tools, this server provides simple, atomic operations and lets the LLM handle all the intelligence:
- No hidden logic: Tools do exactly what they say - no auto-disambiguation or smart matching
- LLM decides everything: Entity recognition, relationship inference, and conflict resolution
- Transparent operations: Every action is explicit and predictable
- Maximum flexibility: The LLM can implement any strategy without tool limitations
Search Behaviour
search_memories is hybrid: each result ranks by its best keyword, semantic or fuzzy name signal. See Search below.
This approach makes the system more powerful and adaptable, as improvements in LLM capabilities directly translate to better memory management.
Search
search_memories supports four matching signals — keyword, semantic, fuzzy and exact — through these modes:
hybrid(default): rank by the best signal — keyword share of query words, semantic cosine or fuzzy name similaritykeyword: any word of the query as a substring of any searchable content property (timestamps,statusand embedding fields are never matched)semantic: embeddings only; if embeddings are unavailable it falls back to keyword matching (andhybridkeeps its keyword and fuzzy signals)fuzzy: match misspelled or misheard names and aliases using spelling, prefixes and phonetics; "Ben Wicks" can find "Benjamin Weeks" without embeddingsexact: case-insensitive equality onname,aliasesoremail; the precise lookup to run before creating a memory, so "ben weeks" finds exactly "Ben Weeks" and nothing else
Archived memories (status = 'archived') are left out of results and of list_memory_labels unless include_archived: true is passed. Returned relationships carry _start and _end node ids, so a connection's direction is always recoverable.
Use similarity_threshold (default 0.4; must be between 0 and 1, other values are rejected) to control how strict semantic matches are. Use fuzzy_threshold (default 0.85, range 0–1) for fuzzy strictness. Results include _score, _match and, for fuzzy hits, _matched (the stored name or alias). Confirm differing names with the user; nicknames such as Bill/William need aliases.
Neo4j Enterprise Support
This server now supports connecting to specific databases in Neo4j Enterprise Edition. By default, it connects to the "neo4j" database, but you can specify a different database using the NEO4J_DATABASE environment variable.
Memory Tools
-
search_memories: Search and retrieve memories from the knowledge graph- Hybrid search: Blend keyword, semantic and fuzzy name search;
Ben Wickscan findBenjamin Weeks - Choose
search_mode=hybrid,keyword,semantic,fuzzyorexact - Tune
similarity_threshold(default0.4) andfuzzy_threshold(default0.85) - Returned memories include
_score,_matchand_matchedfor fuzzy hits - Filter by memory type (case-insensitive, so
personandPersonboth work), date, depth, result limit, and sort order
- Hybrid search: Blend keyword, semantic and fuzzy name search;
-
create_memory: Create a new memory in the knowledge graph- Flexible type system - any label that is a plain identifier; Capitalised singular is canonical (Person, Place, Project, Skill…), and
dreamcanonicalises lowercase labels - Store any properties as key-value pairs
- Automatic timestamps for temporal tracking
- Flexible type system - any label that is a plain identifier; Capitalised singular is canonical (Person, Place, Project, Skill…), and
-
create_connection: Create relationships between memories- Link memories using semantic relationship types (KNOWS, WORKS_AT, LIVES_IN, etc.)
- Add properties to relationships (since, role, status, etc.)
- Build complex knowledge networks
-
update_memory: Update properties of existing memories- Returns a
_hintwhen the node exceeds the property limit: the graph is for entities and relationships, not a notebook - Add or modify any property
- Set properties to null to remove them
- Returns a
-
update_connection: Update relationship properties- Modify relationship metadata
- Track changes over time
-
delete_memory: Remove memories and all their connections- Use with caution - permanent deletion
- Automatically removes all relationships
-
delete_connection: Remove specific relationships- Precise relationship removal
- Keeps the memories intact
-
list_memory_labels: List all unique memory labels in use- Shows all labels with counts
- Helps maintain consistency
- Prevents duplicate label variations
-
query_memories: Run a read-only Cypher query- Accepts a Cypher string plus optional params
- Runs in a Neo4j READ transaction (the server rejects writes), stops after 200 rows, and times out after 10 seconds
- Rejects write clauses,
CALLsubqueries, and any procedure outside a small read-only allow-list (db.labels,db.propertyKeys,db.index.*.query*, schema procedures). For belt and braces, run the server with a read-only Neo4j role where you can
-
memory_stats: Summarize the current graph- Returns node, relationship, label, relationship-type, embedding, and orphan counts
-
dream: Deterministically clean up and consolidate the graph- Relabels lowercase labels to their Capitalised form (
person→Person), merges same-named nodes within a label when APOC is available, and refreshes embeddings - Merging keeps the survivor's
name, timestamps and vectors and combines every other property (conflicting values become lists, nothing is dropped) and skips pairs whose identity fields differ (email,phone,website,company,organisation,organization), so two different "John Smith"s stay separate. The report lists every group underduplicateswith what was merged and what was skipped and why. Run withdry_run: truefirst to review - Reports
bloatednodes (more thanREVERIE_MAX_PROPERTIES, default 30, real properties) with the keys that look like dated facts or prose, so a nightly sleep can fold them into attributes, relationships or notes - Supports
dry_runfor a no-write report
- Relabels lowercase labels to their Capitalised form (
-
get_guidance: Get help on using the memory tools effectively- Topics: labels, relationships, best-practices, examples
- Returns comprehensive guidance for LLMs
- Use when uncertain about label/relationship naming
Prerequisites
-
Neo4j Database 5.9 or newer (the
dreamtool usesCOUNT {}andIS :: STRING); APOC for duplicate merging- Install Neo4j Community or Enterprise Edition
- Download from neo4j.com/download
- Or use Docker:
docker run -p 7474:7474 -p 7687:7687 -e NEO4J_AUTH=neo4j/password neo4j
-
Node.js (v18 or higher)
- Required to run the MCP server
- Download from nodejs.org
-
Claude Desktop (for MCP integration)
- Download from claude.ai/download
Installation
MCP Registry
Reverie is listed in the MCP Registry as ai.knowall/reverie (KnowAll's domain namespace, verified by a DNS TXT record on knowall.ai) (the successor of the "Neo4j Agent Memory" entry that used to sit in the modelcontextprotocol/servers README). server.json in this repository is the listing; the release workflow republishes it on every tag.
Installing via Smithery
To install Reverie for Claude Desktop automatically via Smithery (currently indexed under its legacy package name):
For Development
- Clone the repository:
- Install dependencies:
- Build the project:
Configuration
Environment Variables
The server requires the following environment variables:
NEO4J_URI: Neo4j database URI (required, e.g., bolt://localhost:7687)NEO4J_USERNAME: Neo4j username (required)NEO4J_PASSWORD: Neo4j password (required)NEO4J_DATABASE: Neo4j database name (optional) - For Neo4j Enterprise with multiple databases
Embeddings
Set REVERIE_EMBEDDINGS to choose the embedding provider used by hybrid and semantic search. Changing REVERIE_EMBEDDINGS or REVERIE_EMBEDDING_MODEL causes nodes to be re-embedded lazily on the next search, or eagerly when you run dream.
Use REVERIE_EMBEDDING_MODEL to override the model name for any provider. Remote providers batch up to 64 texts per request, time out after REVERIE_EMBED_TIMEOUT_MS (default 30000, max 120000), and must be reached over https; plain http is only accepted for localhost.
The local provider downloads its model (about 23 MB) from Hugging Face on first use and caches it. If that download fails, or any provider errors, semantic search falls back to keyword matching and hybrid retains keyword + fuzzy matching for that call and the error is logged to stderr. Set REVERIE_EMBEDDINGS=none to turn embeddings off entirely.
Each node stores two vectors: embedding (label, name and every text property) and name_embedding (label, name and aliases only), plus embedding_model and embedded_at. A semantic score is the better of the two, so a short query like Ben Weeks still matches a richly described Benjamin Weeks. None of these fields are ever returned by the tools.
Setting up Environment Variables
For Development
Copy .env.example to .env and update with your credentials:
For Claude Desktop
Add the environment variables to your Claude Desktop configuration (see Quick Start above).
Usage Examples
The LLM handles all the complexity of deciding what to store and how to connect memories:
Storing Information
Retrieving Information
Building Relationships
Connecting to a Specific Database
For Neo4j Enterprise users with multiple databases, you can specify which database to connect to:
This will connect to "myCustomDatabase" instead of the default "neo4j" database.
More Complex Examples
Finding Related Information
Creating Domain-Specific Memories
Managing Relationships
Advanced Queries
The LLM can handle complex queries by intelligently using the search tools:
Word-Based Search
Keyword matching finds ANY word from your query and scores the fraction found. Hybrid search also considers semantic and fuzzy name matches, ranking each result by its best signal.
Recent Memories (Last 7 Days)
Disambiguation
Temporal Queries
Flexible Memory Types
The system doesn't enforce strict types - you can create any type of memory that makes sense:
Common Types (Capitalised singular is canonical; lowercase is accepted and canonicalised by dream): person, place, organization, project, event, topic, object, animal, plant, food, activity, media, skill, document, meeting, task, habit, health, vehicle, tool, idea, goal
But you can use any type (any plain identifier): recipe, dream, memory, quote, book, movie, emotion, relationship, appointment, medication, exercise, symptom, payment, contract, etc.
The LLM will intelligently reuse existing types when appropriate to maintain consistency.
The Power of Connections
The true value of this memory system lies not just in storing individual memories, but in creating connections between them. A knowledge graph becomes exponentially more useful as you build relationships:
Why Connections Matter
- Context Discovery: Connected memories provide rich context that isolated facts cannot
- Relationship Patterns: Reveal hidden patterns and insights through relationship analysis
- Temporal Understanding: Track how relationships evolve over time
- Network Effects: Each new connection increases the value of existing memories
Best Practices for Building Connections
-
Always look for relationships when storing new information:
-
Use semantic relationship types that capture meaning:
-
Add relationship properties for richer context:
-
Think in graphs: When recalling information, use depth > 1 to explore the network:
Remember: A memory without connections is like a book in a library with no catalog - it exists, but its utility is limited. The more you connect your memories, the more intelligent and useful your knowledge graph becomes.
Testing
The integration tests need a Neo4j 5 with APOC and wipe the database they point at, so give them a disposable one:
REVERIE_TEST_DESTRUCTIVE=1 is the explicit opt-in: without it the suite refuses to run. With it,
the suite wipes whatever NEO4J_URI points at, so only set it alongside a disposable database.
The suite waits up to a minute for authenticated Bolt before starting, and a remote NEO4J_URI
must use bolt+s:// or neo4j+s:// with a validated certificate (+ssc is refused).
CI runs the same suite against a Neo4j service container on every pull request and fails the build if coverage drops below the gate. The first semantic search downloads the local embedding model (about 23 MB); CI caches it.
A second CI check, Version bumped with src/ (scripts/check-version.mjs), keeps the version
honest: server.json's version and each packages[].version must equal package.json's, and a
pull request that changes src/ must raise package.json's version above the base branch's
(SemVer). To fix it, run npm version patch --no-git-tag-version and set the same version in both
places in server.json.
Interactive Testing with MCP Inspector
For interactive testing and debugging, use the MCP Inspector:
The inspector provides a web UI to:
- Test all available tools interactively
- See real-time request/response data
- Validate your Neo4j connection
- Debug tool parameters and responses
HTTP mode (reverie serve)
reverie on its own is the stdio MCP server. reverie serve runs the same server over
Streamable HTTP
and adds a read-only Brain API that the KnowAll Agents Portal
Brain tab uses to draw the graph live. One bearer token protects both; only the health check is open.
NEO4J_* and REVERIE_EMBEDDINGS work exactly as in stdio mode.
Node ids in the Brain API are the same numeric ids the tools return, as strings, so activation events and snapshot nodes line up. Archived memories are never shown. Embedding vectors never leave the server.
Activation log. Every search_memories (recall), create_memory / update_memory
(remember), create_connection / update_connection (connect), delete_* (forget) and real
dream run (dream.start / dream.end) appends one JSON line to REVERIE_EVENTS_PATH, whichever
transport served it. It holds ids, names and search terms only, is private to the user (mode 0600), is capped at
5 MB / 5,000 lines, and is what makes the Brain view light up. The graph itself never records what was looked at.
Behind Caddy on an agent's VM:
and as a service:
Give the portal https://<agent host>/reverie as the agent's brainUrl and the same token as
REVERIE_TOKEN.
License
MIT
來源:README.md,提交 0640b3d
工具
0版本歷史
3- v0.5.4最新Nov 7, 2026
- v0.5.3Sep 25, 2026
- v0.5.2Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
