# Data sources

> Give your agent the knowledge it needs from files, website pages, text, and Q&A, then keep it up to date.

Data sources are the knowledge your agent uses to answer questions: your help center, policy documents, product details, and common questions with their answers. The better your knowledge, the better your agent's answers.

**Where to find it:** open your agent and go to **Build → Data Sources**.

![The Data Sources page for Acme: a help center website, a returns policy PDF, Q&A pairs, and text notes](https://hourzero.dev/marketing/app/data-sources-light.webp "Each row is one source. The banner at the top tells you when changes are ready to train.")

## How it works

You can add four kinds of knowledge:

- **Webpages**: pages from your website, such as your help center or shipping page.
- **Files**: documents like PDFs, Word files, spreadsheets, and slides.
- **Text**: a note you paste in, such as your holiday opening hours.
- **Q&A**: questions with the exact answers you want customers to get.

You can also ask [Backstage](https://hourzero.dev/docs/ai-agent-management/backstage) to add webpages, text, or Q&A for you. It prepares the new source and adds it once you approve.

After you add or change knowledge, you **train** the agent. Training means Hourzero reads all your current sources so the agent can use them. Then you test in the Playground and publish.

1. **Add knowledge**: Add pages, files, text, or Q&A.
2. **Train**: Hourzero reads your sources.
3. **Test**: Ask questions in the Playground.
4. **Publish**: Live channels get the new knowledge.

> [!IMPORTANT]
> Your live agent keeps using the knowledge it had when you last published. New or changed sources reach customers only after you **retrain** and then **publish** each channel.

## Add pages from your website

1. Select **Add new webpage**. The **Add webpages** window opens.
2. Under **Website**, type your website address, for example `acme.com`. To add one section, type its address, for example `acme.com/help`.
3. Select **Find pages**. Hourzero explores the website the way you'd brief a new employee: it reads the key pages and policies in full, looks up what other websites say about the business, lists the questions customers ask, and picks the pages that answer them. You can watch what it's reading as it goes, and select **Stop** to cancel. Large online stores can take up to four minutes.
4. Check its picks. Hourzero says how many customer questions the pages answer and lists the ones the website doesn't fully answer; add those as Q&A so your agent doesn't have to guess. Each picked page has a short note on what it tells customers, and the pages it didn't pick are listed below them. Tick or untick pages to change the selection. Use **Search** to find a page in a long list, and **Select all** or **Deselect all** to go faster.
5. Optional: if a page is missing, type it in **Add another URL** and select **Add URL**. It must be on the same website.
6. Select **Add pages**.

You can add up to 100 pages at a time. On a large store, Hourzero doesn't try to pick every product: it picks your categories and collections, which show many products and their prices, plus your featured products. All the pages appear as one source in the list. Select the arrow under the source name to see every page it includes.

### Add pages from a sitemap

If Hourzero misses pages, or your website blocks automated visits, add pages from your sitemap file instead of typing them one by one. A sitemap is a file that lists every page on a website. Most websites have one at an address like `acme.com/sitemap.xml`; save it from your browser or ask your web developer for it.

1. In the **Add webpages** window, select **Upload sitemap.xml** under **Website**. If you already found pages, select **Upload sitemap** above the page list instead.
2. Choose the file. You can use an XML sitemap, a `.xml.gz` file, or a text file with one address per line.
3. Hourzero lists the sitemap's pages. Pages already in the list aren't added twice, and pages from other websites are skipped.

Hourzero reads the file in your browser and doesn't store it. If the file is a sitemap index, which lists other sitemaps, Hourzero fetches those sitemaps from your website.

> [!NOTE]
> Hourzero reads your pages when you add them, and again each time you retrain. Pages it already read while exploring your website are used as they were read, so they're ready right away. When your website changes, retrain and publish so your agent uses the new content.

To check what Hourzero read from a page, select **View parsed content** (the eye icon) on the source's row. You can open each page from there with **Open page**.

### Pages that need attention

Some websites don't show their content to automated visits. Hourzero checks every page it reads, when you add it and each time you retrain, so a broken page doesn't become something your agent "knows".

When there's a problem, the source's row says so, for example **1 page isn't used · 1 to check**. Select it to open the parsed content, where the page is marked:

| Mark | What happened | What the agent does |
| --- | --- | --- |
| **Not used** | Hourzero couldn't read the page at all, or got a bot check, a cookie banner, a sign-in page, a "turn on JavaScript" message, or almost no text instead of the page. | Leaves the page out. |
| **Check** | Only a little text came back (tabs, accordions, or tables may be missing), email addresses are hidden by the website, or the text is in a different language than the page's address. | Uses the page. |

A page that can't be read doesn't stop the others: the source is added with the pages that worked. It only fails when none of the selected pages could be read.

To use a page marked **Not used**, open it in your browser, copy its text, and add it as a [Text source](#paste-text). For a page marked **Check**, add whatever is missing as text or a question and answer.

If a page loaded fine before but shows a bot check or can't be reached when you retrain, Hourzero keeps the copy it already had and marks the page **Check**, so your agent doesn't lose what it knew.

## Upload files

1. Select **Add new file**. The **Add files** window opens.
2. Drag your files into the window, or click it to choose files from your computer.
3. Select **Add files**. Each file shows as its own source as soon as it's uploaded.
4. Hourzero reads each file in the background. Its row shows **Pending** or **Processing** until it's done, then **Ready**. Large PDFs can take a few minutes. You can leave the page meanwhile.

If a file can't be read, its row shows **Failed** with the reason, for example when a PDF is password-protected. Archive and delete that source, fix the file, and upload it again.

You can upload these file types: PDF, Word (`.doc` and `.docx`), Excel (`.xlsx`), PowerPoint (`.pptx`), CSV, plain text (`.txt`), and Markdown (`.md` and `.mdx`).

PDFs are read page by page, so scanned documents and tables work too.

### File limits

- Up to 10 files at a time.
- Hourzero reads up to 400,000 characters from each file. Anything after that is cut off, so split very long documents into smaller files.
- The largest file you can upload depends on your plan:

| Plan | Largest file |
| --- | --- |
| Free | 5 MB |
| Hobby | 10 MB |
| Standard | 25 MB |
| Pro | 50 MB |
| Enterprise | 100 MB |

Your plan also limits how many files your workspace can store in total. See [Plans and billing](https://hourzero.dev/docs/workspace-management/billing) for details.

## Paste text

Use text for short pieces of information that aren't on your website, like a new policy or a seasonal notice.

1. Select **Add new text**. The **Add plain text** window opens.
2. Give it a clear **Title**, for example `Holiday opening hours`.
3. Paste or type the information in **Content**.
4. Select **Add text**.

For example:

```text
Title: Holiday opening hours

Our support team is available 9:00–17:00 (CET) on weekdays.
Between December 24 and January 1, we answer messages within 2 business days.
Orders placed after December 18 may arrive after Christmas.
```

## Add questions and answers

Q&A is best for questions you already know customers will ask, where you want the agent to give a specific answer.

1. Select **Add new Q&A**. The **Add Q&A** window opens.
2. Type a **Question** and its **Answer**.
3. To add more, select **Add pair**. The window shows how many pairs are ready.
4. Select **Add Q&A**.

For example:

```text
Question: Can I exchange a jacket for a different size?
Answer: Yes. You can exchange unworn items within 30 days of delivery.
Start the exchange from your order page, and we'll send a free return label.
```

> [!TIP]
> Write questions the way customers ask them, not the way your team talks. "Can I swap my jacket for a bigger one?" is closer to what people type than "Size exchange procedure."

## Train your agent

The banner above the list shows where your knowledge stands:

- **Preparing sources…** means Hourzero is still reading new sources. Wait until they're ready.
- **Source changes are ready to train** means you've added or changed something since the last training.
- **Agent is trained** means the agent is using all your current sources.

To train:

1. Wait until your new sources show **Ready** in the **Status** column.
2. Select **Retrain agent** (or **Train agent** the first time). When you retrain, Hourzero first reads every active webpage again from your website.
3. The banner shows **Training agent…** and how many sources are done. You can leave the page while it runs.
4. When it finishes, a message says **Training complete**.
5. Test a few questions in the [Playground](https://hourzero.dev/docs/ai-agent-management/playground), then publish each channel.

When you first create an agent, training starts on its own once your sources are ready. After that, you start it yourself.

If a webpage can't be read during a retrain, for example because the website is slow or offline, Hourzero keeps the copy it already had, marks the page **Check**, and finishes training. Check that the page loads in your browser, then retrain to pick up its latest text. Training stops, and the banner names the page, only when a page that can't be read has no earlier copy to fall back on.

## Resolve facts that disagree

After each training, Hourzero checks your sources for two problems that lead to wrong answers:

- **Sources disagree**: two pages, or two parts of one page, give different values for the same thing. For example, your Returns page says 14 days and your returns policy PDF says 30 days.
- **Offer ended**: a page still presents a promotion, event, or seasonal price as current or upcoming after its end date has passed. Pages that list it as over, such as a past events page or a news story about an event that already happened, aren't flagged.

Each one shows up under **Decisions**, above your list of sources, with the exact words from each page and a link to it. To decide:

- **Use [value]** tells the agent which value is right. Pages that say otherwise are treated as out of date.
- **It has ended** tells the agent not to present an ended offer as current.
- **Write my own** lets you say what's true in your own words, for example when neither value is right.
- **Not a conflict** or **Ignore** closes the item without changing anything. Hourzero won't raise it again.

Your decisions are saved, one line each, to a Text source called **Owner clarifications**. The agent follows them over anything your other sources say. Like any change to your sources, they reach the agent when you retrain and reach customers when you publish. You can edit the **Owner clarifications** source at any time.

To check again without retraining, select **Check sources**. The check runs in the background, so you can leave the page. Hourzero also checks every day for offers that have ended since.

> [!TIP]
> Decisions fix what the agent says. Update the pages on your website too, so customers who read them see the same thing.

## Check a source's status

Each row shows the source's **Type**, **Status**, how many **Characters** of text Hourzero read, and when it was **Added**.

| Status | What it means |
| --- | --- |
| **Pending** or **Processing** | Hourzero is still reading the source. |
| **Ready** | The source is ready to train. |
| **Failed** | Hourzero couldn't read it. The reason appears under the source name. |
| **Archived** | The source is set aside and won't be used in the next training. |

If a source fails, check the message under its name. Common fixes are uploading a different copy of the file or checking that the page loads in your browser.

## Edit a source

You can fix or update a source without adding it again.

1. Select **Edit source** (the pencil icon) on the source's row.
2. Change the **Source name** or the content. For files, you edit the text Hourzero read; the original file stays the same. For webpages, you can only change the source name: page text comes from your website, so update the page there and retrain.
3. Select **Save changes**. A message confirms **Source updated**.
4. Retrain your agent, then publish.

## Stop using a source

There's no on/off switch for sources. To stop using one, archive it. Archiving is safe: you can restore it at any time.

1. Select **Archive source** (the box icon) on the source's row.
2. Confirm with **Archive source**. The row fades and shows **Archived**.
3. Retrain your agent and publish, so the agent stops using it.

Live channels keep using what they were trained on until you retrain and publish.

To use it again, select **Restore source** on the archived row, then retrain.

## Delete a source for good

Deleting removes a source and its content permanently. For files, it also deletes the uploaded file. This can't be undone.

Deleting is always two steps: archive, then delete.

1. Select **Archive source** on the source's row and confirm. You can only delete archived sources.
2. On the archived row, select **Delete permanently**.
3. Read the window. If the source can be deleted, select **Delete permanently** again.

If a live channel is still answering with this source, Hourzero won't delete it yet. The window lists each one, for example "Chat Bubble deployment (v4)". Retrain your agent, publish each listed channel, then try again.

This protects your live agent from losing knowledge it still relies on.

To remove a single page from a webpage source, archive the source first. Then open **View parsed content** and remove that page.

## Tips for good knowledge

![Acme Support answering a shipping question, then saying it couldn't find anything about P.O. box delivery](https://hourzero.dev/marketing/app/widget-sources-light.webp "When the knowledge covers a question, the agent answers. When it doesn't, it says so instead of guessing.")

- **Start with what customers ask most.** Look at your last 20 support emails or chats and make sure each question has an answer in your sources.
- **Keep one version of each fact.** If your return window is in a PDF and on a web page, make sure both say the same thing. Conflicting sources lead to confusing answers. [Decisions](#resolve-facts-that-disagree) points out the ones Hourzero finds.
- **Prefer clear, current pages.** Leave out outdated pages, blog posts, and marketing pages that don't answer real questions.
- **Use Q&A for exact wording.** Prices, legal phrases, and promises are best as Q&A pairs.
- **Fill gaps you find.** When the agent says it couldn't find something, add that information and retrain. The [Suggestions](https://hourzero.dev/docs/ai-agent-management/suggestions) page collects these gaps for you.

> [!WARNING]
> Don't add private information you wouldn't want a customer to see, like internal pricing notes or staff phone numbers. The agent may use anything in its knowledge when it answers.

## Common questions

### I added a source, but the agent doesn't know about it.

Make sure the source shows **Ready**, then select **Retrain agent**. To update live channels, publish them after training.

### My website changed. Will the agent see the new content?

Yes, after you retrain. Retraining reads every active webpage again, so the agent picks up your changes. Publish each channel to update your live agent. If a page can't be read again, the agent keeps using the previous copy (see [Pages that need attention](#pages-that-need-attention)).

### Why can't I delete a source?

It must be archived first, and no live channel can still be using it. The delete window lists the channels to retrain and publish.

## Next steps

- [Playground](https://hourzero.dev/docs/ai-agent-management/playground): Test your agent's answers and publish.
- [Instructions](https://hourzero.dev/docs/ai-agent-management/build): Tell your agent how to use its knowledge.
- [Suggestions](https://hourzero.dev/docs/ai-agent-management/suggestions): Find the questions your knowledge doesn't cover yet.
- [Best practices](https://hourzero.dev/docs/quick-start/best-practices): Habits that keep your agent accurate.
