---
title: "List current user's agent sessions"
method: GET
path: "/agents/sessions"
tags: ["AI", "Agents"]
---

# List current user's agent sessions

`GET /agents/sessions`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/agents/sessions`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

`q` (two characters or more, trimmed) keeps the chats whose title, a message or the name of an object they made contains it (case-insensitive); each result says where in `match`. `project_id` keeps the chats about that project; `limit` and `offset` page the list.

## Query parameters

- `agent_key` string, nullable
- `limit` integer
- `offset` integer
- `include_shared` boolean
- `workspace_id` integer, nullable
- `connection_key` string, nullable
- `q` string, nullable
- `project_id` integer, nullable
- `object_kind` 'workflow' | 'view' | 'dataset' | 'automation' | 'automations' | 'lineage' | 'null', nullable
- `object_id` integer, nullable

## Response `200`

Request fulfilled, document follows

- AgentSessionsResponse
  - `sessions` AgentSessionSummary[], required
    - `session_id` string, required
    - `agent_key` string, required
    - `scope_type` string, required
    - `scope_id` integer, nullable
    - `title` string, nullable
    - `status` string, required
    - `visibility` 'private' | 'shared', required
    - `owner_user_id` integer, required
    - `is_owner` boolean, required
    - `project_scope` string, nullable
    - `project_id` integer, nullable
    - `workflow_id` integer, nullable
    - `scope` AgentObjectScope
      - `kind` 'workflow' | 'dataset', required
      - `id` integer, required
      - `name` string, nullable
      - `project_id` integer, nullable
    - `object_chat` AgentObjectChat
      - `kind` 'workflow' | 'view' | 'dataset' | 'automation' | 'automations' | 'lineage', required
      - `id` integer, required
      - `name` string, nullable
      - `project_id` integer, nullable
      - `dataset_id` integer, nullable
      - `dataset_name` string, nullable
    - `created_at` string, nullable
    - `last_active_at` string, nullable
    - `attention` 'question' | 'approval' | 'stopped' | 'failed' | 'new_result' | 'waiting_job' | 'waiting_time' | 'paused' | 'capped' | 'null', nullable
    - `unseen` boolean
    - `needs_you` boolean
    - `made` AgentSessionMade
      - `kind` string, required
      - `id` union, required
        - integer
        - string
      - `name` string, required
    - `match` AgentSessionMatch
      - `field` 'title' | 'message' | 'made', required
      - `snippet` string, required
    - `pinned_at` string, nullable
    - `title_source` 'auto' | 'result' | 'user' | 'null', nullable

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
