> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attaxr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents

> Recorded agent sessions and their execution timelines.

Aquila records every agent run as a session. A session groups the execution
events of one run, so you can replay what the agent did and when.

## List sessions

`GET /api/agents` returns the paginated session list. `?scanId=` narrows the
list to one scan.

## Read the timeline

`GET /api/agents/{id}/events` returns the chronological execution events for
one session: tool calls, streamed output, and results. The chat canvas reads
this endpoint to render a live timeline.

## Manage sessions

* `GET /api/agents/{id}` — one session.
* `DELETE /api/agents/{id}` — delete a session.
* `POST /api/agents/stop` — stop running sessions.
* `POST /api/agents/bulk-delete` — delete many sessions.

Stop and bulk-delete need the owner or admin role. Both take an id list:

```json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
{ "ids": ["run_1", "run_2"] }
```

Sessions belong to their owner. List, get, and delete return `404` for ids
that belong to another user.
