# AzurePromptAgentResource

- 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)

Represents a Microsoft Foundry prompt agent resource that is provisioned on Azure.

## Remarks

Unlike hosted agents (which run as containers), prompt agents are configuration-only
agents defined by a model, system instructions, and optional tools. They are always
deployed to Azure Foundry via the data plane API, even during local development
(`aspire run`). Local services communicate with the cloud-provisioned agent
using the Foundry project endpoint and agent name.

## Definition

```go
type AzurePromptAgentResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithEnvironment
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithEnvironment`

## Properties

- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- Gets the ConnectionStringExpression property
- `Description`: `string` `get/set` -- Gets or sets a description of the agent.
- `Instructions`: `*string` `get/set` -- Gets or sets the system instructions for the agent.
- `Metadata`: `*Dict[string, string]` `get` -- Gets the metadata to associate with the agent.
- `Model`: `string` `get/set` -- Gets or sets the model deployment name used by this agent.

## Methods

- [WithTool](/reference/api/go/aspire.hosting.foundry/azurepromptagentresource/withtool.md) -- `method` -- Adds a tool to a prompt agent.
  ```go
  WithTool(tool FoundryToolResource) AzurePromptAgentResource
  ```
