Write a long document
Set up document types, run the writing canvas, steer a section's brief, rewrite a passage, use versions, add your own material, export to PDF and translate a copy.
What this is for
Most of what an agent does fits in one reply. This is for the thing you hand to someone else: a regulatory filing, a market-entry report, a due-diligence memo, a tender response. The agent plans the outline first, asks for anything it needs before it starts, researches each section, and writes section by section on a background job — while you read and edit the result in a canvas beside the chat.
If you're new to the idea, start with the Long-form writing concept page. This page is the how-to.
1. Define a document type
A document type is the reusable definition of one kind of document you produce. You create them in the console under Document types. Each carries:
| Field | What it does |
|---|---|
| Outline | The skeleton: section keys, titles, order, what each must cover, target length, and which required facts it depends on. Leave it empty to have the agent propose an outline per document. |
| Required information | The handful of facts only the customer has — legal manufacturer, target market, deadline. The agent asks for these before writing. |
| Boundary | What this document must never do: never quote a rate, never predict an outcome, never state a classification as final. Attached to every section's instructions by the system. |
| Knowledge bases | Which of your knowledge bases this type may draw on. This is a permission, not a hint — it is intersected with what the agent itself is allowed. |
| When to use | A plain-language description of when this type applies. Used to recognise the type from what a customer types. |
A type is a draft until you publish it. Publishing freezes a revision, and a document that is already running stays pinned to the revision it started on — so editing a type this afternoon never renumbers a document that started this morning.
Section keys are identifiers, not prose. Renaming a key breaks the anchors in documents already written from that type. Change the title freely; leave the key alone.
2. Start a document
Three ways in, all the same production line:
- The + menu → Write a document, then say what it should be about.
- Just say it — "write me a full report on registering this device in Brazil". Typing it is equivalent to picking it from the menu.
- From a storyline step that produces a deliverable.
If the request is missing the subject ("write a document"), the agent asks what about — it does not guess, because a document written on a guessed subject is the most expensive kind of guess.
3. It asks before it starts
The agent checks the type's required information against what it already knows — including anything the customer said earlier in the conversation — and asks for what is missing, one thing at a time, with a line saying why it needs it.
Nothing is generated and nothing is billed until those answers are in. For anonymous visitors on a share link there is one extra step: an email address before work starts. That is both the cost gate and how they get the document back later.
4. Confirm, then it writes
Before writing starts you see the exact section count and a token estimate. That pause is deliberate — it is the last point before the expensive part.
Then the job runs. Some things worth knowing:
- You can close the tab. The work is a background job, not a request. Come back to the same link.
- A restart is survivable. If the server restarts mid-document, the section in flight is rewritten from the start and the finished sections are untouched.
- You can stop it. Sections already written are kept — they were paid for.
- Progress is per section: which section it is on, and which domains it read for that section.
5. Where the facts come from
Each section researches on its own, in this order: your knowledge bases first, then — only if public sources are enabled on that agent — a web search where it opens and reads the page rather than answering from the search summary. Each fact is stored next to the source it came from.
The section is then written from those facts only. Specifics that appear in no source are flagged by code scanning the finished text, not by asking the model whether it was careful.
A document type cannot switch public sources on by itself. If you turned them off on the agent, that decision holds — a type can only be narrower than the agent, never wider.
6. Steer a section
Every section has three controls, on hover, on the section's own status line:
- Brief — the instructions the model is given for this section. Editing it and choosing save and rewrite re-runs that section alone. This is the fastest way to fix a section that came out generic.
- Edit — the text itself, in a full-screen markdown editor. A manual edit marks the section as edited, and the writer never overwrites an edited section.
- History — every version of this section (see below).
To change one passage, select it in the text and say what you want:
Only that passage is replaced; the rest of the section is byte-for-byte identical. You can preview the replacement before applying it. The same path handles a whole-section rewrite — it is a selection of the whole section.
Or just say it in the chat
You do not have to select anything. Tell the agent what you want and it changes the document directly:
- "in Detailed Changes, change the sentence about the Portuguese IFU to say it is mandatory from January 2027 — leave the rest alone" — only that sentence changes. The rest of the section is byte-for-byte identical, because the agent replaces the exact text rather than retyping the section.
- "move the chart from the Executive Summary to Impact Analysis" — the chart moves. It does not end up in both places, and the section it came from keeps its prose.
- "move that paragraph into Impact Analysis" — same, for text.
- "split Detailed Changes in two — keep the labelling part, move the rest into a new section".
- "undo that last change" — the document goes back to how it was before. This is a real undo, not a second rewrite that tries to describe the old text from memory.
Each of these is one operation the platform performs itself, not a sequence the model improvises. That distinction is the whole point: when an agent has to retype a section to change one line of it, the parts it was not asked to touch are the parts that quietly go missing.
7. History and going back
Open History on any section. You get every version: the one it was first written as, your manual edits, each requested rewrite and each restore — with the date, the length, which passage it touched and, for a requested rewrite, what you asked for in your own words.
Select a version to see it compared line by line against the current text, or read it in full. Restore this version puts it back — by adding a new version. Nothing in the history is ever deleted.
8. Add your own material mid-document
Drop a file into the chat while a document is open and it becomes supporting material for that document: the agent tells you which sections it affects and offers to rewrite them. Material is managed per document — you can see what is attached, by source, and remove any of it.
9. Export and translate
- PDF with a clickable table of contents and page numbers. Charts and images are embedded.
- Translated copies — a read-only copy of the document in another language. The original is untouched, section anchors are shared, and a copy marks itself stale when the source section changes after it was translated. Edits belong on the source; a translated copy is for handing over.
- Sharing — when you share the conversation that produced a document, there is a checkbox for whether the documents go with it. It is off by default and the reader gets a read-only view. See Sharing a conversation.
Limits worth knowing before you promise it to a customer
- A document is capped at 40 sections. Beyond that, split it.
- Export links expire; the document does not. Re-export when you need a fresh link.
- PDF export requires the export component to be installed on the deployment. If the button is not there, that is why — it does not error, it simply does not appear.
- Long-form writing is per-agent. Turn it on for the agents that produce deliverables, not for the FAQ bot.