Skip to main content
Knowledge bases provide context to your agent’s AI models. They allow your agent to answer questions based on documents, websites, or other data sources.

Creating a knowledge base

Create a knowledge source in src/knowledge/:

Data sources

You can add knowledge from several different data sources:

Website source

There are multiple ways to index websites:

From a sitemap

Index a website using a sitemap XML file:

From a base URL

Crawl a website starting from a base URL (requires the Browser integration):

From llms.txt

Index pages referenced in an llms.txt file:

From specific URLs

Index a specific list of URLs:

Website source options

File source

Index files from a local directory (development only):
Directory sources only work during development (adk dev). For production, use website sources or upload files to Botpress Cloud.

Directory source options

Table source

Index data from a table:

Using knowledge in conversations

Provide knowledge bases to your conversation handlers:

Refreshing knowledge

Refresh knowledge bases to update their content:

Force refresh

Force re-indexing of all content even if unchanged:

Refresh a specific source

Refresh a single data source within a knowledge base:

Reference

Knowledge props