---
title: "Get Session by ID"
method: GET
path: "/sessions/{session_id}"
tags: ["Sessions"]
---

# Get Session by ID

`GET /sessions/{session_id}`

Retrieve detailed information about a specific session including metadata, configuration, and run history. Response schema varies based on session type (agent, team, or workflow).

## Path parameters

- `session_id` string, required — Session ID to retrieve

## Query parameters

- `type` 'agent' | 'team' | 'workflow'
- `user_id` string, nullable — User ID to query session from
- `db_id` string, nullable — Database ID to query session from
- `table` string, nullable — Table to query session from

## Response `200`

Session details retrieved successfully

- union
  - AgentSessionDetailSchema
    - `user_id` string, nullable — User ID associated with the session
    - `agent_session_id` string, required — Unique agent session identifier
    - `session_id` string, required — Session identifier
    - `session_name` string, required — Human-readable session name
    - `session_summary` object, nullable — Summary of session interactions
    - `session_state` object, nullable — Current state of the session
    - `agent_id` string, nullable — Agent ID used in this session
    - `total_tokens` integer, nullable — Total tokens used in this session
    - `agent_data` object, nullable — Agent-specific data
    - `metrics` object, nullable — Session metrics
    - `metadata` object, nullable — Additional metadata
    - `chat_history` object[], nullable — Complete chat history
    - `created_at` string, date-time, nullable — Session creation timestamp
    - `updated_at` string, date-time, nullable — Last update timestamp
  - TeamSessionDetailSchema
    - `session_id` string, required — Unique session identifier
    - `session_name` string, required — Human-readable session name
    - `user_id` string, nullable — User ID associated with the session
    - `team_id` string, nullable — Team ID used in this session
    - `session_summary` object, nullable — Summary of team interactions
    - `session_state` object, nullable — Current state of the session
    - `metrics` object, nullable — Session metrics
    - `team_data` object, nullable — Team-specific data
    - `metadata` object, nullable — Additional metadata
    - `chat_history` object[], nullable — Complete chat history
    - `created_at` string, date-time, nullable — Session creation timestamp
    - `updated_at` string, date-time, nullable — Last update timestamp
    - `total_tokens` integer, nullable — Total tokens used in this session
  - WorkflowSessionDetailSchema
    - `user_id` string, nullable — User ID associated with the session
    - `workflow_id` string, nullable — Workflow ID used in this session
    - `workflow_name` string, nullable — Name of the workflow
    - `session_id` string, required — Unique session identifier
    - `session_name` string, required — Human-readable session name
    - `session_data` object, nullable — Complete session data
    - `session_state` object, nullable — Current workflow state
    - `workflow_data` object, nullable — Workflow-specific data
    - `metadata` object, nullable — Additional metadata
    - `created_at` string, date-time, nullable — Session creation timestamp
    - `updated_at` string, date-time, nullable — Last update timestamp

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Session not found
- `422` — Invalid session type
- `500` — Internal Server Error

---

[API](https://skmtc.net/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.net/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agno/agno-api-reference/versions/5f6149d395d0/schema)
