PouryaKit.AI 0.1.0-preview.2

This is a prerelease version of PouryaKit.AI.
dotnet add package PouryaKit.AI --version 0.1.0-preview.2
                    
NuGet\Install-Package PouryaKit.AI -Version 0.1.0-preview.2
                    
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" Version="0.1.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PouryaKit.AI" Version="0.1.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="PouryaKit.AI" />
                    
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 --version 0.1.0-preview.2
                    
#r "nuget: PouryaKit.AI, 0.1.0-preview.2"
                    
#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@0.1.0-preview.2
                    
#: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&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PouryaKit.AI&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Tool

PouryaKit.AI

NuGet .NET 10 License: MIT

PouryaKit.AI

The Host's one chat client, for OpenAI, Azure OpenAI or Ollama, built from validated options. A run of that client may call a Module's command or query as a Gateway tool: each call runs through the Module's Gateway as an Operation of its own, with the run's Operation Context continued, so validation, the authorizers and the tenant requirement apply to it. Over the same client, agents of the Microsoft Agent Framework run plain, streamed or for a typed answer.

Install

dotnet add package PouryaKit.AI --prerelease

When to use it

  • A Feature answers in natural language, or lets a model look things up through the Module's own queries.
  • You compose the Host's chat client for a hosted provider or a local Ollama.
  • A run needs a Module's command or query, or an MCP server's tools.
  • An agent keeps a conversation's session and memory per Actor, or a workflow runs several agents.
  • You check every call to the model with a guardrail.

It builds on PouryaKit.Modularity, whose Gateway its tools call. PouryaKit.AI.Postgres adds semantic search.

Quick start

Register the Host's one client and bind its options, as the Proving Sample does:

builder.Services.AddPouryaKitAI();
builder.Services.Configure<PouryaKitAIOptions>(
    builder.Configuration.GetSection("PouryaKit:AI")
);
builder.Services.AddSingleton<IChatGuardrail, CardNumberGuardrail>();

Turn a query into a Gateway tool, in the handler that builds the run:

var getProduct = catalog.Tool(
    "GetProduct",
    "Finds one product of the catalog by its id: its id, its category's id and its name.",
    context,
    (ProductToFind product) => new GetProductQuery(product.ProductId)
);

What you get

  • One IChatClient per Host, wrapped in its allow-list, iteration cap and the guardrails the Host registers.
  • Gateway tools that run as Operations, under the run's Operation Context.
  • MCP tools of the servers the Host's options name, under the same allow-list.
  • Agents and workflows over that client, with sessions and memory in your application's stores.
  • No resilience of its own on the provider's client, so a Host whose defaults add one pipeline to every client keeps exactly that one.

The model decides what to call; the Kit decides what each call may do. A run inside an authorized Operation gives its tool calls that Operation's authority, so give such a run only the tools its Operation may run.

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 (1)

Showing the top 1 NuGet packages that depend on PouryaKit.AI:

Package Downloads
PouryaKit.AI.Postgres

Text stored by its embedding and searched by meaning with pgvector in PostgreSQL, within the tenant, in the Operation's Unit of Work.

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 78 10/31/2026
0.1.0-preview.0.28 71 10/26/2026