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

# Linking to Agents

> Connect knowledge bases to your agents for context-aware conversations.

## Linking a knowledge base to an agent

To give an agent access to your knowledge base content, you need to link them together.

<Steps>
  <Step title="Open agent configuration">
    Navigate to your agent and open the **Knowledge Base** tab.
  </Step>

  <Step title="Browse available KBs">
    You'll see a list of all knowledge bases in your workspace, along with their document count and status.
  </Step>

  <Step title="Link a knowledge base">
    Click the **Link** button next to the knowledge base you want to connect. The agent will now have access to all documents in that KB.
  </Step>
</Steps>

## Multiple knowledge bases

You can link **multiple knowledge bases** to a single agent. The agent will search across all linked KBs when looking for relevant context.

This is useful for organizing content by topic:

* "Product Documentation" KB for product questions
* "Pricing & Plans" KB for billing inquiries
* "Company Policies" KB for policy-related questions

## Unlinking a knowledge base

To remove a knowledge base from an agent:

1. Open the agent's **Knowledge Base** tab
2. Click **Unlink** next to the KB you want to disconnect

The knowledge base itself is not deleted  - only the connection to the agent is removed.

## How retrieval works

When a caller asks a question:

1. The agent extracts the key intent from the caller's message
2. It searches all linked knowledge bases for relevant content
3. The most relevant chunks are included as context in the LLM prompt
4. The agent generates a response using both its instructions and the retrieved context

<Info>
  The agent automatically decides when to search the knowledge base based on the caller's question. You don't need to configure retrieval rules.
</Info>
