Share via


HostedAgentBuilderExtensions.WithAITools Method

Definition

Adds multiple AI tools to an agent being configured with the service collection.

public static Microsoft.Agents.AI.Hosting.IHostedAgentBuilder WithAITools(this Microsoft.Agents.AI.Hosting.IHostedAgentBuilder builder, params Microsoft.Extensions.AI.AITool[] tools);
static member WithAITools : Microsoft.Agents.AI.Hosting.IHostedAgentBuilder * Microsoft.Extensions.AI.AITool[] -> Microsoft.Agents.AI.Hosting.IHostedAgentBuilder
<Extension()>
Public Function WithAITools (builder As IHostedAgentBuilder, ParamArray tools As AITool()) As IHostedAgentBuilder

Parameters

builder
IHostedAgentBuilder

The hosted agent builder.

tools
AITool[]

The collection of AI tools to add to the agent.

Returns

The same IHostedAgentBuilder instance so that additional calls can be chained.

Exceptions

Thrown when builder or tools is null.

Applies to