Share via


AgentApplicationOptions interface

Configuration options for creating and initializing an Agent Application. This interface defines all the configurable aspects of an agent's behavior, including adapter settings, storage, authorization, and various feature flags.

Properties

adapter

The adapter used for handling bot interactions with various messaging platforms. This adapter manages the communication layer between your agent and the Bot Framework. If not provided, a default CloudAdapter will be created automatically.

adaptiveCardsOptions

Configuration options for handling Adaptive Card actions and interactions. This controls how the agent processes card submissions, button clicks, and other interactive elements within Adaptive Cards sent to users.

agentAppId

The unique application ID of the agent as registered in the Bot Framework. This ID is used to identify your bot in the Azure Bot Service and should match the App ID from your bot registration in the Azure portal.

Example

"12345678-1234-1234-1234-123456789012"
authorization

Handlers for managing user authentication and authorization within the agent. This includes OAuth flows, token management, and permission validation. Use this to implement secure access to protected resources or user-specific data.

fileDownloaders

An array of file downloaders for handling different types of input files from users. Each downloader can handle specific file types or sources (e.g., SharePoint, OneDrive, direct uploads). The agent will use these downloaders to process file attachments sent by users during conversations.

headerPropagation

Optional. A function to handle header propagation for incoming requests. This allows the agent to manage headers from incoming requests and propagate them to outgoing requests as needed.

longRunningMessages

Whether to enable support for long-running message processing operations. When enabled, the agent can handle operations that take longer than the typical HTTP timeout period without the connection being terminated. This is useful for complex AI operations, file processing, or external API calls that may take time.

normalizeMentions

Whether to automatically normalize mentions in incoming messages. When enabled, user mentions and other entity mentions in messages will be standardized to a consistent format, making them easier to process and understand. This includes formatting

removeRecipientMention

Whether to automatically remove mentions of the bot's name from incoming messages. When enabled, if a user mentions the bot by name (e.g., "@BotName hello"), the mention will be stripped from the message text before processing, leaving just "hello". This helps create cleaner input for natural language processing.

startTypingTimer

Whether to start a typing indicator timer when the bot begins processing a message. When enabled, users will see a typing indicator while the agent is thinking or processing, providing better user experience feedback. The typing indicator will automatically stop when the agent sends a response.

storage

The storage mechanism for persisting conversation and user state across turns. This can be any implementation of the Storage interface, such as memory storage for development or blob storage for production scenarios.

transcriptLogger

Optional. The transcript logger to use for logging conversations. If not provided, no logging will occur.

turnStateFactory

A factory function that creates a new instance of the turn state for each conversation turn. This function is called at the beginning of each turn to initialize the state object that will be used throughout the turn's processing lifecycle.

Example

() => new MyCustomTurnState()

Property Details

adapter

The adapter used for handling bot interactions with various messaging platforms. This adapter manages the communication layer between your agent and the Bot Framework. If not provided, a default CloudAdapter will be created automatically.

adapter?: CloudAdapter

Property Value

adaptiveCardsOptions

Configuration options for handling Adaptive Card actions and interactions. This controls how the agent processes card submissions, button clicks, and other interactive elements within Adaptive Cards sent to users.

adaptiveCardsOptions?: AdaptiveCardsOptions

Property Value

agentAppId

The unique application ID of the agent as registered in the Bot Framework. This ID is used to identify your bot in the Azure Bot Service and should match the App ID from your bot registration in the Azure portal.

Example

"12345678-1234-1234-1234-123456789012"
agentAppId?: string

Property Value

string

authorization

Handlers for managing user authentication and authorization within the agent. This includes OAuth flows, token management, and permission validation. Use this to implement secure access to protected resources or user-specific data.

authorization?: AuthorizationHandlers

Property Value

fileDownloaders

An array of file downloaders for handling different types of input files from users. Each downloader can handle specific file types or sources (e.g., SharePoint, OneDrive, direct uploads). The agent will use these downloaders to process file attachments sent by users during conversations.

fileDownloaders?: InputFileDownloader<TState>[]

Property Value

headerPropagation

Optional. A function to handle header propagation for incoming requests. This allows the agent to manage headers from incoming requests and propagate them to outgoing requests as needed.

headerPropagation?: HeaderPropagationDefinition

Property Value

HeaderPropagationDefinition

longRunningMessages

Whether to enable support for long-running message processing operations. When enabled, the agent can handle operations that take longer than the typical HTTP timeout period without the connection being terminated. This is useful for complex AI operations, file processing, or external API calls that may take time.

longRunningMessages: boolean

Property Value

boolean

normalizeMentions

Whether to automatically normalize mentions in incoming messages. When enabled, user mentions and other entity mentions in messages will be standardized to a consistent format, making them easier to process and understand. This includes formatting

normalizeMentions?: boolean

Property Value

boolean

removeRecipientMention

Whether to automatically remove mentions of the bot's name from incoming messages. When enabled, if a user mentions the bot by name (e.g., "@BotName hello"), the mention will be stripped from the message text before processing, leaving just "hello". This helps create cleaner input for natural language processing.

removeRecipientMention?: boolean

Property Value

boolean

startTypingTimer

Whether to start a typing indicator timer when the bot begins processing a message. When enabled, users will see a typing indicator while the agent is thinking or processing, providing better user experience feedback. The typing indicator will automatically stop when the agent sends a response.

startTypingTimer: boolean

Property Value

boolean

storage

The storage mechanism for persisting conversation and user state across turns. This can be any implementation of the Storage interface, such as memory storage for development or blob storage for production scenarios.

storage?: Storage

Property Value

transcriptLogger

Optional. The transcript logger to use for logging conversations. If not provided, no logging will occur.

transcriptLogger?: TranscriptLogger

Property Value

turnStateFactory

A factory function that creates a new instance of the turn state for each conversation turn. This function is called at the beginning of each turn to initialize the state object that will be used throughout the turn's processing lifecycle.

Example

() => new MyCustomTurnState()
turnStateFactory: () => TState

Property Value

() => TState