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

# Manage knowledge bases

The `knowledge` command group manages AgentKit knowledge bases, covering listing, inspection, creation, update, and deletion. The command is also available under the `kb` and `knowledgebase` aliases.

A knowledge base stores documents for retrieval. Configure management credentials and the target provider and region, with permissions for AgentKit, the knowledge provider, and TOS uploads. The AgentKit knowledge ID differs from the provider-side ID: register with the provider ID, then use the returned AgentKit ID for subsequent operations

## knowledge list

List all knowledge bases.

| Flag / Argument | Description | Default |
| - | - | - |
| `-r, --region <region>` | Region for the selected cloud provider. | auto-detect |
| `-p, --project <name>` | Project name. | default |
| `--json` | Output raw JSON. | `false` |

```bash lines theme={null}
agentkit knowledge list --project demo
```

## knowledge show

Show details of a knowledge base.

| Flag / Argument | Description | Default |
| - | - | - |
| `<id>` | Knowledge id, e.g. `kb-xxxxxxxx`. Required. | — |
| `-r, --region <region>` | Region for the selected cloud provider. | auto-detect |
| `--json` | Output raw JSON. | `false` |

```bash lines theme={null}
agentkit knowledge show kb-12345678
```

<Warning>
  Automatic provisioning and document uploads use cloud storage and indexing resources and may incur charges. Directory uploads recurse; exclude credentials and data that must not enter the knowledge base first
</Warning>

## knowledge create

Create a knowledge base.

| Flag / Argument | Description | Default |
| - | - | - |
| `-n, --name <name>` | Knowledge base name. | — |
| `--provider-knowledge-id <id>` | Existing provider-side knowledge id to register; omit to auto-provision (viking only). | — |
| `--provider-type <type>` | Provider type, e.g. `viking`. | `viking` |
| `--viking-project <name>` | Viking project for auto-provisioning. | `$DATABASE_VIKING_PROJECT` or `default` |
| `--viking-version <n>` | Viking collection version: `2` \| `4`. | `2` |
| `-d, --description <text>` | Knowledge base description. | — |
| `-p, --project <name>` | Project name. | default |
| `-r, --region <region>` | Region for the selected cloud provider. | from env/default |
| `--json <jsonString>` | Advanced: a JSON object merged into the request body (overrides options). | — |

```bash lines theme={null}
agentkit knowledge create --name docs-kb --provider-type viking --provider-knowledge-id pk-123
```

## knowledge add

Add documents to a knowledge base — upload local files or directories (directories recurse), or register documents by public URL.

| Flag / Argument | Description | Default |
| - | - | - |
| `<kb>` | Knowledge base name or id. Required. | — |
| `[paths...]` | Local files or directories to upload (directories recurse). | — |
| `--url <url>` | Add a document by public URL instead of a local file (repeatable). | `[]` |
| `--doc-type <type>` | Document type hint for `--url` (e.g. `md`, `pdf`). | — |
| `--tos-bucket <name>` | TOS bucket for uploads. | `agentkit-platform-<account-id>` |
| `-p, --project <name>` | Project name. | default |
| `-r, --region <region>` | Region for the selected cloud provider. | from env/default |

```bash lines theme={null}
agentkit knowledge add docs-kb ./docs ./README.md
agentkit knowledge add docs-kb --url https://example.com/guide.pdf --doc-type pdf
```

## knowledge update

Update a knowledge base.

| Flag / Argument | Description | Default |
| - | - | - |
| `<id>` | Knowledge id, e.g. `kb-xxxxxxxx`. Required. | — |
| `-d, --description <text>` | New description. | — |
| `--vpc-id <id>` | VPC id to attach. | — |
| `--subnet-ids <ids>` | Comma-separated subnet ids (requires `--vpc-id`). | — |
| `-r, --region <region>` | Region for the selected cloud provider. | auto-detect |
| `--json <jsonString>` | Advanced: a JSON object merged into the request body (overrides options). | — |

```bash lines theme={null}
agentkit knowledge update kb-12345678 --description "Updated docs"
```

<Warning>
  Before deletion, check agents that still reference the knowledge base and retain required document copies. `--yes` skips confirmation; associated calls may fail afterward
</Warning>

## knowledge delete

Delete a knowledge base.

| Flag / Argument | Description | Default |
| - | - | - |
| `<id>` | Knowledge id, e.g. `kb-xxxxxxxx`. Required. | — |
| `-r, --region <region>` | Region for the selected cloud provider. | auto-detect |
| `-y, --yes` | Skip the confirmation prompt. | `false` |

```bash lines theme={null}
agentkit knowledge delete kb-12345678 --yes
```

A successful add completes the upload or registration request; parsing and indexing may still be in progress. Check document processing in the provider before verifying retrieval with a connected agent. For an empty list, check provider, region, and `--project` before creating another resource
