Skip to main content

Agent Filesystem

Every agent has a persistent workspace. The filesystem API gives you full programmatic access to read, write, search, and organize files within any agent’s workspace. All filesystem endpoints follow the pattern: /v1/agent/{agentId}/filesystem/...

Endpoints

File Operations

MethodEndpointDescription
GET/v1/agent/{id}/filesystem/files/{path}Read a file
POST/v1/agent/{id}/filesystem/files/{path}Create a file
PUT/v1/agent/{id}/filesystem/files/{path}Update a file
DELETE/v1/agent/{id}/filesystem/files/{path}Delete a file
PATCH/v1/agent/{id}/filesystem/files/{path}Patch a file (append, prepend, insert, replace)

Directory Operations

MethodEndpointDescription
GET/v1/agent/{id}/filesystem/directories/{path}List directory contents
POST/v1/agent/{id}/filesystem/directories/{path}Create a directory
DELETE/v1/agent/{id}/filesystem/directories/{path}Delete a directory

Bulk Operations

MethodEndpointDescription
POST/v1/agent/{id}/filesystem/copyCopy files or directories
POST/v1/agent/{id}/filesystem/moveMove or rename files
POST/v1/agent/{id}/filesystem/searchSearch by filename or content

Metadata

MethodEndpointDescription
GET/v1/agent/{id}/filesystem/metadata/{path}Get file metadata
PATCH/v1/agent/{id}/filesystem/metadata/{path}Update file metadata

Archives

MethodEndpointDescription
POST/v1/agent/{id}/filesystem/archiveCreate an archive
POST/v1/agent/{id}/filesystem/extractExtract an archive
For a conceptual guide, see Filesystem Management.