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

# Agent files

> List, download, and delete files in a personal CREAO agent's file space via the Developer API.

## Overview

Each personal CREAO agent has a durable file space — the skill folder mounted into sandbox runs (for example `SKILL.md` plus supporting scripts and templates). The Developer API can list those files, fetch a short-lived download URL, and delete a file.

Upload is not available on the Developer API today; use the CREAO web UI or agent runs to add files.

## List files

```bash theme={null}
curl https://developer.creao.ai/v1/agents/00000000-0000-4000-8000-000000000000/files \
  -H "Authorization: Bearer cr_sk_your_key_here"
```

```json theme={null}
{
  "files": [
    {
      "id": "55555555-5555-4555-8555-555555555555",
      "name": "SKILL.md",
      "mime_type": "text/markdown",
      "size_bytes": 1204,
      "sha256": "abc123...",
      "created_at": "2026-07-02T00:00:00.000Z"
    }
  ]
}
```

Agents are capped at **50** files, so this endpoint is not paginated. Listings include the auto-staged `SKILL.md` when present.

## Download a file

```bash theme={null}
curl https://developer.creao.ai/v1/agents/00000000-0000-4000-8000-000000000000/files/55555555-5555-4555-8555-555555555555 \
  -H "Authorization: Bearer cr_sk_your_key_here"
```

```json theme={null}
{
  "id": "55555555-5555-4555-8555-555555555555",
  "name": "notes.txt",
  "mime_type": "text/plain",
  "size_bytes": 12,
  "sha256": null,
  "created_at": "2026-07-02T00:00:00.000Z",
  "download_url": "https://s3.example/notes.txt?X-Amz-Signature=...",
  "download_url_expires_at": "2026-07-02T01:00:00.000Z"
}
```

`download_url` is a presigned URL that expires in **1 hour**.

## Delete a file

```bash theme={null}
curl -X DELETE https://developer.creao.ai/v1/agents/00000000-0000-4000-8000-000000000000/files/55555555-5555-4555-8555-555555555555 \
  -H "Authorization: Bearer cr_sk_your_key_here"
```

```json theme={null}
{
  "deleted": true
}
```

Deleting `SKILL.md` is allowed. CREAO re-stages it automatically the next time the agent's skill content is updated.

## Errors

| Code              | When                                                                |
| ----------------- | ------------------------------------------------------------------- |
| `AGENT_NOT_FOUND` | Agent is missing, not personal, or not owned by the API key account |
| `FILE_NOT_FOUND`  | File ID is unknown or does not belong to this agent                 |
| `INVALID_INPUT`   | Bad UUID path param                                                 |

See also the OpenAPI operations under [Agent Files](/developer-api/agent-files/list-agent-files).
