neo4j-agent-memory-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

neo4j-agent-memory

neo4j-agent-memory

Authoritative reference for the
neo4j-agent-memory
Python package — a Neo4j Labs project that gives AI agents three distinct memory layers (short-term, long-term, reasoning) in a single knowledge graph.
⚠️ 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 (
https://pypi.org/project/neo4j-agent-memory/
) and the GitHub README (
https://github.com/neo4j-labs/agent-memory
). PyPI is the authoritative source for version numbers — never infer.
neo4j-agent-memory
Python包的权威参考文档——这是一个Neo4j Labs项目,可为AI Agent在单一知识图谱中提供三种不同的内存层(短期、长期、推理)。
⚠️ 撰写前请确认权威状态。版本号、扩展组件、工具数量和API范围会随版本更新变化。本技能中的内容仅反映特定时间点的状态。发布任何涉及版本的内容前,请对照PyPI
https://pypi.org/project/neo4j-agent-memory/
)和GitHub README
https://github.com/neo4j-labs/agent-memory
)进行确认。PyPI是版本号的权威来源——切勿自行推断。

When to Use

使用场景

  • Building AI agents that need persistent memory (short-term, long-term, reasoning traces) backed by Neo4j
  • Using the
    neo4j-agent-memory
    Python package or the hosted NAMS service at memory.neo4jlabs.com
  • 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
  • 使用
    neo4j-agent-memory
    Python包或memory.neo4jlabs.com上的托管NAMS服务
  • 将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

项目概览

FieldValue
Package
neo4j-agent-memory
PyPIhttps://pypi.org/project/neo4j-agent-memory/
GitHubhttps://github.com/neo4j-labs/agent-memory
Canonical docshttps://neo4j.com/labs/agent-memory/
Hosted servicehttps://memory.neo4jlabs.com (NAMS — early-access, not yet documented on official project pages)
Hosted MCP endpointhttps://memory.neo4jlabs.com/mcp (SSE, bearer auth)
LicenseApache-2.0
Python3.10+
Neo4j5.20+ (required for vector indexes)
StatusExperimental (Neo4j Labs, community-supported)
Current version (at time of writing)0.1.1always verify PyPI before citing
字段
包名
neo4j-agent-memory
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
ships in two consumption models. They are the same underlying project — the differences are how you run it, how you authenticate, and what's managed for you.
OptionWhat It IsWhen to Choose
Self-hosted library
pip install neo4j-agent-memory
+ your own Neo4j (local / Docker / Aura). Full Python API, local MCP server, and framework integrations run in your process.
Dev, on-prem data, custom extraction pipelines, full control, bringing your own embeddings / LLMs.
Hosted (NAMS)Managed service at
https://memory.neo4jlabs.com
. Per-workspace isolated Neo4j Aura database, REST API, remote MCP endpoint, web console.
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
neo4j.com/labs/agent-memory/
.
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-agent-memory
提供两种使用模式。二者基于同一底层项目,差异体现在运行方式、认证方式和托管内容上。
选项说明适用场景
自托管库通过
pip install neo4j-agent-memory
安装,搭配您自己的Neo4j(本地/Docker/Aura)。完整Python API、本地MCP服务器和框架集成均在您的进程中运行。
开发环境、本地部署数据、自定义提取流水线、需要完全控制、自带嵌入模型/LLM的场景。
托管服务(NAMS)部署在
https://memory.neo4jlabs.com
的托管服务。每个工作区对应独立的Neo4j Aura数据库,提供REST API、远程MCP端点和Web控制台。
零基础设施试用、跨Agent/机器共享内存、演示场景、不想自行部署Neo4j的团队。
⚠️ NAMS已可访问,但尚未在GitHub README或
neo4j.com/labs/agent-memory/
中提及
。请将其视为早期访问/软发布阶段。发布内容中请勿断言服务级别协议(SLA)、定价或正式发布(GA)状态。详情请见下方**托管服务(NAMS)**章节。

The Three Memory Types

三种内存类型

