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

# Create an Agent Knowledge Base

> Create an agent knowledge base, add content from sources or uploads, and get it ready for testing

Go to **Knowledge**, switch to **Agent**, and click **Create**.

## Set Up the Basics

Give the knowledge base a name and a description, and set who can view it and connect it to their apps. All of these can be changed later in the knowledge base's settings.

The knowledge base uses your workspace's default models. To make images in your documents searchable, use a [vision-capable embedding model](https://docs.dify.ai/en/cloud/use-dify/knowledge-base/multimodal-retrieval.md).

## Add Content

Connect a source when the content lives somewhere else and keeps changing, or upload files when you have standalone documents. A knowledge base can hold a mix of both.

> [!TIP]
>
> Start with a small, representative set of documents and import the rest once retrieval is well tuned. Changing the embedding or reasoning model later re-indexes every document, which costs fewer tokens while the knowledge base is small.

### Connect a Source

A source brings content in from a website, a document platform, or a cloud drive through a data source integration such as Firecrawl, Notion, or Google Drive.

**1. Choose a Provider**

Select one of the data source integrations installed in your workspace, or click **More providers** to browse and install one.

> [!TIP]
>
> If no integration covers your needs, [build one yourself](https://docs.dify.ai/en/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin.md) or [request one](https://github.com/langgenius/dify-plugins/issues/new?template=plugin_request.yaml) from the community.

Set up the connection in **Integrations** > **Data Source** by entering its API key or authorizing an account.

**2. Select What to Sync**

**Website crawl**

1. Name the source and paste the URL, then check the crawling defaults under **Crawl options** and adjust as needed.

2. Click **Crawl & preview** and select which pages to import from the results.

**Online documents**

Choose the pages to import from your connected account.

**Online drive**

Choose the files to import from the connected drive or bucket.

**3. Set the Sync Policy**

Pick a preset schedule, set a custom interval (1 hour to 30 days), or switch to manual sync.

Match it to how often the content changes. A sync that finds changes re-indexes them, which costs tokens.

### Upload Files

Files can be up to 15 MB each.

> [!TIP]
>
> Batch uploads are available on Professional and Team. [Learn more](https://dify.ai/pricing).

## Next Steps

Once your documents show **Ready** on the **Document** page, three steps remain before the knowledge base should serve real users:

1. [Review indexed documents](https://docs.dify.ai/en/cloud/use-dify/knowledge-base/review-indexed-documents.md): open a document and check that its sections, summaries, and chunks came through well.

2. [Test retrieval and tune settings](https://docs.dify.ai/en/cloud/use-dify/knowledge-base/test-and-tune.md): ask the questions your app will face and tune until the results hold up.

3. [Connect to apps, agents, and code](https://docs.dify.ai/en/cloud/use-dify/knowledge-base/use-knowledge-in-apps.md): attach it to the apps that should answer from it.


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