Skip to main content

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

FormatExtensionBest For
PowerPoint.pptxPresentations, pitch decks, status updates
Word.docxReports, proposals, meeting notes
Excel.xlsxData exports, financial reports, dashboards
PDF.pdfFormal documents
Markdown.mdTechnical docs, READMEs, specs
Plain Text.txtLogs, raw exports, simple notes

How It Works

  1. A user asks an agent to create a document (e.g., "Create a Q4 sales report")
  2. The agent uses the generate_document tool with structured content
  3. MeetLoyd generates the file and stores it as a persistent attachment
  4. 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 CaseFormatExample
Meeting notesDOCXAgent summarizes a team conversation into structured notes
Status presentationsPPTXWeekly status deck auto-generated from project data
Data exportsXLSXAgent pulls CRM data and creates a filtered spreadsheet
Compliance reportsPDFAudit report generated from governance pack data
Technical specsMDAgent drafts a spec based on conversation requirements
Executive summariesDOCXAgent 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.

Best Practices

Be Specific in Prompts

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."

Let Agents Choose the Format

Include format guidance in agent system prompts so agents pick the right format automatically. PPTX for presentations, DOCX for reports, XLSX for data tables.

Combine with File Uploads

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.