Agent observability

See what happens between a request and a result.

Follow model and tool activity across agent workflows. Understand latency, reliability, and usage in one place, then see where to improve.

Workflow trace

Illustrative activity view

Total latency

1.42s

Across 3 workflow steps

Cache activity

1hit

In this example trace

Step latencySample view

Agent request

Input received

0 ms

Model call

gpt-4.1 · completion

1.24 s

Search tools

2 calls · 1 cached

84 ms

Make every step clearer

Understand the work behind every answer.

A joined-up view helps teams identify what is slow, what is repeated, and where to focus next.

Follow the full workflow

Bring model and tool activity together to understand the steps behind an agent response.

Find performance bottlenecks

See where latency, errors, and cache behavior affect the experience.

Understand usage and cost

Connect usage to the actions that drive it and spot repeated work worth optimizing.

Observability and caching work together: find repeated work, then decide where reuse makes sense.

Explore caching

Investigate a slow agent run

Take a support agent that looks up account details and searches a knowledge base before drafting a reply. A trace helps you see which step held up the answer.

  1. Start with an affected request

    Open a trace for a slow or failed run. Follow the model calls, tool calls, and retries in execution order to find where the workflow waited or stopped.

  2. Compare with a healthy run

    Look at the same workflow under similar inputs. Check whether the difference came from model latency, a tool timeout, a retry, or a cache miss.

  3. Verify the change across runs

    After adjusting a timeout, prompt, or cache rule, compare latency, error rate, and usage for that workflow. Check the slowest requests alongside typical ones.

Read the trace from request to result

Start with the user-facing outcome and work backward through the steps that produced it. Keep an eye on which operations waited for one another and which ran at the same time.

Follow the dependencies

If the model waits for both an account lookup and a knowledge-base search, the slower call can determine when drafting begins. Adding the durations of parallel calls can overstate their effect on total latency.

Account for recovery

A run may succeed after a retry or a fallback. Read the failed attempt alongside the successful one to understand the extra wait and which path ultimately supplied the result.

Choose signals that match the problem

Use the symptom to decide where to start. A slow response, a jump in usage, and a rise in tool failures each call for a different comparison.

Slower answers

Compare median latency with the 95th percentile to see whether most runs slowed down or whether a smaller group is waiting longer. Then inspect a few traces from the affected group.

Higher usage

Compare usage per completed run as well as total usage. This helps distinguish higher request volume from a workflow that now needs more model calls or tokens per answer.

Compare workflow changes after a release

Use comparable requests when evaluating a prompt, model, or tool change. A shift in traffic mix can make a release look faster or slower even when its behavior is similar.

Choose a representative baseline

Group similar workflows and inputs, such as routine order lookups or longer support cases. Record the usual latency, error rate, and usage for each group before rollout.

Investigate changes together

If latency improves while errors rise, inspect runs from both groups. An earlier timeout may shorten slow runs while leaving more users without a usable answer.

Frequently asked questions

Explore SDK instrumentation
Which signals help explain a cost increase?

Compare token usage and the number of model calls per run. Larger prompts, longer outputs, and extra calls after retries can each raise the cost of the same workflow.

How do I spot repeated work worth caching?

Look for recurring calls with equivalent inputs, then check how much time or usage they account for. Confirm that the output can be reused under the same data and access conditions.

How do traces and aggregate metrics work together?

Aggregate metrics show how often a problem occurs and how many requests it affects. Traces give you the sequence of events for individual runs you can compare.