# Exporting and Importing Agents

## Overview

Kognitos supports the ability to **export** automation agents from one environment and **import** them into another. This allows you to move published automation content across agents in a controlled way.

## Exporting an Agent

Exporting lets you download a snapshot of an agent’s **published state**. The export includes only published processes, learnings, and books — draft processes, playgrounds, and configuration credentials are *not* exported. Anyone with access to the agent can export it.

### How to Export an Agent

{% stepper %}
{% step %}
**Navigate to Agents**

Open the agent menu and select <kbd>View All</kbd>.
{% endstep %}

{% step %}
**Select an Agent**

Check the box next to the agent you want to export.
{% endstep %}

{% step %}
**Start Export**

Click on <kbd>Actions</kbd>, then select <kbd>Export</kbd> from the dropdown.
{% endstep %}

{% step %}
**Confirm Export**

In the confirmation popup, click on **Export** again. This will download a `.json` file containing the agent's current state, which can be later imported into a new or existing agent.
{% endstep %}
{% endstepper %}

{% @supademo/embed url="<https://app.supademo.com/demo/cmcl3j95v0cp116b6eqxkhuzl>" demoId="cmcl3j95v0cp116b6eqxkhuzl" %}

## Importing an Agent

You can import an agent using a `.json` file generated from the export process. There are two ways to do this — into a **new agent** or **into an existing agent**. All imported items are added as **drafts**. The agent's published content is *not* affected unless you review and publish the imported content.

#### 1. Import into a New Agent

Use this option to create a **new agent**.

#### 2. Import into an Existing Agent

This option allows you to update an **existing agent** and is available only to agent **admins**.

### How to Import an Agent

{% stepper %}
{% step %}
**Navigate to Agents**

Open the agent menu and select <kbd>View All</kbd>.
{% endstep %}

{% step %}
**Start Import**

Click on <kbd>Import</kbd> to start the import.
{% endstep %}

{% step %}
**Add Import Details**

1. Upload a `.json` file of an exported agent.
2. Choose *one* of the following options:
   1. Select **Create New Agent** and provide a name for the new agent.
   2. Select **Import to Existing Agent** and select an existing agent from the dropdown menu. *Note: This option is only available to agent admins.*
3. Click <kbd>Next</kbd> to continue.
   {% endstep %}

{% step %}
**Review and Confirm**

Review the summary of the import and click <kbd>Import</kbd> to finish importing.

{% hint style="info" %}
By default, all items are selected for import. You can uncheck items to exclude them.
{% endhint %}
{% endstep %}
{% endstepper %}

{% @supademo/embed url="<https://app.supademo.com/demo/cmcm8c9ae1axn16b6my05xtwr>" demoId="cmcm8c9ae1axn16b6my05xtwr" %}
