---
title: "Integrate PostgreSQL Tools"
---

This guide walks you through configuring and authenticating the PostgreSQL tools in Airia, enabling your agents to interact with your PostgreSQL database.

Airia provides the following PostgreSQL tools:

*   **PostgreSQL Query Tool:** To execute SQL queries against your PostgreSQL database.
*   **PostgreSQL Metadata Retrieval Tool:** To retrieve schema metadata for your PostgreSQL database.

Both tools are required for comprehensive interaction with your PostgreSQL Database.

## Supported PostgreSQL Versions

Airia currently supports:

*   PostgreSQL version 9.3 and higher.

## Prerequisites

To connect Airia to your PostgreSQL server, you will need the following details:

*   **Hostname/Endpoint**
*   **Port** (default: `5432`)
*   **Database name**
*   **Basic Credentials:**
    *   **User name**
    *   **Password**

> 💡 Note: These details can be retrieved from your PostgreSQL server. For example, if your server is hosted on Azure, connection details can often be found on the connection page within the Azure portal.
>

## Add and Configure PostgreSQL Tools

Follow these steps to add and configure each PostgreSQL tool:

1.  **Add a PostgreSQL Tool:**
    *   Navigate to the **Tools** section in your Airia dashboard.
    *   From the library, select the PostgreSQL tool you wish to add (e.g., **PostgreSQL Query Tool**).

2.  **Provide Connection Details:**
    *   On the tool configuration page, provide the following details:
        *   **Hostname/Endpoint:** Your PostgreSQL server's hostname or IP address.
        *   **Port:** The port number your PostgreSQL server is listening on (default `5432`).
        *   **Database name:** The name of the database you want to connect to.
    *   For **User name** and **Password**, set them as a **Basic authentication credential**.
    
3.  **Save the Tool:**
    *   Click **Save** to add the configured tool to your library.
4.  **Repeat for Other Tool:**
    *   Repeat steps 1-3 for the **PostgreSQL Metadata Retrieval Tool**, providing the same connection values.
    

## Next Steps

Now that your PostgreSQL tools are added, you can integrate them into an agent to query your PostgreSQL database.

*   [Use PostgreSQL tools in an Agent](./using-database-tools-in-agents.mdx)

> ⚠️ Warning: Your PostgreSQL server must be accessible by Public IP. If you encounter connectivity issues, contact support@airia.com. We can provide you with the necessary IP addresses to whitelist on your firewall.
