# Agents: Unlink a knowledge base from an agent (https://docs.envocal.ai/api-reference/agents/unlink-a-knowledge-base-from-an-agent/) > The knowledge base itself is not deleted. ## DELETE `/v1/tenants/{tenantId}/agents/{agentId}/knowledge-bases/{kbId}` The knowledge base itself is not deleted. **Required permission:** `agents:write` ### Parameters | Name | In | | Type | Description | | --- | --- | --- | --- | --- | | `tenantId` | path | required | string | Tenant id, or `current` for the key's own tenant. Must be the key's tenant or one of its sub-tenants. | | `agentId` | path | required | string | Agent id. | | `kbId` | path | required | string | Knowledge base id. | ### Responses **204**: Unlinked. **401**: Missing, invalid, revoked or expired API key. **403**: The key lacks the required permission, or the tenant/resource is outside its reach. **404**: Agent not found. **429**: Rate limit exceeded. Retry after the number of seconds in the Retry-After header. ### Example ```bash curl -X DELETE "https://api.envocal.ai/v1/tenants/current/agents/{agentId}/knowledge-bases/{kbId}" \ -H "Authorization: Bearer evk_eu_..." ```