AgentHostingServiceCollectionExtensions Class
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.
Provides extension methods for configuring AI agents in a service collection.
public static class AgentHostingServiceCollectionExtensions
type AgentHostingServiceCollectionExtensions = class
Public Module AgentHostingServiceCollectionExtensions
- Inheritance
-
AgentHostingServiceCollectionExtensions
Methods
| Name | Description |
|---|---|
| AddAIAgent(IServiceCollection, String, Func<IServiceProvider,String,AIAgent>) |
Adds an AI agent to the service collection using a custom factory delegate. |
| AddAIAgent(IServiceCollection, String, String, IChatClient) |
Adds an AI agent to the service collection with a provided chat client instance. |
| AddAIAgent(IServiceCollection, String, String, Object) |
Adds an AI agent to the service collection using a chat client resolved by an optional keyed service. |
| AddAIAgent(IServiceCollection, String, String, String, Object) |
Adds an AI agent to the service collection using a chat client (optionally keyed) and a description. |
| AddAIAgent(IServiceCollection, String, String) |
Adds an AI agent to the service collection using only a name and instructions, resolving the chat client from dependency injection. |