# Adding sources

> Add your website, PDFs, and text or markdown to a project's knowledge base, and let Lorito discover the content your agent answers from.

Source: https://www.lorito.ai/docs/knowledge-base/adding-sources

A project's knowledge base is the set of content your agent answers from. You build it by adding **sources**, such as a website, a PDF, or a block of text or markdown. Lorito reads each source, breaks it into smaller pieces, and indexes those pieces so the agent can find the right one when a visitor asks a question.

You add and manage sources from a project's **Knowledge** page. Click **Add source** and choose the type you want to add.

## Source types

Lorito supports three kinds of source today:

* **Website.** Enter a site address. Lorito discovers the individual pages on the site and indexes each one. A single website source contains many **items** (one per page).
* **PDF.** Upload a PDF document. Lorito extracts the text and indexes it.
* **Text / Markdown.** Paste content directly, either as plain text or markdown. Useful for FAQs, policies, or notes that don't live on a public page.

> Other source types are planned. For now, websites, PDFs, and text/markdown are the available options.

## Add a website

When you add a website, Lorito first **discovers** the pages on the site, shows you what it found, and only begins indexing once you confirm. This lets you see the scope, and trim it, before any content is indexed.

1. **Open the Add website dialog.** On the Knowledge page, click **Add source → Website**.

2. **Enter the site address.** Type the full URL, starting with `http://` or `https://` (for example, `https://example.com`), then click **Discover pages**.

   Lorito looks for the site's sitemap to build a list of pages. If it can't find one, it falls back to the links on the homepage and tells you the coverage may be incomplete.

3. **Review what was found.** You'll see how many pages were discovered. If the site blocks automated access, has no sitemap, or returned a partial list, Lorito shows a short note explaining what happened so you know whether coverage is complete.

4. **Adjust the scope (optional).** Open **Advanced options** to:

   * Set a **maximum number of pages** to index.
   * **Exclude paths** you don't want. Exclusions are prefix matches. For example, `/blog/` excludes everything under `/blog/`, while `/blog/post-slug` excludes only that one page.

   The dialog shows how many pages will be indexed as you adjust these.

5. **Start indexing.** Click **Start indexing**. The source appears in your list and begins indexing in the background, so you don't need to wait on the page. See [How indexing works](https://www.lorito.ai/docs/knowledge-base/how-indexing-works) for what each status means.

> If a site's `robots.txt` blocks crawlers, Lorito will tell you and, where possible, show the line you can add to allow indexing. You can also add the content another way, for example by pasting it as a text source.

## Add a PDF

1. **Open the Add PDF dialog.** Click **Add source → PDF**.

2. **Choose your file.** Drag a PDF onto the upload area or click to browse. Lorito accepts PDF files up to the size shown in the dialog.

3. **Set a title (optional).** Lorito pre-fills the title from the file name. Edit it to something clearer if you like. This is the label you'll see in your source list.

4. **Upload.** Click **Upload**. Lorito extracts the document's text and starts indexing it.

> **Warning**
>
> Lorito indexes a PDF's text content, so text-based documents work best. A scanned or image-only PDF with no selectable text can't be read, and Lorito will tell you if no text could be extracted.

If a document is longer than your plan covers, Lorito indexes as much as your plan allows and tells you how much was indexed. See [Capacity & limits](https://www.lorito.ai/docs/knowledge-base/capacity-and-limits).

## Add text or markdown

This is the quickest way to add content that isn't on a public page, such as an FAQ, a returns policy, opening hours, or anything you'd rather paste directly.

1. **Open the Add text dialog.** Click **Add source → Text / Markdown**.

2. **Choose a format.** Switch between **Plain text** and **Markdown** at the top. Use markdown if your content has headings, lists, or other structure you want preserved.

3. **Add a title and content.** Give the source a title, then paste your content. A counter shows how much you've added against your plan's limit.

4. **Add it.** Click **Add**. The content is indexed right away.

## Labels

Every source has a label, which is the name you see in your source list. For a website it defaults to the site, for a PDF the file name, and for text the title you enter. A clear label makes a long list easier to scan, especially when a project draws on many sources.

## Items: what's inside a website source

A website source isn't a single item. It's a collection of them, one per page Lorito discovered. After a website finishes indexing, expand its row in the source list to see each page, its word count, and its status. You can also search across every item in the project from the search box at the top of the Knowledge page.

For PDFs and text sources, the source itself is the unit of content.

## Next steps

* [How indexing works](https://www.lorito.ai/docs/knowledge-base/how-indexing-works) explains what happens after you add a source, and what each status means.
* [Re-scraping a website](https://www.lorito.ai/docs/knowledge-base/rescraping) picks up changes after a site is updated.
* [Capacity & limits](https://www.lorito.ai/docs/knowledge-base/capacity-and-limits) explains how usage is measured against your plan.
