Skip to content

aidb

In-database AI pipelines for chunking, embedding, retrieval, and generation.

aidb · In-database AI pipelines for chunking, embedding, retrieval, and generation.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101864aidbaidb7.10.0RAGProprietaryUnknown
Relationships
Requiresvector

Usage

Sources:

aidb is EDB’s in-database AI pipeline extension for parsing, chunking, embedding, indexing, retrieving, reranking, and generating over PostgreSQL data.

Enablement and Access

Install AIDB 7, preload it, restart, and create it with CASCADE and its required vector dependency:

shared_preload_libraries = 'aidb'
CREATE EXTENSION aidb CASCADE;
GRANT aidb_users TO app_user;

aidb_users grants access to AIDB routines but not to application tables; grant source/target table privileges separately. PGD users must also call aidb.bdr_setup() after creation.

Create and Query a Pipeline

SELECT aidb.create_pipeline(
  name               => 'support_kb',
  source             => 'support_articles',
  source_key_column  => 'id',
  source_data_column => 'body',
  step_1             => 'KnowledgeBase',
  step_1_options     => aidb.knowledge_base_config(
    model       => 'bge-small-en-v1.5-f16',
    data_format => 'Text'
  ),
  auto_processing    => 'Disabled'
);

SELECT aidb.run_pipeline('support_kb');
SELECT * FROM aidb.retrieve_text('public.pipeline_support_kb', 'connection exhaustion', 3);

Resource and Security Boundaries

Models may download on first use and inference consumes backend/background-worker CPU, memory, and storage. Limit pipeline roles, source-table privileges, model provenance, network egress, concurrency, and threading. External files or object storage additionally require EDB pgfs; because that provider identity conflicts with an unrelated open-source extension of the same name, verify the installed package rather than relying on name alone.

7.10.0 Upgrade and Ownership

AIDB 7.10.0 requires a matching current PostgreSQL minor release, for example 18.7; the packages do not enforce that prerequisite. Upgrade the server and AIDB together, then run ALTER EXTENSION aidb UPDATE in each installed database. If remaining on an older server minor, the security advisory identifies 7.9.0 as a compatible fixed alternative.

Pipeline changes and execution require the ability to SET ROLE to the owner. Review agent/tool ownership and custom function grants after upgrading. Encoding functions now return vector instead of real[]; dependent objects can block the upgrade. Save their definitions and follow the documented migration without DROP EXTENSION or cascading drops. Check orphaned pipeline owners before upgrading, since their triggers can reject source-table writes.

Configuration and history tables now participate in pg_dump; caches, metrics and telemetry remain excluded. Follow the release note’s special agent-memory migration procedure if the update warns about a nonstandard pg_agents namespace ID, and test restoration.

MCP Authentication Advisory

The December 3, 2026 advisory CVE-2026-141488 affects the enabled MCP endpoint in AIDB 7.7.0–7.8.0 when its local PostgreSQL connection matches peer, trust or ident authentication. An HTTP password is then not actually checked. The endpoint is disabled by default; preloading AIDB alone does not enable it.

AIDB 7.9.0 and later reject connections admitted without password validation. Use password-authenticated MCP roles and check the matching local connection rules. The fixed endpoint requires PostgreSQL 16 or later; this limit applies to the endpoint, not every AIDB feature. Until upgrading, disable the endpoint with edb.endpoints_mcp_enabled = off and reload configuration, and restrict access to its port. Coordinate authentication changes with local administrative access.

Table reader