pgvector

By pgvector

Postgres extension for vector similarity search — add agent memory and RAG without a separate database.

v0.8.52026-07-08SQL / CPostgreSQL
22.3k Completely free Open source

Doc version 1.0 · Updated

Overview

pgvector adds a vector column type and similarity operators to PostgreSQL.
If your stack already runs Postgres, it is the lowest-friction way to give an agent long-term memory or RAG retrieval — no extra service to operate.

flowchart LR
  text[text] -->|embedding model| vec[vector]
  vec --> pg[(Postgres + pgvector)]
  q[query vector] -->|<=> cosine| pg
  pg --> top[top-k rows]

The Code samples tab shows the schema/query and the index — pick from the selector to compare.

When to use it

Choose pgvector when you want vector search co-located with your relational data and prefer operating one database instead of adding a dedicated vector store.