---
title: "Get Session"
method: GET
path: "/api/chat/sessions/{session_id}"
tags: ["v2", "chat", "chat"]
---

# Get Session

`GET /api/chat/sessions/{session_id}`

Retrieve the details of a specific chat session.

Supports cursor-based pagination via ``limit`` and ``before_sequence``.
When no pagination params are provided, returns the most recent messages.

## Path parameters

- `session_id` string, required

## Query parameters

- `limit` integer
- `before_sequence` integer, nullable

## Response `200`

Successful Response

- SessionDetailResponse — Response model providing complete details for a chat session, including messages.
  - `id` string, required
  - `created_at` string, required
  - `updated_at` string, required
  - `user_id` string, nullable, required
  - `messages` object[], required
  - `active_stream` ActiveStreamInfo — Information about an active stream for reconnection.
    - `turn_id` string, required
    - `last_message_id` string, required
    - `started_at` string, nullable
  - `has_more_messages` boolean
  - `oldest_sequence` integer, nullable
  - `total_prompt_tokens` integer
  - `total_completion_tokens` integer
  - `metadata` ChatSessionMetadata — Typed metadata stored in the ``metadata`` JSON column of ChatSession. Add new session-level flags here instead of adding DB columns — no migration required for new fields as long as a default is provided.
    - `dry_run` boolean
    - `builder_graph_id` string, nullable

## Other responses

- `401` — Authentication required
- `422` — Validation Error

## Changes

- **2026-04-30** `8c84efcb3afb` — 4 warning, 1 info
  - removed the optional property `chat_status` from the response with the `200` status
  - removed the optional property `metadata/dream_pass_id` from the response with the `200` status
  - removed the optional property `metadata/kind` from the response with the `200` status
  - removed the optional property `metadata/source_platform` from the response with the `200` status
  - …1 more

[Change history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/chat/sessions/:session_id/get.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/revisions/72eaad2d41b3?raw)
