Context Graphs and Reasoning Memory

Short-term and long-term memory together give an agent a working memory and a knowledge base — but they do not answer the hardest enterprise question: why did the agent decide that? This module introduces reasoning memory, the layer that captures every tool call, intermediate thought, and causal chain, turning your agent’s decision history into a queryable institutional knowledge base — a context graph.

By the end of this module, you will:

  • Explain what a context graph is and how reasoning memory implements the "context" layer

  • Instrument a Pydantic AI agent to record complete reasoning traces into Neo4j

  • Write Cypher queries that traverse from a tool call back through reasoning steps to the originating entity

  • Use vector similarity to find past traces for similar tasks (agent learning from experience)

  • Produce a human-readable audit report of an agent’s decisions from the graph

Ready? Let’s go →

Chatbot

How can I help you today?

Data Model

Your data model will appear here.