Documentation - v1.2.0-alpha.3
    Preparing search index...

    Interface AgentApplicationOptions<TState>

    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.

    interface AgentApplicationOptions<TState extends TurnState> {
        adapter?: CloudAdapter;
        adaptiveCardsOptions?: AdaptiveCardsOptions;
        agentAppId?: string;
        authorization?: AuthorizationOptions;
        connections?: Connections;
        fileDownloaders?: InputFileDownloader<TState>[];
        headerPropagation?: HeaderPropagationDefinition;
        longRunningMessages: boolean;
        normalizeMentions?: boolean;
        removeRecipientMention?: boolean;
        startTypingTimer: boolean;
        storage?: Storage;
        transcriptLogger?: TranscriptLogger;
        turnStateFactory: () => TState;
    }

    Type Parameters

    • TState extends TurnState

      The type of turn state that extends TurnState, allowing for custom state management specific to your agent's needs.

    Index

    Properties

    adapter?: CloudAdapter

    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.

    undefined (auto-created)
    
    adaptiveCardsOptions?: 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.

    undefined (default Adaptive Card handling)
    
    agentAppId?: string

    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.

    "12345678-1234-1234-1234-123456789012"
    
    authorization?: AuthorizationOptions

    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.

    undefined (no authorization required)
    
    connections?: Connections

    Optional. Configuration for managing multiple authentication connections within the agent. This allows the agent to handle authentication across different services or identity providers.

    fileDownloaders?: InputFileDownloader<TState>[]

    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.

    undefined (no file downloading capability)
    
    headerPropagation?: HeaderPropagationDefinition

    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.

    undefined
    
    longRunningMessages: boolean

    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.

    false
    
    normalizeMentions?: boolean

    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 mentions and channel references consistently.

    true
    
    removeRecipientMention?: boolean

    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.

    true
    
    startTypingTimer: boolean

    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.

    false
    
    storage?: 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.

    undefined (no persistence)
    
    transcriptLogger?: TranscriptLogger

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

    turnStateFactory: () => TState

    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.

    Type Declaration

      • (): TState
      • Returns TState

        A new instance of TState for the current turn

    () => new MyCustomTurnState()