HostedAgentBuilderExtensions.WithAITools 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.
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.