Skip to main content

NuGet

Recommend AXM extensions from a NuGet (.NET) package and target NuGet packages from an extension.

AXM reads .NET extension metadata from an agent-extensions.json sidecar at the package root. This is the two-way linking model applied to the NuGet ecosystem.

Recommend extensions from a package

Section titled Recommend extensions from a package

Add an agent-extensions.json file at the package root and ship it in the published .nupkg. It carries an agentExtensions array where each entry is an extension reference (@owner/<type>/<name>):

// agent-extensions.json
{
  "$schema": "https://axm.sh/schemas/agent-extensions.schema.json",
  "agentExtensions": [
    { "ref": "@examples/packs/dotnet-csharp-nuget-tinyflags" },
  ],
}

Keep recommendations identity-only — omit versionRange. AXM resolves the reference to the newest matching extension version and pins it in the user's axm.lock. Prefer recommending a single pack so you keep one stable reference while its contents evolve.

Add a semver versionRange only when your package genuinely pairs with a bounded major line of the extension:

{
  "agentExtensions": [
    {
      "ref": "@examples/packs/dotnet-csharp-nuget-tinyflags",
      "versionRange": "^1.0.0",
    },
  ],
}

Target NuGet packages from an extension

Section titled Target NuGet packages from an extension

On the extension manifest (skill.json, pack.json, subagent.json, …), add a packages array with a NuGet purl:

// pack.json
{
  "packages": [{ "purl": "pkg:nuget/AgentXM.Examples.TinyFlags.CSharp" }],
}

Use the package id as published to NuGet.org as the purl name; NuGet ids are case-insensitive.

Default to identity-only. Add a VERS versionRange with the nuget scheme only when the extension depends on package APIs introduced or removed in a known range:

{
  "packages": [
    {
      "purl": "pkg:nuget/AgentXM.Examples.TinyFlags.CSharp",
      "versionRange": "vers:nuget/>=0.1.0|<1.0.0",
    },
  ],
}

When the NuGet package recommends an extension through the AgentXM Registry and that extension names the package as a companion via its purl, AXM derives official status for the pair — no extra flag. See Official extensions.

The dotnet-csharp-nuget-lib and dotnet-csharp-nuget-app directories in polyglot-examples are the working fixtures for everything above (an F# pair lives alongside them). The package publishes a TinyFlags companion pack and recommends it from the agent-extensions.json sidecar; the pack and each skill declare the package's NuGet purl as an identity-only companion package.