# Generate a document

Ask an agent for a PDF, PowerPoint or Word file in a conversation, find it under the reply and in Artifacts, and know what the generator can and cannot do.

An agent that carries the **Document Generator** tool can turn a request into a file: a PDF, a PowerPoint deck or a Word document. You ask in the conversation, the platform writes the body and renders the file, and the result appears under the reply and in your Artifacts.

**Who can use it:** the **Member** role, in a tenant licensed for agents, in a conversation with an agent that has the **Document Generator** tool attached. Personal chat and the default assistant carry it from the start. A role with read-only access to the Work Room cannot generate one.

Video: Generate a document (2:23), https://katonicdocsmedia.blob.core.windows.net/docs/generate-a-document/4a87090a72e4/index.html

## Prerequisites

- A conversation with an agent that has the tool. A builder attaches it in Studio on the agent's **Tools** step, under **Function tools**, where it is listed as **Document Generator**; Research report agents get it automatically. If a request for a document only ever gets prose back, ask the agent's builder.

## Ask for a document

  
**Step 1. Say what you want, and name the format**

Ask for a **PDF**, a **PowerPoint** (a deck, slides or a presentation) or a **Word document**. Asked for a report, memo, letter or write-up without a format, the agent is instructed to make a PDF.

Put everything the document must cover in the same message: the subject, the audience, the sections you want and the length. The writer treats your message as the statement of what the document is about. If the name matters, say what the document should be called; otherwise the agent picks a short title. For example: "Make me a PDF called Meeting Notes Guide: how to run a weekly team meeting and write up the notes afterwards."

  
**Step 2. Wait for the reply**

Writing takes longer than a chat answer, because the platform makes a separate model call to write the body and then renders the file. When it finishes, the reply says the document is ready and a chip appears under it with the file name, the words **document generator** and **Download** (the down arrow). The document also opens in the side panel, headed **Artifact Preview**.

    ![The end of a conversation turn: the request for a PDF, the agent's reply saying the document is ready, and under it a chip with the file name, the words document generator, a Download control and a chevron.](https://docs.katonic.ai/img/user-guide/work-room/generate-a-document/docgen-chat-chip.png)
*When the agent finishes, the file appears as a chip under the reply. Download saves it, and the chip is still there when you reopen the conversation.*

  
**Step 3. Read, download or save it**

The side panel shows the title with its kind, **PDF Document**, **Presentation** or **Word Document**. **Preview** renders the document body and **Code** shows the text it was written from. **Copy Code** copies that text. The save control is labelled **Download PDF**, **Download PPTX** or **Download DOCX**; it opens **Save to**, where **Download** saves the file to your device and **Team Library** pins it so your team can find it. **Close** puts the panel away.

The chip's **Download** saves the file at any time, including after you reopen the conversation.

  
**Step 4. Find it later**

Every generated file is also listed in [Artifacts](/user-guide/work-room/artifacts): PDF and Word files under **Documents**, PowerPoint files under **Decks**. The card names the agent that made it, and opening it shows the document in a [working session](/user-guide/work-room/working-sessions).

    ![The Artifacts page with the Documents filter selected: the All, Documents, Data and Decks chips with their counts, the search box, and a grid of document cards, each with a preview, its name, the agent that made it and a final badge.](https://docs.katonic.ai/img/user-guide/work-room/generate-a-document/artifacts-documents-filter.png)
*Documents holds Markdown, PDF, Word and plain-text files, Decks holds PowerPoint files. Each card names the agent that made the file.*

## Ask for changes

A generated document cannot be edited in place, and the side panel offers no **Edit** view for these formats. Ask again in the same conversation with the change you want: each request produces a new file and a new chip, and the earlier file stays in Artifacts.

## What the generator can and cannot do

- **Formats:** PDF, PowerPoint and Word only. It makes no spreadsheets. An agent asked for an Excel file may answer with a Word document of prose and announce it as ready, so ask for the figures in the conversation instead.
- **Structure:** a title, headings, paragraphs and bullet lists. In a deck, the title fills the first slide and each top-level section becomes a slide; a section with little text becomes a divider slide, and lower-level headings become sub-headings on the slide. Tables are not rendered: a table you ask for arrives as lines of text separated by vertical bars, or is left out. Numbered lists come out as plain paragraphs. Images, charts, a table of contents and cover pages beyond the title are not produced.
- **Look:** one fixed colour scheme, not your organisation's branding. Decks and Word documents carry the line "Generated by Katonic Studio" under the title.
- **Content:** the body is written from your latest message and the title only; earlier turns in the conversation are not passed to the writer. It does not search your organisation's knowledge sources, so the document carries no citations. The writer aims for about 500 words, so expect a first draft of a few sections rather than a long report.
- **Model:** the body is written on the same model the conversation is using. In Personal chat, that is the model you picked.
- **File name:** the title in lower case, with spaces and punctuation turned into dashes, up to 120 characters, plus the extension.

## Troubleshooting

- **The agent says the document could not be generated.** The writer produced no body, so no file was made; nothing is waiting in Artifacts. Ask again. If it keeps happening, tell your administrator: the model call that writes the body is failing.
- **The reply ends in an error after a long wait.** The file may still have been produced: the turn can fail after the file was made and registered. Open Artifacts before asking again, so you do not generate the same document twice. The messages themselves are explained in Chat errors: agents and access.
- **You asked for a spreadsheet and got a Word document.** The generator has no spreadsheet format; see the limits above.
- **Download failed. Please try again.** in the side panel: the file could not be fetched. Try again, or download it from its card in Artifacts.

## Related

- [Artifacts](/user-guide/work-room/artifacts)
- [Home and chat](/user-guide/work-room/home-and-chat)
- [Working sessions](/user-guide/work-room/working-sessions)
- [Files and documents](/user-guide/work-room/files-and-documents)

Source: https://docs.katonic.ai/user-guide/work-room/generate-a-document
