SentinelAI.AspNetCore
0.2.0-preview.1
dotnet add package SentinelAI.AspNetCore --version 0.2.0-preview.1
NuGet\Install-Package SentinelAI.AspNetCore -Version 0.2.0-preview.1
<PackageReference Include="SentinelAI.AspNetCore" Version="0.2.0-preview.1" />
<PackageVersion Include="SentinelAI.AspNetCore" Version="0.2.0-preview.1" />
<PackageReference Include="SentinelAI.AspNetCore" />
paket add SentinelAI.AspNetCore --version 0.2.0-preview.1
#r "nuget: SentinelAI.AspNetCore, 0.2.0-preview.1"
#:package SentinelAI.AspNetCore@0.2.0-preview.1
#addin nuget:?package=SentinelAI.AspNetCore&version=0.2.0-preview.1&prerelease
#tool nuget:?package=SentinelAI.AspNetCore&version=0.2.0-preview.1&prerelease
SentinelAI.AspNetCore
SentinelAI for ASP.NET Core apps.
Preview. The API may change before 1.0.
Take the caller from the signed-in user
Tool authorization needs to know who is acting. This reads it from the user's claims:
builder.Services.AddSentinelAI()
.AddHttpContextCaller(o => o.OwnerIdClaims = ["customer_id"]);
The user id comes from ClaimTypes.NameIdentifier or sub. The owner id, which ownership_arg tools compare against, comes from the claims you list, or the user id if you list none. Anonymous requests get no caller, so ownership-checked tools are refused.
Pair it with SentinelAI.Extensions.AI:
builder.Services.AddChatClient(innerChatClient).UseSentinel().UseFunctionInvocation();
Scan prompts in a minimal API
For endpoints that take a prompt without going through an IChatClient:
app.MapPost("/ask", (AskRequest req) => ...)
.ScanWithSentinel<AskRequest>(r => r.Question); // 400 if policy blocks it
More: https://sentinelaidotnet.com · https://github.com/surya3524/sentinelai-net
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- SentinelAI.Core (>= 0.2.0-preview.1)
-
net9.0
- SentinelAI.Core (>= 0.2.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.2.0-preview.1 | 69 | 10/19/2026 |
| 0.1.0-preview.1 | 74 | 10/17/2026 |