Class AgentRuntimeExtensions
Provides extension methods for managing and registering agents within an IAgent
- Inheritance
-
Agent
Runtime Extensions
- Inherited Members
Methods
RegisterAgentTypeAsync(IAgentRuntime, AgentType, Type, IServiceProvider, params IEnumerable<object>)
public static ValueTask<AgentType> RegisterAgentTypeAsync(this IAgentRuntime runtime, AgentType type, Type runtimeType, IServiceProvider serviceProvider, params IEnumerable<object> additionalArguments)
Parameters
runtime
IAgentRuntime type
AgentType runtimeType
TypeserviceProvider
IServiceProvider additionalArguments
IEnumerable<object>
Returns
RegisterAgentTypeAsync<TAgent>(IAgentRuntime, AgentType, IServiceProvider, params IEnumerable<object>)
Registers an agent type with the runtime, providing a factory function to create instances of the agent.
public static ValueTask<AgentType> RegisterAgentTypeAsync<TAgent>(this IAgentRuntime runtime, AgentType type, IServiceProvider serviceProvider, params IEnumerable<object> additionalArguments) where TAgent : IHostableAgent
Parameters
runtime
IAgentRuntime The IAgent
Runtime where the agent will be registered.type
AgentType The Agent
Type representing the type of agent.serviceProvider
IServiceProvider The service provider used for dependency injection.
additionalArguments
IEnumerable<object>Additional arguments to pass to the agent's constructor.
Returns
- Value
Task <AgentType > A ValueTask<TResult> representing the asynchronous operation of registering the agent.
Type Parameters
TAgent
The type of agent being registered. Must implement IHostable
Agent .
RegisterImplicitAgentSubscriptionsAsync(IAgentRuntime, AgentType, Type, bool, bool)
public static ValueTask RegisterImplicitAgentSubscriptionsAsync(this IAgentRuntime runtime, AgentType type, Type runtimeType, bool skipClassSubscriptions = false, bool skipDirectMessageSubscription = false)
Parameters
runtime
IAgentRuntime type
AgentType runtimeType
TypeskipClassSubscriptions
boolskipDirectMessageSubscription
bool
Returns
RegisterImplicitAgentSubscriptionsAsync<TAgent>(IAgentRuntime, AgentType, bool, bool)
public static ValueTask RegisterImplicitAgentSubscriptionsAsync<TAgent>(this IAgentRuntime runtime, AgentType type, bool skipClassSubscriptions = false, bool skipDirectMessageSubscription = false) where TAgent : IHostableAgent
Parameters
runtime
IAgentRuntime type
AgentType skipClassSubscriptions
boolskipDirectMessageSubscription
bool
Returns
Type Parameters
TAgent