The Chat History API manages the persistent conversation sessions created by the AI Agent. Each session groups the messages exchanged in one conversation. Use these endpoints to list past sessions, load a full transcript, rename a session, or delete one. All paths are relative to the base URL and require authentication. All responses use the standard envelope.

List sessions

Return recent chat sessions, newest first. Optionally filter to a single ontology.
The session_id here is the same identifier the AI Agent chat endpoint accepts. Load a past session, then keep sending chat messages with that session_id to continue the conversation.

Get a session

Load a single session along with all of its messages.
Messages are stored in OpenAI wire format, ordered oldest-first:
  • role is user, assistant, tool, or system.
  • content may be null on an assistant turn that only makes tool calls.
  • tool_calls (assistant) is the raw OpenAI array; each has id, type, and function: { name, arguments } where arguments is a JSON string.
  • tool_call_id (tool role) links a tool result back to its call.
  • There is no persisted thinking field — the reasoning stream is only emitted live over the agent chat response, not stored.
To render a past conversation, show the user and assistant (content) turns; tool rows are internal. Returns 404 if no session with that ID exists.

Rename a session

Set a new title for a session. The title must be non-empty.
Returns 404 if the session does not exist, or 400 if title is missing or empty.

Delete a session

Permanently delete a session and all of its messages.
Returns 404 if the session does not exist.