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

# Get a session by ID

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

## Request

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

Returns a session by ID.

## Path parameters

- `sessionId` string, required

## Response `200`

result

- AgentSessionManagerGetSessionResponse200
  - `sessionId` string: The session ID assigned by AEE
  - `agentDefinitionId` string, required: The agent definition ID
  - `agentSnapshot` AgentSessionManagerSessionsSessionIdGetResponsesContentApplicationJsonSchemaAgentSnapshot: Snapshot of the agent configuration at session start time
    - `_id` string, required: Agent definition ID
    - `name` string, required: Agent name
    - `description` string, required: Agent description
    - `instructions` string, required: Agent instructions
    - `namespace` AgentSessionManagerSessionsSessionIdGetResponsesContentApplicationJsonSchemaAgentSnapshotNamespace: Parent project namespace info
      - `_id` string, required: Project UUID
      - `name` string, required: Project name
  - `status` 'PENDING' | 'RUNNING' | 'PAUSING' | 'PAUSED' | 'COMPLETE' | 'FAILED' | 'CANCELING' | 'CANCELED', required: Current session status
  - `startedAt` string, date-time: Session start timestamp (engine-authoritative)
  - `endTime` string, date-time: Session end timestamp
  - `duration` number, double: Session duration in milliseconds
  - `createdAt` string, date-time, required: Session creation timestamp
  - `createdBy` string, required: User who created the session
  - `provider` string: Infrastructure provider (e.g. aws, gcp)
  - `modelVersion` string: Model version used
  - `sessionType` 'root' | 'child': Session type
  - `trigger` AgentSessionManagerSessionsSessionIdGetResponsesContentApplicationJsonSchemaTrigger: Trigger context for trigger-fired sessions. source is the name of the firing user for manual triggers, or set as the name of the trigger for all other trigger types.
    - `type` 'eventSystem' | 'endpoint' | 'schedule' | 'manual' | 'job' | 'session', required: Trigger type that started the session
    - `name` string, required: Name of the trigger that fired the session
    - `source` string, required: For manual and API triggers, the username of the person who started the session. For schedule and event triggers, the name of the trigger.
  - `canceledBy` string: User who canceled the session
  - `errorMessage` string: Error message if session failed
  - `errorCategory` string: Error category if session failed
  - `durationMs` number, double: Session duration in milliseconds
  - `iterationCount` number, double: Number of inference iterations
  - `toolGroupCount` number, double: Number of tool groups dispatched
  - `totalToolCallCount` number, double: Total number of tool calls made
  - `totalInputTokens` number, double: Total input tokens consumed across all inferences
  - `totalOutputTokens` number, double: Total output tokens produced across all inferences
  - `totalTokens` number, double: Combined total tokens consumed across all inferences (input + output)
  - `inputs` AgentSessionManagerSessionsSessionIdGetResponsesContentApplicationJsonSchemaInputs: Inputs passed when starting the session

## 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/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)
