4.2 · Lesson

Querying Traces

Your agent records a trace every turn now. It can also consult them — its own record of what it did and how.

You've built this shape enough times to work from comments alone. Define how_did_i_handle below save_fact — it wraps one call, get_similar_traces, which finds past traces whose tasks resemble the ask.