Aspeckd 0.1.8
dotnet add package Aspeckd --version 0.1.8
NuGet\Install-Package Aspeckd -Version 0.1.8
<PackageReference Include="Aspeckd" Version="0.1.8" />
<PackageVersion Include="Aspeckd" Version="0.1.8" />
<PackageReference Include="Aspeckd" />
paket add Aspeckd --version 0.1.8
#r "nuget: Aspeckd, 0.1.8"
#:package Aspeckd@0.1.8
#addin nuget:?package=Aspeckd&version=0.1.8
#tool nuget:?package=Aspeckd&version=0.1.8
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.
Looking for just the abstractions? See
Aspeckd.Corefor 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:
[AgentName]attributeWithName()/IEndpointNameMetadata- Auto-generated
"METHOD /route"
And for description:
[AgentDescription]attributeWithSummary()WithDescription()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 }
]
Links
- GitHub repository
- Full documentation & contributing guide
Aspeckd.Corepackage — stable abstractions with no ASP.NET Core dependency
| 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 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. |
-
net10.0
- Aspeckd.Core (>= 0.1.8)
-
net8.0
- Aspeckd.Core (>= 0.1.8)
-
net9.0
- Aspeckd.Core (>= 0.1.8)
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 |