# HostedAgentConfiguration

- Module: [Aspire.Hosting.Foundry](/reference/api/go/aspire.hosting.foundry.md)
- Version: `17.0.0-preview.1.26565.2`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

A configuration helper for hosted agents.

## Remarks

This type is used instead of `ProjectsAgentVersionCreationOptions` to provide a strongly typed
configuration surface for hosted agent definitions. When used from polyglot AppHosts, only the
ATS-compatible properties are exported; Azure SDK-specific members remain .NET-only.

## Definition

```go
type HostedAgentConfiguration interface{}
```

## Properties

- `Cpu`: `float64` `get/set` -- CPU allocation for each hosted agent instance, in vCPU cores.
- `Description`: `string` `get/set` -- The description of the hosted agent.
- `EnvironmentVariables`: `*Dict[string, string]` `get` -- Environment variables to set in the hosted agent container.
- `Memory`: `float64` `get/set` -- Memory allocation for each hosted agent instance, in GiB. Must be 2x the CPU allocation.
- `Metadata`: `*Dict[string, string]` `get` -- Additional metadata to associate with the hosted agent.
