Ai2Web 0.4.1

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

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

AI2Web on Launchpadly - Product of the Week (Gold)

CI NuGet NuGet Downloads

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
0.4.1 0 7/21/2026
0.4.0 46 7/19/2026
0.3.0 64 7/17/2026