> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vivi.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases

A **database knowledge base** connects your agent directly to structured data stored in a relational database. This allows the agent to retrieve rows, records, and facts in real time based on user queries.

***

## Set Up

<video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/ksg-ea85c748/CWiBk3e-zmdzqj2d/videos/vivi_database.mp4?fit=max&auto=format&n=CWiBk3e-zmdzqj2d&q=85&s=bb83ecb32d25aacfe86bbe253207d4b0" data-path="videos/vivi_database.mp4" />

To set up your database, navigate to the **Knowledge Base** tab and click **Add New**. Select **Database** from the Category dropdown menu and fill in the sections marked as required. In addition to a name and description, you’ll need to provide the following information: 

* **Database Server URL**
* **Database Name**
* **Database Username**
* **Database Password**
* **Database Port**
* **Database Engine** (PostgreSQL, MySQL, SQL Server, SQLite, Oracle)

After entering your database information, click Test DB Connection to confirm that the connection is valid before deployment. Once connected successfully, the agent will query the database when relevant to a user’s request. Responses will reflect the most current state of your data in real time.

***

## Best Practices

* Databases are ideal for frequently updated, **structured data** like inventory, schedules, or customer records.
* Ensure table and field names are **clear** and **well-documented** so queries return meaningful results.
