Lists durable conversation sessions across every workspace in the project, with the most recently active first. These sessions contain messages and execution runs. They are separate from runtime sessions, which track reserved sandbox capacity. To get the next page, pass next_cursor from the response as cursor.
Query parameters
-
Max results (default 50, max 200)
-
Restrict to a single workspace
-
Filter by the session's latest execution status
-
Only sessions with activity at or after this RFC3339 time
-
Only sessions with activity before this RFC3339 time
-
Opaque paging token from a previous response's next_cursor
Responses
-
Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence.
-
OK
-
Bad Request
-
Unauthorized
-
Internal Server Error
-
Bad Gateway
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/sessions' \
--header "Authorization: $API_KEY"
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"has_more": true,
"limit": 42,
"next_cursor": "string",
"sessions": [
{
"active_duration_ms": 42,
"created_at": "string",
"first_message_preview": "string",
"last_activity": "string",
"latest_status": "string",
"project_id": "string",
"session_id": "string",
"total_duration_ms": 42,
"total_tokens": 42,
"turns": 42,
"user_id": "string",
"visibility": "string",
"wait_ms": 42,
"workspace_id": "string"
}
],
"total_count": 42,
"truncated": true
}
{
"has_more": true,
"limit": 42,
"next_cursor": "string",
"sessions": [
{
"active_duration_ms": 42,
"created_at": "string",
"first_message_preview": "string",
"last_activity": "string",
"latest_status": "string",
"project_id": "string",
"session_id": "string",
"total_duration_ms": 42,
"total_tokens": 42,
"turns": 42,
"user_id": "string",
"visibility": "string",
"wait_ms": 42,
"workspace_id": "string"
}
],
"total_count": 42,
"truncated": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}