# timescale/pgai

A suite of tools to develop RAG, semantic search, and other AI applications more easily with PostgreSQL

Repository: https://github.com/timescale/pgai
Canonical: https://ross.abutalabs.com/products/pgai
Language: PLpgSQL
License: PostgreSQL
License Family: other
Topics: ai, llm, postgresql, rag
Archived: true
Last push: 2026-05-27T13:37:44+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 84, release rhythm 52, longevity 59
- inputs: {"age_days": 839, "days_push": 98, "days_rel": 323, "gap_med": 5, "n_releases_24m": 40}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5806, forks 314 (observed 2026-08-28T04:09:29.865450+00:00)

## What it is
pgai is a Python library and set of PostgreSQL tools from Timescale that turns PostgreSQL into a retrieval engine for RAG and agentic applications, with automatic embedding generation and synchronization from database rows and S3 documents. It also provides a semantic catalog for natural-language-to-SQL and works with pgvector/pgvectorscale on any PostgreSQL instance.

## Use cases
- build a rag application on postgres
- automatically generate and sync vector embeddings for database rows
- semantic search over documents stored in s3 and postgres
- natural language to sql for ai agents
- embed postgres data with openai or other embedding models
- add vector search to an existing postgres database

## When to choose
- you already run postgres and want rag/semantic search without a separate vector database
- you need embeddings that stay in sync as underlying data changes
- you want text-to-sql grounded in database metadata for agentic apps

## When to avoid
- you need actively maintained software - the project was discontinued in February 2026
- you want a managed vector database outside postgres
- you need non-postgres data stores

## Facets
- artifact type: library
- maturity: abandoned
- function: rag, vector-database, database, search-engine, llm-inference, etl
- domain: databases, artificial-intelligence, large-language-models
- platform: python, self-hosted, cloud
- tags: pgvector, embeddings, semantic-search, text-to-sql, postgres-extension, vectorizer-worker, discontinued, retrieval-augmented-generation, search, data-engineering, postgresql, docker

## Member repositories
- timescale/pgai (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:29.865450+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:38.474523+00:00, confidence not recorded.
  - readme: https://github.com/timescale/pgai (fetched 2026-08-28T04:09:29.865450+00:00, sha 1b9df8aabdfe)
- Data as of 2026-08-30T08:39:29.467469+00:00.
