---
title: "Traces and agents"
url: "/docs/proxy/lens/traces"
canonical_url: "https://docs.litellm.ai/docs/proxy/lens/traces"
type: "docs"
last_updated: "2026-11-29"
summary: "Find an agent run, read its conversation, and inspect the model calls, tools, timing, cost, and flagged evidence."
related:
  - "/docs/proxy/lens/coding-agents/codex"
  - "/docs/proxy/lens/findings"
---
# Traces and agents

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


A trace records one agent run, including its input, response, model calls, and tools. **Traces** is the starting page in Lens. **Agents** groups those runs by the agent name your instrumentation records

![A captured support conversation in Thread view, with Steps available for detailed inspection](/img/lens/traces-demo.png)

*Demo data from the Lens UI preview*

## Connect an agent

Open **Agents > Connect agent** and choose your framework. Follow the generated tracing setup, then run your agent once. The [first-trace guide](./first-trace.md) has copyable examples and explains which tracing key and endpoint to use

When no agents are connected, **Traces > Connect agent** opens the same setup. A tracing key sends telemetry; it does not grant permission to read traces

## Inspect a run

In **Traces**, choose an agent and time range, then open a run. **Thread** is the default view and puts the conversation first. Use **Steps** for the individual model and tool calls, their inputs and outputs, timing, and attributes

Opening a flag or cited span takes you directly to the relevant step. Earlier conversation turns appear only when the instrumentation recorded a shared session. Missing prompt text or cost is not reconstructed: content must be captured, and cost needs matched billing data

Choose **Add to dataset** to save a useful run as a [test case](./datasets.md). The **Showing** filter above results makes the current agent scope visible across pages. Clear it to return to all agents

If the list is empty, check the agent and time filters, turn off **Demo data**, then follow [trace troubleshooting](./first-trace.md). Demo mode displays sample data and does not verify your tracing connection

## Related pages

- [Codex](https://docs.litellm.ai/docs/proxy/lens/coding-agents/codex.md)
- [Findings](https://docs.litellm.ai/docs/proxy/lens/findings.md)
