HPD-Agent.AspNetCore.OpenApi 0.9.5

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

HPD-Agent.AspNetCore.OpenApi

Optional .NET 10 OpenAPI 3.1 document generation for the HPD-Agent HTTP API.

Registration

using HPD.Agent;
using HPD.Agent.AspNetCore;
using HPD.Agent.AspNetCore.OpenApi;
using Microsoft.Extensions.DependencyInjection;

builder.Services.AddHPDAgentHost("assistant");
builder.Services.AddHPDAgentOpenApi();

var app = builder.Build();
app.MapHPDAgentOpenApiDocuments();
app.MapHPDAgentHostApi("assistant");

Documents are available at:

/openapi/hpd-agent-v1.json
/openapi/hpd-agent-v1.yaml

The document adds HPD-specific descriptions for:

  • typed public agent inputs;
  • permission, clarification, continuation, and client-tool responses;
  • accepted thread execution submissions;
  • runtime state and context-use responses;
  • execution cancellation and queue promotion;
  • multipart content upload;
  • binary content download;
  • resumable committed SSE with cursor replay;
  • the application event union, including custom output events, with durability and module metadata per event schema;
  • client-tool-provider WebSocket metadata;
  • the immutable agent event catalog.

Authentication and clients

Authentication remains owned by the consuming ASP.NET Core application. The generated document does not invent a security scheme or attach one to every operation. Add the document transformer, security scheme, and operation requirements that match your host's middleware before using the contract for protected endpoints:

using Microsoft.OpenApi;

builder.Services.AddHPDAgentOpenApi(configure: options =>
{
    options.AddDocumentTransformer((document, _, _) =>
    {
        document.Components ??= new OpenApiComponents();
        document.Components.SecuritySchemes ??=
            new Dictionary<string, IOpenApiSecurityScheme>();
        document.Components.SecuritySchemes["Bearer"] =
            new OpenApiSecurityScheme
            {
                Type = SecuritySchemeType.Http,
                Scheme = "bearer",
                BearerFormat = "JWT"
            };
        return Task.CompletedTask;
    });
});

Place the transformer after AddHPDAgentOpenApi and add operation-level security requirements with your normal ASP.NET Core OpenAPI conventions. The generated contract is OpenAPI 3.1 and can be consumed by Kiota, OpenAPI Generator, or another 3.1-capable client generator.

HPD also provides a deterministic C# client generator for its canonical hosted contract. See the client generator guide for runtime event unions, resumable SSE, client-tool WebSockets, authentication, and generated API-change checks.

Customize the standard OpenApiOptions through the optional callback:

builder.Services.AddHPDAgentOpenApi(configure: options =>
{
    options.ShouldInclude = description =>
        description.RelativePath?.StartsWith("api/hpd-agent") == true;
});

This package does not include Swagger UI, Scalar, ReDoc, or client generation.

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

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.9.5 63 11/10/2026