---
title: "Get agent trace"
method: GET
path: "/v2/agent_analytics/traces/{trace_id}"
tags: ["Agent Analytics"]
---

# Get agent trace

`GET /v2/agent_analytics/traces/{trace_id}`

Returns the summary of a specific agent trace by its trace ID.

## Path parameters

- `trace_id` string, required

## Headers

- `Request-Timeout` integer
- `Request-Timeout-Millis` integer

## Response `200`

The requested agent trace.

- AgentTrace — A summary of an agent trace representing one complete agent invocation.
  - `trace_id` string, required — The unique identifier of the trace.
  - `agent_key` string — A unique key that identifies an agent.
  - `session_key` string — A unique key that identifies an agent session.
  - `started_at` string, date-time, required — The time the trace started.
  - `duration_ms` integer — Total duration of the trace in milliseconds.
  - `status` 'ok' | 'error', required — The final status of the trace.
  - `input_tokens` integer — Total input tokens consumed across all spans.
  - `output_tokens` integer — Total output tokens produced across all spans.

## Other responses

- `403` — Permissions do not allow accessing this trace.
- `404` — Trace not found.

---

[API](https://skmtc.net/vectara/apis/vectara-rest-api-v2.md) · [All operations](https://skmtc.net/vectara/apis/vectara-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vectara/vectara-rest-api-v2/versions/fca567a46b3a/schema)
