PouryaKit.AI
0.1.0-preview.2
dotnet add package PouryaKit.AI --version 0.1.0-preview.2
NuGet\Install-Package PouryaKit.AI -Version 0.1.0-preview.2
<PackageReference Include="PouryaKit.AI" Version="0.1.0-preview.2" />
<PackageVersion Include="PouryaKit.AI" Version="0.1.0-preview.2" />
<PackageReference Include="PouryaKit.AI" />
paket add PouryaKit.AI --version 0.1.0-preview.2
#r "nuget: PouryaKit.AI, 0.1.0-preview.2"
#:package PouryaKit.AI@0.1.0-preview.2
#addin nuget:?package=PouryaKit.AI&version=0.1.0-preview.2&prerelease
#tool nuget:?package=PouryaKit.AI&version=0.1.0-preview.2&prerelease

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
IChatClientper 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 | 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
- Microsoft.Agents.AI (>= 1.26.0)
- Microsoft.Agents.AI.Workflows (>= 1.26.0)
- Microsoft.Extensions.AI (>= 10.11.0)
- Microsoft.Extensions.AI.OpenAI (>= 10.11.0)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- ModelContextProtocol.Core (>= 2.3.0)
- PouryaKit.Cqrs (>= 0.1.0-preview.2)
- PouryaKit.Modularity (>= 0.1.0-preview.2)
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 |