Skip to content

Import

The Import page provides a powerful tool for importing a complete agent configuration from a JSON file. This is useful for migrating agents between accounts, restoring an agent from a backup, or setting up a new agent based on a template. The import process overwrites the configuration of a selected existing agent with the data from the file.

Overview

The page provides a step-by-step workflow to:

  • Select a target account and agent to import into.
  • Upload an agent configuration file in JSON format.
  • Analyze the file for items that have the same name as existing items in the target account.
  • Provide a user interface to resolve these name conflicts.
  • Run the import, which updates the target agent and creates all its associated child entities (intents, prompts, variables, etc.).
  • Display a detailed summary of the import operation.

Import

The Import Process

The import process is designed to be safe and transparent, guiding the user through several steps.

1. Select Target Account and Agent

Before you can import, you must select the target for the import using the global selectors at the top of the admin interface:

  1. Select an Account: Choose the account that will own the imported configuration.
  2. Select an AI Agent: Choose an existing agent within that account. The configuration from the JSON file will be imported into this agent, overwriting its existing properties except for agent name, and adding all the associated child items.

2. Upload and Analyze File

Once a target account and agent are selected:

  1. Use the "Choose a version file" uploader to select the agent configuration JSON file from your local system.
  2. Click the "Analyze Import File" button.
  3. The system will read the JSON file and compare the name of each item (e.g., each intent, prompt, variable) against the items that already exist in the selected account.

3. Resolve Name Conflicts

If the analysis finds items in the JSON file with names that already exist in the target account, a "Resolve Name Conflicts" form will appear.

  • For each conflicting item, you are given two choices:
  • Skip: The item from the import file will not be imported. The existing item in the account will remain untouched.
  • Append suffix and Import: The item from the import file will be imported, but its name will be changed to original_name_imported to avoid a conflict.
  • After choosing an action for each conflict, click "Confirm Resolutions and Prepare Import".

If the analysis finds no conflicts, you can proceed directly to the next step.

4. Run the Import

After the file is analyzed and any conflicts are resolved, the "Run Import" button will become available.

  1. Click the "Run Import" button.
  2. The system will perform the following actions within a single database transaction:
    • Update Agent Details: The core properties of the agent you selected in Step 1 (e.g., agent_name, agent_description, start_prompt) will be updated with the values from the agent object in the JSON file.
    • Import Child Entities: The system will iterate through all lists of items in the JSON file (intents, prompts, variables, actions, etc.). For each item not marked to be "skipped", it will be created in the database and associated with the target account and the (now updated) agent.

5. Review Summary

Once the import is complete, a summary is displayed:

  • Imported: The number of items successfully created.
  • Skipped: The number of items skipped due to your choices in the conflict resolution step.
  • Failed: The number of items that failed to import due to an error.
  • An expandable "View Import Details" section provides a log of each individual operation (SUCCESS, SKIPPED, FAILED) for detailed review.

Expected JSON File Structure

The import file must be a JSON object with a single top-level key named "agent". The value of this key is an object that contains the agent's configuration and lists of all its associated entities.

Example Structure:

{
  "agent": {
    "name": "Imported Agent Name",
    "description": "Description for the imported agent.",
    "startPrompt": "classification_prompt_name",
    "intents": [
      { "name": "CheckBalance", "type": "action", ... },
      { "name": "Greeting", "type": "fixed", ... }
    ],
    "prompts": [
      { "name": "classification_prompt_name", "body": "...", ... },
      { "name": "final_response_prompt", "body": "...", ... }
    ],
    "variables": [
      { "name": "customer_id", "value": "", ... }
    ]
  }
}