---
title: "Update agent knowledge bases"
method: PUT
path: "/agents/{agentId}/knowledge-bases"
tags: ["Knowledge Bases"]
---

# Update agent knowledge bases

`PUT /agents/{agentId}/knowledge-bases`

## Request

- Base URL: `https://api.telvana.com`
- URL: `https://api.telvana.com/agents/{agentId}/knowledge-bases`
- Auth: API key in header `x-api-key`

Replace the set of knowledge bases associated with an agent. Pass an array of knowledge base IDs — all previous associations are removed and replaced with the new set. Pass an empty array to remove all associations.

## Path parameters

- `agentId` string, required

## Request body

- object
  - `knowledgeBaseIds` string[], required

## Response `200`

Agent knowledge bases updated successfully

- object
  - `data` unknown
  - `message` string

## Other responses

- `400`: Bad request - Invalid knowledge base IDs
- `401`: Unauthorized
- `404`: Agent not found

---

[API](https://skmtc.dev/telvana/apis/telvana-api.md) · [All operations](https://skmtc.dev/telvana/apis/telvana-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telvana/apis/telvana-api/revisions/a70ff9063cdf?raw)
