Share via


WorkflowHostingExtensions.AsAIAgent Method

Definition

Convert a workflow with the appropriate primary input type to an AIAgent.

public static Microsoft.Agents.AI.AIAgent AsAIAgent(this Microsoft.Agents.AI.Workflows.Workflow workflow, string? id = default, string? name = default, string? description = default, Microsoft.Agents.AI.Workflows.IWorkflowExecutionEnvironment? executionEnvironment = default, bool includeExceptionDetails = false, bool includeWorkflowOutputsInResponse = false);
static member AsAIAgent : Microsoft.Agents.AI.Workflows.Workflow * string * string * string * Microsoft.Agents.AI.Workflows.IWorkflowExecutionEnvironment * bool * bool -> Microsoft.Agents.AI.AIAgent
<Extension()>
Public Function AsAIAgent (workflow As Workflow, Optional id As String = Nothing, Optional name As String = Nothing, Optional description As String = Nothing, Optional executionEnvironment As IWorkflowExecutionEnvironment = Nothing, Optional includeExceptionDetails As Boolean = false, Optional includeWorkflowOutputsInResponse As Boolean = false) As AIAgent

Parameters

workflow
Workflow

The workflow to be hosted by the resulting AIAgent

id
String

A unique id for the hosting AIAgent.

name
String

A name for the hosting AIAgent.

description
String

A description for the hosting AIAgent.

executionEnvironment
IWorkflowExecutionEnvironment

Specify the execution environment to use when running the workflows. See OffThread, Concurrent and Lockstep for the in-process environments.

includeExceptionDetails
Boolean

If true, will include Message in the ErrorContent representing the workflow error.

includeWorkflowOutputsInResponse
Boolean

If true, will transform outgoing workflow outputs into into content in AgentResponseUpdates or the AgentResponse as appropriate.

Returns

Applies to