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

# Knowledge Base Admin Tools

> Register, inspect, and delete reusable knowledge bases built from document indexes, then assign them to agents.

## Overview

### Tool Name

```json theme={null}
knowledge_base_admin_tools
```

### Purpose

The **knowledge\_base\_admin\_tools** manage reusable knowledge bases. A knowledge
base is a named bundle of one or more document index names that an agent can
later search with `search_knowledge_bases(...)`.

<Note>
  These admin tools require the `manage_document_indexes` permission. They
  register and delete knowledge-base bundles; they do not search them. Use
  `search_knowledge_bases(...)` for runtime retrieval, then
  `read_knowledge_base_doc(...)` to read the full document behind a hit (not
  `read_genesis_doc`, which only covers Genesis product documentation), and
  [Bot Management Tools](/docs/Genbot-Toolkit/Bot-Management-Tools) to inspect
  or replace which knowledge bases are assigned to an agent.
</Note>

### Functions Available

1. **`list_knowledge_bases`**: *List registered knowledge bases that can be assigned to agents.*
2. **`create_knowledge_base`**: *Create or register a reusable knowledge base backed by one or more document indexes.*
3. **`delete_knowledge_base`**: *Delete a registered knowledge base and remove assignments that reference it.*

## Input Parameters for Each Function

### `list_knowledge_bases`

No additional parameters.

### `create_knowledge_base`

| **Name** | **Definition** | **Format** | **Default** |
| - | - | :-: | :-: |
| **knowledge\_base\_id** | Unique registered ID for the knowledge base. | String | none |
| **title** | Human-friendly title shown when the knowledge base is assigned or searched. | String | none |
| **index\_names** | Document index names bundled into this knowledge base. | Array of strings | none |
| **summary** | Optional short summary of what the knowledge base contains. | String | `""` |
| **search\_hint** | Optional hint to surface when guiding runtime knowledge-base search. | String | `""` |
| **recommended\_queries** | Optional starter queries that work well against this knowledge base. | Array of strings or null | `null` |
| **enabled** | Whether the knowledge base is enabled for assignment and runtime use. | Boolean | `true` |

### `delete_knowledge_base`

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **knowledge\_base\_id** | Registered knowledge-base ID to delete. | String |

## Typical Flow

1. Create or update the source document indexes with [Document Index Tools](/docs/Genbot-Toolkit/Document-Index-Tools).
   For Git-backed indexes synced from a managed source, stage markdown edits with
   `propose_kb_edit(...)` instead of direct `ADD_DOCUMENTS` writes.
2. Register a reusable bundle with `create_knowledge_base(...)`.
3. Assign that `knowledge_base_id` to an agent with `set_bot_knowledge_bases(...)`.
4. Let the assigned agent use `search_knowledge_bases(...)` during runtime, then `read_knowledge_base_doc(...)` when it needs the full text of a matched document.

## Example

```python theme={null}
create_knowledge_base(
    knowledge_base_id="customer-success",
    title="Customer Success Playbooks",
    index_names=["renewal_runbooks", "escalation_policies"],
    summary="Renewal, onboarding, and escalation guidance.",
    search_hint="Use for customer-success process questions.",
    recommended_queries=["renewal path", "handoff checklist"],
)

set_bot_knowledge_bases(
    bot_id="Eve",
    knowledge_bases=["customer-success"],
)
```

## Output

* **`list_knowledge_bases`** returns `success`, `count`, and `knowledge_bases`.
* **`create_knowledge_base`** returns `success`, `knowledge_base_id`, `created_by`,
  `attributed_to_another`, and the saved `knowledge_base`. These values are read from
  the persisted record: replacing an existing id keeps its original `created_by`, while
  a record without a named creator returns `"unattributed"` and a null attribution.
* **`delete_knowledge_base`** returns `success`, `knowledge_base_id`, and `removed_assignments`.

<Warning>
  Deleting a knowledge base removes the registered bundle and also removes any
  assignments that still reference it. The underlying document indexes are not
  deleted by this tool.
</Warning>