The defining architectural feature. Every piece of content describing the project should lead with this trinity.
Memory TypeStoresColor Convention
Short-TermConversation messages, session history, sequential message chains, metadata-filtered search, LLM-powered summariesGreen (
#B2F2BB
/
#2F9E44
)
Long-TermEntities (people, places, orgs), preferences, facts, and the relationships between them — built automatically from conversations via the POLE+O modelOrange/Yellow (
#FFEC99
/
#F08C00
)
ReasoningDecision traces, tool call provenance, thought-action-outcome chains — so the agent can learn from its own past reasoning patternsPurple (
#D0BFFF
/
#9C36B5
)
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生成的摘要绿色(
#B2F2BB
/
#2F9E44
长期内存实体(人物、地点、组织)、偏好、事实及其间的关系——通过POLE+O模型从对话中自动构建橙黄色(
#FFEC99
/
#F08C00
推理内存决策轨迹、工具调用溯源、思考-行动-结果链——使Agent能够从自身过往推理模式中学习紫色(
#D0BFFF
/
#9C36B5
推理内存是核心竞争优势。大多数竞品系统仅覆盖短期和长期内存,将推理内存视为附加功能或直接忽略。定位时应重点突出这一点。

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]             # Everything
Full extras list (subject to change — verify PyPI):
all
,
anthropic
,
aws
,
bedrock
,
cli
,
crewai
,
extraction
,
full
,
fuzzy
,
gliner
,
google
,
google-adk
,
langchain
,
llamaindex
,
mcp
,
microsoft-agent
,
observability
,
openai
,
openai-agents
,
opentelemetry
,
opik
,
pydantic-ai
,
sentence-transformers
,
spacy
,
strands
,
vertex-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):
all
,
anthropic
,
aws
,
bedrock
,
cli
,
crewai
,
extraction
,
full
,
fuzzy
,
gliner
,
google
,
google-adk
,
langchain
,
llamaindex
,
mcp
,
microsoft-agent
,
observability
,
openai
,
openai-agents
,
opentelemetry
,
opik
,
pydantic-ai
,
sentence-transformers
,
spacy
,
strands
,
vertex-ai

Python 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 (
async with MemoryClient(settings) as memory:
) — this is the canonical form.
标准导入模式和基础用法。教程和示例中应采用此格式。
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
undefined
bash
undefined

stdio (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>
undefined
neo4j-agent-memory mcp serve
--session-strategy per_day
--user-id alice
--password <pw>
undefined

Tool Profiles

工具配置文件

ProfileToolsContents
core6
memory_search
,
memory_get_context
,
memory_store_message
,
memory_add_entity
,
memory_add_preference
,
memory_add_fact
extended (default)16Core + conversation history, entity details, graph export, relationship creation, reasoning traces, observations, read-only Cypher
As of v0.1.1,
memory_add_fact
accepts a
metadata
parameter, bringing it to parity with
memory_add_entity
.
配置文件工具数量包含内容
core6个
memory_search
,
memory_get_context
,
memory_store_message
,
memory_add_entity
,
memory_add_preference
,
memory_add_fact
extended(默认)16个核心工具 + 对话历史、实体详情、图谱导出、关系创建、推理轨迹、观测结果、只读Cypher
截至v0.1.1版本,
memory_add_fact
支持
metadata
参数,与
memory_add_entity
功能对齐。

Claude 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
memory.neo4jlabs.com/mcp
, see the Hosted Service (NAMS) section below — it uses SSE transport and bearer-token auth, not a local
uvx
invocation.
json
{
  "mcpServers": {
    "neo4j-agent-memory": {
      "command": "uvx",
      "args": ["neo4j-agent-memory[mcp]", "mcp", "serve", "--password", "your-password"],
      "env": {
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}
关于
memory.neo4jlabs.com/mcp
上的托管MCP端点,请见下方**托管服务(NAMS)**章节——它使用SSE传输协议和Bearer令牌认证,而非本地
uvx
调用。

Hosted Service (NAMS)

托管服务(NAMS)

NAMS — Neo4j Agent Memory Service — is the managed deployment of
neo4j-agent-memory
at
https://memory.neo4jlabs.com
. It bundles the REST API, the MCP server, a web console, and per-workspace Neo4j Aura databases.
⚠️ Verify against the live service before citing. NAMS is not documented on the GitHub README or
neo4j.com/labs/agent-memory/
. 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 at
/openapi.json
.
NAMS——Neo4j Agent Memory Service——是部署在
https://memory.neo4jlabs.com
neo4j-agent-memory
托管版本。它整合了REST API、MCP服务器、Web控制台和每个工作区对应的Neo4j Aura数据库。
⚠️ 引用前请对照实时服务验证。NAMS尚未在GitHub README或
neo4j.com/labs/agent-memory/
中记录。端点格式、工具数量、认证流程和限制可能会无预警变更。发布任何与NAMS相关的内容前,请重新检查实时站点和
/openapi.json
中的OpenAPI规范。

Surface

服务范围

  • Base URL:
    https://memory.neo4jlabs.com
  • Web console: root URL — workspace management, memory browsing, entity visualization
  • REST API:
    https://memory.neo4jlabs.com/v1/
    — OpenAPI spec at
    /openapi.json
    ; covers conversations, entities, observations, reasoning traces, and read-only Cypher
  • MCP endpoint:
    https://memory.neo4jlabs.com/mcp
    — SSE transport, exposes the hosted tool set, bearer-token auth
  • 基础URL
    https://memory.neo4jlabs.com
  • Web控制台:根URL——工作区管理、内存浏览、实体可视化
  • REST API
    https://memory.neo4jlabs.com/v1/
    ——OpenAPI规范位于
    /openapi.json
    ;涵盖对话、实体、观测结果、推理轨迹和只读Cypher
  • MCP端点
    https://memory.neo4jlabs.com/mcp
    ——SSE传输协议,暴露托管工具集,采用Bearer令牌认证

Auth

认证方式

  • API keys, prefixed
    nams_
    , created and rotated from the web console — used as a bearer token for REST and MCP
  • Auth0 OAuth2 (PKCE) + scoped JWTs for interactive user flows
Don't mix these with the self-hosted library's
--password
Neo4j credential — they serve different sides of the stack.
  • API密钥,前缀为
    nams_
    ,可在Web控制台创建和轮换——作为Bearer令牌用于REST和MCP认证
  • Auth0 OAuth2(PKCE) + 带作用域的JWT令牌,用于交互式用户流程
请勿将这些密钥与自托管库的
--password
Neo4j凭证混淆——它们服务于栈的不同层面。

Storage 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
neo4j_agent_memory.integrations.<framework>
. Install the matching extra.
FrameworkInstall ExtraImport
LangChain
[langchain]
from neo4j_agent_memory.integrations.langchain import Neo4jAgentMemory
Pydantic AI
[pydantic-ai]
from neo4j_agent_memory.integrations.pydantic_ai import MemoryDependency
Google ADK
[google-adk]
from neo4j_agent_memory.integrations.google_adk import Neo4jMemoryService
AWS Strands
[strands]
from neo4j_agent_memory.integrations.strands import context_graph_tools
CrewAI
[crewai]
from neo4j_agent_memory.integrations.crewai import Neo4jCrewMemory
LlamaIndex
[llamaindex]
from neo4j_agent_memory.integrations.llamaindex import Neo4jLlamaIndexMemory
OpenAI Agents
[openai-agents]
from neo4j_agent_memory.integrations.openai_agents import ...
Microsoft Agent Framework
[microsoft-agent]
from neo4j_agent_memory.integrations.microsoft_agent import Neo4jMicrosoftMemory
所有集成均位于
neo4j_agent_memory.integrations.<framework>
路径下。需安装对应的扩展组件。
框架扩展组件导入路径
LangChain
[langchain]
from neo4j_agent_memory.integrations.langchain import Neo4jAgentMemory
Pydantic AI
[pydantic-ai]
from neo4j_agent_memory.integrations.pydantic_ai import MemoryDependency
Google ADK
[google-adk]
from neo4j_agent_memory.integrations.google_adk import Neo4jMemoryService
AWS Strands
[strands]
from neo4j_agent_memory.integrations.strands import context_graph_tools
CrewAI
[crewai]
from neo4j_agent_memory.integrations.crewai import Neo4jCrewMemory
LlamaIndex
[llamaindex]
from neo4j_agent_memory.integrations.llamaindex import Neo4jLlamaIndexMemory
OpenAI Agents
[openai-agents]
from neo4j_agent_memory.integrations.openai_agents import ...
Microsoft Agent Framework
[microsoft-agent]
from neo4j_agent_memory.integrations.microsoft_agent import Neo4jMicrosoftMemory

Entity Extraction Pipeline

实体提取流水线

Multi-stage extraction (cost/quality tradeoff from fastest → most accurate):
  1. spaCy — fast statistical NER, cheapest, broad but imprecise coverage
  2. GLiNER — zero-shot entity extraction with typed schemas;
    GLiREL
    for relationships
  3. 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
DeduplicationConfig
.
Configuration objects to know:
ExtractionConfig
,
DeduplicationConfig
,
MemoryIntegration
,
SessionStrategy
.
多阶段提取(从最快到最精确的成本/质量权衡):
  1. spaCy——快速统计命名实体识别(NER),成本最低,覆盖范围广但精度一般
  2. GLiNER——支持类型化 schema 的零样本实体提取;
    GLiREL
    用于关系提取
  3. LLM兜底——精度最高,成本也最高;适用于结构复杂或模糊的场景
实体增强是独立的后台阶段:Wikipedia和Diffbot可为提取的实体补充额外上下文。
去重(v0.1.1+版本)通过主题/谓词匹配加嵌入相似度(阈值约0.95)自动合并重复事实和偏好,更新置信度而非创建新节点。可通过
DeduplicationConfig
进行调优。
需了解的配置对象:
ExtractionConfig
,
DeduplicationConfig
,
MemoryIntegration
,
SessionStrategy

Positioning 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.
  • neo4j-agent-memory
    is positioned as the complete implementation of the context graph category — it covers all three memory layers, not just two.
  • 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
    neo4j-labs-brand
    skill for the full voice guide).
  • 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:
  1. Outdated version numbers — anyone writing "v0.1.0" today may be working from stale notes; verify PyPI.
  2. Wrong canonical docs URL — it's
    neo4j.com/labs/agent-memory
    , not a Vercel preview URL.
  3. Inferred API surface — if code samples weren't run, flag them; prefer patterns from the GitHub README or official examples.
  4. Missing "Labs" framing — experimental/community-supported should be clear.
  5. Conflating with other Neo4j MCP servers — there are several (
    mcp-neo4j-cypher
    ,
    mcp-neo4j-memory
    — the old knowledge graph memory server, etc.).
    neo4j-agent-memory
    's MCP server is distinct and ships as part of the package under the
    [mcp]
    extra.
  6. 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
    uvx
    invocation and a Neo4j
    --password
    ; NAMS uses an SSE MCP URL and a
    nams_
    -prefixed bearer token. Don't mix them.
  7. Over-promising NAMS availability — the hosted service is not yet referenced in the GitHub README or
    neo4j.com/labs/agent-memory/
    . Avoid "officially supported," SLAs, pricing claims, or "production-ready" framing. Treat it as early-access.
编辑或审核该项目相关内容时,请检查以下事项:
  1. 过时的版本号——如果有人写"v0.1.0",可能使用的是陈旧资料;请验证PyPI。
  2. 错误的官方文档URL——正确地址是
    neo4j.com/labs/agent-memory
    ,而非Vercel预览URL。
  3. 推断的API范围——如果代码示例未实际运行,请标记;优先使用GitHub README或官方示例中的模式。
  4. 缺失"Labs"定位——应明确标注实验性/社区支持状态。
  5. 与其他Neo4j MCP服务器混淆——存在多个MCP服务器(
    mcp-neo4j-cypher
    mcp-neo4j-memory
    ——旧版知识图谱内存服务器等)。
    neo4j-agent-memory
    的MCP服务器是独立的,作为包的一部分随
    [mcp]
    扩展组件发布。
  6. 混淆NAMS与自托管库——二者基于同一底层项目,但使用模式不同。连接字符串、认证方式和工具集均有差异:自托管使用本地
    uvx
    调用和Neo4j
    --password
    ;NAMS使用SSE MCP URL和
    nams_
    前缀的Bearer令牌。请勿混用。
  7. 过度承诺NAMS可用性——托管服务尚未在GitHub README或
    neo4j.com/labs/agent-memory/
    中提及。避免使用"官方支持"、SLA、定价声明或"生产就绪"等表述。将其视为早期访问阶段。

Related Projects in the Ecosystem

生态系统中的相关项目

Mentions of these are frequent; recognize them and use the correct names.
ProjectWhat It Is
create-context-graphCLI scaffolder (
uvx create-context-graph
) that generates full-stack context graph apps pre-wired with neo4j-agent-memory. Canonical docs:
create-context-graph.dev
.
Lenny's Podcast Memory ExplorerFlagship demo — 299 podcast episodes, knowledge graph, geospatial maps, Wikipedia enrichment. PydanticAI-based. Lives at
examples/lennys-memory/
in the repo.
neo4j-agent-integrationsBroader umbrella of framework integrations, many of which are packaged back into
neo4j-agent-memory
under
[<framework>]
extras.
agent-memory-tckTechnology Compliance Kit — behavioral specifications for multi-language/multi-framework interoperability (polyglot).
Microsoft Learn integrationOfficial Microsoft Agent Framework docs reference
neo4j-agent-memory
as the Neo4j Memory Provider.
这些项目经常被提及,请识别并使用正确名称。
项目说明
create-context-graphCLI脚手架工具(
uvx create-context-graph
),可生成预配置neo4j-agent-memory的全栈上下文图谱应用。官方文档:
create-context-graph.dev
Lenny's Podcast Memory Explorer旗舰演示项目——包含299个播客剧集、知识图谱、地理空间地图、Wikipedia增强。基于PydanticAI构建。位于仓库的
examples/lennys-memory/
目录。
neo4j-agent-integrations更广泛的框架集成合集,其中许多集成被打包回
neo4j-agent-memory
[<framework>]
扩展组件中。
agent-memory-tck技术合规套件——多语言/多框架互操作性的行为规范(多语言兼容)。
Microsoft Learn集成官方Microsoft Agent Framework文档将
neo4j-agent-memory
列为Neo4j内存提供者。

Canonical Examples (from the Repo)

标准示例(来自仓库)

Point users here rather than inventing examples:
  • examples/lennys-memory
    — flagship PydanticAI demo
  • examples/full-stack-chat-agent
    — PydanticAI news research with NVL graph viz
  • examples/financial-services-advisor/aws-financial-services-advisor
    — AWS Strands multi-agent KYC/AML with reasoning-trace audit trails
  • examples/financial-services-advisor/google-cloud-financial-advisor
    — Google ADK multi-agent with Vertex AI embeddings + SSE streaming
  • examples/microsoft_agent_retail_assistant
    — Microsoft Agent Framework with GDS algorithms and context providers
  • examples/domain-schemas
    — 8 GLiNER2 extraction scripts
  • examples/google_cloud_integration
    — progressive tutorial covering Vertex AI → ADK → MCP →
    MemoryIntegration
  • examples/google_adk_demo
    — standalone ADK demo of
    Neo4jMemoryService
请引导用户查看这些示例,而非自行创建:
  • examples/lennys-memory
    ——旗舰PydanticAI演示
  • examples/full-stack-chat-agent
    ——带NVL图谱可视化的PydanticAI新闻研究项目
  • examples/financial-services-advisor/aws-financial-services-advisor
    ——带推理轨迹审计跟踪的AWS Strands多Agent KYC/AML项目
  • examples/financial-services-advisor/google-cloud-financial-advisor
    ——带Vertex AI嵌入+SSE流式传输的Google ADK多Agent项目
  • examples/microsoft_agent_retail_assistant
    ——带GDS算法和上下文提供者的Microsoft Agent Framework项目
  • examples/domain-schemas
    ——8个GLiNER2提取脚本
  • examples/google_cloud_integration
    ——逐步教程,涵盖Vertex AI → ADK → MCP →
    MemoryIntegration
  • examples/google_adk_demo
    ——
    Neo4jMemoryService
    的独立ADK演示

Diagram Conventions (Cross-Reference)

图表规范(交叉参考)

When building diagrams for this project, combine this skill with:
  • excalidraw
    skill
    — JSON format and the project's diagram management script
  • neo4j-styleguide
    skill
    — Cypher code style and Neo4j brand colors
  • neo4j-labs-brand
    skill
    — Labs purple (
    #6366F1
    ), status badges, disclaimer language
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)
为该项目制作图表时,请结合以下技能:
  • excalidraw
    技能
    ——JSON格式和项目的图表管理脚本
  • neo4j-styleguide
    技能
    ——Cypher代码风格和Neo4j品牌颜色
  • neo4j-labs-brand
    技能
    ——Labs紫色(
    #6366F1
    )、状态徽章、免责声明话术
内存类型颜色(所有图表中请保持一致):
短期内存:  #B2F2BB 填充色 / #2F9E44 描边色 (绿色)
长期内存:   #FFEC99 填充色 / #F08C00 描边色 (橙黄色)
推理内存:   #D0BFFF 填充色 / #9C36B5 描边色 (紫色)
Neo4j/存储: #A5D8FF 填充色 / #1971C2 描边色 (蓝色)
Labs强调色: #6366F1(紫色,用于Labs品牌元素)

Documentation Structure (Cross-Reference)

文档结构(交叉参考)

The canonical docs at
neo4j.com/labs/agent-memory
follow the Diataxis framework (see the
diataxis
skill in this project for details):
  • 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-memory
上的官方文档遵循Diataxis框架(请参阅本项目中的
diataxis
技能了解详情):
  • 教程——构建您的第一个支持内存的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
    neo4j_agent_memory.integrations.<framework>
    (underscore, snake_case)
  • 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

资源

Checklist

检查清单

  • Version: check PyPI before citing
  • Consumption model: self-hosted vs NAMS
  • Correct extras installed (
    neo4j-agent-memory[<extra>]
    )
  • MemoryClient
    as async context manager
  • 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
    分离