Skip to content

Files and Media

Varun S V edited this page Oct 16, 2026 · 1 revision

Files, Documents and Media Generation

Cascade's file workflow differs between local workspaces and browser-hosted runs. In particular, a Markdown string merely saved with a .docx extension is not a valid Word document.

Document outputs

Output Source material Rendered format
.pdf Markdown/text Real PDF with selectable text
.docx Markdown Word OOXML document
.pptx Markdown divided into slides PowerPoint OOXML presentation
.xlsx CSV / tabular data Excel workbook

Desktop and CLI

Use the generate_document tool for actual .docx, .pptx and .xlsx creation (and the appropriate PDF tool for PDF). The Node-side renderers write real binary documents. file_write only writing text into the target path can create a corrupt-looking document.

Hosted Cloud and self-hosted web

A generated result can contain fenced blocks tagged with a filename. The frontend turns compatible content into downloadable files, and optionally saves it to the user-scoped cloud Files storage:

```file:report.md
# Findings
- Completed analysis
- Next steps
```

Office exports render from structured Markdown/CSV into genuine binary files. Browser-side download and saving to the server's user storage are separate operations; storage quotas can apply to saved files.

Charts and rich material

PowerPoint rendering can embed images and convert chart data blocks into editable chart objects. Image, audio, speech transcription and video generation are conditional on a configured provider/model with the corresponding capabilities. Some tasks require a provider credential or an available runtime tool.

Safe file handling

The cloud backend must enforce file ownership, size restrictions and tenant separation. Do not include credentials or private tokens in prompt-generated artifacts. User-owned downloads should not require third-party publication.

Implementation: src/core/documents/, docs/file-generation.md, cloud/server/src/documents.ts.

Clone this wiki locally