# Knowledge bases

> Put your website, your files and your own answers in a knowledge base, then link it to your agents so they answer leads with your real facts.

Source: https://docs.whatsetter.com/dashboard/knowledge-base/

A knowledge base is what your agent reads before it answers a lead: the pages
of your website, your files and the answers you write yourself. You create a
base once, then link it to one or several agents. It all lives under
**Knowledge** in the menu.

## What a knowledge base is

Open **Knowledge** in the menu. Each line is a base: a binder with a name. A
base holds three kinds of sources.

| Source | What it is |
|---|---|
| **A website** | Its pages. They are read when you add the site, then read again about once a week on a paid plan. The site's other pages are only read if you choose them. |
| **A file** | A brochure, a price list, your terms. |
| **Your answers** | Questions and answers you write by hand. |

A base is linked to one or several agents, and they answer from it. An agent
answers from one base at a time.

If you knew the previous dashboard: the page was called Knowledge Base and a
base had Documents, Websites and Q&A lists. Documents are now files. Q&A
lists are now **Your answers**: one per base, with nothing to create or name.
"Re-sync" is now **Read the website again**, and connecting an agent is now
linking it. Campaigns are now called Agents.

## What the Knowledge page shows

Open **Knowledge**. The top of the page counts your bases. Each line shows
four things:

- **Knowledge base**: its name.
- **Contains**: what it holds, for example "1 website · 2 files · 12 answers", or **Empty**.
- **Agents**: the agents that answer from it.
- **State**: one word, such as **Ready** or **Reading**.

Bases are grouped. **To check** comes first: bases that are unreadable, empty
or out of date while an agent that is not a draft answers from them. Then
come the bases linked to an agent, those whose agent is in service first.
Bases no agent uses are folded under **No agent** at the bottom: click
**Show**. Above 6 bases, a search field looks through base names, source
names and agent names.

Click a line to open the base: its **Content** on the left, its
**Linked agents** on the right.

## Create a knowledge base

1. Open **Knowledge** and click **New knowledge base**. If you have no base yet, the button reads **Create a knowledge base**.
2. Type a **Name**, for example the name of your business. It can hold up to 120 characters.
3. Click **Create**.

You land inside the new base. It is empty until you add a source.

Creating a base needs a paid plan and the **Edit agents and their prompts**
permission. Each plan includes a number of bases: 1 on Starter, 3 on
Business, 10 on Scale. Once you reach it, the window shows a message such as
**Your plan includes 1 knowledge base.** and a **See plans** link. On the
free plan, the button carries a lock and opens
**Create and fill a knowledge base**, which leads to the plans.

## The base that came with your agent

Open **Knowledge**: if you created an agent from your website, a base is
already there. The pages read while the agent was being created were put in a
base, and the agent was linked to it. The same goes for an agent created from
a document. If your team already had a base holding the same website, the new
agent was linked to that base, so nothing is read twice.

