Documentation Index
Fetch the complete documentation index at: https://docs.crewship.ai/llms.txt
Use this file to discover all available pages before exploring further.
Files and Output
Every crew container has a structured file system that separates agent workspaces, output, secrets, and shared space. Crewship provides REST APIs for listing, uploading, and downloading files, plus real-time WebSocket events for file changes.Agent File System Layout
Inside each crew container, the file system is organized into purpose-specific directories:| Directory | Purpose | Visibility |
|---|---|---|
/workspace/ | Temporary files, scratch space for agent work | Internal to container |
/output/{slug}/ | Agent output files | Visible in UI Files panel |
/crew/shared/ | Files shared between all agents in the crew | All agents in the crew |
/secrets/{slug}/ | Credential files (read-only) | Per-agent, injected at startup |
/crew/agents/{slug}/ | Agent home directory with memory and config | Per-agent |
File Listing
List files for a specific agent or an entire crew.Agent Files
| Parameter | Type | Description |
|---|---|---|
recursive | boolean | List files recursively (default: false) |
subdir | string | Subdirectory to list within the agent’s output |
Crew Files
| Parameter | Type | Description |
|---|---|---|
agent_slug | string | Filter files by a specific agent slug |
recursive | boolean | List files recursively (default: false) |
subdir | string | Subdirectory to list |
File Download
Download a file from an agent’s or crew’s container.Agent File Download
Crew File Download
application/octet-stream with a Content-Disposition header for the filename.
File Upload
Upload a file to an agent’s or crew’s container.Agent File Save
Crew File Save
path query parameter specifies the destination path inside the container.
File save operations require the
create permission (MEMBER role or above). VIEWER role users cannot upload files.Output Directory Convention
Agents write their output to/output/{agent-slug}/. This directory is the primary location surfaced in the UI Files panel. When an agent produces artifacts (generated code, reports, images), they should be written to this directory.
Shared Crew Space
The/crew/shared/ directory is accessible to all agents in a crew. Use it for:
- Shared configuration files
- Inter-agent data exchange
- Common resources needed by multiple agents
/crew/shared/.memory/ subdirectory holds crew shared memory — FTS5-indexed knowledge shared across all agents. The Lead agent writes to CREW.md and topics/*.md; all agents can search it. See the Memory System guide for details.
File Events via WebSocket
File changes inside crew containers are broadcast in real-time via WebSocket on thefiles:{crewId} channel.
Subscribing
Event Types
| Event | Description |
|---|---|
file_created | A new file was created in the output directory |
file_modified | An existing file was modified |
file_deleted | A file was deleted |
Event Payload
File watching uses
fsnotify under the hood. The file watcher monitors the storage base path for changes and broadcasts events to all WebSocket clients subscribed to the relevant crew channel.Channel Authorization
Subscribing tofiles:{crewId} requires membership in the crew’s workspace. The WebSocket hub verifies workspace membership before allowing the subscription.
What’s Next
WebSocket Reference
Full WebSocket protocol reference including all channel types and event formats.
Container Isolation
How file system permissions and UID boundaries protect agent data.