> ## 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](/knowledge-base/overview) collections, reference specific files in your instructions, and control when the Agent searches.

<Info>Before configuring Agent knowledge, make sure your [Knowledge Base is set up](/knowledge-base/setup) with the documents and sources your Agent needs.</Info>

## Add Knowledge Base search

<Steps>
  <Step title="Open the Agent editor">
    Go to **Agents**, find the Agent you want to configure, click **...** and select **Edit**.
  </Step>

  <Step title="Navigate to the Knowledge section">
    In the **Setup** tab, scroll to the **Knowledge** section and click **+ Add**.

    <Frame>
      <img src="https://mintcdn.com/cassidy/phY6dyfV98bvF6BE/images/agents/knowledge-section.png?fit=max&auto=format&n=phY6dyfV98bvF6BE&q=85&s=b03bb24bf2953642b59771ce614fa37f" alt="Knowledge section in the Agent editor showing connected collections and Smart Search toggle" width="1024" height="323" data-path="images/agents/knowledge-section.png" />
    </Frame>
  </Step>

  <Step title="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.

    <Frame>
      <img src="https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/knowledge-add.png?fit=max&auto=format&n=k1fD1PPJz98taSFv&q=85&s=b9ca9b557c51a3743175e5bce7f40b26" alt="Add Knowledge dialog showing Knowledge Base collections with checkboxes to select General Knowledge, Sales, Marketing, and Customer Support" width="1738" height="1266" data-path="images/agents/knowledge-add.png" />
    </Frame>
  </Step>
</Steps>

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.

<Frame>
  <img src="https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/smart-search-toggle.png?fit=max&auto=format&n=k1fD1PPJz98taSFv&q=85&s=e3dc81ad751d97ceb88cb48dcdf5e6db" alt="Smart Search toggle in the Knowledge section of the Agent editor" width="1652" height="528" data-path="images/agents/smart-search-toggle.png" />
</Frame>

<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.</Tip>

## Reference files in instructions

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

<Frame caption="Type # in the instructions to search and reference specific Knowledge Base items">
  <img src="https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/kb-reference-search.png?fit=max&auto=format&n=k1fD1PPJz98taSFv&q=85&s=4b7360212a1269ffed9c6179809cfb85" alt="Knowledge Base reference search popup appearing after typing # in the instructions field" width="1156" height="118" data-path="images/agents/kb-reference-search.png" />
</Frame>

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.

<Frame caption="Click the pin icon to include content inline in every prompt">
  <img src="https://mintcdn.com/cassidy/k1fD1PPJz98taSFv/images/agents/kb-reference-pin.png?fit=max&auto=format&n=k1fD1PPJz98taSFv&q=85&s=33f9b75cb95c3c2b2f6e5b2dcf502b5f" alt="Pin icon on a referenced Knowledge Base item in the instructions field" width="1156" height="116" data-path="images/agents/kb-reference-pin.png" />
</Frame>

<Note>Pinning only works when the content is small enough to fit inline. Larger documents should be added to the Knowledge section instead.</Note>

## 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

<CardGroup cols={2}>
  <Card title="Set up your Knowledge Base" icon="database" href="/knowledge-base/setup">
    Upload documents, connect integrations, and import websites.
  </Card>

  <Card title="Build and configure an Agent" icon="wrench" href="/agents/build-and-configure">
    Learn about all the other settings you can configure on an Agent.
  </Card>
</CardGroup>
