---
title: "Replace the knowledge bases attached to one hosted agent"
method: PATCH
path: "/v1/agents/{agent_id}/knowledge-bases"
---

# Replace the knowledge bases attached to one hosted agent

`PATCH /v1/agents/{agent_id}/knowledge-bases`

## Request

- Base URL: `https://api.skysay.ai`
- URL: `https://api.skysay.ai/v1/agents/{agent_id}/knowledge-bases`
- Auth: none declared

## Request body

- KnowledgeBaseAttachments
  - `knowledge_base_ids` string[], required: Active bases in the same organization and project only.
  - `organization_id` string, required
  - `project_id` string, required

## Response `200`

Agent knowledge-base attachments

---

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