Creating the agent stays quick: it reads the home page and up to five main
pages, not the whole site. To have your agent read more of them, see
[Add more pages of a website](#add-more-pages-of-a-website).

This also happens on the free plan. The page then says that your agent's base
was filled when it was created. You can open it, see its pages and click
**Read the website again**. To create another base, or to add a website, a
file or your answers, you need a paid plan.

See [Create your AI agent](/getting-started/agent/).

## Add a website

1. Open **Knowledge**, open your base and click **Add**.
2. Under **What do you want to add?**, choose **A website**.
3. Type the **Website address**, with or without `https://`.
4. Click **Read this website**.

What is read:

- The address you gave first, then the pages found on the same domain.
- Up to your plan's number of pages per site: 50, 150 or 200. The window shows yours.
- Text only. Images, PDFs and other files of the site are skipped.

The site's line shows **Reading** with the number of pages left, then
**Ready**. Keep a **Knowledge** page open while it reads. If you leave, the
reading resumes when you come back.

Two messages can stop you. **This website is already in your knowledge.**
means the base already holds this site.
**This website does not open. Check the address.** means the site could not
be reached.

## Add a file

1. Open **Knowledge**, open your base and click **Add**.
2. Choose **A file**.
3. Drop the file in the box, or click the box to choose it.
4. Click **Add the file**.

Accepted formats: PDF, Word (.docx, .doc), text (.txt, .md), HTML and CSV.
One file at a time, 50 MB at most.

The file's line shows **Reading** while it is read, then **Ready**. The page
refreshes by itself. Another format is refused with
**This format is not read. Choose a PDF, a Word, text, HTML or CSV file.** A
file that is too heavy is refused with **This file is over 50 MB.**

Click a file to open its panel. **Open** shows a PDF, HTML, text or CSV file
in the browser. **Download** saves any file. There is no edit button: to
update a file, remove it and add the new version.

## Add an answer you write

1. Open **Knowledge**, open your base and click **Add**.
2. Choose **An answer you write**.
3. Fill in **The question**, for example "Do you have parking?", then **Your answer**.
4. Click **Save the answer**.

Use it for a question you are asked often. All the answers of a base appear
as one source called **Your answers**, with their count. Your agents can use
an answer as soon as it is saved.

Limits: a question holds up to 1,000 characters, an answer up to 4,000, and a
base holds up to 200 answers on every paid plan. At that point the window
says **You have reached 200 answers, the maximum.**

## Edit or delete an answer

Open **Knowledge**, open the base and click **Your answers**. The panel
**Questions and answers** lists them, the newest first.

- The pencil (**Edit**) opens the question and the answer. Change them and click **Save**. Your agents use the new text right away.
- The bin (**Delete**) asks **Delete this answer?**. Click **Delete** to confirm, or **Keep**.
- **New answer** adds one without leaving the panel, until the base reaches 200 answers.

When you delete the last answer of a base, **Your answers** disappears from
its content. It comes back with the next answer you save.

## Link a base to an agent

Two places do the same thing.

From the base: open **Knowledge**, open the base and look at
**Linked agents** on the right. Click **Link an agent**, tick one or several
agents, then click the button that reads **Link 1 agent**, with your own
count. Agents are grouped under **Active** and **Paused**. Drafts are behind
a link at the bottom of the list.

From the agent: open **Agents**, click your agent, then the **Settings** tab
and the **Knowledge** section. Choose a base in the **Knowledge base** list
and click **Save**.

An agent answers from one base at a time. If the agent you pick already uses
another base, the window warns you:
**This agent will leave the knowledge base it uses today.** Several agents
can share the same base.

## Unlink a base from an agent

Open **Knowledge**, open the base and, in **Linked agents**, click the
**Unlink** icon on the agent's line. Or open **Agents**, click your agent,
then the **Settings** tab and the **Knowledge** section, choose **None** in
the **Knowledge base** list and click **Save**.

The base and its content are not touched: only the link goes. The agent then
has no knowledge. It answers from its prompt alone, and its settings say that
it is not linked to a knowledge base. You can link it to another base at any
time.

A base that no agent uses moves to the **No agent** group at the bottom of
the **Knowledge** page.

## How your agent uses the base in a conversation

There is nothing to switch on. Once a base is linked (open **Agents**, your
agent, **Settings**, then **Knowledge** to check), your agent uses it each
time it answers a message from a lead.

- It searches the base with the lead's latest messages and keeps the passages that match best, 4 at most.
- Those passages are handed to it as source material for facts, with the page or the file they come from.
- Your content can be written in another language than the conversation: the agent keeps answering in the lead's language.
- When nothing in the base matches, it answers from its prompt alone.
- If the base cannot be reached for a moment, the reply still leaves.

The first message and the automatic follow-ups do not search the base. A
page, a file or an answer is used as soon as it has been read. You can check
what your agent answers in its **Test** tab: see
[Test your agent](/dashboard/playground/).

## What the states mean

On the **Knowledge** page and inside a base, each line carries one state.

| State | Meaning |
|---|---|
| **Reading** | A website or a file is being read. For a website, the number of pages left follows. |
| **Ready** | It has been read and your agents can use it. |
| **Unreadable** | The reading failed. Open the line to see why. |
| **Empty** | Nothing has been read yet. A base with no source is empty too. |
| **Out of date** | The website has not been read in full for more than 30 days, while an agent that is not a draft answers from the base. |
| **No agent** | Shown on a base: its content is ready, but no agent is linked to it. |

A website is **Ready** as soon as one of its pages has been read, even if
other pages failed. A base takes the state of its sources: **Reading** while
one of them is being read, **Unreadable** when one of them failed.

## A source shows Unreadable

Open **Knowledge**, open the base and click the line marked **Unreadable**.
The panel gives the reason.

| Message | What to do |
|---|---|
| **The website does not answer. Check its address, then read it again.** | Check that the site is online, then click **Read again** on its line. |
| **No readable text was found on these pages.** | The pages hold no text, for example only images. Add that content as a file or as answers. |
| **Reading failed. Read the source again to retry.** | For a website, click **Read again**. For a file, remove it and add it again. |

Inside a website that is **Ready**, a single page can still read
**Unreadable page** in the list of pages. The other pages are used normally.

## Update a website

Open **Knowledge**, open the base and click the website. Its panel shows when
the last full read took place.

- Every week, a website is read again by itself when its base is linked to an active or paused agent and your team is on a paid plan. This re-read covers the pages already known. It does not look for new pages.
- **Read the website again**, at the bottom of the panel, reads the pages your agent already has again right now. It adds none: the site's new pages are chosen with **See the site's other pages**.
- A page whose text has not changed keeps what was already learned from it.

On the free plan there is no weekly re-read: click
**Read the website again** yourself. When a site has not been read for more
than 30 days while an agent uses it, its line shows **Out of date** with a
**Read again** button.

## Add more pages of a website

A website never grows in your base on its own: only the pages your agent
already has are read again. For it to read others, such as a services page or
a new article, you choose them. This needs a paid plan.

1. Open **Knowledge**, open the base and click the website. The top of the panel says how many pages your agent has read, for example "Your agent has read 1 page of this site."
2. Click **See the site's other pages**. The site's pages are looked for once, then listed under **The site's other pages**.
3. Tick the pages your agent should read. Legal, account and job pages start unticked, marked **Legal, account or job page**: you can still tick them. **Tick all** and **Untick all** go faster.
4. Click **Read these pages** at the bottom of the panel. The button says how many pages you ticked.

The panel shows "14 pages added: your agent is reading them now." The
website's line turns to **Reading**, then **Ready**. The pages you added are
read again every week with the others.

- The list is kept: opening it again does not look at the site again. **Look again** does, for example after new pages went online.
- Your plan sets the number of pages per site (50, 150 or 200). If you tick more than are left, a message says so and the button waits until you untick some.
- **No other page found: your agent already has every page of this site.** means there is nothing to add.

## Leave a page of a website out

Open **Knowledge**, open the base and click the website. The panel lists the
**Pages your agent reads**, each one with a switch. Above 8 pages, a **Search a page** field
appears.

- Turn a page's switch off: your agents stop using that page at once, and the page reads **Page left out**.
- Turn it back on: the page reads **Waiting to be read**, then is used again once read.
- A page left out stays out when the site is read again, by you or by the weekly re-read.

Use it for pages your agent should not quote, such as an old offer or legal
notices. **Open the website** opens the site in a new tab.

## Remove a website or a file

Open **Knowledge**, open the base and click the website or the file. At the
bottom of the panel, click **Remove this website** or **Remove this file**,
then confirm with **Remove**. **Keep** cancels.

Your agents forget that source at once: its pages or its content are no
longer used in replies. For a file, the stored copy is deleted too.

> **This cannot be undone**
You can add the website or the file again, but a website is then read from
the start, and the pages you had left out come back.

Removing a source frees a place in your plan's count of websites or files for
that base.

## Rename or delete a base

Open **Knowledge** and open the base.

- Rename: click the name of the base at the top, type the new one and press Enter. You can also open **More actions**, the button with three dots, and choose **Rename**.
- Delete: open **More actions**, choose **Delete knowledge base** and confirm.

> **Deleting a base cannot be undone**
Its sources are permanently deleted: websites, files and answers. The agents
linked to it are unlinked and have no knowledge until you link them to
another base. The confirmation window tells you so before you confirm.

## Limits by plan

Open **Subscription**, then **Compare in detail**, to see these numbers in
the app.

| Plan | Knowledge bases | Websites per base | Pages read per site | Files per base | Answers per base |
|---|---|---|---|---|---|
| Starter | 1 | 1 | 50 | 3 | 200 |
| Business | 3 | 3 | 150 | 5 | 200 |
| Scale | 10 | 10 | 200 | 10 | 200 |

On the free plan you cannot create a base or add a source: the
**New knowledge base** and **Add** buttons carry a lock and lead to the
plans. You keep the base filled when your agent was created, and you can read
its website again.

When a limit is reached, the **Add** window says so, for example
**Your plan includes 1 website.**, with a **See plans** link. See
[Plan & billing](/dashboard/billing/).

## Who can change knowledge

Everyone who has the **See the agents** permission can open **Knowledge** and
read what a base holds. Creating a base, adding or removing a source, reading
a website again and linking agents need the
**Edit agents and their prompts** permission.

- **Owner**, **Admin** and **Editor** can change everything on this page.
- A **Viewer** reads only: the buttons that change something are not shown.
- A **Responder** does not see **Knowledge** in the menu.

A custom set of permissions follows the same two rules. See
[Team & roles](/dashboard/team/).

## Knowledge in the API and with an AI assistant

- `GET /knowledge-bases` lists your bases, their sources and the agents linked to each one.
- `GET /knowledge-bases/{id}/search` returns the passages an agent is given for a message, with the same search as when it replies.
- The answers of **Your answers** can be added, corrected and removed with `POST`, `PATCH` and `DELETE` on `/knowledge-bases/{id}/answers`. Websites and files are added here, in the dashboard.

See [API: knowledge bases](/developers/guides/knowledge/).

## Related

- [My Styles](/dashboard/styles/)
- [Your agent's prompt](/dashboard/prompt/)
- [Test your agent](/dashboard/playground/)
- [Agents](/dashboard/agents/)
