> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base overview

> Create, attach, rename, list, and safely retire v1 knowledge bases.

Knowledge bases hold reusable context for agent versions. The v1 API manages the resource record and its documents; attach its signed `kb_` ID to an agent version through `knowledge_base_ids`.

## Capabilities

| Capability | Operation |
| - | - |
| Create, list, read, rename and delete knowledge bases | [Create](https://dialnexa.com/docs/api-reference/v1/knowledge-base/create.md), [List](https://dialnexa.com/docs/api-reference/v1/knowledge-base/list.md), [Get](https://dialnexa.com/docs/api-reference/v1/knowledge-base/get.md), [Update](https://dialnexa.com/docs/api-reference/v1/knowledge-base/update.md), [Delete](https://dialnexa.com/docs/api-reference/v1/knowledge-base/delete.md) |
| Add a PDF, TXT or DOCX document | [Upload Knowledge Base Document](https://dialnexa.com/docs/api-reference/v1/knowledge-base/upload-document.md) |
| List documents and check indexing | [List Knowledge Base Documents](https://dialnexa.com/docs/api-reference/v1/knowledge-base/documents.md) |

## Lifecycle

1. [Create a knowledge base](https://dialnexa.com/docs/api-reference/v1/knowledge-base/create.md).
2. Add documents with [Upload Knowledge Base Document](https://dialnexa.com/docs/api-reference/v1/knowledge-base/upload-document.md) and wait until [List Knowledge Base Documents](https://dialnexa.com/docs/api-reference/v1/knowledge-base/documents.md) shows each one `ready`. A document whose indexing fails is removed from that list instead; upload it again.
3. Attach it with [Update Agent](https://dialnexa.com/docs/api-reference/v1/agents/update.md).
4. [Get](https://dialnexa.com/docs/api-reference/v1/knowledge-base/get.md) or [list](https://dialnexa.com/docs/api-reference/v1/knowledge-base/list.md) resources to confirm the signed ID and name.
5. [Rename](https://dialnexa.com/docs/api-reference/v1/knowledge-base/update.md) without changing attachments.
6. Detach it from agent versions before [deleting](https://dialnexa.com/docs/api-reference/v1/knowledge-base/delete.md).

## Response envelope

`GET /v1/knowledge-base` returns `items` plus a `meta` object with `totalItems`, `itemsPerPage`, `totalPages`, and `currentPage`. See [API pagination](https://dialnexa.com/docs/api-reference/api-fundamentals.md#paginate-dialnexa-list-responses) for an endpoint-by-endpoint envelope table.

## Delete conflicts

Deletion is blocked while a current draft or latest published agent version references the knowledge base. The `409 Conflict` response lists those agents in `data.agent_ids` (with `data.code` `KNOWLEDGE_BASE_IN_USE`); detach or replace the knowledge base on each, then retry the delete.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.