# HostedAgentConfiguration

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

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.
