> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the atlanai CLI; `atlanai --map json` prints its command map. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.

# Sessions

> Every published sessions operation, generated from the contract.

12 operations on `client.sessions`, including `sessions.messages`, `sessions.traces`.

Path parameters come first, positionally; the request body is last, as a plain
object. Method names are `snake_case` in Python and `camelCase` in
TypeScript, and resource names follow the same rule.

<CodeGroup>
  ```python Python theme={null}
  result = client.sessions.aggregate(body)
  ```

  ```typescript TypeScript theme={null}
  const result = await client.sessions.aggregate(body);
  ```
</CodeGroup>

## Operations

| Call | Route | Does |
| - | - | - |
| `client.sessions.aggregate(body)` | `POST /agent/v1/sessions/aggregate` | Aggregate sessions |
| `client.sessions.create_record(body)` | `POST /agent/v1/sessions` | Upload a session record |
| `client.sessions.get(session_id)` | `GET /agent/v1/sessions/{session_id}` | Get a session |
| `client.sessions.list()` | `GET /agent/v1/sessions` | List sessions |
| `client.sessions.poll_events(session_id)` | `GET /agent/v1/sessions/{session_id}/events` | Poll the session message log |
| `client.sessions.post_event_events(session_id, body)` | `POST /agent/v1/sessions/{session_id}/events` | Send an event to a delegated session |
| `client.sessions.search(body)` | `POST /agent/v1/sessions/search` | Search sessions |
| `client.sessions.stream_events(session_id)` | `GET /agent/v1/sessions/{session_id}/events/stream` | Stream session turns over SSE |
| `client.sessions.messages.create(session_id, body)` | `POST /agent/v1/sessions/{session_id}/messages` | Record a session turn |
| `client.sessions.messages.get(session_id, message_id)` | `GET /agent/v1/sessions/{session_id}/messages/{message_id}` | Get one recorded turn |
| `client.sessions.messages.list(session_id)` | `GET /agent/v1/sessions/{session_id}/messages` | List a session's recorded turns |
| `client.sessions.traces.list(session_id)` | `GET /agent/v1/sessions/{session_id}/traces` | List traces for a session |

## Related

<CardGroup cols={2}>
  <Card title="How the client is organised" icon="list" href="/tools/sdk/how-tos/operations">
    Resources, call shapes, and errors.
  </Card>

  <Card title="Errors and retries" icon="triangle-exclamation" href="/platform/references/errors-and-retries">
    What the SDK raises, and which calls are safe to retry.
  </Card>
</CardGroup>
