File Manager
Introduction
The File Manager tool gives the agent access to the file system through Laravel's storage abstraction. It can use any disk configured in config/filesystems.php and listed in LARACLAW_ALLOWED_DISKS.
Allowed Disks
The agent can only see disks listed in filesystem.allowed_disks:
LARACLAW_ALLOWED_DISKS=local,public,s3
Disks not in the list are invisible to the agent. The default is local.
Reading and Writing
| Operation | Required parameters | Notes |
|---|---|---|
list | disk, path | Returns files and directories at the path |
read | disk, path | Truncated at 100 KB. Binary files are rejected. |
write | disk, path, content | Overwrites if the file exists |
append | disk, path, content | Creates the file if it doesn't exist |
exists | disk, path | Returns whether the file is present |
mkdir | disk, path | Auto-renames if the directory already exists |
Moving, Copying, and Deleting
| Operation | Required parameters | Notes |
|---|---|---|
move | disk, path, destination | Auto-renames the destination on collision |
copy | disk, path, destination | Auto-renames the destination on collision |
delete | disk, path (or paths) | Requires confirmation. Supports batch delete. |
delete prompts the user for yes/no confirmation through the connector before any file is removed.
Saving Inbound Attachments
When a user sends a file in chat, the agent can save it to a disk with save_attachment:
| Parameter | Description |
|---|---|
source | The path of the inbound attachment (provided to the agent in conversation metadata) |
disk | Destination disk |
path | Destination path. Auto-renamed on collision. |
Attaching Files to a Reply
attach_to_reply sends a file from any allowed disk back to the user as part of the reply:
| Parameter | Description |
|---|---|
disk | Source disk |
path | Source file path |
The file is staged in outbound/{message_uuid}/ and delivered by the connector when the agent's reply is sent.
Downloading Remote Files
The download_url operation fetches a remote file and saves it to a disk:
| Parameter | Description |
|---|---|
url | The URL to download |
disk | Destination disk |
path | Destination path or directory. If path has no extension, the filename is derived from the URL. |
The download has a 30 second timeout.
Protected Paths
The agent cannot list, read, write, move, or delete the inbound or outbound attachment directories on the attachments disk. They are reserved for Laraclaw's message-attachment lifecycle. See Attachments for the full picture.
This is the only protection. Everything else inside an allowlisted disk is fully readable and writable by the agent.
Allowlisting Disks
The File Manager and Image Manager can only see disks listed in LARACLAW_ALLOWED_DISKS:
LARACLAW_ALLOWED_DISKS=local
The default is local. In a stock Laravel install, the local disk points at storage/app/private/ — a Laravel-managed application folder, not the project root and not the system root. The agent cannot read .env, app/, vendor/, or config/ through this disk because they are outside its root.
Two things to keep in mind:
- Custom disks. If you've remapped
local(or any disk you allowlist) to point somewhere broader — say, the project root or a shared NFS mount — the agent will see everything inside it. Audit yourconfig/filesystems.phpbefore adding a disk to the allowlist. - The agent folder.
laraclaw/holds the instructions, personas, and skills, and lives at the project root by default, where it is not reachable through the stocklocaldisk. If you add a disk that does reach them, the agent could rewrite its own behavior on the fly. Keep those directories out of any allowlisted disk's root.
The safest production posture is a dedicated disk pointed at a folder you've created specifically for the agent to use (storage/app/agent, an S3 bucket, etc.) and nothing else in the allowlist.