Concepts

Long-form writing: an agent that plans, researches and writes a real document

Long-form writing is an agent producing a complete, multi-section document — a filing, a market-entry report, a due-diligence memo — by planning the outline first, asking for anything it needs before it starts, researching each section against your material and public sources, and writing section by section on a job that survives a restart. You edit it in a canvas beside the chat, rewrite any passage by selecting it, and every version is kept.

Also calleddocument writing agentreport writing agentAI report generatorlong document generationmulti-section documentregulatory filing agentwriting canvasAI document draftingautomated report writingresearch report agent

Everything else an agent does fits in one reply. Long-form writing is where it produces something you hand to someone else: a regulatory filing, a market-entry report, a due-diligence memo, a tender response. Those documents have three properties that a chat answer cannot have — they are researched before they are written, they are structured, and they take longer than anyone will sit and watch.

So this is not "an export button on the chat". It is a production line beside the conversation: stateful, interruptible, resumable, with a canvas where you read and edit the result.

It plans before it writes

planning
“Write the Brazil filing”document typemd-submission1Scope & product2Classification3Local representation4Submission dossierbrief · targetbrief · targetbrief · targetbrief · targetoutline — pinned before a single word is written
The agent recognises which document is being asked for, lays out the sections, and gives each one its own brief — before it writes a word.

The first thing that happens is not writing. The agent recognises which document is being asked for — from the document types you define, each with its own outline, required information, knowledge bases and refusal boundary — and lays out the sections. Every section gets its own brief: what it must cover, roughly how long, and which facts it depends on.

That brief is not hidden. It is the text the model is given for that section, it is on screen, you can edit it, and you can rerun that one section after changing it. A document you cannot steer is a document you will rewrite by hand.

If nothing matches, the agent proposes an outline and asks you to confirm it. Either way the structure is pinned before a single word is written, and it stays pinned for the run — editing the type tomorrow does not renumber the document you started today.

Each section researches on its own

research
section 2 needs factsanvisa.gov.brin.gov.bryour knowledge basesearched · opened · readfacts for this sectiona quoted factfrom anvisa.gov.bra quoted factfrom in.gov.bra quoted factfrom your knowledge base2Classificationwritten from those facts only
Each section researches on its own: it searches, opens and reads the page, and keeps every fact next to the source it came from.

This is the part that separates a document from a long answer. Each section goes and gets its own facts: it searches, it opens and reads the page — not the search summary, which is a title and two lines while the figures live in the body — and it keeps every fact next to the source it came from. Your own knowledge bases are searched the same way, and take precedence.

Then the section is written from those facts only. Not from what the model remembers about the topic. That is why the interesting failure mode changes shape: instead of a confident invented figure, you get a section that says the figure could not be found — and the tool that checks this is code scanning the text for specifics that appear in no source, not the model grading its own work.

The research is bounded and budgeted per document, and it stops when it stops finding new things. You can watch which domains it read, per section, while it works.

It asks before it invents

before writing
what this document needsProduct & intended useTarget marketLegal manufacturerDeadline?Who is the legal manufacturer?It goes on the cover page and in §3.Acme Medical Ltda.writingon holdwritingstarts now
When something the document needs is missing, it asks for that one thing — and does not start writing until it has it.

A document usually needs a handful of facts only you have: the legal manufacturer, the target market, the filing deadline, the class of the device. Missing one of them does not degrade the document slightly — it invalidates it.

So the required information is part of the document type, and the agent checks it before starting: it asks for the one thing that is missing, says why it needs it, and holds. Nothing is generated, and nothing is billed, until the answer is in. If you already said it earlier in the conversation, it does not ask again.

You change a passage, not the document

rewrite a passage
section 3[start, end) — computed, not guessed“Add the Brazil deadline”your instruction, in your wordsreplacement onlysection 3 · v2everything else byte-identical
Select a passage, say what you want changed, and only that passage is replaced. The rest of the section stays byte-for-byte identical.

Select a sentence, say "add the Brazil deadline here", and that passage is replaced. The rest of the section is byte-for-byte identical.

The mechanism matters more than it sounds: the selection range is computed by the system, and the model is only ever asked for the replacement text. A model asked to return a range does not return an error when it is unsure — it returns a plausible-looking range, and a sentence quietly disappears from your filing. So it never gets to choose one.

The same path handles a whole-section rewrite, a manual edit in the editor, and an instruction typed into the chat. And because the document sits beside the conversation rather than inside it, you can keep talking to the agent about the document while it is open — asking it to add a chart from your own data, pull in a file you just uploaded, or translate a copy into another language.

Nothing you had is ever lost

history
#1written#2edited by you#3rewritten on request#4restored to #2compare with current− the old sentence+ the new sentencecomputed line by line — never described by a modelRestore this versionadds #4 — deletes nothing
Every change is kept — written, edited, rewritten, restored. Going back adds a version instead of deleting one.

Every change to a section is kept: the version it was first written as, your manual edits, each requested rewrite, each restore — with what you said at the time, and which passage it touched. The comparison against the current text is computed line by line; a model is never asked to describe what changed, because a description that reads well and is wrong is exactly the failure this feature exists to prevent.

Restoring an old version adds a new version. History only ever grows.

What you end up with

A document in the canvas, exportable as PDF with a clickable table of contents and page numbers, with charts drawn only from numbers that appear in your material. A read-only copy can be translated into another language without touching the original. And when you share the conversation that produced it, you decide whether the document goes with it.

The honest limit: this is for documents that are worth a few minutes of machine work and a review by someone who knows the subject. It removes the blank page, the fact-gathering and the assembly — not the accountability.

Common questions

How is this different from asking ChatGPT to write a report?
A chat answer is produced in one pass, in one context window, from whatever the model already believes. Long-form writing plans the outline first, asks you for anything it needs before it starts, researches each section separately, and writes one section at a time — so a forty-page document stays consistent, every figure traces back to a source, and the work survives closing the tab.
Where do the facts in the document come from?
From your own knowledge bases and, if you have enabled public sources for that agent, from pages the agent actually opens and reads. Each fact is stored with the source it came from, so any figure in the finished document can be traced back to the page or passage it was taken from.
What happens if the agent needs something it does not know?
It asks — once, before it starts writing, and it explains why it needs that particular thing. Writing does not begin until the answer is in, which means a missing detail is caught in the first minute rather than discovered on page twenty, and the document never contains an invented substitute.
Can I change one paragraph without regenerating the whole document?
Yes. You select the passage and say what you want changed, and only that passage is replaced — the rest of the section stays byte-for-byte identical. The selection range is computed by the system, not chosen by the model.
Can I see what changed between drafts?
Yes. Every change to a section is kept as a version — the version it was first written as, your manual edits, each requested rewrite and each restore — with a line-by-line comparison against the current text. Restoring an old version adds a new version rather than deleting anything.
How long does a document take, and do I have to wait with the tab open?
Minutes to tens of minutes depending on length and how much research it needs. The work runs as a background job, so you can close the tab and come back; if the server restarts mid-document, it picks up from the section it was on and the finished sections are untouched.
Can I control what a document is allowed to say?
Yes. Each document type carries a refusal boundary — what it must never promise, quote or predict — and that boundary is attached to every section's instructions by the system rather than left to the model to remember. Document types are yours to define, with their own outline, required information and knowledge bases.
Want the mechanics?Write your first document
Getting it running