Skip to content

Generating documents

An agent can write a Word document, a PDF or an Excel workbook for you and attach it as a file under its answer. You can preview and download it there, and ask the agent for changes in the same conversation.

You need an agent with the Generate documents capability. Only that capability gives you versions, Edit and templates. If your instance has a code interpreter, Intra AI can also write files with code in a conversation without an agent, but those files have no versions and no Edit.

Which formats you can get

PDF, Word (DOCX) and Excel (XLSX) work wherever document generation is turned on. For a Word document, the agent can use one of the templates set up for it. PowerPoint (PPTX) needs the code interpreter on your instance.

The agent builds a presentation by writing a short program, and that program can only run in the code interpreter's sandbox. If your instance has no sandbox, the agent tells you it can't produce a PowerPoint file here. It can still write PDF, Word and Excel files, just not by running code.

Document generation is on by default. Intra AI decides centrally whether it is available on your instance, and your administrator can see the setting under Centrally managed. Trial instances have no code interpreter.

Turn on document generation for an agent

Whoever is allowed to edit the agent does this once. If you're using an agent someone else built, skip ahead.

  1. Open the agent in the agent builder.
  2. Go to the Tools step, then Capabilities.
  3. Select Generate documents. The tile gets a blue outline.
In the agent builder, turn on Generate documents under Capabilities in the Tools step.Enlarge figure

If the tile is grayed out and shows Unavailable when you hover over it, document generation is turned off on your instance. For creating and finishing an agent, see Building an agent.

Ask for a document

  1. Start a conversation with the agent. Using agents explains how to pick one.
  2. Say what the document is for, who will read it and which format you need. For example: "Create a trade fair booth setup checklist as a Word document, grouped into technical, furniture and marketing."
  3. If the content should come from your own files, attach them and say which figures to use.
  4. Send the message. The tool row in the answer shows progress: Writing content, Rendering document, Converting, Validating, Ready. When the agent builds the file with code, you also see Running the generator, Checking the result and, if needed, Fixing the document.
  5. When it's done, the tool row reads something like "Created 1 document", and a tile appears under the answer with the file name, version and size. A new document starts at v1.

For spreadsheets, name the columns, units and formulas you want. Check names, figures and dates before you send a document on. The file may look polished, but the model still wrote the content.

Preview and download the file

Select the tile (Open in panel) to open the file in the Artifacts panel on the right. The download icon on the tile saves the file without opening the panel.

The panel shows a preview. PDFs display directly. Word, Excel and PowerPoint files show as a PDF preview, and a generated Excel workbook appears as a grid. Formula cells show the formula in italics. Hover over one to see Computed when the file is opened in Excel or LibreOffice. If you didn't request the workbook yourself, for example in a shared conversation, you get the PDF preview instead. If no preview can be made, you see Preview unavailable and can still download the file.

Above the preview you'll find these buttons:

  • Download saves the file in the format shown. A PDF doesn't have this button, so use the download icon on its tile.
  • Download as offers a second format when there is one: a text document as PDF or DOCX, a spreadsheet as XLSX or PDF, a document made from a template as DOCX or PDF, a file built with code in its own format or as PDF. If the button is missing, that document only exists in one format.
  • Versions lists every version with its date. The one you're looking at is marked Current.
  • Edit opens the document's source, described below.

When the conversation holds more than one file, the download icon at the top of the panel saves all of them at once (Download all as ZIP).

Have a document revised

  1. Stay in the same conversation and say what should change, for example: "Add an item for network cabling under technical."
  2. The agent revises the same document and saves it as a new version. The new tile under its answer shows the higher version number. The file name may change too.
  3. Open Versions to switch between them. If a version belongs to this conversation, the panel shows it. Otherwise Intra AI downloads it.
The agent places the Word document as a tile under its answer; the panel shows the preview, and Versions switches between v1 and the current v2.Enlarge figure

Earlier versions are kept. The tile under an older answer still opens its own version.

Edit the source yourself

A small fix is often quicker to make than to describe.

  1. Open the latest version in the panel. Edit only appears there. Some older documents made from templates don't have the button; ask the agent to revise those.
  2. Select Edit to open Edit document source. Depending on the document, you're editing its Markdown text, the placeholder values of a Fill placeholders template as JSON, or the program that builds the file. The note above the editor tells you which.
  3. Make your change and select Save. Intra AI creates a new version from it and shows it in the panel. Cancel closes the editor without changes.
Edit opens the Edit document source dialog, where you change the Markdown and select Save to create a new version.Enlarge figure

You see Versions, Download as and Edit only in your own conversation, and only for documents you requested. People you invite to the conversation can view and download the file, but they can't switch versions or change the source. A Global share link is a snapshot and doesn't include the files. See Sharing conversations.

Add a Word template to an agent

A template lets the agent produce documents with your letterhead and your Word styles. Templates belong to one agent, not to the whole instance, and they are always Word files (DOCX). The agent's Owner and anyone with the Co-editor role can upload them.

  1. Open the agent in the builder and turn on Expert mode. If the agent already has templates, the section shows without it.
  2. Go to the Knowledge step, find Document templates and select Upload template.
  3. Enter a Template ID using lowercase letters, digits, hyphens and underscores. Uploading another template with the same ID later replaces this one.
  4. Pick a Mode. Use Fill placeholders when the Word file has blanks for the agent to fill in. Use House style when the agent should write its own text and format it with the file's styles.
  5. In Description, say when the agent should use the template, such as "for every quote sent to a customer". The agent chooses templates based on this description.
  6. Choose the DOCX file, then select Save template.

Make sure Generate documents is on in the Tools step, or the agent won't use the template. If the list shows Defined in the agent configuration, read-only., you can't change the templates here. Either you don't have the Owner or Co-editor role, or the templates were set up centrally. A template you upload counts toward your storage. More on the builder in Tools, knowledge and sub-agents.

Other files in answers

Generate documents isn't the only source of file tiles. Files written by the code interpreter (with or without an agent) and translations made with the Translate document capability show up as the same tiles and open in the same panel. Versions and Edit are only available for documents made with Generate documents. For translating and filing documents, see Managing files.

Troubleshooting

What you see, What to do
What you seeWhat to do
The agent answers in text and creates no fileCheck that the agent has Generate documents. Without an agent, this capability isn't available.
The agent says it can't create a PowerPoint file hereYour instance has no code interpreter. Ask for the content as a Word document or PDF instead.
The agent says the document is too largeAsk for a shorter version, or split the content across several documents.
The agent says your storage is fullEmpty the trash or delete files in Files, then send the request again.
The agent says the document could not be createdSend the request again, ideally phrased a little more simply.
"The document could not be generated. Try again." when downloadingRepeat the download from Download as or from Versions.
"The document generator is not available on this instance. Ask an administrator."The document service is missing on your instance. Contact your administrator.
"This document was revised in the meantime …" when savingA newer version appeared while you were editing. Close the editor, open the latest version and make your change there.
Preview unavailableDownload the file and open it in Word, Excel or PowerPoint.