# SquadResource

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.Squad](/reference/api/csharp/communitytoolkit.aspire.hosting.squad.md)
- Version: `13.4.1-beta.706`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Squad/SquadResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IValueProvider`, `IValueWithReferences`

Represents a Squad AI-agent team as a first-class Aspire resource. Implements `ApplicationModel.IResourceWithConnectionString` so that downstream services can reference the team with `.WithReference(squad)` and receive a custom `squad://` descriptor that encodes the resource name, team root, and agent roster. The resource is a logical Aspire resource; it does not start a listener by itself.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class SquadResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## Constructors

- [SquadResource(string, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.squad/squadresource/constructors.md#constructor-string-string) -- Initialises a new [SquadResource](/reference/api/csharp/communitytoolkit.aspire.hosting.squad/squadresource.md), auto-discovering agents from `.squad/team.md`.

## Properties

- [Agents](/reference/api/csharp/communitytoolkit.aspire.hosting.squad/squadresource/properties.md#agents) : `IReadOnlyList<string>` `get` -- Gets the list of agent names discovered from `.squad/team.md`.
- [ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.squad/squadresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Describes the connection string format string used for this resource.
- [TeamRoot](/reference/api/csharp/communitytoolkit.aspire.hosting.squad/squadresource/properties.md#teamroot) : `string` `get` -- Gets the absolute path to the directory that contains the `.squad/` folder (i.e., the workspace root, not the `.squad/` sub-directory itself).
