---
title: "Get Thread Summary"
method: GET
path: "/ai/thread-summary/{thread_id}"
tags: ["agent"]
---

# Get Thread Summary

`GET /ai/thread-summary/{thread_id}`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/ai/thread-summary/{thread_id}`
- Auth: none declared

Get thread summary, optionally generating if not exists.

Args:
    thread_id: Thread ID to get summary for
    generate: If True, generate summary if not exists or stale
    force_refresh: If True, regenerate even if exists (requires generate=True)

This endpoint returns the cached thread summary for context compression.
Summaries include communication style analysis and role detection.

## Path parameters

- `thread_id` integer, required

## Query parameters

- `generate` boolean
- `force_refresh` boolean

## Response `200`

Successful Response

- ThreadSummaryResponse: Response model for thread summary endpoint.
  - `thread_id` integer, required
  - `summary_text` string, nullable
  - `message_count` integer, nullable
  - `last_summary_at` string, nullable
  - `model_name` string, nullable
  - `tokens_used` integer, nullable
  - `exists` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
