# Document types

Every session of Coauthor works on one document, of one of three types: a live document, an uploaded document, or a snapshot. The document type determines where the document is stored while the agent works, and what happens to the agent’s edits.

<a id="choose-a-type"></a>

## Choose a type

Choose a document type based on how your application stores documents. You do not need real-time collaboration: without it, choose an uploaded document or a snapshot.

|                                | Live document                                       | Uploaded document                                        | Snapshot                                                                          |
| ------------------------------ | --------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **What it is**                 | A document saved in your Cloud Services environment | A document that your backend sends to Coauthor           | A copy of the document that a person has open in your editor                      |
| **Choose it if**               | Your application uses real-time collaboration       | You keep your documents in your own system               | You do not use real-time collaboration, and the edits should reach an open editor |
| **What happens to the edits**  | Every open editor shows them at once                | Your backend gets the edited document back, and saves it | The editor in the person’s browser applies them                                   |
| **Who opens the session**      | Your backend, or the agent itself                   | Your backend                                             | Your backend                                                                      |
| **A person must have it open** | No                                                  | No                                                       | Yes                                                                               |

<a id="live-document"></a>

## Live document

A live document is saved in your Cloud Services environment, and people can edit it while the agent works. Choose it if your application uses [real-time collaboration](../../collaboration/introduction.md). It needs no setup beyond [Set up your environment](set-up.md).

An agent that opens its own sessions, such as Claude Code or a chat app, works on live documents only.

<a id="uploaded-document"></a>

## Uploaded document

An uploaded document comes from your backend when it opens a session. Choose it if you keep your documents outside Cloud Services. Cloud Services keeps the document only until one hour after the session ends.

The document can include comments, suggestions, and revision history, as a [Cloud Services document export](../../collaboration/document-import-and-export.md) does. You do not export or import anything. When the edits are applied, your backend gets the edited document back in the same form, and saves it in your system.

Your backend opens every session, with a token that reaches all documents in your environment, as [Authentication](authentication.md) explains. [A document in your own system](https://help.cke-cs.com/toolkit/v1/docs#section/Choose-a-way-to-work/A-document-in-your-own-system) in the API reference shows how.

<a id="snapshot"></a>

## Snapshot

A snapshot is a copy of the document that a person has open in your editor. Choose it if your application does not use real-time collaboration, and the edits should reach that editor. The editor needs the `DocumentCompare` plugin.

A session on a snapshot takes these steps:

1. The editor takes a snapshot.
2. Your backend opens a session on the snapshot. It also sends the comments and suggestions of the document, because the snapshot does not hold them.
3. When the agent is done, your backend passes the edited document to the browser and closes the session.
4. The editor applies the changes, and merges them with what the person typed in the meantime.

Coauthor never applies the edits of a snapshot.

Your editor decides whether the edits arrive as suggestions. Either way, the person in the browser is their author, not the agent.

As with an uploaded document, your backend opens every session. [An editor without real-time collaboration](https://help.cke-cs.com/toolkit/v1/docs#section/Choose-a-way-to-work/An-editor-without-real-time-collaboration) in the API reference shows how.

<a id="next-steps"></a>

## Next steps

* **[Set up your environment](set-up.md)** adds the editor bundle and finds the MCP address. Both are the same for every type.
* **[Connect an agent](connect-an-agent.md)** shows how an agent opens a session and edits a document.
* **[How it works](how-it-works.md)** follows one session from the first call to the change in the document.

---

Full index of the Cloud Services documentation: [llms.txt](../../../../llms.txt)
