File Generation
Generate and convert files in various formats with your Dust agents
Introduction
Dust agents can generate files from text content and convert files between different formats using the File Generation capability. This allows your agents to create downloadable documents in formats like PDF, Word, Excel, and more.
Supported Formats
The File Generation capability supports the following output formats:
| Format | Extension | Description |
|---|---|---|
| Portable Document Format | ||
| Word | .docx | Microsoft Word Document |
| Excel | .xlsx, .xls | Microsoft Excel Spreadsheet |
| PowerPoint | .pptx | Microsoft PowerPoint Presentation |
| CSV | .csv | Comma-Separated Values |
| Markdown | .md | Markdown text |
| Plain Text | .txt | Plain text file |
| HTML | .html | Web page format |
| XML | .xml | Extensible Markup Language |
| Images | .jpg, .png, .gif, .webp | Image formats |
How to Enable File Generation
When creating or editing an agent:
- In the Agent Builder, click on Add Tools
- Select the File Generation capability
- Save your agent
No additional configuration is required.
How It Works
Generating Files
The agent can generate files from text content you provide or content it creates. When generating files for binary formats (PDF, DOCX, XLSX, PPTX), the agent can accept content in:
- Plain text: Simple text content
- Markdown: Markdown-formatted text that gets converted
- HTML: HTML content for more complex formatting
Converting Files
The agent can also convert files between different formats. For example:
- Convert a Markdown file to PDF
- Convert HTML to Word document
- Convert CSV to Excel
Example Use Cases
Creating a Report:
Please create a PDF report summarizing the quarterly sales data we discussed.
Converting a Document:
Convert this markdown file to a Word document.
Generating a Spreadsheet:
Create an Excel file with the project timeline we outlined.
Tip: Generated files appear in the conversation and can be downloaded directly. All files in a conversation are accessible via the folder icon.
Limitations
- Maximum file content size is 64,000 characters for generated content
- Complex formatting in source content may not always convert perfectly between formats
- For interactive data visualizations, consider using Frames instead
Updated about 2 hours ago
