Skip to main content
POST
/
v1
/
agents
/
sessions
/
list
List Sessions
curl --request POST \
  --url https://api.mixpeek.com/v1/agents/sessions/list \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "active",
  "filters": {},
  "sort": {}
}
'
{
  "results": [
    {
      "session_id": "<string>",
      "namespace_id": "<string>",
      "internal_id": "<string>",
      "agent_config": {
        "model": "gemini-2.0-flash",
        "temperature": 0.7,
        "max_tokens": 4096,
        "system_prompt": "You are a helpful AI assistant with access to Mixpeek's data infrastructure.",
        "available_tools": [
          "<string>"
        ]
      },
      "status": "active",
      "message_count": 123,
      "stats": {
        "total_messages": 0,
        "total_tokens": 0,
        "total_tool_calls": 0,
        "avg_latency_ms": 0
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "last_activity_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "user_id": "<string>",
      "session_name": "<string>",
      "user_memory": {}
    }
  ],
  "total": 123,
  "pagination": {}
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer YOUR_API_KEY"

"Bearer YOUR_STRIPE_API_KEY"

X-Namespace
string

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Query Parameters

limit
integer | null
Required range: 1 <= x <= 1000
offset
integer | null
Required range: 0 <= x <= 10000
cursor
string | null
include_total
boolean
default:false

Body

application/json

Request payload for listing sessions.

Attributes: status: Optional status filter filters: Optional additional filters sort: Optional sort configuration

Example: python request = ListSessionsRequest( status="active", filters={"user_id": "user_123"} )

status
enum<string> | null

Filter by session status

Available options:
active,
idle,
archived,
terminated
filters
Filters · object

Additional filters

sort
Sort · object

Sort configuration

Response

Successful Response

Response for listing sessions.

Attributes: results: List of session summaries total: Total number of sessions matching query pagination: Pagination information

Example: python response = ListSessionsResponse( results=[...], total=50, pagination={...} )

results
GetSessionResponse · object[]
required

Session list

total
integer
required

Total matching sessions

pagination
Pagination · object
required

Pagination information