@salesforce/agents
    Preparing search index...

    Class AgentPreviewBaseAbstract

    Abstract base class for agent runners that provides common functionality for interacting with agents through the Einstein AI Agent API.

    Hierarchy (View Summary)

    Implements

    Index

    Methods

    • Send a message to the agent using the session ID obtained by calling start().

      Parameters

      • sessionId: string

        A session ID provided by first calling start().

      • message: string

        A message to send to the agent.

      Returns Promise<AgentPreviewSendResponse>

      AgentPreviewSendResponse

    • Enable or disable Apex Debug Mode, which will enable trace flags for the Bot user and create apex debug logs for use within VS Code's Apex Replay Debugger.

      Parameters

      • enable: boolean

        Whether to enable or disable Apex Debug Mode.

      Returns void

    • Get the traces for a given session and message IDs.

      Parameters

      • sessionId: string

        A session ID provided by first calling start().

      • messageIds: string[]

        An array of message IDs to get the traces for.

      Returns Promise<PlannerResponse[]>

      PlannerResponse[]