Manage documents

Create, edit, organize, and keep your knowledge base documents up to date.

Manage your knowledge base from the knowledge base dashboard, the CLI, or the API. For what a knowledge base is and how agents use it, see Knowledge base.

Knowledge base main interface showing a list of
documents

Add documents

Documents can be created from files, webpages, or plain text. Once created, attach them to an agent to make their contents available in conversations.

From the knowledge base dashboard, or directly from an agent’s configuration, click Add document and choose a source.

1

File

Upload a document in PDF, TXT, DOCX, HTML, EPUB, or Markdown format, up to 20MB per file.

File upload interface showing supported formats and the 20MB size limit

2

URL

Import a webpage by pasting its URL. To ingest an entire site, use the crawl option — either crawl the whole website by following links from the starting URL, or import pages from the site’s sitemap.

URL import interface where users can paste a documentation link

Ensure you have permission to use the content from the URLs you provide.
3

Text

Enter text manually and give it a name.

Text input interface where users can name and add custom content

Add existing documents to an agent

Documents can be reused across agents, so shared knowledge only needs to be maintained once.

  1. Navigate to the agent’s configuration.
  2. Find the knowledge base section and click Add document.
  3. Select an existing document from your knowledge base, or upload a new one.

Interface for adding documents to an
agent

Reusing documents across agents keeps knowledge consistent and avoids duplicating uploads.

Edit documents

You can edit a document’s content directly instead of deleting and re-uploading it. Editing a document automatically regenerates its content-search chunks and RAG embeddings, so search and agent retrieval stay in sync.

  • Text and file documents: Edit the content inline and save.
  • File documents: Alternatively, replace the underlying file with a new version.
  • URL documents: Edit the content when auto-sync is off. When auto-sync is on, the sync cycle manages the document and manual edits are blocked.

Editing a document's content inline in the knowledge
base

1# Update a document's name or content
2elevenlabs.conversational_ai.knowledge_base.documents.update(
3 documentation_id="i2YYI6huwBmcgYydAXARmQJc3pmX",
4 name="Unladen Swallow Facts",
5 content="The airspeed velocity of an unladen swallow (European) is 24 miles per hour.",
6)
7
8# Replace the underlying file of a file document
9
10elevenlabs.conversational_ai.knowledge_base.document.update_file(
11documentation_id="i2YYI6huwBmcgYydAXARmQJc3pmX",
12file=open("/path/to/unladen-swallow-facts-v2.txt", "rb"),
13)

Keep URL content up to date

Documents created from a URL can be refreshed to re-fetch the latest content from their source. Refreshing re-indexes the document so RAG-enabled agents use the updated content.

1elevenlabs.conversational_ai.knowledge_base.document.refresh(
2 documentation_id="i2YYI6huwBmcgYydAXARmQJc3pmX",
3)

In the dashboard, you can also enable auto-sync to refresh URL documents automatically on a schedule, so their content stays current without manual updates.

Organize with folders

Folders group related documents so they are easier to manage and attach in bulk. Create a folder, then move documents into it from the dashboard or the API.

A folder attached to an agent makes all of its documents available through RAG, so the agent must have RAG enabled to use folders.

Creating a folder and moving documents into
it

1# Create a folder
2folder = elevenlabs.conversational_ai.knowledge_base.documents.create_folder(
3 name="Product documentation",
4)
5
6# Move a document into the folder
7
8elevenlabs.conversational_ai.knowledge_base.documents.move(
9document_id="i2YYI6huwBmcgYydAXARmQJc3pmX",
10move_to=folder.id,
11)

Dependencies and deletion

Each document has a Dependent agents tab that lists the agents currently depending on it.

Document detail view showing the Dependent agents
tab

A document cannot be deleted while an agent depends on it. Remove the document from those agents first, or use force deletion to detach it from all dependents at once.