PouryaKit.AI.Postgres
0.1.0-preview.1
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
<PackageReference Include="PouryaKit.AI.Postgres" Version="0.1.0-preview.1" />
<PackageVersion Include="PouryaKit.AI.Postgres" Version="0.1.0-preview.1" />
<PackageReference Include="PouryaKit.AI.Postgres" />
paket add PouryaKit.AI.Postgres --version 0.1.0-preview.1
#r "nuget: PouryaKit.AI.Postgres, 0.1.0-preview.1"
#:package PouryaKit.AI.Postgres@0.1.0-preview.1
#addin nuget:?package=PouryaKit.AI.Postgres&version=0.1.0-preview.1&prerelease
#tool nuget:?package=PouryaKit.AI.Postgres&version=0.1.0-preview.1&prerelease

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 | Versions 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. |
-
net10.0
- PouryaKit.AI (>= 0.1.0-preview.1)
- PouryaKit.Persistence.Postgres (>= 0.1.0-preview.1)
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 |