---
title: "List reasoning logs for an AI pentest agent"
method: GET
path: "/scans/{scanId}/agents/{agentId}/logs"
tags: ["Scans", "Beta"]
---

# List reasoning logs for an AI pentest agent

`GET /scans/{scanId}/agents/{agentId}/logs`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/scans/{scanId}/agents/{agentId}/logs`
- Auth: API key in header `X-ESCAPE-API-KEY`

Returns reasoning and action logs for a single AI pentest agent within a scan.

## Path parameters

- `scanId` string, uuid, required: The scan ID
- `agentId` string, uuid, required: The agent ID

## Query parameters

- `cursor` string: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned.
- `size` integer: The number of items to return per page
- `sortType` 'DATE': The type to sort by
- `sortDirection` 'asc' | 'desc': The direction to sort by
- `search` string: Search in log titles and descriptions
- `stages` string[]: Filter by log stage

## Response `200`

OK

- object
  - `nextCursor` string, nullable, required
  - `totalCount` integer
  - `data` object[], required
    - `id` string, uuid, required: The id of the reasoning log event
    - `createdAt` string, required: The date and time the log entry was created
    - `title` string, required: The title of the log entry
    - `description` string, required: The reasoning or action description
    - `stage` 'AGENT_ACTION' | 'AGENT_REASONING' | 'CONFIGURATION' | 'EXECUTION', required: The stage of the log entry
    - `level` 'DEBUG' | 'ERROR' | 'INFO' | 'WARNING', required: The level of the log entry

## Other responses

- `400`: Pagination error
- `404`: Not found

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
