@salesforce/agents
    Preparing search index...

    Abstract base class for agent preview functionality. Contains shared properties and methods between ScriptAgent and ProductionAgent.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    name: string | undefined

    The display name of the agent (user-friendly name, not API name)

    preview: AgentPreviewInterface & {
        setMockMode: (mockMode: "Mock" | "Live Test") => void;
    }

    Methods

    • Get the agent ID to use for storage/transcript purposes

      Returns string

    • Beta

      Publish an AgentJson representation to the org

      Parameters

      • OptionalskipMetadataRetrieve: boolean

      Returns Promise<PublishAgent>

      The publish response

    • Refreshes the access token on the standard connection.

      Retained for backward compatibility. The caller's original Connection is never mutated by agent operations, so this only refreshes the internal standard connection owned by the ConnectionManager.

      Returns Promise<void>

    • Resume an existing session by loading session state from disk

      Parameters

      • sessionId: string

        The session ID to resume

      Returns Promise<void>

    • Beta

      Creates an AiAuthoringBundle directory, .script file, and -meta.xml file

      Parameters

      • options: {
            agentSpec?: ExtendedAgentJobSpec;
            bundleApiName: string;
            outputDir?: string;
            project: SfProject;
        }

        { project: SfProject; bundleApiName: string; outputDir?: string; agentSpec?: ExtendedAgentJobSpec; }

      Returns Promise<void>

      Promise