Document Generation
Agents can create documents during conversations using the generate_document MCP tool. This enables agents to produce reports, presentations, spreadsheets, meeting notes, and more -- all formatted as downloadable files.
Supported Formats
| Format | Extension | Best For |
|---|---|---|
| PowerPoint | .pptx | Presentations, pitch decks, status updates |
| Word | .docx | Reports, proposals, meeting notes |
| Excel | .xlsx | Data exports, financial reports, dashboards |
| Formal documents | ||
| Markdown | .md | Technical docs, READMEs, specs |
| Plain Text | .txt | Logs, raw exports, simple notes |
How It Works
- A user asks an agent to create a document (e.g., "Create a Q4 sales report")
- The agent uses the
generate_documenttool with structured content - MeetLoyd generates the file and stores it as a persistent attachment
- The agent replies with a download link, rendered as an artifact card in chat
Example Flow
User: "Create a presentation about our Q4 results"
Agent uses generate_document with format, filename, title, and slide content.
Agent: "Here's your Q4 results presentation:" followed by an artifact card with the file name, format label, and a download button.
Artifact Cards
When an agent sends a message containing a file download URL, the chat renders it as a styled artifact card:
- Format-specific icon and color (red for PDF, blue for DOCX, green for XLSX, orange for PPTX)
- File name displayed prominently
- File format label and size
- One-click download
This works for both agent-generated documents and user-uploaded files.
Use Cases
| Use Case | Format | Example |
|---|---|---|
| Meeting notes | DOCX | Agent summarizes a team conversation into structured notes |
| Status presentations | PPTX | Weekly status deck auto-generated from project data |
| Data exports | XLSX | Agent pulls CRM data and creates a filtered spreadsheet |
| Compliance reports | Audit report generated from governance pack data | |
| Technical specs | MD | Agent drafts a spec based on conversation requirements |
| Executive summaries | DOCX | Agent distills a long thread into a one-page brief |
Persistence
Generated documents are stored durably, tied to the tenant and agent that created them. Files survive server restarts and deployments -- download links remain valid.
Content Structure by Format
PowerPoint (PPTX)
Slides support multiple layouts: title, content, section, two-column, and blank. Each slide can have a title, bullet points, and speaker notes. The agent structures its content as a list of slides with layout hints.
Word (DOCX)
Documents use a section-based structure. Each section can include headings (levels 1-4), paragraphs, bullet lists, and tables with headers and rows.
Excel (XLSX)
Workbooks contain one or more sheets. Each sheet has headers, rows of data, and optional column width settings. Multi-sheet workbooks are useful for summary + detail patterns.
Markdown and Plain Text
For simpler formats, the agent provides a title and the raw text content. Markdown supports the full syntax (headings, lists, tables, code blocks).
Combining with File Uploads
Agents can read uploaded files and use them as input for document generation. For example, a user uploads a CSV and asks the agent to "turn this into a formatted Excel report." The agent reads the CSV, structures the data, and generates a polished XLSX.
Best Practices
The more detail you give, the better the document. "Create a PPTX with 5 slides covering Q4 revenue, key wins, top customers, challenges, and 2026 outlook" produces much better results than "Make a presentation about Q4."
Include format guidance in agent system prompts so agents pick the right format automatically. PPTX for presentations, DOCX for reports, XLSX for data tables.
Upload raw data files and ask agents to transform them into formatted documents. The agent reads the input, processes it, and generates polished output.
Related: Files & Attachments for upload and file management details.