Skip to content

How to Export Tools and Assistants

Overview

When developing in Etendo Copilot, it is possible to export assistants and tools. This documentation details how to export them and how to make sure that, when installing the module, the configurations are ready to use, allowing a plug and play process.

Exporting Assistants

There are two main methods for exporting assistants: export it as a dataset where the configured assistant is exported within an Etendo Classic dataset or export as a System Administrator, where the assistant(s) defined with the System Administrator role are exported directly together with the module.

Exporting Assistants as Datasets

Assistants must be exported as a dataset, in case optional installation is required and with Client/Organization data access level.

  1. Initial setup of the assistant:

    • Configure the assistant and tools in the environment where the development takes place.
    • Make sure to include all the necessary fields to be exported. Make sure to configure correctly the Knowledge Base, Skills/Tools and Team Members tabs, as well as the records in the Knowledge Base File window.


    Assistant example with complete tabs.

  1. Create and Configure a Dataset:

    • As System Administrator, go to the Dataset window and create a new record by selecting the module under development.
    • Define the Search Key and Name of the dataset.
    • Set the Data Access Level to System/Organization (recommended for user assistants).
  2. Add Tables to the Dataset

    For each window or tab to be exported, create a record in the Table tab. Specify the corresponding table and add the appropriate HQL/SQL Where clause.

    • Assistant: Table etcop_app
      Where Clause
      id in ('<AssistantID>')
      
    • Knowledge Base: Table etcop_app_source
      Where Clause
      etcopApp.id in ('<AssistantID>')
      
    • Skills/Tools: Table etcop_app_tool
      Where Clause
      `copilotApp.id in ('<AssistantID>')
      
    • Team Members: Table ETCOP_Team_Member
      Where Clause
      copilotApp.id in ('<AssistantID>')
      
    • Knowledge Base File: Table etcop_file
      Where Clause
      id in ('<knowladgeBaseFileID>')
      

    Dataset window configuration example in the module Copilot Purchase Expert

  3. Export Reference Data Button

    • Execute the Export Reference Data process, which will create the referencedata/ folder inside the selected module, with all the records that were exported according to the dataset configuration.

    Note

    Verify that all the required records are generated in the .XML file.

  4. Include Reference Data in the Module

    • Check the Include Reference Data checkbox in the module definition and add a description to the dataset referring to the exported assistant.

    Configuration example in the module Copilot Purchase Expert

    • When the module is installed, the dataset will be available for application in the Enterprise Module Management window.

    Distributed datasets example

Exporting Assistants as System Administrator

When exporting assistants that need to be pre-configured in a module installation, they must be created with the System Administrator role. These assistants will be editable only by the System Administrator, but they can be executed either by the System Administrator or by users with Client/Organization data access levels.

  1. Create Assistant with System Administrator Role:

    • Log in as System Administrator.
    • Configure the assistant and its tabs, ensuring to select the module (under development) in the Module field.
    • If the assistant should be restricted to System Administrator use only, check the System App checkbox. Otherwise, leave it unchecked to allow execution across all data access levels.

    Exported assistant example and available only as System Administrator

  2. Export the Database.

    • Execute the command ./gradlew export.database to export the assistant together with the module.

Exporting Tools

Tool configuration: When defining a tool, select the module (under development) in the Module field, and run ./gradlew export.database command to export the tool together with the module.

Tool configuration example

Info

For more information, visit How to create a Copilot Tool.