Skip to main content
net10.0.NETFramework4.6.2net8.0.NETStandard2.0

Postgres (with pgvector extension) provider for Microsoft.Extensions.VectorData by the .NET Community Toolkit

Published
Oct 29, 2026
19d ago
Total Downloads
79.7K
79,656

Install

dotnet add package CommunityToolkit.VectorData.PgVector --version 1.0.2
ProductVersions
.NET
net10.0net8.0
.NET Standard
netstandard2.0
Other
.NETFramework4.6.2

README

CommunityToolkit.VectorData.PgVector

This connector uses Postgres to implement Semantic Memory. It requires the pgvector extension to be installed on Postgres to implement vector similarity search.

What is pgvector?

pgvector is an open-source vector similarity search engine for Postgres. It supports exact and approximate nearest neighbor search, L2 distance, inner product, and cosine distance.

How to install the pgvector extension, please refer to its documentation.

This extension is also available for Azure Database for PostgreSQL - Flexible Server and Azure Cosmos DB for PostgreSQL.

Quick start

  1. To install pgvector using Docker:
docker run -d --name postgres-pgvector -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword pgvector/pgvector
  1. Create a database and enable pgvector extension on this database
docker exec -it postgres-pgvector psql -U postgres

postgres=# CREATE DATABASE sk_demo;
postgres=# \c sk_demo
sk_demo=# CREATE EXTENSION vector;

Note, "Azure Cosmos DB for PostgreSQL" uses SELECT CREATE_EXTENSION('vector'); to enable the extension.

For more information, see the Microsoft.Extensions.VectorData documentation.

Changes from Previous Version

No structural changes between v1.0.1 and v1.0.2.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.The published metadata declares 20 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.