Skip to content

List active/recent agent sessions for a project

GET
/projects/{id}/agent-sessions
curl --request GET \
--url 'https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/agent-sessions?active=true' \
--header 'Authorization: Bearer <token>'
id
required
string format: uuid

Project UUID

active
string
default: true
Allowed values: true false

When true (default), filters to sessions with last_activity_at within 5 minutes.

Agent sessions

Media type application/json
object
sessions
required
Array<object>
object
session_id
required
string
machine_id
required
string
user_id
required
string
project_id
string | null format: uuid
caller_role
string | null
caller_origin
string | null
connected_at
string | null format: date-time
last_activity_at
required
string format: date-time

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

Forbidden

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number