Skip to main content
Trinity
Guides/Agent Files

Agent Files

Two-panel file manager in the Agent Detail Files tab for browsing, previewing, and editing agent workspace files.

How It Works

1

Open the agent detail page and click the Files tab.

2

The left panel displays a file tree with search and expandable directories.

3

The right panel shows a preview of the selected file.

4

Supported previews: images, video, audio, PDF, and text files.

5

Click the edit button on any text file to modify and save it inline.

6

Click New folder on any directory to create a subfolder in place (workspace-confined; edit-protected paths are rejected).

7

Delete files directly from the file manager. Protected path warnings appear for critical files.

8

Toggle Show hidden files to reveal dotfiles (.env, .claude/, etc.).

9

The agent workspace root is /home/developer/.

Content Folder Convention

The content/ directory is gitignored by default. Use it for large generated assets such as images, audio, and video.

Shared Folders

Agents can expose their workspace folder for other agents to mount as a collaboration mechanism.

•Configure in the agent's Sharing tab using the Expose and Consume toggles.
•Permission-gated: only permitted agents can mount a shared folder.
•Relevant API endpoints: GET/PUT /api/agents/{name}/folders, GET /api/agents/{name}/folders/available, GET /api/agents/{name}/folders/consumers.

Outbound File Sharing

Agents can publish files to signed download URLs that work universally — web, Slack, Telegram, WhatsApp, email — without per-channel upload handling.

Enabling File Sharing

1

Open agent detail → Sharing tab

2

In the File Sharing panel, switch the toggle on (it reads Enabled / Disabled)

3

A restart-required banner appears — restart the agent to mount the publish volume

4

After restart, /home/developer/public/ is live

Sharing a File

From inside the agent via MCP share_file tool:

share_file({ filename: "report.csv" })
# Returns: { url, expires_at, size_bytes, mime_type }

The agent drops the file into /home/developer/public/, calls share_file with the filename (optionally display_name and expires_in). Trinity extracts it, stores it securely, and returns a signed URL valid for 7 days.

Opening a link. The link works wherever it is pasted, including in-app browsers on a phone (Telegram, iOS Safari): audio, video, images, and PDFs open inline and stream with range requests, so a voice note plays without a forced download. Anything that could carry script — HTML and SVG — is always delivered as a download. Append ?download=1to force a download for any file. A media player's chunked reads count as one download.

From the UI:

•Active shared files appear in the File Sharing panel with filename, size, expiry, and download count
•Click Copy URL to get the link
•Click Revoke to invalidate a link immediately (returns 410 Gone on download)

Limits

Max file size50 MB per file
Per-agent storage quota500 MB across all active shares
Default expiry7 days
Blocked typesExecutables (PE/ELF/Mach-O), scripts with shebangs

The signed URL is the only credential a download needs: it is not tied to a chat session or a verified email, so a recipient outside Trinity can open it. Revoke the link if it reaches the wrong hands.

API Endpoints

EndpointMethodDescription
/api/agents/{name}/filesGETList workspace files (tree structure)
/api/agents/{name}/filesPUTSave a text file (what the inline editor calls)
/api/agents/{name}/filesDELETEDelete a file (protected paths are refused)
/api/agents/{name}/files/downloadGETDownload file content (100 MB limit)
/api/agents/{name}/files/previewGETFile content with its real MIME type, for previews
/api/agents/{name}/files/mkdirPOSTCreate a directory in the workspace
/api/agents/{name}/file-sharingGETFile sharing status and quota
/api/agents/{name}/file-sharingPUTEnable or disable file sharing (owner/admin)
/api/agents/{name}/shared-filesPOSTMint a download URL for a file in /home/developer/public/
/api/agents/{name}/shared-filesGETList active shared files
/api/agents/{name}/shared-files/{id}DELETERevoke a shared file
/api/files/{file_id}?sig={token}GET / HEADPublic download endpoint; supports Range requests; ?download=1 forces a download

See Also

•Workspace — the Workspace has its own Files tab for files you and the agent exchange in a conversation