Workspace: File Write
Agent Workspace
File Write
Create or overwrite a file in the agent’s workspace filesystem
POST
Workspace: File Write
Create or overwrite a file in the per-agent workspace filesystem. When
create_dirs is true, any missing parent directories are created automatically.
Path Parameters
string
required
Agent ID (UUID)
Request Body
string
required
Destination file path relative to the workspace root.
string
required
Full file content. Existing files are overwritten.
boolean
default:true
When
true, missing parent directories are created automatically.Response
string
Result status (e.g.,
ok).string
Path of the file that was written.
Example Request
Notes
file_writeoverwrites existing files. To modify an existing file in place, prefer File Edit or Multi Edit.- Paths must be relative to the workspace root.
See Also
Authorizations
API Key for authentication
Path Parameters
Body
application/json
Relative path where the file should be written. Creates or overwrites the file.
Example:
"output/report.txt"
Complete content to write. A string is written verbatim; a JSON object/array is auto-serialized to pretty JSON.
Example:
"Hello World\n"
If true, creates parent directories automatically if they don't exist.

