
Neo4j Agent Memory Skill
Add graph-native short-term, long-term, and reasoning memory to agents with Neo4j or NAMS and wire it into LangChain, CrewAI, or MCP.
Overview
neo4j-agent-memory-skill is an agent skill most often used in Build (also Ship, Operate) that implements graph-native agent memory with neo4j-agent-memory, NAMS, and MCP framework integrations.
Install
npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-agent-memory-skillWhat is this skill?
- MemoryClient and MemorySettings API for store/retrieve on Neo4j or NAMS
- Short-term :Message conversation history and long-term POLE+O structured knowledge
- Reasoning traces as auditable thought chains on the graph
- NAMS hosted setup with nams_ API keys, endpoints, and rate limits
- Memory MCP server to expose memory tools to any MCP-compatible agent
- POLE+O entity model: Person, Object, Location, Event + Organisation
- Framework integrations: 8+ named stacks in SKILL.md
- Hosted NAMS at memory.neo4jlabs.com
Adoption & trust: 1 installs on skills.sh; 80 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your agent forgets context across turns and vector-only RAG cannot represent relationships or audit reasoning chains.
Who is it for?
Solo builders creating custom agents who want structured, Cypher-inspectable memory and hosted NAMS without building memory infra from scratch.
Skip if: Teams that only need generic Neo4j vector search or full GraphRAG pipelines without the agent-memory package—use the sibling vector or graphrag skills instead.
When should I use this skill?
User builds or debugs graph-native agent memory with neo4j-agent-memory, NAMS, MemoryClient, or Memory MCP.
What do I get? / Deliverables
You can persist messages, POLE+O knowledge, and reasoning traces in Neo4j or NAMS and call them from your agent stack or Memory MCP tools.
- Configured MemoryClient/MemorySettings
- Graph schema with messages and POLE+O nodes
- Optional Memory MCP tool surface
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Primary shelf is Build agent-tooling where memory architecture is implemented before Ship and Operate. Agent-tooling is where MemoryClient, POLE+O schema, and framework hooks are chosen and integrated.
Where it fits
Wire MemoryClient into a CrewAI crew so each role shares POLE+O facts on Neo4j.
Register the Memory MCP server so Cursor agents read/write :Message nodes.
Audit which reasoning traces and secrets land in the graph before production.
Run Cypher to inspect stale memories and NAMS rate-limit behavior.
How it compares
Graph-native relational memory with traces, not a vector-only embedding store or a general Neo4j admin skill.
Common Questions / FAQ
Who is neo4j-agent-memory-skill for?
Indie developers and agent builders integrating Neo4j or NAMS for conversation history, structured entities, and auditable reasoning in production agents.
When should I use neo4j-agent-memory-skill?
Use it in Build when wiring agent memory; in Ship when hardening persistence and MCP exposure; in Operate when debugging memory graphs and Cypher queries after deploy.
Is neo4j-agent-memory-skill safe to install?
It documents API keys and database access patterns—review the Security Audits panel on this page and scope NAMS/Neo4j credentials to least privilege.
Workflow Chain
Then invoke: neo4j vector index skill, neo4j graphrag skill
SKILL.md
READMESKILL.md - Neo4j Agent Memory Skill
# neo4j-agent-memory-skill Skill for building graph-native agent memory backed by Neo4j using the `neo4j-agent-memory` Python package and the hosted Neo4j Agent Memory Service (NAMS) at memory.neo4jlabs.com. **Covers:** - `MemoryClient` / `MemorySettings` — core API for storing and retrieving memories - Short-term memory — conversation history stored as `:Message` nodes - Long-term memory — structured knowledge using the POLE+O entity model (Person, Object, Location, Event + Organisation) - Reasoning traces — storing agent thought chains for auditability and re-use - NAMS hosted service — API key setup (`nams_` prefix), endpoints, rate limits - Memory MCP server — exposing memory as MCP tools for any MCP-compatible agent - Framework integrations: LangChain, PydanticAI, CrewAI, AWS Strands, Google ADK, Microsoft Agent Framework, OpenAI Agents SDK, LlamaIndex - Graph schema — memory graph structure, Cypher queries for inspection - Comparing graph-native memory vs vector-only approaches **Version / compatibility:** - `neo4j-agent-memory` Python package (latest) - Neo4j 5.x / 2025.x or NAMS hosted service **Not covered:** - General Neo4j vector search → `neo4j-vector-index-skill` - GraphRAG pipelines → `neo4j-graphrag-skill` - MCP server setup (general) → `neo4j-mcp-skill` **Install:** ```bash pip install neo4j-agent-memory ``` ```bash npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-agent-memory-skill ``` Or paste this link into your coding assistant: https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-agent-memory-skill --- name: neo4j-agent-memory-skill description: Authoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com. Use this skill whenever the user mentions neo4j-agent-memory, agent memory with Neo4j, context graphs, the POLE+O model, MemoryClient/MemorySettings, the memory MCP server, or any of the framework integrations (LangChain, PydanticAI, CrewAI, AWS Strands, Google ADK, Microsoft Agent Framework, OpenAI Agents, LlamaIndex). Also use when the user mentions the hosted service at memory.neo4jlabs.com, NAMS, the Neo4j Agent Memory Service, the `nams_` API key prefix, or the hosted MCP endpoint. Also use when writing documentation, blog posts, tutorials, PRDs, or code samples for the project, when comparing agent memory approaches, or when positioning graph-native memory against vector-only approaches — even if the user doesn't explicitly name the package. version: 1.0.1 --- # 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. ## 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 ## 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` - **GraphR