Skip to content
Docs Try Aspire

HostedAgentResourceBuilderExtensions

Class static net8.0
📦 Aspire.Hosting.Foundry v13.2.0-preview.1.26170.3
Extension methods for adding hosted agent applications to the distributed application model.
namespace Aspire.Hosting;
public static class HostedAgentResourceBuilderExtensions
{
// ...
}
AddAndPublishPromptAgent(IResourceBuilder<AzureCognitiveServicesProjectResource>, IResourceBuilder<FoundryDeploymentResource>, string, string?)extensionats export
IResourceBuilder<AzurePromptAgentResource>
Publish a simple prompt agent in Microsoft Foundry. If a project resource is not provided, the method will attempt to find an existing Microsoft Foundry project resource in the application model.
AsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>)extensionats ignored
IResourceBuilder<T>
In both run and publish modes, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
AsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>)extensionats ignored
IResourceBuilder<T>
In both run and publish modes, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
PublishAsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>)extensionats ignored
IResourceBuilder<T>
Publish the containerized agent as a hosted agent in Microsoft Foundry. If a project resource is not provided, the method will attempt to find an existing Microsoft Foundry project resource in the application model. If none exists, a new project resource (and its parent account resource) will be created automatically.
PublishAsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>)extensionats export
IResourceBuilder<T>
Publish the containerized agent as a hosted agent in Microsoft Foundry. If a project resource is not provided, the method will attempt to find an existing Microsoft Foundry project resource in the application model. If none exists, a new project resource (and its parent account resource) will be created automatically.
RunAsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>)extensionats ignored
IResourceBuilder<T>
In run mode, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
RunAsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>)extensionats ignored
IResourceBuilder<T>
In run mode, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
View all methods