GET /api/v1/projects/{id}/execution-logs

Fetches execution logs for a session via the workspace Orchestration Engine. The project scope is carried by the route id path parameter and the org is derived from that project.

Path parameters

  • id string Required

    Project ID

Query parameters

  • session_id string Required

    Session ID

  • since string

    RFC3339 timestamp filter

  • after string

    Opaque cursor returned as next_cursor by the previous response

  • workspace_id string

    Workspace ID for workspace resolution

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.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Optional validation details defined by the standard error schema; API negotiation errors do not emit this field.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Fields with validation failures.

        Hide fields attributes Show fields attributes object

        A field and its validation failure.

        • description string Required

          Human-readable validation failure.

        • field string Required

          Name or path of the invalid request field.

    • detail string Required

      Human-readable error details.

    • error integer Required

      HTTP status code.

    • errorCode string Required

      Machine-readable error code.

    • parameters array[string]

      Request parameter names associated with the error; omitted when none apply.

    • reason string Required

      HTTP status reason phrase.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Optional validation details defined by the standard error schema; API negotiation errors do not emit this field.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Fields with validation failures.

        Hide fields attributes Show fields attributes object

        A field and its validation failure.

        • description string Required

          Human-readable validation failure.

        • field string Required

          Name or path of the invalid request field.

    • detail string Required

      Human-readable error details.

    • error integer Required

      HTTP status code.

    • errorCode string Required

      Machine-readable error code.

    • parameters array[string]

      Request parameter names associated with the error; omitted when none apply.

    • reason string Required

      HTTP status reason phrase.

  • 200

    OK

    Hide response attributes Show response attributes object
    • count integer
    • has_more boolean
    • logs array[object]
      Hide logs attributes Show logs attributes object
      • a2a_caller_workspace_id string
      • a2a_parent_execution_id string
      • a2a_target_agent_id string
      • a2a_target_agent_name string
      • completion_tokens integer
      • cost_usd number
      • decision string
      • duration_ms number
      • error string
      • execution_id string
      • guardrail_action string

        Guardrail decision fields (populated for kind="guardrail" logs by LogGuardrailDecision). These are top-level fields on the OE document; mapping them here ensures the API Gateway passes them through to the UI rather than dropping them during struct unmarshal.

      • guardrail_name string
      • guardrail_type string
      • id string
      • inputs object

        Additional properties are allowed.

      • kind string

        Kind is "llm" for LLM calls, "tool" for ordinary tools, "memory" for memory operations, "a2a" for agent-to-agent calls, "guardrail" for guardrail decision events, and "policy" for platform-policy decision events.

        Values are llm, tool, memory, a2a, guardrail, or policy.

      • log_source string

        LogSource identifies the platform component that recorded this log row (for example, "memory_proxy" for rows written by the platform's memory proxy). Empty for rows recorded from agent-driven calls.

      • metadata object

        Additional properties are allowed.

      • model string
      • org_id string
      • pod_name string

        Hostname/pod name where tool was executed

      • project_id string
      • prompt_tokens integer

        Token usage and cost fields (populated for invoke_llm calls)

      • root_execution_id string
      • root_session_id string
      • session_id string
      • span_id string
      • status string

        Step outcome; includes "cancelled" for caller-cancelled memory turn writes.

      • step_number integer

        StepNumber identifies the step within its execution. It is what ties a log row to the step a client is looking at elsewhere — omit it here and the row still arrives, but nothing can say which step it belongs to.

      • timestamp string(date-time)
      • tool string
      • tool_api_error object
        Hide tool_api_error attributes Show tool_api_error attributes object
        • classification string
        • error_code string
        • http_status integer
        • provider_type string
        • reason string
        • retryable boolean

          True if a new provider call might succeed (429/503/timeout/connect). Must not replay this tool call.

      • tool_call_id string

        ToolCallID is the stable LLM tool-call id. Joins a tool call's start/result execution-log records to each other and to the session message. Empty for invoke_llm and other non-tool-call events.

      • total_tokens integer
      • trace_id string
      • triggered_policy_ids array[string]
      • user_id string
      • workspace_id string
    • next_cursor string

      NextCursor is the opaque after token for the next poll. Omitted when OE sent no position (empty first page).

    • success boolean
    Hide response attributes Show response attributes object
    • count integer
    • has_more boolean
    • logs array[object]
      Hide logs attributes Show logs attributes object
      • a2a_caller_workspace_id string
      • a2a_parent_execution_id string
      • a2a_target_agent_id string
      • a2a_target_agent_name string
      • completion_tokens integer
      • cost_usd number
      • decision string
      • duration_ms number
      • error string
      • execution_id string
      • guardrail_action string

        Guardrail decision fields (populated for kind="guardrail" logs by LogGuardrailDecision). These are top-level fields on the OE document; mapping them here ensures the API Gateway passes them through to the UI rather than dropping them during struct unmarshal.

      • guardrail_name string
      • guardrail_type string
      • id string
      • inputs object

        Additional properties are allowed.

      • kind string

        Kind is "llm" for LLM calls, "tool" for ordinary tools, "memory" for memory operations, "a2a" for agent-to-agent calls, "guardrail" for guardrail decision events, and "policy" for platform-policy decision events.

        Values are llm, tool, memory, a2a, guardrail, or policy.

      • log_source string

        LogSource identifies the platform component that recorded this log row (for example, "memory_proxy" for rows written by the platform's memory proxy). Empty for rows recorded from agent-driven calls.

      • metadata object

        Additional properties are allowed.

      • model string
      • org_id string
      • pod_name string

        Hostname/pod name where tool was executed

      • project_id string
      • prompt_tokens integer

        Token usage and cost fields (populated for invoke_llm calls)

      • root_execution_id string
      • root_session_id string
      • session_id string
      • span_id string
      • status string

        Step outcome; includes "cancelled" for caller-cancelled memory turn writes.

      • step_number integer

        StepNumber identifies the step within its execution. It is what ties a log row to the step a client is looking at elsewhere — omit it here and the row still arrives, but nothing can say which step it belongs to.

      • timestamp string(date-time)
      • tool string
      • tool_api_error object
        Hide tool_api_error attributes Show tool_api_error attributes object
        • classification string
        • error_code string
        • http_status integer
        • provider_type string
        • reason string
        • retryable boolean

          True if a new provider call might succeed (429/503/timeout/connect). Must not replay this tool call.

      • tool_call_id string

        ToolCallID is the stable LLM tool-call id. Joins a tool call's start/result execution-log records to each other and to the session message. Empty for invoke_llm and other non-tool-call events.

      • total_tokens integer
      • trace_id string
      • triggered_policy_ids array[string]
      • user_id string
      • workspace_id string
    • next_cursor string

      NextCursor is the opaque after token for the next poll. Omitted when OE sent no position (empty first page).

    • success boolean
  • Bad Request

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • Unauthorized

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 425

    Workspace orchestration engine is not ready

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • Internal Server Error

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • Bad Gateway

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
GET /api/v1/projects/{id}/execution-logs
curl \
 --request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/execution-logs?session_id=string' \
 --header "Authorization: $API_KEY"
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"
}
{
  "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,
  "has_more": true,
  "logs": [
    {
      "a2a_caller_workspace_id": "string",
      "a2a_parent_execution_id": "string",
      "a2a_target_agent_id": "string",
      "a2a_target_agent_name": "string",
      "completion_tokens": 42,
      "cost_usd": 42.0,
      "decision": "string",
      "duration_ms": 42.0,
      "error": "string",
      "execution_id": "string",
      "guardrail_action": "string",
      "guardrail_name": "string",
      "guardrail_type": "string",
      "id": "string",
      "inputs": {},
      "kind": "llm",
      "log_source": "string",
      "metadata": {},
      "model": "string",
      "org_id": "string",
      "pod_name": "string",
      "project_id": "string",
      "prompt_tokens": 42,
      "root_execution_id": "string",
      "root_session_id": "string",
      "session_id": "string",
      "span_id": "string",
      "status": "string",
      "step_number": 42,
      "timestamp": "2026-05-04T09:42:00Z",
      "tool": "string",
      "tool_api_error": {
        "classification": "string",
        "error_code": "string",
        "http_status": 42,
        "provider_type": "string",
        "reason": "string",
        "retryable": true
      },
      "tool_call_id": "string",
      "total_tokens": 42,
      "trace_id": "string",
      "triggered_policy_ids": [
        "string"
      ],
      "user_id": "string",
      "workspace_id": "string"
    }
  ],
  "next_cursor": "string",
  "success": true
}
Response examples (200)
{
  "count": 42,
  "has_more": true,
  "logs": [
    {
      "a2a_caller_workspace_id": "string",
      "a2a_parent_execution_id": "string",
      "a2a_target_agent_id": "string",
      "a2a_target_agent_name": "string",
      "completion_tokens": 42,
      "cost_usd": 42.0,
      "decision": "string",
      "duration_ms": 42.0,
      "error": "string",
      "execution_id": "string",
      "guardrail_action": "string",
      "guardrail_name": "string",
      "guardrail_type": "string",
      "id": "string",
      "inputs": {},
      "kind": "llm",
      "log_source": "string",
      "metadata": {},
      "model": "string",
      "org_id": "string",
      "pod_name": "string",
      "project_id": "string",
      "prompt_tokens": 42,
      "root_execution_id": "string",
      "root_session_id": "string",
      "session_id": "string",
      "span_id": "string",
      "status": "string",
      "step_number": 42,
      "timestamp": "2026-05-04T09:42:00Z",
      "tool": "string",
      "tool_api_error": {
        "classification": "string",
        "error_code": "string",
        "http_status": 42,
        "provider_type": "string",
        "reason": "string",
        "retryable": true
      },
      "tool_call_id": "string",
      "total_tokens": 42,
      "trace_id": "string",
      "triggered_policy_ids": [
        "string"
      ],
      "user_id": "string",
      "workspace_id": "string"
    }
  ],
  "next_cursor": "string",
  "success": 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 (425)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (425)
{
  "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
}