Agents

Use AI observability in Sentry to trace and debug agent workflows and conversations. Monitor agent runs, tool calls, model interactions, token usage, and errors.

Sentry helps you understand what's happening in your agent workflows. Agent tracing automatically collects information about agent runs, tool calls, model interactions, and errors across your entire AI pipeline, from user interaction to final response. You can also replay past conversations. If you're looking for MCP monitoring, see MCP Servers.

Open Explore → Agents in Sentry to investigate this data. Choose the tab that matches what you need to debug:

  • Conversations groups messages and tool calls by conversation ID. Use it to replay a user's multi-turn interaction, inspect its transcript and timeline, and find where a response or tool call went wrong.
  • Traces shows end-to-end agent runs and the application work around them. Use it to follow execution across model calls, tools, and services or to investigate latency and errors in context.
  • LLM Calls shows individual model requests. Use it to compare models, prompts, token usage, cost, and response performance without reviewing an entire conversation or trace.

To start debugging agents, you need a Sentry account and project. If you don't have an account, create one.

Set up Sentry for Agents and name your agents so you can identify them in Explore. Then choose a sampling strategy that keeps complete agent runs without sampling all application traffic.

  • Your agent is failing silently during tool execution, and you want to trace the complete agent flow to identify where it's breaking.
  • Users report that your agent is returning unexpected or malformed responses, and you need to debug the full context of prompts, model calls, and outputs.
  • Your agent workflows are experiencing performance issues, and you want to identify which steps (model calls, tool usage, or custom logic) are causing bottlenecks.
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").