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

# Agent knowledge

> Set up what your Agent knows by adding Knowledge Base search, referencing specific files, and connecting sources.

Give your Agent access to your company's documents so it can answer questions with accurate, cited responses. You can connect entire [Knowledge Base](https://docs.cassidyai.com/knowledge-base/overview.md) collections, reference specific files in your instructions, and control when the Agent searches.

> [!NOTE]
>
> Before configuring Agent knowledge, make sure your [Knowledge Base is set up](https://docs.cassidyai.com/knowledge-base/setup.md) with the documents and sources your Agent needs.

## Add Knowledge Base search

**1. Open the Agent editor**

Go to **Agents**, find the Agent you want to configure, click **...** and select **Edit**.

**2. Navigate to the Knowledge section**

In the **Setup** tab, scroll to the **Knowledge** section and click **+ Add**.

![Knowledge section in the Agent editor showing connected collections and Smart Search toggle](https://mintcdn.com/cassidy/phY6dyfV98bvF6BE/images/agents/knowledge-section.png?fit=max\&auto=format\&n=phY6dyfV98bvF6BE\&q=85\&s=b03bb24bf2953642b59771ce614fa37f)

**3. Select knowledge sources**

Browse your Knowledge Base and select the collections, folders, or individual documents you want your Agent to search. Click **Save** to confirm.

![Add Knowledge dialog showing Knowledge Base collections with checkboxes to select General Knowledge, Sales, Marketing, and Customer Support](https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/knowledge-add.png?fit=max\&auto=format\&n=k1fD1PPJz98taSFv\&q=85\&s=b9ca9b557c51a3743175e5bce7f40b26)

Once you add knowledge, the Agent searches it when answering questions and cites the sources it used.

## Smart Search

When knowledge is added, you can enable **Smart Search** to let the Agent decide when to search the Knowledge Base.

* **Smart Search on** -- The Agent only searches when it determines the Knowledge Base is likely to help answer the request. This reduces unnecessary searches and improves response speed.
* **Smart Search off** -- The Agent searches the Knowledge Base on every request, regardless of whether it seems relevant.

![Smart Search toggle in the Knowledge section of the Agent editor](https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/smart-search-toggle.png?fit=max\&auto=format\&n=k1fD1PPJz98taSFv\&q=85\&s=e3dc81ad751d97ceb88cb48dcdf5e6db)

> [!TIP]
>
> Enable Smart Search for Agents that handle a mix of general questions and company-specific inquiries. Disable it for Agents that should always ground their answers in your documents.

## Reference files in instructions

You can reference specific Knowledge Base items directly in your Agent's [instructions](https://docs.cassidyai.com/agents/build-and-configure.md#instructions) by typing **#** in the instructions field. This opens a search dialog where you can find and select documents.

![Knowledge Base reference search popup appearing after typing # in the instructions field](https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/kb-reference-search.png?fit=max\&auto=format\&n=k1fD1PPJz98taSFv\&q=85\&s=4b7360212a1269ffed9c6179809cfb85)

Type # in the instructions to search and reference specific Knowledge Base items

When you reference an item this way:

* The Agent autonomously searches over that content when it's relevant to a user's question.
* The referenced item is automatically added to the Agent's Knowledge section.

### Pin content inline

Hover over a referenced item in the instructions field and click the **pin icon** to include the content directly in the prompt. Pinned content counts toward the model's token limit but guarantees the Agent always sees it in full — useful for critical guidelines, style guides, or reference tables.

![Pin icon on a referenced Knowledge Base item in the instructions field](https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/kb-reference-pin.png?fit=max\&auto=format\&n=k1fD1PPJz98taSFv\&q=85\&s=33f9b75cb95c3c2b2f6e5b2dcf502b5f)

Click the pin icon to include content inline in every prompt

> [!NOTE]
>
> Pinning only works when the content is small enough to fit inline. Larger documents should be added to the Knowledge section instead.

## When to use each approach

| Approach | Best for | How it works |
| - | - | - |
| **Knowledge section** | Large document sets the Agent searches on demand | Agent performs semantic search across all added sources |
| **# reference in instructions** | Specific documents the Agent should be aware of | Agent searches referenced content when relevant |
| **Pinned content** | Small, critical documents the Agent must always see | Content included directly in every prompt |

## Next steps

> [card] [Set up your Knowledge Base](https://docs.cassidyai.com/knowledge-base/setup.md)
>
> Upload documents, connect integrations, and import websites.

> [card] [Build and configure an Agent](https://docs.cassidyai.com/agents/build-and-configure.md)
>
> Learn about all the other settings you can configure on an Agent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.