neo4j-agent-memory-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseneo4j-agent-memory
neo4j-agent-memory
Authoritative reference for the Python package — a Neo4j Labs project that gives AI agents three distinct memory layers (short-term, long-term, reasoning) in a single knowledge graph.
neo4j-agent-memory⚠️ Verify authoritative state before writing. Version numbers, extras, tool counts, and API surface change between releases. The values in this skill reflect a specific point in time. Before publishing anything version-sensitive, confirm against PyPI () and the GitHub README (https://pypi.org/project/neo4j-agent-memory/). PyPI is the authoritative source for version numbers — never infer.https://github.com/neo4j-labs/agent-memory
neo4j-agent-memory⚠️ 撰写前请确认权威状态。版本号、扩展组件、工具数量和API范围会随版本更新变化。本技能中的内容仅反映特定时间点的状态。发布任何涉及版本的内容前,请对照PyPI()和GitHub README(https://pypi.org/project/neo4j-agent-memory/)进行确认。PyPI是版本号的权威来源——切勿自行推断。https://github.com/neo4j-labs/agent-memory
When to Use
使用场景
- Building AI agents that need persistent memory (short-term, long-term, reasoning traces) backed by Neo4j
- Using the Python package or the hosted NAMS service at memory.neo4jlabs.com
neo4j-agent-memory - Integrating agent memory with LangChain, PydanticAI, CrewAI, AWS Strands, Google ADK, OpenAI Agents, LlamaIndex, or Microsoft Agent Framework
- Writing documentation, tutorials, or positioning content about graph-native agent memory
- Comparing graph-native memory against vector-only approaches
- 构建需要由Neo4j提供持久化内存(短期、长期、推理轨迹)支持的AI Agent
- 使用Python包或memory.neo4jlabs.com上的托管NAMS服务
neo4j-agent-memory - 将Agent内存与LangChain、PydanticAI、CrewAI、AWS Strands、Google ADK、OpenAI Agents、LlamaIndex或Microsoft Agent Framework集成
- 编写关于原生图Agent内存的文档、教程或定位内容
- 对比原生图内存与纯向量方案
When NOT to Use
不适用场景
- Plain Neo4j driver connections (no memory layer needed) → use
neo4j-driver-python-skill - Writing or optimizing Cypher queries → use
neo4j-cypher-skill - GraphRAG retrieval pipelines → use
neo4j-graphrag-skill
- 纯Neo4j驱动连接(无需内存层)→ 使用
neo4j-driver-python-skill - 编写或优化Cypher查询 → 使用
neo4j-cypher-skill - GraphRAG检索流水线 → 使用
neo4j-graphrag-skill
Project at a Glance
项目概览
| Field | Value |
|---|---|
| Package | |
| PyPI | https://pypi.org/project/neo4j-agent-memory/ |
| GitHub | https://github.com/neo4j-labs/agent-memory |
| Canonical docs | https://neo4j.com/labs/agent-memory/ |
| Hosted service | https://memory.neo4jlabs.com (NAMS — early-access, not yet documented on official project pages) |
| Hosted MCP endpoint | https://memory.neo4jlabs.com/mcp (SSE, bearer auth) |
| License | Apache-2.0 |
| Python | 3.10+ |
| Neo4j | 5.20+ (required for vector indexes) |
| Status | Experimental (Neo4j Labs, community-supported) |
| Current version (at time of writing) | 0.1.1 — always verify PyPI before citing |
| 字段 | 值 |
|---|---|
| 包名 | |
| PyPI地址 | https://pypi.org/project/neo4j-agent-memory/ |
| GitHub地址 | https://github.com/neo4j-labs/agent-memory |
| 官方文档 | https://neo4j.com/labs/agent-memory/ |
| 托管服务 | https://memory.neo4jlabs.com(NAMS——早期访问阶段,尚未在官方项目页面记录) |
| 托管MCP端点 | https://memory.neo4jlabs.com/mcp(SSE协议,Bearer认证) |
| 许可证 | Apache-2.0 |
| Python版本要求 | 3.10+ |
| Neo4j版本要求 | 5.20+(向量索引必需) |
| 状态 | 实验性项目(Neo4j Labs,社区支持) |
| 当前版本(撰写时) | 0.1.1 — 引用前务必验证PyPI |
What It Is (One Sentence)
项目定义(一句话)
A graph-native memory system for AI agents that stores conversations, builds knowledge graphs, and records agent reasoning — all as connected nodes in a single Neo4j database.
一款为AI Agent打造的原生图内存系统,可将对话内容、知识图谱构建结果和Agent推理记录全部存储为单个Neo4j数据库中的关联节点。
Consumption Models
使用模式
neo4j-agent-memory| Option | What It Is | When to Choose |
|---|---|---|
| Self-hosted library | | Dev, on-prem data, custom extraction pipelines, full control, bringing your own embeddings / LLMs. |
| Hosted (NAMS) | Managed service at | Zero-infra trials, sharing memory across agents / machines, demos, teams that don't want to run Neo4j. |
⚠️ NAMS is reachable but not yet referenced in the GitHub README or. Treat it as early-access / soft-launched. Do not assert SLAs, pricing, or GA status in published content. See the Hosted Service (NAMS) section below for details.neo4j.com/labs/agent-memory/
neo4j-agent-memory| 选项 | 说明 | 适用场景 |
|---|---|---|
| 自托管库 | 通过 | 开发环境、本地部署数据、自定义提取流水线、需要完全控制、自带嵌入模型/LLM的场景。 |
| 托管服务(NAMS) | 部署在 | 零基础设施试用、跨Agent/机器共享内存、演示场景、不想自行部署Neo4j的团队。 |
⚠️ NAMS已可访问,但尚未在GitHub README或中提及。请将其视为早期访问/软发布阶段。发布内容中请勿断言服务级别协议(SLA)、定价或正式发布(GA)状态。详情请见下方**托管服务(NAMS)**章节。neo4j.com/labs/agent-memory/
The Three Memory Types
三种内存类型
The defining architectural feature. Every piece of content describing the project should lead with this trinity.
| Memory Type | Stores | Color Convention |
|---|---|---|
| Short-Term | Conversation messages, session history, sequential message chains, metadata-filtered search, LLM-powered summaries | Green ( |
| Long-Term | Entities (people, places, orgs), preferences, facts, and the relationships between them — built automatically from conversations via the POLE+O model | Orange/Yellow ( |
| Reasoning | Decision traces, tool call provenance, thought-action-outcome chains — so the agent can learn from its own past reasoning patterns | Purple ( |
Reasoning memory is the primary competitive differentiator. Most competing systems cover short-term and long-term but treat reasoning as an afterthought or omit it entirely. Lead with this when positioning.
这是项目的核心架构特性。所有描述该项目的内容都应首先介绍这三类内存。
| 内存类型 | 存储内容 | 颜色规范 |
|---|---|---|
| 短期内存 | 对话消息、会话历史、顺序消息链、元数据过滤搜索、LLM生成的摘要 | 绿色( |
| 长期内存 | 实体(人物、地点、组织)、偏好、事实及其间的关系——通过POLE+O模型从对话中自动构建 | 橙黄色( |
| 推理内存 | 决策轨迹、工具调用溯源、思考-行动-结果链——使Agent能够从自身过往推理模式中学习 | 紫色( |
推理内存是核心竞争优势。大多数竞品系统仅覆盖短期和长期内存,将推理内存视为附加功能或直接忽略。定位时应重点突出这一点。
The POLE+O Model
POLE+O模型
Long-term memory uses the POLE+O entity framework — the canonical entity classification for this project:
- Person
- Organization
- Location
- Event
- +O Object (anything that doesn't fit the core four — products, concepts, projects, etc.)
When diagramming the data model, use ellipses for entity nodes and labeled arrows (UPPER_SNAKE_CASE) for relationships, consistent with Neo4j Browser conventions.
长期内存采用POLE+O实体框架——这是本项目的标准实体分类:
- Person(人物)
- Organization(组织)
- Location(地点)
- Event(事件)
- +O Object(对象——涵盖核心四类之外的所有内容,如产品、概念、项目等)
绘制数据模型图时,实体节点使用椭圆,关系使用带标签的箭头(大写蛇形命名法),与Neo4j Browser的规范保持一致。
Installation
安装
Core install plus extras. The extras pattern is .
pip install neo4j-agent-memory[<extra>]bash
pip install neo4j-agent-memory # Core
pip install neo4j-agent-memory[openai] # + OpenAI embeddings
pip install neo4j-agent-memory[mcp] # + MCP server
pip install neo4j-agent-memory[langchain] # + LangChain
pip install neo4j-agent-memory[all] # EverythingFull extras list (subject to change — verify PyPI): , , , , , , , , , , , , , , , , , , , , , , , , , .
allanthropicawsbedrockclicrewaiextractionfullfuzzyglinergooglegoogle-adklangchainllamaindexmcpmicrosoft-agentobservabilityopenaiopenai-agentsopentelemetryopikpydantic-aisentence-transformersspacystrandsvertex-ai核心安装加扩展组件。扩展组件的安装格式为。
pip install neo4j-agent-memory[<extra>]bash
pip install neo4j-agent-memory # 核心组件
pip install neo4j-agent-memory[openai] # + OpenAI嵌入
pip install neo4j-agent-memory[mcp] # + MCP服务器
pip install neo4j-agent-memory[langchain] # + LangChain集成
pip install neo4j-agent-memory[all] # 所有组件完整扩展组件列表(可能会变化——请验证PyPI):, , , , , , , , , , , , , , , , , , , , , , , , , 。
allanthropicawsbedrockclicrewaiextractionfullfuzzyglinergooglegoogle-adklangchainllamaindexmcpmicrosoft-agentobservabilityopenaiopenai-agentsopentelemetryopikpydantic-aisentence-transformersspacystrandsvertex-aiPython API (Quickstart)
Python API(快速入门)
Canonical import pattern and basic usage. This is the shape to reproduce in tutorials and examples.
python
import asyncio
from neo4j_agent_memory import MemoryClient, MemorySettings
async def main():
settings = MemorySettings(
neo4j={"uri": "bolt://localhost:7687", "password": "your-password"}
)
async with MemoryClient(settings) as memory:
# Short-term: store a conversation message
await memory.short_term.add_message(
session_id="user-123",
role="user",
content="Hi, I'm John and I love Italian food!"
)
# Long-term: build the knowledge graph
await memory.long_term.add_entity("John", "PERSON")
await memory.long_term.add_preference(
category="food",
preference="Loves Italian cuisine"
)
# Get combined context for an LLM prompt
context = await memory.get_context(
"What restaurant should I recommend?",
session_id="user-123"
)
print(context)
asyncio.run(main())Note the async context manager pattern () — this is the canonical form.
async with MemoryClient(settings) as memory:标准导入模式和基础用法。教程和示例中应采用此格式。
python
import asyncio
from neo4j_agent_memory import MemoryClient, MemorySettings
async def main():
settings = MemorySettings(
neo4j={"uri": "bolt://localhost:7687", "password": "your-password"}
)
async with MemoryClient(settings) as memory:
# 短期内存:存储对话消息
await memory.short_term.add_message(
session_id="user-123",
role="user",
content="Hi, I'm John and I love Italian food!"
)
# 长期内存:构建知识图谱
await memory.long_term.add_entity("John", "PERSON")
await memory.long_term.add_preference(
category="food",
preference="Loves Italian cuisine"
)
# 获取LLM提示的合并上下文
context = await memory.get_context(
"What restaurant should I recommend?",
session_id="user-123"
)
print(context)
asyncio.run(main())注意异步上下文管理器模式()——这是标准用法。
async with MemoryClient(settings) as memory:MCP Server
MCP服务器
Exposes memory as tools for MCP-compatible AI assistants (Claude Desktop, Claude Code, Cursor, VS Code Copilot).
将内存暴露为兼容MCP的AI助手(Claude Desktop、Claude Code、Cursor、VS Code Copilot)可用的工具。
Invocation
调用方式
The authoritative one-liner (no install needed):
bash
uvx "neo4j-agent-memory[mcp]" mcp serve --password <neo4j-password>Install-local alternative:
bash
neo4j-agent-memory mcp serve --password <pw>标准单行命令(无需额外安装):
bash
uvx "neo4j-agent-memory[mcp]" mcp serve --password <neo4j-password>本地安装后的替代命令:
bash
neo4j-agent-memory mcp serve --password <pw>Transports and Profiles
传输协议和配置文件
bash
undefinedbash
undefinedstdio (default — Claude Desktop, Claude Code)
stdio(默认——适用于Claude Desktop、Claude Code)
neo4j-agent-memory mcp serve --password <pw>
neo4j-agent-memory mcp serve --password <pw>
SSE (network deployment)
SSE(网络部署)
neo4j-agent-memory mcp serve --transport sse --port 8080 --password <pw>
neo4j-agent-memory mcp serve --transport sse --port 8080 --password <pw>
Core profile — fewer tools, less context overhead
核心配置文件——工具更少,上下文开销更低
neo4j-agent-memory mcp serve --profile core --password <pw>
neo4j-agent-memory mcp serve --profile core --password <pw>
Session continuity across conversations
跨对话保持会话连续性
neo4j-agent-memory mcp serve
--session-strategy per_day
--user-id alice
--password <pw>
--session-strategy per_day
--user-id alice
--password <pw>
undefinedneo4j-agent-memory mcp serve
--session-strategy per_day
--user-id alice
--password <pw>
--session-strategy per_day
--user-id alice
--password <pw>
undefinedTool Profiles
工具配置文件
| Profile | Tools | Contents |
|---|---|---|
| core | 6 | |
| extended (default) | 16 | Core + conversation history, entity details, graph export, relationship creation, reasoning traces, observations, read-only Cypher |
As of v0.1.1, accepts a parameter, bringing it to parity with .
memory_add_factmetadatamemory_add_entity| 配置文件 | 工具数量 | 包含内容 |
|---|---|---|
| core | 6个 | |
| extended(默认) | 16个 | 核心工具 + 对话历史、实体详情、图谱导出、关系创建、推理轨迹、观测结果、只读Cypher |
截至v0.1.1版本,支持参数,与功能对齐。
memory_add_factmetadatamemory_add_entityClaude Code Registration
Claude Code注册
bash
claude mcp add neo4j-agent-memory -- \
uvx "neo4j-agent-memory[mcp]" mcp serve --password <neo4j-password>bash
claude mcp add neo4j-agent-memory -- \
uvx "neo4j-agent-memory[mcp]" mcp serve --password <neo4j-password>Claude Desktop Config
Claude Desktop配置
json
{
"mcpServers": {
"neo4j-agent-memory": {
"command": "uvx",
"args": ["neo4j-agent-memory[mcp]", "mcp", "serve", "--password", "your-password"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}For the hosted MCP endpoint at, see the Hosted Service (NAMS) section below — it uses SSE transport and bearer-token auth, not a localmemory.neo4jlabs.com/mcpinvocation.uvx
json
{
"mcpServers": {
"neo4j-agent-memory": {
"command": "uvx",
"args": ["neo4j-agent-memory[mcp]", "mcp", "serve", "--password", "your-password"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}关于上的托管MCP端点,请见下方**托管服务(NAMS)**章节——它使用SSE传输协议和Bearer令牌认证,而非本地memory.neo4jlabs.com/mcp调用。uvx
Hosted Service (NAMS)
托管服务(NAMS)
NAMS — Neo4j Agent Memory Service — is the managed deployment of at . It bundles the REST API, the MCP server, a web console, and per-workspace Neo4j Aura databases.
neo4j-agent-memoryhttps://memory.neo4jlabs.com⚠️ Verify against the live service before citing. NAMS is not documented on the GitHub README or. Endpoint shapes, tool counts, auth flows, and limits can change without a release note. Before publishing anything NAMS-specific, re-check the live site and the OpenAPI spec atneo4j.com/labs/agent-memory/./openapi.json
NAMS——Neo4j Agent Memory Service——是部署在的托管版本。它整合了REST API、MCP服务器、Web控制台和每个工作区对应的Neo4j Aura数据库。
https://memory.neo4jlabs.comneo4j-agent-memory⚠️ 引用前请对照实时服务验证。NAMS尚未在GitHub README或中记录。端点格式、工具数量、认证流程和限制可能会无预警变更。发布任何与NAMS相关的内容前,请重新检查实时站点和neo4j.com/labs/agent-memory/中的OpenAPI规范。/openapi.json
Surface
服务范围
- Base URL:
https://memory.neo4jlabs.com - Web console: root URL — workspace management, memory browsing, entity visualization
- REST API: — OpenAPI spec at
https://memory.neo4jlabs.com/v1/; covers conversations, entities, observations, reasoning traces, and read-only Cypher/openapi.json - MCP endpoint: — SSE transport, exposes the hosted tool set, bearer-token auth
https://memory.neo4jlabs.com/mcp
- 基础URL:
https://memory.neo4jlabs.com - Web控制台:根URL——工作区管理、内存浏览、实体可视化
- REST API:——OpenAPI规范位于
https://memory.neo4jlabs.com/v1/;涵盖对话、实体、观测结果、推理轨迹和只读Cypher/openapi.json - MCP端点:——SSE传输协议,暴露托管工具集,采用Bearer令牌认证
https://memory.neo4jlabs.com/mcp
Auth
认证方式
- API keys, prefixed , created and rotated from the web console — used as a bearer token for REST and MCP
nams_ - Auth0 OAuth2 (PKCE) + scoped JWTs for interactive user flows
Don't mix these with the self-hosted library's Neo4j credential — they serve different sides of the stack.
--password- API密钥,前缀为,可在Web控制台创建和轮换——作为Bearer令牌用于REST和MCP认证
nams_ - Auth0 OAuth2(PKCE) + 带作用域的JWT令牌,用于交互式用户流程
请勿将这些密钥与自托管库的 Neo4j凭证混淆——它们服务于栈的不同层面。
--passwordStorage Model
存储模型
Each workspace is backed by an isolated Neo4j Aura database, provisioned on demand. Bring-your-own-Neo4j is supported as an alternative, configured per workspace.
每个工作区由独立的Neo4j Aura数据库提供支持,按需配置。也支持自带Neo4j数据库,可按工作区进行配置。
Rate Limits
速率限制
Usage counters are tracked per API key / workspace. Exact limits are not publicly documented — check the console or re-verify against the service before committing customers to numbers.
使用计数器按API密钥/工作区跟踪。具体限制未公开——引用前请检查控制台或对照服务重新验证。
Claude Code Registration (Hosted MCP)
Claude Code注册(托管MCP)
bash
claude mcp add --transport sse neo4j-agent-memory-hosted \
https://memory.neo4jlabs.com/mcp \
--header "Authorization: Bearer <nams_api_key>"bash
claude mcp add --transport sse neo4j-agent-memory-hosted \
https://memory.neo4jlabs.com/mcp \
--header "Authorization: Bearer <nams_api_key>"Claude Desktop Config (Hosted MCP)
Claude Desktop配置(托管MCP)
json
{
"mcpServers": {
"neo4j-agent-memory-hosted": {
"url": "https://memory.neo4jlabs.com/mcp",
"transport": "sse",
"headers": {
"Authorization": "Bearer nams_..."
}
}
}
}json
{
"mcpServers": {
"neo4j-agent-memory-hosted": {
"url": "https://memory.neo4jlabs.com/mcp",
"transport": "sse",
"headers": {
"Authorization": "Bearer nams_..."
}
}
}
}Framework Integrations
框架集成
All integrations live under . Install the matching extra.
neo4j_agent_memory.integrations.<framework>| Framework | Install Extra | Import |
|---|---|---|
| LangChain | | |
| Pydantic AI | | |
| Google ADK | | |
| AWS Strands | | |
| CrewAI | | |
| LlamaIndex | | |
| OpenAI Agents | | |
| Microsoft Agent Framework | | |
所有集成均位于路径下。需安装对应的扩展组件。
neo4j_agent_memory.integrations.<framework>| 框架 | 扩展组件 | 导入路径 |
|---|---|---|
| LangChain | | |
| Pydantic AI | | |
| Google ADK | | |
| AWS Strands | | |
| CrewAI | | |
| LlamaIndex | | |
| OpenAI Agents | | |
| Microsoft Agent Framework | | |
Entity Extraction Pipeline
实体提取流水线
Multi-stage extraction (cost/quality tradeoff from fastest → most accurate):
- spaCy — fast statistical NER, cheapest, broad but imprecise coverage
- GLiNER — zero-shot entity extraction with typed schemas; for relationships
GLiREL - LLM fallback — most accurate, most expensive; used when structure is rich or ambiguous
Enrichment is a separate background stage: Wikipedia and Diffbot can hydrate extracted entities with additional context.
Deduplication (v0.1.1+) auto-merges duplicate facts and preferences using subject/predicate matching plus embedding similarity (threshold ~0.95), and updates confidence rather than creating new nodes. Tuned via .
DeduplicationConfigConfiguration objects to know: , , , .
ExtractionConfigDeduplicationConfigMemoryIntegrationSessionStrategy多阶段提取(从最快到最精确的成本/质量权衡):
- spaCy——快速统计命名实体识别(NER),成本最低,覆盖范围广但精度一般
- GLiNER——支持类型化 schema 的零样本实体提取;用于关系提取
GLiREL - LLM兜底——精度最高,成本也最高;适用于结构复杂或模糊的场景
实体增强是独立的后台阶段:Wikipedia和Diffbot可为提取的实体补充额外上下文。
去重(v0.1.1+版本)通过主题/谓词匹配加嵌入相似度(阈值约0.95)自动合并重复事实和偏好,更新置信度而非创建新节点。可通过进行调优。
DeduplicationConfig需了解的配置对象:, , , 。
ExtractionConfigDeduplicationConfigMemoryIntegrationSessionStrategyPositioning Language
定位话术
These phrasings are load-bearing. Use them verbatim when possible.
以下表述为核心定位内容。请尽可能直接使用。
Core Taglines
核心标语
- "Graph handles understanding; vector handles similarity."
- "Vector stores give you recall. The graph gives you understanding."
- "Three memory types, one knowledge graph."
- "图谱负责理解;向量负责相似性匹配。"
- "向量存储提供召回能力。图谱提供理解能力。"
- "三种内存类型,一个知识图谱。"
Category Framing
品类定位
- Anchor to the Foundation Capital "AI's Trillion-Dollar Opportunity: Context Graphs" thesis when the forum warrants it.
- is positioned as the complete implementation of the context graph category — it covers all three memory layers, not just two.
neo4j-agent-memory - The context graph coexists with domain data in the same Neo4j instance (not a bolted-on external system). This is a key conceptual/visual point for architecture diagrams.
- 当场景合适时,可引用Foundation Capital的论文《AI的万亿美元机遇:上下文图谱》作为定位依据。
- 被定位为上下文图谱品类的完整实现——它覆盖全部三层内存,而非仅两层。
neo4j-agent-memory - 上下文图谱与领域数据共存于同一个Neo4j实例中(并非附加的外部系统)。这是架构图中的关键概念/视觉要点。
Do Say
推荐表述
- "graph-native memory"
- "context graph"
- "three distinct memory layers"
- "reasoning traces as first-class graph nodes"
- "learn from past reasoning"
- "build knowledge graphs automatically from conversations"
- "Neo4j Labs project" / "experimental" / "community-supported"
- "原生图内存"
- "上下文图谱"
- "三种独立内存层"
- "推理轨迹作为一等图节点"
- "从过往推理中学习"
- "从对话中自动构建知识图谱"
- "Neo4j Labs项目" / "实验性" / "社区支持"
Don't Say
禁用表述
- Don't name specific competitors (Mem0, Zep, Letta, Cognee, Supermemory) in published content. Reframe comparisons around capabilities, not product names.
- Don't call it "production-ready" (it's a Labs project — see the skill for the full voice guide).
neo4j-labs-brand - Don't say "officially supported" or imply SLAs.
- 发布内容中请勿提及具体竞品(Mem0、Zep、Letta、Cognee、Supermemory)。应围绕能力而非产品名称进行对比。
- 请勿称其为"生产就绪"(这是一个Labs项目——请参阅技能获取完整品牌指南)。
neo4j-labs-brand - 请勿使用"官方支持"或暗示SLA的表述。
Common Corrections to Watch For
需要注意的常见修正点
When editing or reviewing content about this project, check for:
- Outdated version numbers — anyone writing "v0.1.0" today may be working from stale notes; verify PyPI.
- Wrong canonical docs URL — it's , not a Vercel preview URL.
neo4j.com/labs/agent-memory - Inferred API surface — if code samples weren't run, flag them; prefer patterns from the GitHub README or official examples.
- Missing "Labs" framing — experimental/community-supported should be clear.
- Conflating with other Neo4j MCP servers — there are several (,
mcp-neo4j-cypher— the old knowledge graph memory server, etc.).mcp-neo4j-memory's MCP server is distinct and ships as part of the package under theneo4j-agent-memoryextra.[mcp] - Confusing NAMS with the self-hosted library — same underlying project, different consumption models. Connection strings, auth, and tool sets differ: self-hosted uses a local invocation and a Neo4j
uvx; NAMS uses an SSE MCP URL and a--password-prefixed bearer token. Don't mix them.nams_ - Over-promising NAMS availability — the hosted service is not yet referenced in the GitHub README or . Avoid "officially supported," SLAs, pricing claims, or "production-ready" framing. Treat it as early-access.
neo4j.com/labs/agent-memory/
编辑或审核该项目相关内容时,请检查以下事项:
- 过时的版本号——如果有人写"v0.1.0",可能使用的是陈旧资料;请验证PyPI。
- 错误的官方文档URL——正确地址是,而非Vercel预览URL。
neo4j.com/labs/agent-memory - 推断的API范围——如果代码示例未实际运行,请标记;优先使用GitHub README或官方示例中的模式。
- 缺失"Labs"定位——应明确标注实验性/社区支持状态。
- 与其他Neo4j MCP服务器混淆——存在多个MCP服务器(、
mcp-neo4j-cypher——旧版知识图谱内存服务器等)。mcp-neo4j-memory的MCP服务器是独立的,作为包的一部分随neo4j-agent-memory扩展组件发布。[mcp] - 混淆NAMS与自托管库——二者基于同一底层项目,但使用模式不同。连接字符串、认证方式和工具集均有差异:自托管使用本地调用和Neo4j
uvx;NAMS使用SSE MCP URL和--password前缀的Bearer令牌。请勿混用。nams_ - 过度承诺NAMS可用性——托管服务尚未在GitHub README或中提及。避免使用"官方支持"、SLA、定价声明或"生产就绪"等表述。将其视为早期访问阶段。
neo4j.com/labs/agent-memory/
Related Projects in the Ecosystem
生态系统中的相关项目
Mentions of these are frequent; recognize them and use the correct names.
| Project | What It Is |
|---|---|
| create-context-graph | CLI scaffolder ( |
| Lenny's Podcast Memory Explorer | Flagship demo — 299 podcast episodes, knowledge graph, geospatial maps, Wikipedia enrichment. PydanticAI-based. Lives at |
| neo4j-agent-integrations | Broader umbrella of framework integrations, many of which are packaged back into |
| agent-memory-tck | Technology Compliance Kit — behavioral specifications for multi-language/multi-framework interoperability (polyglot). |
| Microsoft Learn integration | Official Microsoft Agent Framework docs reference |
这些项目经常被提及,请识别并使用正确名称。
| 项目 | 说明 |
|---|---|
| create-context-graph | CLI脚手架工具( |
| Lenny's Podcast Memory Explorer | 旗舰演示项目——包含299个播客剧集、知识图谱、地理空间地图、Wikipedia增强。基于PydanticAI构建。位于仓库的 |
| neo4j-agent-integrations | 更广泛的框架集成合集,其中许多集成被打包回 |
| agent-memory-tck | 技术合规套件——多语言/多框架互操作性的行为规范(多语言兼容)。 |
| Microsoft Learn集成 | 官方Microsoft Agent Framework文档将 |
Canonical Examples (from the Repo)
标准示例(来自仓库)
Point users here rather than inventing examples:
- — flagship PydanticAI demo
examples/lennys-memory - — PydanticAI news research with NVL graph viz
examples/full-stack-chat-agent - — AWS Strands multi-agent KYC/AML with reasoning-trace audit trails
examples/financial-services-advisor/aws-financial-services-advisor - — Google ADK multi-agent with Vertex AI embeddings + SSE streaming
examples/financial-services-advisor/google-cloud-financial-advisor - — Microsoft Agent Framework with GDS algorithms and context providers
examples/microsoft_agent_retail_assistant - — 8 GLiNER2 extraction scripts
examples/domain-schemas - — progressive tutorial covering Vertex AI → ADK → MCP →
examples/google_cloud_integrationMemoryIntegration - — standalone ADK demo of
examples/google_adk_demoNeo4jMemoryService
请引导用户查看这些示例,而非自行创建:
- ——旗舰PydanticAI演示
examples/lennys-memory - ——带NVL图谱可视化的PydanticAI新闻研究项目
examples/full-stack-chat-agent - ——带推理轨迹审计跟踪的AWS Strands多Agent KYC/AML项目
examples/financial-services-advisor/aws-financial-services-advisor - ——带Vertex AI嵌入+SSE流式传输的Google ADK多Agent项目
examples/financial-services-advisor/google-cloud-financial-advisor - ——带GDS算法和上下文提供者的Microsoft Agent Framework项目
examples/microsoft_agent_retail_assistant - ——8个GLiNER2提取脚本
examples/domain-schemas - ——逐步教程,涵盖Vertex AI → ADK → MCP →
examples/google_cloud_integrationMemoryIntegration - ——
examples/google_adk_demo的独立ADK演示Neo4jMemoryService
Diagram Conventions (Cross-Reference)
图表规范(交叉参考)
When building diagrams for this project, combine this skill with:
- skill — JSON format and the project's diagram management script
excalidraw - skill — Cypher code style and Neo4j brand colors
neo4j-styleguide - skill — Labs purple (
neo4j-labs-brand), status badges, disclaimer language#6366F1
Memory-type colors (use consistently across all diagrams):
Short-Term: #B2F2BB fill / #2F9E44 stroke (green)
Long-Term: #FFEC99 fill / #F08C00 stroke (orange/yellow)
Reasoning: #D0BFFF fill / #9C36B5 stroke (purple)
Neo4j/Store: #A5D8FF fill / #1971C2 stroke (blue)
Labs accent: #6366F1 (purple, for Labs branding elements)为该项目制作图表时,请结合以下技能:
- 技能——JSON格式和项目的图表管理脚本
excalidraw - 技能——Cypher代码风格和Neo4j品牌颜色
neo4j-styleguide - 技能——Labs紫色(
neo4j-labs-brand)、状态徽章、免责声明话术#6366F1
内存类型颜色(所有图表中请保持一致):
短期内存: #B2F2BB 填充色 / #2F9E44 描边色 (绿色)
长期内存: #FFEC99 填充色 / #F08C00 描边色 (橙黄色)
推理内存: #D0BFFF 填充色 / #9C36B5 描边色 (紫色)
Neo4j/存储: #A5D8FF 填充色 / #1971C2 描边色 (蓝色)
Labs强调色: #6366F1(紫色,用于Labs品牌元素)Documentation Structure (Cross-Reference)
文档结构(交叉参考)
The canonical docs at follow the Diataxis framework (see the skill in this project for details):
neo4j.com/labs/agent-memorydiataxis- Tutorials — build your first memory-enabled agent
- How-To Guides — entity extraction, deduplication, enrichment, integrations
- Reference — configuration, CLI, MCP tools, API
- Explanation — POLE+O model, memory types, extraction pipeline
When adding new content, place it in the right quadrant.
neo4j.com/labs/agent-memorydiataxis- 教程——构建您的第一个支持内存的Agent
- 操作指南——实体提取、去重、增强、集成
- 参考——配置、CLI、MCP工具、API
- 解释——POLE+O模型、内存类型、提取流水线
添加新内容时,请将其放在对应的分类下。
Quick Authoritative-Facts Checklist
权威事实快速检查清单
Before publishing any content about this project, verify:
- Version number is current per PyPI (not inferred from notes)
- Canonical docs link points to
neo4j.com/labs/agent-memory - Three memory types named correctly (short-term, long-term, reasoning)
- POLE+O model named consistently (not POLEO, not POLE-O)
- Python ≥ 3.10 and Neo4j ≥ 5.20 requirements are stated if relevant
- Labs disclaimer present for README/landing content
- No competitor names in published positioning
- Reasoning memory is called out as the differentiator
- Import paths use (underscore, snake_case)
neo4j_agent_memory.integrations.<framework> - If NAMS is referenced, distinguish clearly from the self-hosted library and re-verify endpoints against the live service (not yet mirrored in the README)
发布任何该项目相关内容前,请验证以下事项:
- 版本号与PyPI保持一致(请勿从资料中推断)
- 官方文档链接指向
neo4j.com/labs/agent-memory - 三种内存类型名称正确(短期、长期、推理)
- POLE+O模型命名一致(请勿写成POLEO或POLE-O)
- 若相关,明确说明Python ≥ 3.10和Neo4j ≥ 5.20的要求
- README/着陆页内容包含Labs免责声明
- 发布的定位内容中未提及竞品名称
- 突出强调推理内存作为差异化优势
- 导入路径使用(下划线、蛇形命名法)
neo4j_agent_memory.integrations.<framework> - 若提及NAMS,明确区分自托管库,并对照实时服务重新验证端点(尚未在README中同步)
Resources
资源
- PyPI (authoritative for version): https://pypi.org/project/neo4j-agent-memory/
- GitHub: https://github.com/neo4j-labs/agent-memory
- Canonical docs: https://neo4j.com/labs/agent-memory/
- CHANGELOG: https://github.com/neo4j-labs/agent-memory/blob/main/CHANGELOG.md
- NAMS (hosted service): https://memory.neo4jlabs.com
- NAMS REST API: https://memory.neo4jlabs.com/v1/ (OpenAPI at )
/openapi.json - NAMS MCP endpoint: https://memory.neo4jlabs.com/mcp (SSE)
- create-context-graph (scaffolder): https://create-context-graph.dev
- Community Forum: https://community.neo4j.com
- Microsoft Learn integration page: https://learn.microsoft.com/en-us/agent-framework/integrations/neo4j-memory
- PyPI(版本权威来源): https://pypi.org/project/neo4j-agent-memory/
- GitHub: https://github.com/neo4j-labs/agent-memory
- 官方文档: https://neo4j.com/labs/agent-memory/
- 变更日志: https://github.com/neo4j-labs/agent-memory/blob/main/CHANGELOG.md
- NAMS(托管服务): https://memory.neo4jlabs.com
- NAMS REST API: https://memory.neo4jlabs.com/v1/(OpenAPI位于`/openapi.json`)
- NAMS MCP端点: https://memory.neo4jlabs.com/mcp(SSE)
- create-context-graph(脚手架工具): https://create-context-graph.dev
- 社区论坛: https://community.neo4j.com
- Microsoft Learn集成页面: https://learn.microsoft.com/en-us/agent-framework/integrations/neo4j-memory
Checklist
检查清单
- Version: check PyPI before citing
- Consumption model: self-hosted vs NAMS
- Correct extras installed ()
neo4j-agent-memory[<extra>] - as async context manager
MemoryClient - Three types named: short-term / long-term / reasoning
- POLE+O consistent (not POLEO or POLE-O)
- NAMS: early-access framing; no SLAs/pricing
- Credentials not hardcoded; NAMS bearer token separate from Neo4j
--password
- 版本:引用前检查PyPI
- 使用模式:自托管 vs NAMS
- 已安装正确的扩展组件()
neo4j-agent-memory[<extra>] - 采用异步上下文管理器模式
MemoryClient - 三种内存类型名称正确:短期/长期/推理
- POLE+O命名一致(非POLEO或POLE-O)
- NAMS:早期访问定位;无SLA/定价承诺
- 凭证未硬编码;NAMS Bearer令牌与Neo4j 分离
--password