---
title: "Get agent context for rehydration"
method: GET
path: "/api/v1/agent/chats/{chat_id}/context"
tags: ["agentApiContext"]
---

# Get agent context for rehydration

`GET /api/v1/agent/chats/{chat_id}/context`

Returns all messages relevant to the agent for execution context/rehydration.

This includes:
- All messages the agent sent (any type: text, tool_call, tool_result, thought, etc.)
- All text messages that @mention the agent

Use this endpoint to load the complete context an external agent needs to resume execution.

Messages are returned in chronological order (oldest first).

## Pagination

Use `cursor` + `limit` for cursor-based pagination (recommended). The response
`metadata` includes `next_cursor` and `has_more`.

`page` and `page_size` are deprecated and will be removed in API 2.0.0 (2026-10-01).

## Path parameters

- `chat_id` string, uuid, required

## Query parameters

- `cursor` string
- `limit` integer
- `page` integer
- `page_size` integer

## Headers

- `X-API-Key` string, required

## Response `200`

Agent context

- ContextGetAgentChatContextResponse200 — unresolved $ref

## Other responses

- `401` — Unauthorized
- `403` — Forbidden - Agent authentication required
- `404` — Not Found - Chat room not found or agent not a participant
- `422` — Validation Error

## Changes

- **2026-08-22** `d4b03725c5d7` — 2 warning, 2 info
  - for the `query` request parameter `limit`, the max was set to `100.00`
  - for the `query` request parameter `limit`, the min was set to `1.00`
  - `query` request parameter `page` was deprecated
  - `query` request parameter `page_size` was deprecated

[Change history](https://skmtc.dev/band/apis/request-api/changes/api/v1/agent/chats/:chat_id/context/get.md)

---

[API](https://skmtc.dev/band/apis/request-api.md) · [All operations](https://skmtc.dev/band/apis/request-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/band/request-api/revisions/3cff423845a2/schema)
