Skip to main content
GET
/
agents
/
{agent_id}
/
sessions
cURL
curl 'https://api.gumloop.com/api/v1/agents/abc123DEFghiJKL/sessions?page_size=20' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
  "sessions": [
    {
      "id": "sess_xYz789AbCd",
      "agent_id": "abc123DEFghiJKL",
      "name": "Research task",
      "type": "api",
      "messages": [],
      "created_at": "2026-05-15T14:32:00Z",
      "state": "completed",
      "agent_name": "Sales research agent",
      "creator": {
        "id": "user_2b9d71f0",
        "first_name": "Ada",
        "last_name": "Lovelace",
        "email": "ada@example.com",
        "profile_picture": null
      }
    },
    {
      "id": "sess_AbC123dEfG",
      "agent_id": "abc123DEFghiJKL",
      "name": "Follow-up call",
      "type": "web",
      "messages": [],
      "created_at": "2026-05-14T09:15:00Z",
      "state": "completed",
      "agent_name": "Sales research agent",
      "creator": {
        "id": "user_2b9d71f0",
        "first_name": "Ada",
        "last_name": "Lovelace",
        "email": "ada@example.com",
        "profile_picture": null
      }
    }
  ],
  "next_cursor": "eyJzb3J0X3ZhbHVlIjoiMjAyNi0wNS0xNFQwOToxNTowMFoifQ=="
}

Authorizations

Authorization
string
header
required

A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.

Path Parameters

agent_id
string
required

ID of the agent whose sessions to list.

Query Parameters

page_size
integer
default:20

Number of sessions to return per page. Defaults to 20, maximum 100.

Required range: 1 <= x <= 100
cursor
string

Cursor for the next page of results. Use the next_cursor value from a previous response.

Free-text search query to filter sessions by name or content. Also accepted as search_query.

sort_order
string

Sort order for the results (e.g. newest or oldest).

type
string

Filter sessions by type (e.g. api, web, slack).

state
enum<string>

Filter sessions by state.

Available options:
processing,
completed,
failed,
queued,
idle
creator_user_id
string

Filter sessions by the user who created them.

trigger_id
string

Filter sessions by the trigger that initiated them.

Response

A paginated list of sessions.

sessions
object[]
next_cursor
string | null

Cursor to pass as the cursor query parameter to retrieve the next page. null when there are no more results.

Example:

"eyJzb3J0X3ZhbHVlIjoiMjAyNi0wNS0xNVQxNDozMjowMFoiLCJpbnRlcmFjdGlvbl9pZCI6InNlc3NfeFl6Nzg5QWJDZCIsInNvcnRfYnkiOiJuZXdlc3QifQ=="