Skip to content

Decision Graph

You’ll learn how to use the Decision Graph to visualize your agent’s decision making process and trace the path from input to output.

What is the Decision Graph?

The Decision Graph is a visual representation of your agent’s execution as an interactive tree. Each node is a span, and branches show where your agent made choices — which tool to call, what response to generate, whether to escalate.

Reading the Graph

The graph displays your trace as a directed tree:

[User Input]
[Classify Intent] (llm_call)
├──→ [Refund Flow]
│ ├── [Lookup Order] (tool_call)
│ └── [Generate Refund Reply] (llm_call)
└──→ [General FAQ]
└── [Search Knowledge Base] (tool_call)

Each node shows:

  • Span name and kind (color coded)
  • Duration of the operation
  • Status — success (green), error (red), or in progress (blue)
  • Token count for LLM call nodes

Using the Decision Graph

  • Click a node to open the span detail panel with inputs, outputs, and metadata
  • Hover to see a quick summary tooltip
  • Zoom and pan to explore large traces
  • Collapse branches to focus on the path you’re investigating

Identify Failures

Error spans appear as red nodes. Follow the path from root to the red node to understand the full context that led to the failure.

Compare Runs

Open two traces side by side to compare decision paths. This helps answer: “Why did the agent handle this request differently?”

When to Use It

The Decision Graph is most useful when:

  • Debugging unexpected behavior — Trace the path your agent took to see where it diverged from expectations
  • Understanding multi step agents — See the full execution flow at a glance
  • Optimizing performance — Identify long running branches or unnecessary steps
  • Explaining decisions — Show stakeholders exactly how the agent arrived at an answer

Next Steps