AgentApplicationBuilder class
Builder class for creating and configuring AgentApplication instances.
Methods
build() | Builds and returns a new AgentApplication instance configured with the provided options. |
with |
Sets authentication options for the AgentApplication. |
with |
Sets the storage provider for the AgentApplication. |
with |
Sets the factory function to create new TurnState instances. |
Method Details
build()
Builds and returns a new AgentApplication instance configured with the provided options.
function build(): AgentApplication<TState>
Returns
AgentApplication<TState>
A new AgentApplication instance
withAuthorization(AuthorizationHandlers)
Sets authentication options for the AgentApplication.
function withAuthorization(authHandlers: AuthorizationHandlers): AgentApplicationBuilder<TState>
Parameters
- authHandlers
- AuthorizationHandlers
The user identity authentication options
Returns
AgentApplicationBuilder<TState>
This builder instance for chaining
withStorage(Storage)
Sets the storage provider for the AgentApplication.
function withStorage(storage: Storage): AgentApplicationBuilder<TState>
Parameters
- storage
- Storage
The storage implementation to use
Returns
AgentApplicationBuilder<TState>
This builder instance for chaining
withTurnStateFactory(() => TState)
Sets the factory function to create new TurnState instances.
function withTurnStateFactory(turnStateFactory: () => TState): AgentApplicationBuilder<TState>
Parameters
- turnStateFactory
-
() => TState
Function that creates a new TurnState
Returns
AgentApplicationBuilder<TState>
This builder instance for chaining