Download raw agent runtime logs

GET /api/v1/projects/{id}/agent-logs/export

Streams customer-visible workspace log records for one required service and up to 24 hours from at most 20 MiB of compressed source objects as normalized AgentLogEntry gzip JSON Lines. The end-to-end export timeout is 30 minutes. Processing is capped at 100 MiB of decoded input and 20 MiB of compressed response output. Records are filtered to the authorized project, workspace, and service; other interactive filters are not supported. Clients must consume and validate the gzip stream to EOF because an interrupted stream can retain HTTP 200 but have an invalid gzip trailer. 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

  • workspace_id string Required

    Workspace identifier

  • service string Required

    Runtime service: agent-execution-runtime or tool-executor (agent and tool aliases accepted)

  • start_time string

    RFC3339 start time (default: 1 hour ago)

  • end_time string

    RFC3339 end time (default: now)

Responses

  • 200 application/gzip

    OK

    Hide headers attribute Show headers attribute
    • Content-Disposition string

      Attachment filename

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 403 application/json

    Forbidden

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 413 application/json

    Request Entity Too Large

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 429 application/json

    Too Many Requests

    Hide headers attribute Show headers attribute
    • Retry-After string

      Seconds before retrying

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 503 application/json

    Service Unavailable

    Hide headers attribute Show headers attribute
    • Retry-After string

      Seconds before retrying

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 504 application/json

    Gateway Timeout

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
GET /api/v1/projects/{id}/agent-logs/export
curl \
 --request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/agent-logs/export?workspace_id=string&service=string' \
 --header "Authorization: $API_KEY"
Response examples (400)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (403)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (404)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (413)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (429)
# Headers
Retry-After: string

# Payload
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (500)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (503)
# Headers
Retry-After: string

# Payload
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (504)
{
  "code": "string",
  "error": "string",
  "success": true
}