Neo4j Agent Memory Workshop
Hands-on workshop: give an AI agent persistent memory with Neo4j. Build short-term, long-term, and reasoning memory as one queryable context graph.
In this 3-hour workshop, you will learn
The Neo4j Agent Memory Workshop is the companion course for the instructor-led workshop on agent memory and context graphs. Over roughly three and a half hours, you take an AI agent that forgets everything between conversations and give it persistent, explainable memory backed by Neo4j, using the neo4j-agent-memory package.
Most agents are stateless: every conversation starts from zero, and everything the user shared last time is gone. Memory fixes that, but stuffing transcripts into a prompt does not scale and cannot explain itself. This workshop takes a different approach — a context graph. Conversations, extracted entities, facts, preferences, and the agent's own reasoning traces all live as connected Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. in Neo4j, so the agent can retrieve exactly what is relevant to the moment and you can query, inspect, and correct what it remembers.
Agent Memory
Understand how AI agents store and retrieve information across turns, building short-term, long-term, and semantic memory layers that persist beyond a single conversation.
neo4j-agent-memory
Install and configure the neo4j-agent-memory Python package, wiring it to your Neo4j instance so an agent reads and writes memory automatically during each turn.
Context Graphs
Build a queryable context graph in Neo4j that unifies every memory type into a single traversable structure, enabling the agent to retrieve relevant facts with a single Cypher query.
Reasoning Traces
Capture and store an agent's step-by-step reasoning as linked nodes, allowing you to inspect why the agent reached a conclusion and replay its decision path after the fact.
POLE+O
Apply the POLE+O entity model — Person, Object, Location, Event, and Organisation — to extract and structure entities from conversation into a consistent, queryable graph schema.
What you need to take part.
A GraphAcademy account
The workshop is delivered here on GraphAcademy, so you need to be signed in to work through the lessons and keep your progress. Creating an account is free.
A GitHub account, or Git on your own machine
You write code against the workshop-agent-memory repository. The quickest route is a GitHub Codespace, an online editor that clones the code and installs everything for you — that needs a GitHub account.
If you would rather work locally, clone the repository with Git and run it in your own editor instead. No GitHub account is needed for that.
5 modules, 3 hours 20 minutes.
Who this workshop is for
This workshop is for developers building AI agents that need to remember users across sessions — and to justify what they remember. If you have built an agent with a framework such as Pydantic AI or LangChain and hit the limits of prompt-stuffed history, this workshop shows you a structured alternative where memory is data you can query rather than text you can only append to. You should have completed Neo4j Fundamentals, Cypher Fundamentals, and Neo4j & Generative AI Fundamentals, and be comfortable with simple Python. It is designed to be followed live with an instructor, but every lesson includes the commands, scripts, and notebooks you need to work at your own pace.
What you'll do
You will build a Pydantic AI learning assistant that answers questions from a course Full definition for knowledge graph (opens in a new tab)A representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. — and then teach it to remember. Starting from an agent with Full definition for GraphRAG (opens in a new tab)Retrieval-augmented generation whose context comes from a knowledge graph, so the model can follow the relationships between facts. retrieval but no recall, you run a simple experiment: introduce yourself, restart the agent, and watch it forget you. Then you rebuild its memory yourself, layer by layer. GraphAcademy provides a blank Neo4j Go to glossary for Aura instance (opens in a new tab)A single Neo4j database running in Aura. for your memory graph and proxies the OpenAI calls, so you only need Python and a code editor.
You configure the memory client, store conversations as short-term memory, and watch the package extract entities and Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node. into deduplicated long-term memory. You record the agent's reasoning as traces you can query later, and combine all three layers with a single
get_contextcall that assembles everything relevant to a question into one prompt-ready block. The workshop finishes with you writing a custom memory tool of your own: a find-your-people tool that matches you to other attendees by shared interests across the shared workshop graph.Where to go next
Context Graphs: Agent Memory with Neo4j covers the same memory concepts as a self-paced course you can revisit after the workshop. Developing with Neo4j MCP Tools introduces the Model Context Protocol, and Building GraphRAG Python MCP tools shows you how to expose custom tools like your memory tool to any MCP client. This workshop also counts toward the Neo4j & Generative AI Certification. Upcoming instructor-led sessions are listed on the workshops page.