> For the complete documentation index, see [llms.txt](https://docs.borndigital.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.borndigital.ai/digital-agent/advanced-functions/knowledge-base/manage-indexes-and-documents.md). Agents can also search and read this documentation through its [MCP server](https://docs.borndigital.ai/~gitbook/mcp).

# Manage indexes and documents

Find, add to, edit, duplicate, export, import and delete knowledge-base indexes and their documents.

Open your project and select **Design** › **Knowledge base** in the left sidebar.

## The index list

* **This project** shows the indexes of the current project as cards: the index name, its provider (**Local**, **OpenAI**, **Azure Cloud** or **Azure Hybrid**), the number of documents, the first document names and the project it belongs to. Hover over a card to see who created and last updated it.
* **All projects** shows the indexes of every project in your organization as a compact list.
* **Search indexes** filters the list by index name.
* The sort button orders the list **Alphabetical**, by **Created** or by **Updated** date.
* Click a card to open the index.

## Add documents to an index

1. Open the index and click **Add**.
2. Choose the splitting settings (they default to the ones described in [Index providers and settings](https://docs.borndigital.ai/digital-agent/advanced-functions/knowledge-base/index-providers-and-settings.md)) and upload **.txt**, **.pdf** or **.html** files.
3. Follow the processing with the upload icon in the top bar.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-2ab2b9598cc4c2846342dd5eaf732875142170f6%2Fkb-manage-index-documents.png?alt=media" alt="An open Local index unesco with the Add button, the document cards with their descriptions, and Select mode with two documents ticked and the Export, Delete and Done buttons highlighted"><figcaption><p>An open index: Add documents, or select documents to export or delete them</p></figcaption></figure>

A file with the **same name as an existing document is skipped**. To replace a document with a newer version, delete the old document first and then upload the new file.

Each document card shows when it was created, its number of snippets and its **agent lookup count** – how many times an agent's knowledge-base search returned the document. Hover over an icon to see what the number means. The document panel shows the same count next to the snippet and token counts.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FY0B7mbFfU15A1KevvZZK%2Fkb-document-lookup-count.png?alt=media" alt="Documents of the Local index unesco, each with its creator and date, its snippet count and its agent lookup count; the lookup counts are highlighted and the tooltip Agent lookup count is shown"><figcaption><p>The agent lookup count of each document</p></figcaption></figure>

### Processing status

Hover over the upload icon in the top bar to see every file being processed with its **Progress**, **Used tokens**, number of **Snippets**, **Project**, **Status** and **Error**.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-6ec3c5c732a8caabc0caf3967fa2434c0e8be56e%2Fkb-manage-processing-status.png?alt=media" alt="The upload panel opened from the upload icon in the top bar while files are processed: six files COMPLETED at 100 percent, two IN_PROGRESS at 95 percent"><figcaption><p>Processing status in the upload panel</p></figcaption></figure>

| Status           | Meaning                                                                           |
| ---------------- | --------------------------------------------------------------------------------- |
| **PENDING**      | Waiting to be processed.                                                          |
| **IN\_PROGRESS** | Being extracted, split into snippets and stored.                                  |
| **COMPLETED**    | Done. The document is in the index and can be found by the AI node.               |
| **FAILED**       | Not added. The **Error** column says why, for example that no text was extracted. |

Documents of a Local index appear in the index only after they were processed successfully. In Cloud indexes, failed files are removed automatically.

## Edit a document (Local indexes)

Click a document to open it in the side panel.

* **Name**, **URL** and **Description** of the document. The **URL** is stored in `kb_document_url` when the document is used, so the agent can link to the source. The **Description** (up to 1024 characters) tells the model what the document contains – see [How it works](https://docs.borndigital.ai/digital-agent/advanced-functions/knowledge-base.md#how-it-works). Where your environment has it enabled, Studio fills it in after the upload with a short summary of the beginning of the document. The summary is generated only once, right after the upload, so your own changes are kept.
* **Labels** – keywords for filtering documents with the [Indexer MCP server](https://docs.borndigital.ai/digital-agent/conversation-flow/nodes-explained/ai-node/indexer-mcp-server.md). Labels cannot contain commas.
* **Snippets** – every snippet is shown as **Snippet 1**, **Snippet 2** and so on. You can edit their text, drag them to a new position, add a snippet with **Add snippet** and remove one from its **…** menu. Use **Search** to find text in the document and **Snippet** to jump to a snippet.

Changes to the document and its snippets are saved when you close the panel, in the order you see them. A removed snippet is deleted together with your other changes when the panel closes.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-659699b0333b32ac32da3b75e0ea58ceb0efc0ba%2Fkb-manage-edit-document.png?alt=media" alt="The document panel of What_is_UNESCO.txt with Name, URL, a generated Description highlighted, Labels, and Snippet 1 below the Snippet, Add snippet and Search controls"><figcaption><p>A document of a Local index with its generated description and snippets</p></figcaption></figure>

Documents of Cloud indexes cannot be opened or edited.

## Work with several indexes or documents

Click **Select**, tick the cards and choose an action. In the index list, **Select all** ticks all loaded indexes; once all of them are ticked, the button changes to **Clear selection**.

| Action        | Indexes                                                                                                                                                 | Documents                                                                                            |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Duplicate** | Copies the selected indexes into a project you choose. Local indexes only.                                                                              | –                                                                                                    |
| **Export**    | Downloads a ZIP file with the selected indexes and their documents, with a readable `.txt` file per document next to the CSV files. Local indexes only. | Downloads the selected documents as a ZIP file, with a `.txt` file per document. Local indexes only. |
| **Delete**    | Deletes the indexes with all their documents.                                                                                                           | Deletes the selected documents.                                                                      |

Click **Done** to leave the selection mode.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FR1PfL0vq8z2hYRduXndD%2Fkb-index-select-all.png?alt=media" alt="The selection bar of the knowledge base: first 0 index selected with Select all, Duplicate, Export, Delete and Done; then 50 index selected with Clear selection"><figcaption><p>Select all, and Clear selection once all indexes are ticked</p></figcaption></figure>

{% hint style="danger" %}
Deleting an index or a document cannot be undone. Export it first if you may need it again.
{% endhint %}

### Duplicate indexes

The copy keeps the name of the original index, and a project cannot contain two indexes with the same name. When you duplicate into the **same project**, the copy fails at first and the dialog offers **Retry duplicate indexes**: enter a new **Index name** for each failed copy and click **Retry**. Duplicating into another project works directly, unless that project already has an index with the same name.

### Import indexes

Click **Import** and choose a ZIP file exported from a knowledge base. The indexes are added to the current project: an index with the same name receives the documents it does not have yet, other indexes are created. Use export and import to move a knowledge base between projects or environments.

## Rename or change an index

The name, provider and settings of an existing index cannot be changed. To start over with different settings, create a new index, upload the files again, switch the AI node to the new index and delete the old one.
