# AzurePromptAgentResource Constructors

- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Type: [AzurePromptAgentResource](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource.md)
- Kind: `Constructors`
- Members: `1`

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

## AzurePromptAgentResource(string, string, AzureCognitiveServicesProjectResource, string?)

- Name: `Constructor(string, string, AzureCognitiveServicesProjectResource, string?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/PromptAgent/AzurePromptAgentResource.cs#L39-L137)

Creates a new instance of the [AzurePromptAgentResource](/reference/api/csharp/aspire.hosting.foundry/azurepromptagentresource.md) class.

```csharp
public class AzurePromptAgentResource
{
    public AzurePromptAgentResource(
        string name,
        string model,
        AzureCognitiveServicesProjectResource project,
        string? instructions = null)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the agent. This will also be used as the agent name in Foundry.
- `model` (`string`)
  The model deployment name to use for this agent.
- `project` ([AzureCognitiveServicesProjectResource](/reference/api/csharp/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md))
  The parent Foundry project resource.
- `instructions` (`string?`) `optional`
  Optional system instructions for the agent.
