For the complete documentation index, see llms.txt. This page is also available as Markdown.

PostgreSQL

The PostgreSQL Knowledge base allows you to use a PostgreSQL database with pgvector as a vector store for your AI workflows. This enables semantic search over your data stored in PostgreSQL, making it available as a retrieval source for agents, recipes, and copilots.

PostgreSQL can be used as a knowledgebase provider in two contexts:

  1. Recipe Knowledge Base Node : As a vector database backend for the native knowledge base in your recipe workflows

  2. Agent Tool : As a knowledgebase tool or dataset tool attached to Agent or Deep Agent nodes

Prerequisites

Before configuring a PostgreSQL knowledgebase, ensure you have:

  • A PostgreSQL instance (version 11+) with the pgvector extension installed and enabled.

  • Network connectivity between the platform and your PostgreSQL host.

  • A database user with read/write permissions on the target database.

  • An embeddings model configured in the platform (used to generate vector embeddings for your data).

Configure PostgreSQL Credentials

Before creating a Knowledge Base recipe that uses PostgreSQL as the vector store provider, the PostgreSQL database must be prepared and the connection credentials must be configured at the organization level.

This setup enables the Karini AI platform to securely connect to PostgreSQL for document ingestion, embedding persistence, vector indexing, and similarity-based retrieval operations.

PostgreSQL credentials are configured from the Organization page under the Vector Database Credentials section by selecting PostgreSQL Credentials.

Step 1 : Prepare the PostgreSQL Database

Before proceeding with recipe configuration, connect to the PostgreSQL database using a superuser account or a role with equivalent administrative privileges. For AWS RDS deployments, use a role with rds_superuser privileges.

Run the following SQL commands to enable vector support and create the Knowledge Base application role:

These permissions allow the Knowledge Base service to create and manage the required database objects, persist vector embeddings, create indexes, and execute retrieval queries during recipe processing.

Step 2 : Configure PostgreSQL Credentials

After the PostgreSQL database is prepared, configure the PostgreSQL connection details in the Karini AI platform at the organization level. These credentials are used by the platform to authenticate with PostgreSQL and execute Knowledge Base ingestion, embedding storage, indexing, and retrieval operations.

  1. Go to the Organization page.

  2. Open the Vector Database Credentials section.

  3. Select PostgreSQL Credentials.

  4. Enter the required PostgreSQL connection details.

  5. Save the configuration.

Configuration Fields

Field
Description

Host

PostgreSQL database host name or endpoint.

Port

PostgreSQL service port. The default port is 5432.

Database Name

Target PostgreSQL database used for Knowledge Base storage.

Schema

Target schema where Knowledge Base objects are created, such as public.

Username

PostgreSQL role configured for Knowledge Base access.

Password

Password associated with the configured PostgreSQL role.

After saving the credentials, the PostgreSQL connection becomes available for Knowledge Base recipes that use PostgreSQL as the vector store provider.

Refer to the Knowledge base recipe section for recipe configuration.

Last updated