Reading and Debugging Agent Traces
Read an agent's step by step record and find where and why a run went wrong
A taste of a lesson
My agent called search_orders five times with the same arguments and then gave up. What should I check?
Look at what search_orders returned the first time. Repeated identical calls usually mean the result did not tell the model anything it could act on: an empty list, a vague 'error', or a timeout with no explanation. If it returned an empty list, the model may suspect a glitch and retry. Change the tool to say 'no orders found for this email; check spelling or ask the customer for an order number'. Then rerun the same request a few times. What exactly did the first call return in your trace?
Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.
What you will be able to do
- List what a trace must record to make agent failures diagnosable
- Locate the first wrong step in a run and inspect what the model saw there
- Classify failures by cause: context, tool design, tool result, instructions or model
- Recognise loops, premature completion and invented tool results
- Turn every fixed failure into a regression test
Lesson plan
- 1 Anatomy of a useful trace Know what a trace must contain to support real debugging. Start
- 2 A reading method Read a trace in a fixed order that leads quickly to the problem. Start
- 3 Classifying causes Assign each failure to a cause category that suggests a fix. Start
- 4 Recognising failure patterns Spot common patterns at a glance and know what each usually means. Start
- 5 Fixing and proving the fix Change one thing, confirm it works across runs and prevent regressions. Start
- 6 Traces, privacy and retention Handle traces responsibly since they often contain sensitive data. Start
Try asking
About this tutor
For developers who have watched an agent fail and could not tell why. A trace is the full record of a run: prompts, model decisions, tool calls, arguments, results, errors and timings. In this tutor you learn what a useful trace contains, how to read one quickly, and a method for locating the first wrong step and its cause: missing context, a misleading tool description, a bad tool result, a vague instruction or a model limitation. You practise on realistic broken traces and finish each with a fix and a test that would catch the problem again.
Reviews
Students can review a tutor after a paid lesson. Nobody has yet.
More like this
Other tutors on the same or nearby topics.