---
title: "Read one window of a text file on an agent's disk"
method: GET
path: "/v1/agents/{agentID}/files/read"
---

# Read one window of a text file on an agent's disk

`GET /v1/agents/{agentID}/files/read`

## Request

- Base URL: `https://api.plori.ai`
- URL: `https://api.plori.ai/v1/agents/{agentID}/files/read`
- Auth: HTTP bearer

Returns `text/plain` for a text file. This is the editor route: a file that is not text answers 415, and a file over the 2 MiB text cap answers 413 unless a window was asked for. Both refusals carry a `download_url` for the route that does serve those bytes. Use `offset` and `limit` to page through a file of any size; every 200 states what it covered in `X-File-Offset`, `X-File-Returned-Bytes`, `X-File-Size` and `X-File-Truncated`, so a short body is never silent. The disk is served directly, so an idle agent's files are readable with no running pod.

## Path parameters

- `agentID` string, uuid, required

## Query parameters

- `path` string, required
- `offset` integer
- `limit` integer

## Response `200`

The requested window of the file, as text.

## Other responses

- `400`: Malformed request.
- `401`: Missing or invalid credential.
- `403`: The resource belongs to another account.
- `404`: No such resource.
- `413`: The file is over the text cap and no window was asked for. The body carries `size`, `cap` and `download_url`.
- `415`: The file is not text. The body carries `download_url` for the route that streams its bytes.

---

[API](https://skmtc.dev/plori/apis/plori-rest-api.md) · [All operations](https://skmtc.dev/plori/apis/plori-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/plori/apis/plori-rest-api/revisions/15c4f9260dff?raw)
