> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/modules/ai-agents/knowledge.md).

# Knowledge

Empower AI agents with trained, unstructured dialogue.

Train the AI agent on the content it uses to generate replies. Training sources are separate from the agent's persona and behaviour — those are configured in the **Agent** tab. See [Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md).

## Add a training source

Select one of the three buttons at the top of the Knowledge base table.

{% tabs %}
{% tab title="Upload file" %}
Supported file types: csv, docx, html, json, md, pdf, pptx, txt · Maximum file size: 5 MB

1. Select **Upload file**.
2. Enter a **Name** for the source.
3. Drag and drop a file or select **Browse files**.
4. Select **Train**.
   {% endtab %}

{% tab title="Add URL" %}

1. Select **Add URL**.
2. Enter a **Name** and the full URL (must start with `https://`).
3. Choose the scope: **URL webpage** trains only on the page at that URL. **All webpages** crawls and trains on all pages linked from that URL.
4. Optionally enable **Automatically retrain every** and select an interval: 12 hours, 1 day, 1 week, or 1 month.
5. Select **Train**.

{% hint style="info" %}
If the URL points directly to a PDF, CSV, or JSON file rather than a webpage, Proto downloads the file (up to 10 MB) and trains on it as a file source instead of scraping it as a webpage — the same as if it had been added through **Upload file**. The **scope** and **Automatically retrain every** settings above don't apply in that case, since a downloaded file trains once, like an uploaded one. Any other link — an ordinary webpage, an unsupported file type, a file larger than 10 MB, or a URL Proto can't reach — is trained as a webpage as described above.
{% endhint %}

{% hint style="info" %}
For **URL webpage** sources, if a site's bot protection blocks the first attempt, Proto automatically retries through alternative access methods before marking the source as failed. This doesn't apply to **All webpages** crawls.
{% endhint %}
{% endtab %}

{% tab title="Paste snippet" %}

1. Select **Paste snippet**.
2. Enter a **Name**.
3. Paste or type the text in the **Text snippet** field.
4. Select **Train**.
   {% endtab %}
   {% endtabs %}

***

## Manage training sources

The knowledge base table lists all sources with name, last updated date, and status. Filter by **Search**, **Type**, and **Status**. A link added through **Add URL** that resolved to a file (see above) is listed and filterable as a file source, not a URL source.

| Status  | Meaning                                |
| ------- | -------------------------------------- |
| Pending | Queued for training                    |
| Loading | Training in progress                   |
| Success | Trained and active                     |
| Fail    | Training failed — remove and try again |

To delete a source, select its row and use the delete option.

***

## View source details

Select any source from the knowledge base table to open its details panel. The fields shown depend on the source type.

{% tabs %}
{% tab title="URL" %}

| Field           | Description                                                         |
| --------------- | ------------------------------------------------------------------- |
| Name            | Editable display name.                                              |
| URL             | The trained page, opens in a new tab.                               |
| Status          | See the status table above.                                         |
| Last updated    | Date of the last successful training or refresh.                    |
| Last updated by | The person who created the source, or who last triggered a refresh. |

Select the refresh icon at the top of the panel to retrain on the URL immediately instead of waiting for the next scheduled refresh. It's disabled while the source is still pending or loading, and again after use until the panel is reopened.
{% endtab %}

{% tab title="File" %}

| Field        | Description                                                                                                                                                                           |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name         | Editable display name.                                                                                                                                                                |
| File         | The file name, with a download button for the original file.                                                                                                                          |
| URL          | The link the file came from. Shown only when the file was created from a URL that resolved directly to a downloadable file (see **Add URL** above) — an uploaded file has no URL row. |
| Status       | See the status table above.                                                                                                                                                           |
| Created      | Date the source was added.                                                                                                                                                            |
| Created by   | The person who added the source.                                                                                                                                                      |
| {% endtab %} |                                                                                                                                                                                       |

{% tab title="Snippet" %}

| Field      | Description                      |
| ---------- | -------------------------------- |
| Name       | Editable display name.           |
| Status     | See the status table above.      |
| Created    | Date the source was added.       |
| Created by | The person who added the source. |

The panel also shows the snippet's text, which can be edited inline. Editing it queues the snippet for retraining.
{% endtab %}
{% endtabs %}

Below the fields above, the panel also shows a short status message: for **Pending** or **Loading**, that the content is still being processed; for **Success**, that it processed successfully; for **Fail**, a source-specific error (for example, a prompt to check the URL, file, or snippet and try again).

***

## Related

{% content-ref url="/pages/CPDl7PGr2ABWirxChzBX" %}
[Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md)
{% endcontent-ref %}

{% content-ref url="/pages/b0BvjBfTLQiXE86oBA4I" %}
[LLM processing](/docs/modules/ai-agents/workflows-and-actions/llm-processing.md)
{% endcontent-ref %}

{% content-ref url="/pages/YuPrI4B32HG10z1g9ZKt" %}
[Example system prompt](/docs/modules/ai-agents/knowledge/example-system-prompt.md)
{% endcontent-ref %}
