PouryaKit.AI.Postgres 0.1.0-preview.1

This is a prerelease version of PouryaKit.AI.Postgres.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PouryaKit.AI.Postgres --version 0.1.0-preview.1
                    
NuGet\Install-Package PouryaKit.AI.Postgres -Version 0.1.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PouryaKit.AI.Postgres" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PouryaKit.AI.Postgres" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="PouryaKit.AI.Postgres" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PouryaKit.AI.Postgres --version 0.1.0-preview.1
                    
#r "nuget: PouryaKit.AI.Postgres, 0.1.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PouryaKit.AI.Postgres@0.1.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PouryaKit.AI.Postgres&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PouryaKit.AI.Postgres&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

PouryaKit.AI.Postgres

NuGet .NET 10 License: MIT

PouryaKit.AI.Postgres

Text stored by its embedding and searched by meaning with pgvector. A command stores text under a key through IVectorStore, in the Module's own Unit of Work, so a rolled-back command stores nothing, and a query finds the nearest passages, always within the Operation's tenant.

Install

dotnet add package PouryaKit.AI.Postgres --prerelease

When to use it

  • You find stored text again by what it means.
  • A model looks passages up through a Gateway tool.
  • You embed text inside a command and want it to commit with the command.

It builds on PouryaKit.AI, which registers the embedding generator, and PouryaKit.Persistence.Postgres, whose Unit of Work it writes through.

Quick start

Add the vector store to a Module stored with UsePouryaKitPostgres, and create its collection in a migration, as the Kit's tests do. The Host registers its embedding generator with AddPouryaKitEmbeddings:

module.AddPouryaKitVectorStore();
migrationBuilder.CreateVectorCollection(VectorsModule.Passages, VectorsModule.Dimensions);

A command stores text under a key, then searches by meaning what it stored:

internal sealed class StoreThenSearchPassageCommandHandler(IVectorStore vectors)
    : CommandHandler<StoreThenSearchPassageCommand, IReadOnlyList<VectorMatch>>
{
    public override async Task<Result<IReadOnlyList<VectorMatch>>> Handle(
        StoreThenSearchPassageCommand command,
        CancellationToken cancellationToken
    )
    {
        await vectors.StoreAsync(
            VectorsModule.Passages,
            command.Key,
            command.Text,
            cancellationToken
        );
        return Result.Success(
            await vectors.SearchAsync(VectorsModule.Passages, command.Text, 1, cancellationToken)
        );
    }
}

What you get

  • Each row keyed by the Operation's tenant: a call never passes a tenant.
  • A store that commits or rolls back with the command.
  • In a command, a search that sees what the command stored.

Storing calls the model inside the Unit of Work's transaction, so a slow model holds the Operation's locks.

Learn more

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.2 74 11/1/2026
0.1.0-preview.1 63 10/31/2026
0.1.0-preview.0.28 70 10/26/2026