Aspeckd 0.1.8

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

Aspeckd

A .NET library that surfaces agent-readable spec endpoints alongside your existing ASP.NET Core API.
Instead of pointing an AI agent at a large OpenAPI document, aspeckd serves a small set of purpose-built JSON endpoints that describe your API in a compact, agent-friendly format — analogous to llms.txt for APIs.

NuGet CI

Looking for just the abstractions? See Aspeckd.Core for the companion package that carries no ASP.NET Core dependency.


Installation

dotnet add package Aspeckd

Quick start

1 — Register services

Call AddAgentSpec() in your service-registration code (typically Program.cs):

builder.Services.AddAgentSpec(opt =>
{
    opt.Title       = "My API";
    opt.Description = "What this API does, in one or two sentences.";
});

2 — Map the routes

After app.Build(), call MapAgentSpec() to activate the three agent spec endpoints:

app.MapAgentSpec();

That's it. Three new routes are now live:

Route Description
GET /agents Spec index — title, description, and a summary of every non-excluded endpoint
GET /agents/schemas All named request/response schemas extracted from API metadata
GET /agents/{id} Full detail for a single endpoint identified by {id}

Annotating endpoints

Aspeckd discovers endpoints through ASP.NET Core's built-in IApiDescriptionGroupCollectionProvider. Three companion attributes let you control how each endpoint appears in the agent spec.

[AgentDescription]

Provides an agent-focused description for an endpoint. Use it instead of (or alongside) WithSummary() / WithDescription() to write a description optimised for agent consumption.

app.MapGet("/api/weather/{city}", [AgentDescription("Returns the current weather for the given city.")] (string city) =>
    Results.Ok(WeatherService.Get(city)));

[AgentName]

Overrides the display name used for an endpoint in the agent spec index. When omitted, aspeckd auto-generates a name from the HTTP method and route template (e.g. GET /api/weather/{city}).

app.MapGet("/api/weather/{city}", [AgentName("GetWeather")] [AgentDescription("...")] (string city) =>
    Results.Ok(WeatherService.Get(city)));

[AgentExclude]

Suppresses an endpoint from the agent spec entirely. Useful for internal or administrative endpoints that agents should not discover.

app.MapGet("/internal/ping", [AgentExclude] () => Results.Ok());

Configuration reference

All options are set through the AspeckdOptions delegate passed to AddAgentSpec():

Option Type Default Description
BasePath string "/agents" The route prefix under which all agent spec endpoints are served.
Title string? null (falls back to "API") Title shown in the agent spec index.
Description string? null Optional description shown at the top of the agent spec index.
UseOpenApiMetadataFallback bool false When true, endpoints without [AgentDescription] / [AgentName] fall back to the standard OpenAPI metadata set by WithSummary(), WithDescription(), and WithName().

Custom base path

builder.Services.AddAgentSpec(opt => opt.BasePath = "/ai-spec");
// Endpoints are now at /ai-spec, /ai-spec/schemas, /ai-spec/{id}

Reusing OpenAPI metadata

If your endpoints already have WithSummary() / WithDescription() / WithName() annotations you can avoid duplicating them:

builder.Services.AddAgentSpec(opt => opt.UseOpenApiMetadataFallback = true);

With fallback enabled the resolution priority for name is:

  1. [AgentName] attribute
  2. WithName() / IEndpointNameMetadata
  3. Auto-generated "METHOD /route"

And for description:

  1. [AgentDescription] attribute
  2. WithSummary()
  3. WithDescription()
  4. null

Example responses

GET /agents

{
  "title": "My API",
  "description": "What this API does, in one or two sentences.",
  "schemasUrl": "/agents/schemas",
  "endpoints": [
    {
      "id": "get-api-weather-city",
      "name": "GetWeather",
      "httpMethod": "GET",
      "route": "/api/weather/{city}",
      "description": "Returns the current weather for the given city.",
      "detailUrl": "/agents/get-api-weather-city"
    }
  ]
}

GET /agents/get-api-weather-city

{
  "id": "get-api-weather-city",
  "name": "GetWeather",
  "httpMethod": "GET",
  "route": "/api/weather/{city}",
  "description": "Returns the current weather for the given city.",
  "consumesContentTypes": [],
  "responseTypes": {
    "200": ["application/json"]
  },
  "parameters": [
    {
      "name": "city",
      "source": "Route",
      "type": "String",
      "isRequired": true
    }
  ]
}

GET /agents/schemas

[
  { "name": "WeatherForecast", "jsonSchema": null }
]

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 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 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.1.8 112 3/26/2026
0.0.0-alpha.0.19 53 3/26/2026
0.0.0-alpha.0.17 53 3/26/2026