# Brains for Text Agents

In Dapta agents, knowledge bases are referred to as "Brains", essentially acting as the brain of your AI agent.

In the Settings tab, go to the Brains section.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-f9c12bb2bad76e730a837c7412d934a07a22c44d%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* If you already have Brains created, you can select them here.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-f16cbd7920472a5aa0ca78427007632a36025e20%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* If you don't, you can create a New Brain to serve as a knowledge base.

#### **Create a New Brain**

* Click the Create Brain button.
* Give your Brain a name.
* Add one or more sources by clicking + Add Source.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-d91a555e417141a14aa6273872c452626bc91740%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

You can add up to 25 sources per Brain, choosing from:

* **Web Pages:**\
  Enter the URL you'd like to add as a knowledge base.\
  You can click discover if a sitemap is found.

You can add web pages in two ways:<br>

* **Discover Sitemap:**

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-9bf5e78d20bd7669000dbf2dd4c31cd603a9b931%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* Click Add Source and select Add Web Pages.

  * Enter the website domain (e.g., example.com).
  * Click Discover Pages.
  * If a sitemap is found, a tree of URLs organized by subdomain will appear.
  * Select the pages you want to include using the checkboxes.
  * Use Select All / Deselect All for quick selection.
  * Expand subdomains to select individual pages.
  * Click Add x URLs to confirm your selection.<br>

  <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-ee527abf3a2876f592d3c7d1ed05867cee338547%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>
* **Manual URL Entry:**<br>

  <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-52ac24d1e5d98fac6a48af66ca176752d6f8e037%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

  * If no sitemap is found or you prefer to add URLs individually:
  * Click the Add URL manually link.
  * Enter the full URL (e.g., <https://example.com/page>).
  * Click Save.
* **Files:**
  * Great for selecting documents from your computer.
  * You can process Documents, spreadsheets, emails, presentations, images, etc.
  * Supported extensions include: `.pdf`, `.doc`, `.csv`, `.xls`, `.ppt`, `.msg`, `.html`, `.xml`, `.epub`, `.jpeg`, `.jpg`, `.png`.\ <br>

    <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-6e33286cbcf016c8df0151e9560c4f723eda449b%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>
  * Check the [full list of supported file extensions](https://docs.dapta.ai/brains) in Brains here.
* **Text:**<br>
  * Type or paste text directly.
  * Click Save.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-4012e3d4ded1c56fa7e8b3ee5e2ac0fdf4ffec4f%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* Once created, the Brain goes through three states:

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-fe9022d4656b9aace5816a867afc56417193fc90%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

1. **Pending**: The knowledge base is waiting to be processed.
2. **In Process**: The knowledge base is being indexed.
3. **Completed:** The knowledge base is available for queries.
4. **Error:** Processing failed.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-984b107f2f8113dd8f606aaacd83899b57e156f4%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

After uploading the source you need for your knowledge base,

select the ones you want to add and click Save.
