Returns the session's runs oldest-first, each with its steps in order. A step carries its kind, start offset within the run, duration, token count, status, and step_number.
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
GET
/api/v1/projects/{id}/sessions/{session_id}/runs
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/sessions/{session_id}/runs' \
--header "Authorization: $API_KEY"
Response examples (406)
Operation unavailable
{
"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"
}
Response examples (406)
{
"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"
}
Response examples (200)
{
"count": 42,
"runs": [
{
"active_duration_ms": 42,
"completion_tokens": 42,
"duration_ms": 42,
"error": "string",
"error_code": "string",
"execution_id": "string",
"invoker_user_id": "string",
"memory_recalls": 42,
"memory_saves": 42,
"prompt_tokens": 42,
"run_number": 42,
"session_id": "string",
"slowest_step": {
"duration_ms": 42.0,
"kind": "string",
"name": "string",
"step_number": 42
},
"started_at": "string",
"startup_failure": {
"boot_id": "string",
"code": "string",
"component": "string",
"phase": "string",
"source": "string"
},
"status": "string",
"steps": [
{
"completion_tokens": 42,
"duration_ms": 42.0,
"error": "string",
"kind": "string",
"memory_op": "string",
"name": "string",
"presented": "string",
"presented_truncated": true,
"prompt_tokens": 42,
"review_outcome": "string",
"review_trigger": "string",
"reviewer": "string",
"reviewer_notes": "string",
"run_id": "string",
"span_id": "string",
"start_offset_ms": 42,
"started_at": "string",
"status": "string",
"step_number": 42,
"tool_call_id": "string",
"total_tokens": 42,
"wait_ms": 42
}
],
"summary": "string",
"time_to_first_event_ms": 42,
"total_tokens": 42,
"user_id": "string",
"wait_ms": 42,
"workspace_id": "string"
}
],
"truncated": true
}
Response examples (200)
{
"count": 42,
"runs": [
{
"active_duration_ms": 42,
"completion_tokens": 42,
"duration_ms": 42,
"error": "string",
"error_code": "string",
"execution_id": "string",
"invoker_user_id": "string",
"memory_recalls": 42,
"memory_saves": 42,
"prompt_tokens": 42,
"run_number": 42,
"session_id": "string",
"slowest_step": {
"duration_ms": 42.0,
"kind": "string",
"name": "string",
"step_number": 42
},
"started_at": "string",
"startup_failure": {
"boot_id": "string",
"code": "string",
"component": "string",
"phase": "string",
"source": "string"
},
"status": "string",
"steps": [
{
"completion_tokens": 42,
"duration_ms": 42.0,
"error": "string",
"kind": "string",
"memory_op": "string",
"name": "string",
"presented": "string",
"presented_truncated": true,
"prompt_tokens": 42,
"review_outcome": "string",
"review_trigger": "string",
"reviewer": "string",
"reviewer_notes": "string",
"run_id": "string",
"span_id": "string",
"start_offset_ms": 42,
"started_at": "string",
"status": "string",
"step_number": 42,
"tool_call_id": "string",
"total_tokens": 42,
"wait_ms": 42
}
],
"summary": "string",
"time_to_first_event_ms": 42,
"total_tokens": 42,
"user_id": "string",
"wait_ms": 42,
"workspace_id": "string"
}
],
"truncated": true
}
Response examples (400)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (400)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (401)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (401)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (500)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (500)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (502)
{
"code": "string",
"error": "string",
"success": true
}
Response examples (502)
{
"code": "string",
"error": "string",
"success": true
}