4.5 · Lesson

Querying the Trace Graph

In the previous lesson, you learned how to use create_memory_tools() and record_agent_trace() to record a complete reasoning trace automatically in Neo4j. Now you will query that trace to understand what the agent did and why.

In this lesson, you will learn four ways to query an agent's reasoning trace: retrieving all tool calls in order, traversing across memory layers, finding similar past traces, and retrieving full provenance.