Ai2Web 0.4.1
dotnet add package Ai2Web --version 0.4.1
NuGet\Install-Package Ai2Web -Version 0.4.1
<PackageReference Include="Ai2Web" Version="0.4.1" />
<PackageVersion Include="Ai2Web" Version="0.4.1" />
<PackageReference Include="Ai2Web" />
paket add Ai2Web --version 0.4.1
#r "nuget: Ai2Web, 0.4.1"
#:package Ai2Web@0.4.1
#addin nuget:?package=Ai2Web&version=0.4.1
#tool nuget:?package=Ai2Web&version=0.4.1
<div align="center"> <a href="https://ai2web.dev"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ai2web-foundation/.github/main/profile/ai2web-logo-white.svg"> <img alt="AI2Web" src="https://raw.githubusercontent.com/ai2web-foundation/.github/main/profile/ai2web-logo-black.svg" width="200"> </picture> </a> </div>
AI2Web .NET SDK (Ai2Web)
The .NET reference implementation of the AI2Web protocol. Mirrors @ai2web/core.
dotnet add package Ai2Web
using Ai2Web;
var manifest = Manifest.ForSite("Example Store", "https://example.com", "ecommerce")
.Capability("content")
.Capability("commerce", new Dictionary<string, object?> { ["endpoint"] = "/ai2w/products", ["checkout"] = true })
.Transports(new Dictionary<string, object?> {
["mcp"] = new Dictionary<string, object?> { ["enabled"] = true, ["endpoint"] = "/ai2w/mcp" },
["rest"] = new Dictionary<string, object?> { ["enabled"] = true } })
.Auth(new Dictionary<string, object?> { ["methods"] = new List<object?> { "none", "oauth2" }, ["oauth2"] = new Dictionary<string, object?> { ["pkce"] = true } })
.Consent(new Dictionary<string, object?> { ["requires_user_approval_for"] = new List<object?> { "purchase" } })
.Contact(new Dictionary<string, object?> { ["support"] = "help@example.com" })
.Build();
Result r = Validator.Validate(manifest); // r.Score, r.Tier, r.Valid, ...
// Serve every AI2Web route (framework-agnostic):
Response res = Server.Handle(manifest, method, path, body, origin);
API
Manifest.ForSite(...)- fluent capability-model builder.Validator.Validate(...)- AI Readiness scoring (spec §9/§11).Negotiator.Negotiate(...)- capability negotiation (spec §5).Server.Handle(...)- framework-agnostic router.Safety.IsSafePublicUrl/AssertSafePublicUrl/SameOrigin- SSRF guard.Json.Parse/Json.ToObject- JSON ⇄ the plain object model.
Test
dotnet run --project Ai2Web.Tests # includes the shared conformance contract
Requires .NET 8+. No external dependencies.
Licence
MIT.
| 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 was computed. 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
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.