# HostedAgentConfiguration Properties

- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Type: [HostedAgentConfiguration](/reference/api/csharp/aspire.hosting.foundry/hostedagentconfiguration.md)
- Kind: `Properties`
- Members: `11`

A configuration helper for hosted agents.

## ContainerProtocolVersions

- Name: `ContainerProtocolVersions`
- Modifiers: `get; init`
- Returns: `IList<ProtocolVersionRecord>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

The protocols that the agent supports for ingress communication of the containers.

```csharp
public IList<ProtocolVersionRecord> ContainerProtocolVersions { get; init; }
```

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## ContentFilterConfiguration

- Name: `ContentFilterConfiguration`
- Modifiers: `nullable` `get; set`
- Returns: `ContentFilterConfiguration?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

Configuration for Responsible AI (RAI) content filtering and safety features.

```csharp
public ContentFilterConfiguration? ContentFilterConfiguration { get; set; }
```

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## Cpu

- Name: `Cpu`
- Modifiers: `get; set`
- Returns: `decimal`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

CPU allocation for each hosted agent instance, in vCPU cores.

```csharp
public decimal Cpu { get; set; }
```

## CpuString

- Name: `CpuString`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs#L77)

CPU allocation as a string.

```csharp
public string CpuString { get; }
```

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## Description

- Name: `Description`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

The description of the hosted agent.

```csharp
public string Description { get; set; }
```

## EnvironmentVariables

- Name: `EnvironmentVariables`
- Modifiers: `get; init`
- Returns: `IDictionary<string, string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

Environment variables to set in the hosted agent container.

```csharp
public IDictionary<string, string> EnvironmentVariables { get; init; }
```

## Image

- Name: `Image`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

The fully qualified container image name for the hosted agent.

```csharp
public string Image { get; set; }
```

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## Memory

- Name: `Memory`
- Modifiers: `get; set`
- Returns: `decimal`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

Memory allocation for each hosted agent instance, in GiB. Must be 2x the CPU allocation.

```csharp
public decimal Memory { get; set; }
```

## MemoryString

- Name: `MemoryString`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs#L100)

Memory allocation as a string.

```csharp
public string MemoryString { get; }
```

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## Metadata

- Name: `Metadata`
- Modifiers: `get; init`
- Returns: `IDictionary<string, string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

Additional metadata to associate with the hosted agent.

```csharp
public IDictionary<string, string> Metadata { get; init; }
```

## Tools

- Name: `Tools`
- Modifiers: `get; init`
- Returns: `IList<ProjectsAgentTool>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentConfiguration.cs)

Tools available to the hosted agent.

```csharp
public IList<ProjectsAgentTool> Tools { get; init; }
```

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.
