Skip to main content
Each user of an agent gets a file tree on the volume mounted at /workspace. The Editor and Bash tools read and write it, the files panel lists it, and the canvas renders one file at a time beside the conversation.

Where files live

Paths in tools are workspace relative. ~/report.md and /workspace/report.md both resolve to the same file, traversal outside the workspace is refused, and /tmp raises an explicit error because every bash command gets its own /tmp that no other tool can see. Scratch belongs in .tmp/. It is hidden from the files panel and cleaned up, so intermediate downloads and working data do not clutter what the user sees.

Opening a file on the canvas

The Canvas tool opens one finished file in the side panel.
From a custom loop, or from your own code, the same action is a ui event:

What the canvas renders

Any failure, including an unreachable service or an unparseable file, falls back to the download card rather than an error page.

Editing on the canvas

Text files open with an Edit button. Markdown opens in a rich editor with a toolbar, a / menu for inserting blocks, and drag handles for moving them. It covers headings, lists, checklists, tables, quotes, code, links and dividers, and saving writes plain markdown back to the file. Each block takes its direction from its own text, so Arabic and English paragraphs sit side by side. Images and videos pasted, dropped or picked into a document are saved in a media/ folder beside it and linked by a relative path. The canvas shows those images and plays those videos in the markdown view too. Markdown that contains math, raw HTML or footnotes opens in a plain-text editor instead, so saving cannot drop them. Other text and code files also edit as plain text. Every other format on the canvas is view-only.

Configuring office rendering

Spreadsheets and .docx render from raw bytes in the browser and need no service. Presentations and the PDF fallback call a shared render service, configured with two environment variables:
With either unset, those two paths return a download card and everything else keeps working. LibreOffice is about 1GB and is used by a small fraction of turns, which is why it runs in one shared service rather than inside every agent image. Rendered output is cached under a hidden .cache/office/ directory in the workspace, so reopening a deck does not repay the conversion.

Uploads

Users attach files in the composer. The loop ingests them before the model call: images and PDFs go to the model as media when .vision(True), and every attachment is written into the workspace so tools can open it.
For text-only models, set .vision(False). The attachment stays in the workspace and the model receives a note naming the file, which it can then read with a tool.

The HTTP API

Files are also a REST surface, which is what the files panel and mobile clients use. All routes require auth. Deleting moves a file to trash and keeps it restorable for thirty days through GET /trash, POST /trash/{id}/restore and DELETE /trash/{id}.

Sharing

A shared chat carries the files it references, so a recipient can open the artifact without an account. Forking lands in the forker’s active workspace.

Next

Connectors and MCP

Let a user connect an account, then give tools the credential.