AIDB is an EDB-maintained PostgreSQL extension that brings AI data workflows directly into your Postgres database. Define pipelines in SQL to parse, chunk, embed, and index your data — then query it with semantic search, hybrid search, and LLM-powered retrieval. Common use cases include Retrieval-Augmented Generation (RAG), semantic search over documents and images, and automated document ingestion pipelines from S3 or local storage.

Where to start

If you're new to AIDB, follow this end-to-end workflow:

  1. Overview — Learn the core concepts: what pipelines and knowledge bases are, and how they fit together.

  2. Install — Install the aidb package, configure shared_preload_libraries, and enable the extension in your database.

  3. Integrating models — Register the AI model that will power your pipeline. Every pipeline step that generates embeddings or processes text requires a model — either a built-in local model (no setup needed) or an external API model that you register with aidb.create_model(). Do this before creating pipelines.

  4. External storage (optional) — If your source data lives in S3 or a local file system rather than a Postgres table, configure a volume using PGFS so pipelines can read from it.

  5. Data pipelines — Define a pipeline that reads from your data source, transforms it (chunk, parse, embed), and writes the output to a knowledge base. This is where the model you registered in step 3 is put to work.

  6. Knowledge bases — Query the vector embeddings your pipeline produced. Use aidb.retrieve_text() or aidb.retrieve_key() for semantic search, or combine vector and keyword search with hybrid search.

Documentation map

SectionWhat it covers
Release notesWhat changed in each version
CompatibilitySupported platforms and Postgres versions for AIDB and PGFS
InstallHow to install and configure the AIDB extension
Integrating modelsLocal models, external APIs (OpenAI, NIM, Gemini, OpenRouter), and supported model variants
External storageUsing S3-compatible object stores and local file systems as pipeline data sources
Data pipelinesDefining pipelines, pipeline steps, orchestration, and examples
Knowledge basesSemantic search, hybrid search, and vector index options
SQL functionsStandalone SQL functions for chunking, parsing, OCR, summarization, and embedding
ReferenceFull API reference for all AIDB functions and views