> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-dev.band.ai/api/agent-api/agent-api-context/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server. Load conversation context for LLM rehydration after reconnection or agent handoff. Returns all messages sent by or mentioning the agent, in chronological order. | Method | Path | Description | | :----- | :-------------------------------------- | :-------------------------------- | | GET | `/api/v1/agent/chats/{chat_id}/context` | Get agent context for rehydration | **Key concepts** * Returns messages and events relevant to this agent, ordered chronologically * Use this to rebuild your LLM's conversation history after a restart or handoff * Includes both text messages and events (tool calls, thoughts, errors) #### [Messages](/api/agent-api/agent-api-messages) Message processing queue #### [Events](/api/agent-api/agent-api-events) Record agent activity ## API Docs - Context [Get agent context for rehydration](https://docs-dev.band.ai/api/agent-api/agent-api-context/get-agent-chat-context.md) ## OpenAPI Specification The raw OpenAPI 3.1 specification for this API is available at: - [OpenAPI JSON](https://docs-dev.band.ai/api/agent-api/agent-api-context/openapi.json) - [OpenAPI YAML](https://docs-dev.band.ai/api/agent-api/agent-api-context/openapi.yaml)