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

# KB Access Control

> Control which users and groups can access specific knowledge bases.

# Knowledge Base Access Control

Similar to agent access control, knowledge bases can be restricted to specific users or groups. This ensures sensitive documents are only searchable by authorized personnel.

## How it works

When a knowledge base has access restrictions:

* Only users in the allowed groups/users list can trigger searches against it
* Agents connected to the KB will only search it when the requesting user has access
* Documents in restricted KBs never appear in citations for unauthorized users

## Setting access restrictions

1. Navigate to **Knowledge Bases** and edit the knowledge base
2. Scroll to the **Access Control** section
3. Configure visibility:
   * **All users** — Anyone in the organization can search this KB (default)
   * **Specific groups** — Only members of selected groups
   * **Specific users** — Only individually selected users
4. Click **Save**

## Interaction with agent access control

Access control is layered:

1. **Agent access** — The user must have access to the agent
2. **KB access** — The user must have access to the knowledge base

If an agent is connected to multiple KBs, a user only searches the KBs they have access to. For example:

* Agent "Company Assistant" is connected to both "General Docs" (all users) and "Finance Reports" (Finance group only)
* A user in the Engineering group can chat with the agent but only searches "General Docs"
* A user in the Finance group searches both "General Docs" and "Finance Reports"

## Best practices

* Use **group-based restrictions** for easier management
* Match KB access to the sensitivity of the documents it contains
* Test access control by checking what citations appear for users in different groups
