---
title: "Get messages for a session"
method: GET
path: "/agent-session-manager/sessions/{sessionId}/messages"
tags: ["Agent Session Manager"]
---

# Get messages for a session

`GET /agent-session-manager/sessions/{sessionId}/messages`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/agent-session-manager/sessions/{sessionId}/messages`
- Auth: none declared

Returns messages for a session.

## Path parameters

- `sessionId` string, required

## Query parameters

- `filters` unknown[]
  - unknown
- `page` number, double
- `limit` number, double
- `sortBy` 'eventId' | 'timestamp': Field to sort by
- `sortOrder` 'asc' | 'desc': Sort order

## Response `200`

result

- AgentSessionManagerSessionsSessionIdMessagesGetResponsesContentApplicationJsonSchemaItems[]
  - `sessionId` string, required: Session ID this message belongs to
  - `eventId` string, required: Unique identifier for the session message — use with GET /messages/:eventId to fetch full data
  - `timestamp` number, double, required: Event timestamp in epoch milliseconds
  - `type` 'inference-pending' | 'inference-succeeded' | 'inference-failed' | 'tool-execution' | 'agent-session-paused' | 'agent-session-resumed' | 'agent-session-completed' | 'agent-session-failed' | 'agent-session-canceled', required: Event type — AEE event type or synthetic merged type (inference-pending, tool-execution)
  - `category` 'AGENT_REASONING' | 'TOOL_CALLED' | 'AGENT_STATUS', required: Display category — AGENT_REASONING (inference), TOOL_CALLED (tools), AGENT_STATUS (lifecycle); never null
  - `sequenceNumber` number, double: Sequence number; null for tool-execution items
  - `text` string: Whatever the model emitted for inference events (text content or error message). Omitted entirely for other event types — clients format display text for those themselves.
  - `data` AgentSessionManagerSessionsSessionIdMessagesGetResponsesContentApplicationJsonSchemaItemsData, required: Event-specific data. ToolExecutionDataDto for tool-execution items; { pauseDurationMs } for agent-session-resumed; { durationMs, tokenUsage } for inference-succeeded; { durationMs } for inference-failed; { errorMessage, errorCategory } for agent-session-failed; empty object ({}) otherwise.

## Other responses

- `500`: Error response from API

## Changes

- **2026-10-31** `2095cc90e583`: 2 info
  - api tag `Agent Session Manager` added
  - api tag `agentSessionManager` removed

[Operation history](https://skmtc.dev/itential/apis/itential-2/changes/agent-session-manager/sessions/:sessionId/messages/get.md)

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
