HostedWorkflowBuilderExtensions.AddAsAIAgent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AddAsAIAgent(IHostedWorkflowBuilder) |
Registers the workflow as an AI agent in the dependency injection container. |
| AddAsAIAgent(IHostedWorkflowBuilder, String) |
Registers the workflow as an AI agent in the dependency injection container. |
AddAsAIAgent(IHostedWorkflowBuilder)
Registers the workflow as an AI agent in the dependency injection container.
public static Microsoft.Agents.AI.Hosting.IHostedAgentBuilder AddAsAIAgent(this Microsoft.Agents.AI.Hosting.IHostedWorkflowBuilder builder);
static member AddAsAIAgent : Microsoft.Agents.AI.Hosting.IHostedWorkflowBuilder -> Microsoft.Agents.AI.Hosting.IHostedAgentBuilder
<Extension()>
Public Function AddAsAIAgent (builder As IHostedWorkflowBuilder) As IHostedAgentBuilder
Parameters
- builder
- IHostedWorkflowBuilder
The IHostedWorkflowBuilder instance to extend.
Returns
An IHostedAgentBuilder that can be used to further configure the agent.
Applies to
AddAsAIAgent(IHostedWorkflowBuilder, String)
Registers the workflow as an AI agent in the dependency injection container.
public static Microsoft.Agents.AI.Hosting.IHostedAgentBuilder AddAsAIAgent(this Microsoft.Agents.AI.Hosting.IHostedWorkflowBuilder builder, string? name);
static member AddAsAIAgent : Microsoft.Agents.AI.Hosting.IHostedWorkflowBuilder * string -> Microsoft.Agents.AI.Hosting.IHostedAgentBuilder
<Extension()>
Public Function AddAsAIAgent (builder As IHostedWorkflowBuilder, name As String) As IHostedAgentBuilder
Parameters
- builder
- IHostedWorkflowBuilder
The IHostedWorkflowBuilder instance to extend.
- name
- String
The optional name for the AI agent. If not specified, the workflow name is used.
Returns
An IHostedAgentBuilder that can be used to further configure the agent.