Context Graphs: Agent Memory with Neo4j
Build an AI agent that records its reasoning, then query the trace to understand what it did and why
In this 3-hour course, you will learn
In this course, you will learn how to give AI agents persistent, explainable memory backed by Neo4j using the neo4j-agent-memory library.
You will learn why most AI agent deployments fail to deliver enterprise value — and how context graphs solve the three critical gaps: no memory, no audit trail, and no shared learning. You will explore the three-layer memory model (short-term, long-term, and reasoning), the POLE+O entity classification system, and the full graph schema that connects them.
By the end of the course, you will have built a Pydantic AI agent that records its complete reasoning trace into Neo4j, and written Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. queries to Full definition for traversal (opens in a new tab)Following relationships from one node to the next to reach other parts of a graph. that trace and explain exactly what the agent did and why.
- Neo4j Fundamentals — graph database concepts
- Cypher Fundamentals — query language basics
- Neo4j & GenAI Fundamentals — Go to glossary for generative AI (opens in a new tab)Models that produce new content rather than classifying or scoring content that already exists. and 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. concepts
- Basic Python — reading and writing simple Python programs
Context Graphs
Agent Memory
neo4j-agent-memory
Reasoning Traces
POLE+O
4 modules, 2 hours 30 minutes.
Workshop AI access
This workshop provides temporary access to a hosted language model. Accept the terms and copy your credentials from within any lesson.
Default model: gpt-4o-mini