> For the complete documentation index, see [llms.txt](https://notara-1.gitbook.io/notara-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notara-1.gitbook.io/notara-docs/libraries/documents.md).

# Managing Documents

Documents are the building blocks of a library. Each document has a title, content, load policy, and optional source metadata (where it came from and how it refreshes).

## Supported File Types

When uploading documents, Notara accepts:

| Format         | Extension   | Notes                                                     |
| -------------- | ----------- | --------------------------------------------------------- |
| Markdown       | `.md`       | Best format — renders cleanly, easy to update             |
| Plain text     | `.txt`      | Treated as markdown                                       |
| PDF            | `.pdf`      | Text is extracted; images and charts in PDFs are not read |
| Word document  | `.docx`     | Text and headings extracted via mammoth                   |
| Unknown binary | (any other) | Rejected — must be one of the types above                 |

PDFs and DOCX files have their text extracted on upload. The extracted text is stored as the document's content. If you update the source file, re-upload it to refresh the content.

## Adding Documents

### Upload a File

1. Open the library in the dashboard.
2. Click **+ Add Document → Upload File**.
3. Drag and drop or click to browse. Select a `.md`, `.txt`, `.pdf`, or `.docx` file.
4. The file is processed and the extracted text is stored.
5. Set the title (defaults to the filename) and load policy.
6. Click **Save**.

### Paste Text

1. Click **+ Add Document → Paste Text**.
2. Enter a title and paste your content into the editor.
3. Markdown is rendered in the preview panel.
4. Set the load policy and click **Save**.

### Crawl a URL (Firecrawl)

1. Click **+ Add Document → Crawl URL**.
2. Enter the URL you want to crawl (e.g., `https://docs.yourapi.com`).
3. Notara uses the Firecrawl connector to fetch and extract the page content.
4. For documentation sites with multiple pages, enable **Crawl subpages** to follow links up to a configurable depth.
5. Extracted content is stored as a document (or multiple documents, one per page, for crawls).

> **Firecrawl must be enabled**: the Crawl URL option requires the Firecrawl platform connector to be active. It's available on paid workspaces with no additional setup.

### Research with Perplexity

1. Click **+ Add Document → Research Topic**.
2. Enter a research question or topic (e.g., "Competitor X's pricing as of 2026").
3. Notara uses Perplexity to synthesize a current answer with citations.
4. The result is stored as a document. You can edit it before saving.

> **Perplexity must be enabled**: the Research option requires the Perplexity connector to be active.

## Load Policies

Every document has a load policy that determines when and how it appears in the agent's context:

### `spine` — Always Present

Spine documents are injected into every agent turn, up to the context budget. They're the documents the agent should always have in mind — core reference material it constantly draws on.

**Use for:**

* Company overview and values
* Key people and team structure
* Product descriptions or glossary
* A short runbook the agent needs constantly

**Budget:** spine documents are injected in priority order until the budget is used. Keep the total spine document size under \~20,000 tokens (roughly 15,000 words) to stay within a reasonable budget.

### `on_demand` — Retrieved When Relevant

On-demand documents are not injected by default. Instead, the agent performs a semantic search when it needs information and retrieves the most relevant documents. This is how you scale a library to hundreds of documents without overwhelming the context window.

**Use for:**

* API reference documentation
* Meeting notes archive
* Runbooks (most of which won't be needed on any given turn)
* Research documents

### `never` — Private

Documents with the `never` policy are stored in Notara but never shown to the agent — not via spine injection, not via semantic search, and not via MCP resources. They're for human reference only: internal notes, sensitive data, drafts you're not ready to make agent-visible.

**Use for:**

* Notes about a sensitive situation
* Financial projections not yet shared
* Draft documents in progress

## Updating and Deleting Documents

To update a document: click it in the library, edit the content or re-upload the file, and click **Save**. The manifest is regenerated automatically.

To delete a document: click it, then click **Delete**. Deletion is immediate and permanent. The manifest is regenerated.

## Regenerating the Manifest

The manifest regenerates automatically when you add, update, or delete a document. To trigger a manual regeneration (e.g., after a bulk import), click **Regenerate Manifest** in the library header.
