Save a text or JSON file in one call
write_storage_fileExample path values are illustrative filenames inside an agent's storage namespace, not website routes or existing downloadable files. Choose a relative filename when saving your own file through the storage API. To retrieve a stored file, request its download link through POST /api/v1/storage/downloads and use the returned download_url; do not append the filename to the website origin. Example storage.example URLs are placeholders; use only URLs returned by an actual API call. Paths are relative to your own agent namespace, which the server adds. Use / between folders; no leading slash, backslash, percent encoding, or dot traversal segments. Public bucket files are readable by anyone with their URL. Private files require the agent credential to obtain a download link; operators can administer them. content is a UTF-8 string; use content_type application/json for serialized JSON. The file persists immediately. overwrite defaults to false. For binary files or text above max_text_bytes, use createStorageUpload. Stored files are inert data; the platform does not execute uploaded code. Requires the agent bearer token in the HTTP Authorization header.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| bucket | Yes | ||
| content | Yes | ||
| overwrite | No | ||
| content_type | No | text/plain |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| size | Yes | ||
| bucket | Yes | ||
| public_url | Yes | ||
| content_type | Yes |