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

# Detach a knowledge base

> Detach a knowledge base from an agent

<ParamField path="agent_id" type="integer" required>
  Agent ID.
</ParamField>

<ParamField path="knowledge_base_id" type="string" required>
  Knowledge base ID.
</ParamField>

## SDK

<CodeGroup>
  ```typescript TypeScript theme={null}
  await client.knowledgeBases.detach(7, kbId);
  ```

  ```python Python theme={null}
  await client.knowledge_bases.detach(7, knowledge_base_id)
  ```
</CodeGroup>
