# Get agent runtime logs **GET /api/v1/projects/{id}/agent-logs** Retrieve gzipped JSONL log batches written by the agent runtime to S3 for a workspace. The project scope is carried by the route id path parameter and the org is derived from that project. ## Servers - https://agentengine.mongodb.com: https://agentengine.mongodb.com () ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **id** (string) Project ID ### Query parameters - **workspace_id** (string) Workspace identifier - **start_time** (string) RFC3339 start time (default: 1 hour ago; range must not exceed 6 hours) - **end_time** (string) RFC3339 end time (default: now; range must not exceed 6 hours) - **limit** (integer) Max entries (default 500, max 5000) - **cursor** (string) Opaque pagination cursor from a previous response - **level** (string) Log levels to match exactly, comma- or space-separated (DEBUG, INFO, WARNING, ERROR; warn/err aliases also accepted). Breaking change from the prior minimum-severity filter: level=INFO now returns INFO only, not INFO+WARNING+ERROR. - **execution_id** (string) Filter by execution ID (exact match) - **session_id** (string) Filter by session ID (exact match) - **source** (string) Source(s) to match exactly, comma- or space-separated (stdout, stderr, python-logging, node-logging) - **service** (string) Service(s) to match exactly, comma- or space-separated (agent-execution-runtime, tool-executor; agent/tool aliases also accepted) - **search** (string) Case-insensitive substring match on message or boot ID - **order** (string) Sort order: asc (default, oldest-first) or desc (newest-first) - **tail** (boolean) Return only the latest entries as a single page (mutually exclusive with cursor) ## Responses ### 406 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. #### Body: application/json (object) - **badRequestDetail** (object) Optional validation details defined by the standard error schema; API negotiation errors do not emit this field. - **detail** (string) Human-readable error details. - **error** (integer) HTTP status code. - **errorCode** (string) Machine-readable error code. - **parameters** (array[string]) Request parameter names associated with the error; omitted when none apply. - **reason** (string) HTTP status reason phrase. ### 200 OK #### Body: application/json (object) - **hasMore** (boolean) - **logs** (array[object]) - **nextCursor** (string) ### 400 Bad Request #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 403 Forbidden #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 404 Not Found #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 429 Too Many Requests #### Headers - **Retry-After** (string) Seconds before retrying #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 500 Internal Server Error #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) ### 503 Service Unavailable #### Headers - **Retry-After** (string) Seconds before retrying #### Body: application/json (object) - **code** (string) - **error** (string) - **success** (boolean) [Powered by Bump.sh](https://bump.sh)