4.4 · Lesson

Recording Reasoning Traces

In the previous lesson, you learned the reasoning memory schema — how ReasoningTrace, ReasoningStep, and ToolCall Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. connect, and how cross-memory 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. tie all three layers together in a single graph. Now you will use the Pydantic AI integration to record those traces automatically.

In this lesson, you will learn how to use create_memory_tools() and record_agent_trace() to record a complete reasoning trace with minimal code.