Understanding Agent Monitoring
1. Understanding Agent Monitoring
Your agent is running. Users are asking questions, but how do you know if it's working correctly? You need visibility into what's happening inside. Snowflake automatically captures detailed traces of every agent interaction. Every question asked, every plan the agent makes, every tool it's called, every response it generated, all of it is logged and available for you to inspect. This is agent monitoring. It gives you visibility into the black box. When something goes wrong, you can see exactly where and why. When something works, well, you can understand what made it successful. Let's understand what gets captured. When a user asks your agent a question, Snowflake logs the entire execution as a trace. A trace is a complete record of everything that happened to answer that question. Each trace contains multiple spans. Think of the spans as chapters in the story of how your agent answered a question. There is a span for planning, spans for each tool call, and a span for response generation. Together, they tell a complete story. The planning span shows how the agent interpreted the question and decided what to do. Did it understand the user's intent? Did it select the right approach? You can see the agent's reasoning. Tool execution spans show each tool the agent's called. For your sales intelligence agent, that means Cortex analyst queries and Cortex search requests. You see the inputs sent to each tool and the outputs returned. The response generation span shows how the agent synthesizes tool outputs into a final answer. This is where the agent combines data from multiple data sources and formats its response. All of this trace data lives in an event table. Specifically, the table is called AI observability events in the Snowflake local schema. Snowflake creates and manages this table automatically. You don't need to set up anything. The event table captures several types of information. Conversation history shows the back and forth between user and agent. Execution traces show the planning, tool use, and response generation steps. User's feedback captures thumbs up or thumbs down reactions. If you enable this feature, why does this matter? Three reasons. First, debugging. When an agent gives a wrong answer, traces show you why. Maybe it selected the wrong tool. Maybe the tool returned uninspected data. Maybe the response generation misinterpret the results. Traces pinpoint that failure. Second, optimization. Traces reveal inefficiencies. Maybe your agent calls the same tool twice unnecessarily. Maybe it's using a slow path when a faster one exists. You can't optimize what you can't see. Third, understanding. Even when things work, traces help you understand how. This builds intuition for writing better instructions. You learn what patterns lead to good outcomes. Let me give you a concrete example. Say a user asks, what's our win rate for enterprise deals? And gets the wrong number. Without monitoring, you're guessing. Was it a tool problem, an instruction problem, a data problem? With monitoring, you open the trace. You see the agent planned to use Cortex Analyst. Good, that's correct. You see the SQL it generated. There's a problem. It filtered on the wrong column. Now you know exactly what to fix. For another example, a user asks about customer concerns and gets a generic response. You take the trace. The agents used Cortex Search. The search returned relevant results. But the response generation summarized poorly. Now you know to improve your response instructions, not your search configuration. Monitoring transforms agent's development from guesswork to evidence-based iteration. You make the changes based on what you observed, not what you assume. One important note about access. To view agents monitoring data, you need specific privileges. Your next reading will help you set up everything you need. In the next video, we'll open the monitoring interface and walk through real traces from your sales intelligence agent. You'll see exactly how to find and interpret this information that we just discussed.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.