___

The knowledge agent generates responses based on articles in the **Knowledge base** tab. Upload files or add a URL to a web page so the agent can use this knowledge to answer questions. Use relevant, accurate content for the best results.

For details on how the agent uses this content, see [Knowledge agents overview](https://www.infobip.com/docs/agentos-ai-agents/knowledge-agents/overview#how-knowledge-agents-work).

You can add content in two ways:

1. **Upload files**: Upload a `.zip` file with your own documentation. Best for precise, controlled content.
2. **Add from URL**: Crawl a website to extract content and add it directly to the knowledge base. Best for existing online documentation.

___

## Add content to Knowledge base

To add content:

1. Go to the **Knowledge base** tab > **Add content**
2. Choose [Upload files](https://www.infobip.com/docs/agentos-ai-agents/knowledge-agents/connect-knowledge-sources#upload-files) or [Add from URL](https://www.infobip.com/docs/agentos-ai-agents/knowledge-agents/connect-knowledge-sources#add-content-from-url).

___

## Upload files

Upload a file with relevant information about your business, products, or any topic you want the agent to know about. This added context helps the agent generate good responses that relate to what customers want to find out.

### Prepare your documentation [#prepare-your-documentation-upload-files]

Follow these guidelines before uploading:

- Use structured documentation with clear headings.
- Cover only one topic per document.
- Ensure content is clean and consistent across documents:
  - No duplicate content across multiple documents
  - No conflicting definitions of the same concept
  - No outdated or incorrect information
  - No mixed product information in the same document
- Supported formats: `.pdf`, `.json`, `.txt`, `.docx`, `.md`
- Remove images from documents before uploading.

### Upload the file [#upload-the-file-upload-files]

Upload your documentation as a single `.zip` file containing one or more supported documents:

1. In the **Knowledge base** tab, select **Add content** > **Upload files**.
2. Drag and drop the zipped file into the upload area, or select **Browse** to locate it.
3. Select **Add file**.

The uploaded articles appear in the **Articles** list in the **Knowledge base** tab. Use the search bar or **Tags** filter to find specific articles.

#### Requirements and limitations

| Requirement | Details |
|---|---|
| **File format** | `.zip` only |
| **Maximum size** | 7 MB |
| **Supported document types** | `.pdf`, `.json`, `.docx`, `.txt`, `.md` |

___

## Add content from URL

Add a website URL to extract content and add it automatically to the knowledge base. The crawler follows links within the same path and subpaths.

Note
For production use, prepare documentation manually for the best results. Use the unaltered crawler output only for demos.

**Before adding a URL**, ensure the website meets the following requirements:

- Use only HTML websites. JavaScript-rendered or API-driven content may affect quality.
- Avoid web pages that cover multiple topics.
- Ensure no duplicate content across pages.
- Remove incorrect or outdated information.
- Do not mix information about similar products on the same page.
- Add the top-level URL for the section you want. Adding a broader URL includes unrelated content.

To add content from a URL:

1. In the **Knowledge base** tab, select **Add content** > **Add from URL**.
2. In the **Website URL** field, enter the URL to crawl.
3. (Optional) Configure the crawl settings:
   - **Path control** - Define which paths and subpaths the knowledge agent can or cannot visit. Toggle on to configure.
   - **Content selection** - Target specific content to extract using HTML and CSS selectors. Toggle on to configure.
   - **Client-side rendering** - Enable to use client-side rendering while crawling. Use for websites that load content dynamically with JavaScript.
   - **Max running time** - Maximum crawl time in seconds.
   - **Max page depth** - How many link levels deep the crawler explores from the starting URL.
4. Select **Add to knowledge base**.
5. Wait for the crawl to complete. A progress indicator shows the crawl status. To cancel, select **Stop**.

The extracted articles appear in the **Articles** list in the **Knowledge base** tab.

___

## Next steps

Test the knowledge agent  
Validate responses against your knowledge sources.

Edit knowledge sources  
Update or replace connected content.

Quality center  
Evaluate agent accuracy at scale.

___