---
title: "Get conversation trace"
method: GET
path: "/api/v0/agent/traces/sessions/{session_id}"
tags: ["Agent Traces"]
---

# Get conversation trace

`GET /api/v0/agent/traces/sessions/{session_id}`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/agent/traces/sessions/{session_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/agent/traces/sessions/:session_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Return messages, model calls, runs, and delegation boundaries. A tier without
``agent_trace_tool_detail`` gets the trace through :func:`without_tool_detail`.

## Path parameters

- `session_id` string, uuid, required

## Response `200`

Successful Response

- AgentConversationTraceResponse: Observability payload for one conversation drawer.
  - `user` TraceUserResponse: The person a conversation in Logs → Traces belongs to.
    - `id` string, uuid, required: The user's public ID.
    - `name` string, nullable: The user's display name.
    - `email` string, nullable: The user's email address.
    - `department` string, nullable: The user's department in the viewer's organization; null when none is set.
    - `is_viewer` boolean: Whether this is the user making the request.
  - `messages` AgentMessageGetResponse[], required
    - `id` string, uuid, required: The ID of the message.
    - `run_id` string, uuid, nullable: The run that emitted this message, when known.
    - `role` string, required: The role of the message sender. Options: 'user', 'assistant', 'tool'.
    - `content` string, nullable: The content of the message.
    - `tool_calls` object[], nullable: Tool calls for assistant messages.
    - `tool_call_id` string, nullable: Tool call ID for tool result messages.
    - `attachments` AgentAttachmentGetResponse[], nullable: Attachments on this message (images/files).
      - `id` string, uuid, required: The ID of the attachment.
      - `filename` string, required: Original filename.
      - `content_type` string, required: MIME type of the attachment.
      - `size_bytes` integer, required: File size in bytes.
      - `url` string, nullable: Signed URL for downloading the attachment.
    - `model_names` string[], nullable: Models whose calls completed in the run that emitted this message, in order of first call. Null on user messages, on messages with no known run, and on a reply whose run's recorded calls all failed; a run with no recorded calls names the model it was dispatched with.
    - `kg_refs` KgResultRefs: Every node and every document location one KG tool result names, each once, in first-seen order.
      - `knowledge_base_id` string, required
      - `nodes` KgNodeRef[]
        - `node_id` string, required
        - `name` string, required
        - `type_id` string, nullable
        - `type_name` string, nullable
        - `ontology` string, nullable
        - `tier` string, nullable
        - `attributes` object
        - `attribute_sources` object
      - `groundings` KgSourceRef[]
        - `document_public_id` string, required
        - `document_name` string, nullable
        - `page_number` integer, nullable
    - `feedback` AgentMessageFeedbackResponse: A person's rating of one agent answer.
      - `id` string, uuid, required: The ID of the rating.
      - `rating` string, required: 'good' or 'bad'.
      - `reason` string, nullable: Why a 'bad' answer was bad: 'incorrect', 'outdated', 'missing_source', 'off_topic' or 'other'. Null on a 'good' rating and on a 'bad' one given without a reason.
      - `comment` string, nullable: What the person wrote.
      - `created_at` string, date-time, required: When the rating was first written.
      - `updated_at` string, date-time, required: When the rating last changed.
    - `sequence_number` integer, required: Ordering sequence number.
    - `created_at` string, date-time, required: When the message was created.
  - `model_calls` AgentModelCallGetResponse[], required
    - `id` string, uuid, required
    - `run_id` string, uuid, required
    - `call_number` integer, required
    - `provider` string, required
    - `model_name` string, required
    - `status` string, required
    - `response_text` string, nullable, required
    - `reasoning_summary` string, nullable, required
    - `reasoning_content` string, nullable, required
    - `finish_reason` string, nullable, required
    - `request_id` string, nullable, required
    - `response_id` string, nullable, required
    - `input_tokens` integer, nullable, required
    - `cached_input_tokens` integer, nullable, required
    - `output_tokens` integer, nullable, required
    - `reasoning_tokens` integer, nullable, required
    - `total_tokens` integer, nullable, required
    - `estimated_cost_usd` number, nullable, required
    - `citations` object[], nullable, required
    - `safety` object, nullable, required
    - `attempts` object[], nullable, required
    - `provider_metadata` object, nullable, required
    - `provider_payload` object, nullable, required
    - `error_message` string, nullable, required
    - `started_at` string, date-time, required
    - `completed_at` string, date-time, nullable, required
    - `duration_ms` integer, nullable, required
  - `runs` AgentTraceSummaryResponse[], required
    - `id` string, uuid, required
    - `session_id` string, uuid, required
    - `session_name` string, nullable, required
    - `persona_id` string, uuid, nullable, required
    - `persona_name` string, nullable, required
    - `parent_run_id` string, uuid, nullable, required
    - `status` string, required
    - `model_name` string, nullable, required
    - `input_message` string, required
    - `final_response` string, nullable, required
    - `total_iterations` integer, required
    - `message_count` integer, required
    - `tool_call_count` integer, required
    - `error_message` string, nullable, required
    - `created_at` string, date-time, required
    - `completed_at` string, date-time, nullable, required
    - `duration_ms` integer, nullable, required
  - `delegated_runs` AgentTraceSummaryResponse[], required
    - `id` string, uuid, required
    - `session_id` string, uuid, required
    - `session_name` string, nullable, required
    - `persona_id` string, uuid, nullable, required
    - `persona_name` string, nullable, required
    - `parent_run_id` string, uuid, nullable, required
    - `status` string, required
    - `model_name` string, nullable, required
    - `input_message` string, required
    - `final_response` string, nullable, required
    - `total_iterations` integer, required
    - `message_count` integer, required
    - `tool_call_count` integer, required
    - `error_message` string, nullable, required
    - `created_at` string, date-time, required
    - `completed_at` string, date-time, nullable, required
    - `duration_ms` integer, nullable, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-12** `08b5bf6f7f18`: 2 info
  - added the optional property `messages/items/feedback` to the response with the `200` status
  - added the optional property `user` to the response with the `200` status
- **2026-11-09** `ecd5b922e78a`: 2 info
  - added the optional property `messages/items/kg_refs` to the response with the `200` status
  - added the optional property `messages/items/model_names` to the response with the `200` status
- **2026-09-25** `fcd15f6d35b4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/agent/traces/sessions/:session_id/get.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
