CommunityToolkit.Aspire.Hosting.Squad
17.0.0
Prefix Reserved
dotnet add package CommunityToolkit.Aspire.Hosting.Squad --version 17.0.0
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Squad -Version 17.0.0
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Squad" Version="17.0.0" />
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Squad" Version="17.0.0" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Squad" />
paket add CommunityToolkit.Aspire.Hosting.Squad --version 17.0.0
#r "nuget: CommunityToolkit.Aspire.Hosting.Squad, 17.0.0"
#:package CommunityToolkit.Aspire.Hosting.Squad@17.0.0
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Squad&version=17.0.0
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Squad&version=17.0.0
CommunityToolkit.Aspire.Hosting.Squad
An Aspire hosting integration that lets you model a Squad AI-agent team as a first-class .NET Aspire resource.
Getting Started
Install the package
dotnet add package CommunityToolkit.Aspire.Hosting.Squad
Add a Squad team to your AppHost
using Aspire.Hosting;
var builder = DistributedApplication.CreateBuilder(args);
// Register a Squad team as a logical Aspire resource.
// teamRoot is the directory that contains the `.squad/` folder.
var research = builder.AddSquad("research-squad",
teamRoot: @"C:\repos\my-research-team");
// Wire the team into a downstream service project.
// The service receives a `squad://...` connection string describing the team.
builder.AddProject<Projects.MyApi>("api")
.WithReference(research)
.WithHttpEndpoint(name: "http", env: "HTTP_PORTS");
builder.Build().Run();
Consume the team from a service project
In a referenced service project, parse the connection string Aspire injects under
ConnectionStrings:{resourceName} (format squad://resource/{name}?teamRoot=...&agents=...&protocol=maf-1.0)
and use Squad.Agents.AI to construct
a SquadAgent over the referenced team:
var teamRoot = ParseTeamRoot(builder.Configuration.GetConnectionString("research-squad")!);
builder.Services.AddSquadAgent(opts =>
{
opts.SquadFolderPath = teamRoot;
opts.Instructions = "You are a research assistant. Be concise.";
});
app.MapPost("/ask", async (string prompt, SquadAgent agent) =>
{
var session = await agent.CreateSessionAsync();
var response = await agent.RunAsync(prompt, session);
return Results.Ok(new { response = response.Text });
});
A complete runnable example lives under
examples/squad/ —
AppHost + ApiApp wired together with a self-contained sample team.
What it does
AddSquad(name, teamRoot) registers a SquadResource that:
- Reads the team roster from
{teamRoot}/.squad/team.md - Surfaces the roster, team root, and protocol version as dashboard properties
- Implements
IResourceWithConnectionStringso downstream services can.WithReference(squad)and receive asquad://resource/{name}?teamRoot={...}&agents={csv}&protocol=maf-1.0descriptor
The resource is logical — it does not start a listener by itself. Service projects that reference the squad can use the connection string to instantiate a Squad.Agents.AI AIAgent (Microsoft Agent Framework adapter) that orchestrates the referenced team.
Roster discovery
The integration parses .squad/team.md looking for either of:
| Ralph | Work Monitor | ... |
- **Ralph** (Work Monitor)
Only names whose lowercase form maps to an existing .squad/agents/{name}/charter.md are kept. If team.md does not exist, a sensible default roster is returned so the resource is still useful.
Feedback & contributing
Issues and PRs welcome at CommunityToolkit/Aspire.
| Product | Versions 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. net11.0 is compatible. |
-
net10.0
- Aspire.Hosting (>= 17.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
-
net11.0
- Aspire.Hosting (>= 17.0.0)
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 |
|---|---|---|
| 17.0.0 | 56 | 11/20/2026 |
| 17.0.0-beta.1090 | 53 | 11/20/2026 |
| 17.0.0-beta.1088 | 46 | 11/20/2026 |
| 17.0.0-beta.1080 | 81 | 11/20/2026 |
| 17.0.0-beta.1078 | 51 | 11/19/2026 |
| 17.0.0-beta.1077 | 47 | 11/19/2026 |
| 17.0.0-beta.1076 | 41 | 11/19/2026 |
| 17.0.0-beta.1075 | 44 | 11/19/2026 |
| 17.0.0-beta.1052 | 61 | 11/16/2026 |
| 17.0.0-beta.1051 | 61 | 11/12/2026 |
| 17.0.0-beta.1033 | 56 | 11/10/2026 |
| 17.0.0-beta.1022 | 67 | 11/8/2026 |
| 17.0.0-beta.1018 | 60 | 11/6/2026 |
| 17.0.0-beta.1009 | 60 | 11/5/2026 |
| 17.0.0-beta.994 | 61 | 11/4/2026 |
| 17.0.0-beta.993 | 64 | 11/4/2026 |
| 13.6.2-beta.959 | 69 | 10/27/2026 |
| 13.6.1 | 142 | 10/26/2026 |
| 13.6.1-beta.950 | 65 | 10/26/2026 |
| 13.6.1-beta.938 | 72 | 10/24/2026 |