Available file operations
Read file
Read the contents of a file from the filesystem mount.
Write file
Create a new file or overwrite an existing file with new content.
Edit file
Replace a specific string within a file without rewriting the whole file.
List files
List the files and directories at a given path in the filesystem mount.
Delete file
Permanently remove a file from the filesystem mount.
How file operations work
File operations work with filesystem mounts attached to an agent’s environment. A filesystem mount is a persistent storage volume that exists across agent runs. Files written in one run are available in subsequent runs, making it possible for agents to maintain state, accumulate data, and collaborate on shared files. File operations are built-in tool steps — they do not require an external integration or API credentials.File operations vs. file inputs
File inputs (uploaded through the agent conversation) are read-only references to files provided by a user. File operations, by contrast, work with files stored in the agent’s filesystem mount. Use file operations when:- The agent needs to create or modify files as part of its work
- Files need to persist between agent runs
- The agent is processing, transforming, or building up a file over multiple steps
Choosing the right operation
| Goal | Operation |
|---|---|
| Read the full contents of a file | Read file |
| Create a new file | Write file |
| Overwrite a file with entirely new content | Write file |
| Change a specific part of a file | Edit file |
| See what files exist in a directory | List files |
| Remove a file | Delete file |
All file operations fail safely with a clear error message if the target file or path does not exist, so agents can handle errors explicitly rather than silently producing bad output.

