Retorna as executar da sessão do mais antigo para o mais recente, cada uma com suas etapas em ordem. Uma etapa carrega seu tipo, deslocamento inicial dentro de executar, duração, contagem de tokens, status e step_number.
Respostas
-
Versão da API não compatível ou malformada, uma operação não disponível no contrato publicado selecionado ou uma representação inaceitável (incluindo parâmetros de tipo de mídia não compatíveis ou SSE excluída). As falhas de autenticação, autorização e limite de taxa existentes têm precedência.
-
OK
-
Solicitação inválida
-
Não autorizado
-
Erro interno do servidor
-
Gateway incorreto
GET /api/v1/projeto/{id}/sessões/{session_id}/executar
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/sessions/{session_id}/runs' \
--header "Authorization: $API_KEY"
Exemplos de resposta (406)
Operação indisponível
{
"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"
}
Exemplos de resposta (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"
}
Exemplos de resposta (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
}
Exemplos de resposta (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
}
Exemplos de resposta (400)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (400)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (401)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (401)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (500)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (500)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (502)
{
"code": "string",
"error": "string",
"success": true
}
Exemplos de resposta (502)
{
"code": "string",
"error": "string",
"success": true
}