Overview
Every agent on the Shinzo Platform has a persistent workspace — an isolated filesystem where it can store configuration, data, and generated artifacts. 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:workspace/config.json, you would call:
File Operations
Read a File
Retrieve the contents of a file from an agent’s workspace:utf-8 (default) or base64 encoding by passing the encoding query parameter. Use base64 for binary files such as images or compiled assets.
Create a File
Create a new file in the agent workspace:Update a File
Replace the contents of an existing file:Delete a File
Remove a file from the workspace:Patch a File
Apply partial updates to a file without replacing its entire contents. Supported operations areappend, prepend, insert, and replace.
Directory Operations
List a Directory
List the contents of a directory in the agent workspace:Create a Directory
recursive to true to create parent directories that do not exist yet.
Delete a Directory
Bulk Operations
Copy
Copy a file or directory to a new location within the workspace:Move
Move or rename a file or directory:Search
Search for files by name, content, or both within an agent’s workspace:Archives
Create an Archive
Package files and directories into a compressed archive:zip, tar, tar.gz, tar.bz2.
Extract an Archive
Extract an archive into a target directory:File Metadata
Get Metadata
Retrieve metadata for a file or directory, including size, permissions, and timestamps:Update Metadata
Update file permissions, ownership, or tags:Practical Examples
Seeding an Agent Workspace
After creating an agent, populate its workspace with configuration and data files:Backing Up Agent Data
Create a compressed archive of important workspace data:Best Practices
- Use
initial_filesfor bootstrapping. Provide configuration and seed data at agent creation time rather than making separate API calls afterward. - Use
base64encoding for binary files. Text files work with the defaultutf-8, but images, compiled assets, and other binary content requirebase64. - Prefer
patchover full updates for large files. Appending log entries or inserting content at a specific position is more efficient than re-uploading the entire file. - Set
overwrite: falseas a safety measure. This prevents accidental data loss when creating or copying files. - Organize workspaces with clear directory structures. Use consistent paths like
config/,data/, andoutput/across your agents.
Next Steps
Agent Configuration
Configure agent workspaces, memory, and initial files.
Agent Messaging
Send messages to agents and retrieve conversation history.

