# AzurePromptAgentResource

- Kind: `class`
- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.Hosting.Foundry`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/PromptAgent/AzurePromptAgentResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithEnvironment`, `IValueProvider`, `IValueWithReferences`

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

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

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

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Foundry/AzurePromptAgentResource`

## 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.

## Constructors

- [AzurePromptAgentResource(string, string, AzureCognitiveServicesProjectResource, string?)](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/constructors.md#constructor-string-string-azurecognitiveservicesprojectresource-string) -- Creates a new instance of the [AzurePromptAgentResource](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource.md) class.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get`
- [Description](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#description) : `string` `get; set` -- Gets or sets a description of the agent.
- [Instructions](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#instructions) : `string?` `get; set` -- Gets or sets the system instructions for the agent.
- [Metadata](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#metadata) : `IDictionary<string, string>` `get; init` -- Gets the metadata to associate with the agent.
- [Model](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#model) : `string` `get; set` -- Gets or sets the model deployment name used by this agent.
- [Project](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#project) : [AzureCognitiveServicesProjectResource](/reference/api/csharp/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md) `get` -- Gets the parent Foundry project resource.
- [Tools](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#tools) : [IReadOnlyList<IFoundryTool>](/reference/api/csharp/aspire.hosting.foundry/ifoundrytool.md) `get` `ats ignored` -- Gets the list of tool resources attached to this agent.
- [Version](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource/properties.md#version) : `StaticValueProvider<string>` `get` -- Once deployed, the version that is assigned to this prompt agent.
