Docs

Files

Read and write files in the sandbox work folder.

For your agent

agental.io/docs/files.md
PUT/v1/sandboxes/{id}/files
http
PUT /v1/sandboxes/{id}/files

{"path":"app/main.py","text":"print('hello')\n"}
GET/v1/sandboxes/{id}/files?path=
json
{"path":"app/main.py","encoding":"text","text":"print('hello')\n"}
  • path is relative to /opt/agental. Absolute paths and .. are refused. Missing folders are created.
  • For binary files, send base64 instead of text, and read with &encoding=base64.
  • A file can be up to 10 MB. For more, use commands: git clone, curl -O, tar.
  • A missing file answers 404 file_not_found.

The full machine-readable reference is OpenAPI 3.1. Every page as Markdown, for an agent: llms.txt. Questions: [email protected]