Day-4

Part-1

Today I want to walk you through our new guide on automating trace analysis. We have built an environment to analyze traces from our workflows using AI agents. The main goal is to automate downloading traces and visualizing their structure. This helps us delegate analysis tasks to agents, which improves our efficiency. Let's look at the first component, which is the download tool. It is a command-line utility that fetches traces as JSON files. You just need to set up your environment file with your keys. If you have many traces, you should increase the timeout setting. This prevents the download from failing when the server is busy. You can filter downloads by tags or specify a time range. It is a simple but powerful way to get the data you need.

Part-2

Next, let's talk about the trace analysis tool, which is quite powerful. It displays the trace structure as a tree, making it easy to understand. You can use the tree command to see the hierarchy at a glance. If you need more detail, the inspect command shows specific node data. It shows you exactly what went in and what came out. There is also a tool command that extracts all the tool calls. This is useful for verifying if the agents are calling functions correctly. You can even search for specific nodes by name or pattern. All of these commands help us understand what happened during the execution. It gives us a clear window into the logic of our agents.