> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/academy/tier-2-core-skills/m03-agent-builder-fundamentals/lab-7-export-the-agent-bundle-and-configure.md). Agents can also search and read this documentation through its [MCP server](https://docs.uptiq.ai/~gitbook/mcp).

# Lab 7: Export the agent bundle and configure access controls

Hands-on lab for lesson 7 of module M03, export the agent bundle and configure access controls.

{% @uptiq-training/training-labels content="Module 3 | brand
Lesson 7 of 8 | brand
Lab 7 | success
11 minutes | neutral
Bloom level Apply | neutral" %}

{% @uptiq-training/training-navigator title="M03 Agent Builder Fundamentals — Executor 1.4" content="Lesson 1: Configure agent identity and instructions | soon
Lab 1: Configure agent identity and instructions
Lesson 2: Configure agent behavior, runtime and skills | soon
Lab 2: Configure agent behavior, runtime and skills
Lesson 3: Configure knowledge, triggers, secrets and authentication | soon
Lab 3: Configure knowledge, triggers, secrets and authentication
Lesson 4: Guardrails for a financial workflow | soon
Lab 4: Guardrails for a financial workflow
Lesson 5: Knowledge check 1 | soon
Lesson 6: Test, validate and troubleshoot the agent | soon
Lab 6: Test, validate and troubleshoot the agent
Lesson 7: Export the agent bundle and configure access controls | soon
Lab 7: Export the agent bundle and configure access controls | current
Lesson 8: Apply financial skills to a configured agent | soon
Lab 8: Apply financial skills to a configured agent" %}

## Lab overview

**Exercise title:** Export the Agent Bundle and Configure Access Controls

**Difficulty level:** Apply (Bloom Level 3 — you will perform the procedures, not just recall them)

**Estimated hands-on time:** 11 minutes (approximately 8 minutes of active hands-on work)

**What you will build:** You will export your configured borrower onboarding agent as a portable bundle and configure the Allowed Domains list to control where the agent's embedded widget may run. By the end of this exercise, you will have an agent export package delivered to your email and a whitelisted domain entered in Access & Security.

**Enabling objective:** Export an agent bundle for reuse, including handling large exports delivered via email with download link, and configure whitelisted domains and agent Authentication tab settings for Microsoft Entra ID or Google sign-in.

{% hint style="info" %}
**Concept:** Authentication tab configuration (Microsoft Entra ID or Google sign-in) was completed in Lesson 3. This lesson focuses on the two remaining components of the enabling objective: the export procedure and the Allowed Domains configuration.
{% endhint %}

### Prerequisites

* Lesson 3 complete — Authentication tab configured with Microsoft Entra ID (Enable Authentication on, Directory tenant ID and Application client ID entered and saved)
* Your borrower onboarding agent is fully configured with all required screens complete (Lessons 1–6)
* You have access to the email account associated with your sandbox user — the export package is delivered by email
* You have the Export Agent capability in your sandbox tenant

## Your sandbox environment

**Environment access URL:** `<provided by your instructor>`

### Connection details

| Field                           | Where to find it                                                                                           |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Your sandbox email address**  | Provided in your exercise materials — this is the address the export email will be sent to                 |
| **Domain URL for whitelisting** | Provided in your exercise materials — enter it exactly as written, including protocol, subdomain, and port |

### Pre-provisioned resources

The following are already set up in your sandbox. You do not need to configure them during this exercise:

* Your borrower onboarding agent, fully configured from Lessons 1–6
* Authentication tab: Microsoft Entra ID configured with Enable Authentication on (completed in Lesson 3)
* The Export Agent capability is enabled for your sandbox user account

## Configuration template

This lesson does not require a configuration file. The two procedures — exporting the agent and adding a domain — use dialog boxes and form fields in the Uptiq Platform UI. The domain URL you will enter is provided in your exercise materials.

{% hint style="warning" %}
The domain URL must be entered exactly as your browser sends it. A mismatch in protocol (`http` vs. `https`), subdomain (`app.example.com` vs. `www.app.example.com`), or port will cause widget requests from that domain to be refused. Copy the URL from your exercise materials rather than typing it from memory.
{% endhint %}

## Step-by-step instructions

### Procedure 1 — Export the Agent Bundle

{% stepper %}
{% step %}
**Open the Export Agent dialog**

In the Agent Builder canvas header, locate the Export Agent icon. It sits between the Integrate Agent icon and the Agent Config button.

Select the Export Agent icon to open the Export Agent dialog.

**Alternative path:** From the agent list, navigate to `My Agents`, find your borrower onboarding agent, select `•••` on its row, then select **Export Agent**.

**Expected result:** The Export Agent dialog opens, showing three checkboxes and an Export Package button.

*Export Agent dialog open, three checkboxes visible (Include secrets, Include MCP configuration, Include integration skills), Export Package button visible*

{% hint style="info" %}
**Concept:** The export package is a complete snapshot of your agent's configuration — its identity and instructions, attached skills and knowledge, integration skills, triggers and checklists, guardrails, and runtime settings. It does not include live conversation history or runtime state.
{% endhint %}
{% endstep %}

{% step %}
**Review the export options and leave all unchecked**

The dialog shows three checkboxes, all unchecked by default:

| Checkbox                       | What it includes if checked                                                                     |
| ------------------------------ | ----------------------------------------------------------------------------------------------- |
| **Include secrets**            | API keys, tokens, and credentials — not just references to them                                 |
| **Include MCP configuration**  | Each MCP connection's credentials and settings (OAuth client ID and secret, headers and tokens) |
| **Include integration skills** | The agent's connected Apps & Services / integration-backed skills and their setup               |

For this exercise, leave all three checkboxes unchecked. You are not exporting secrets, MCP configuration, or integration skills.

{% hint style="warning" %}
If you tick any of the three checkboxes, the platform displays a warning: "Exporting secrets, MCP configuration, or integration skills may expose sensitive credentials, internal tools, or privileged access." Do not check these boxes for this exercise.
{% endhint %}

**Expected result:** All three checkboxes remain unchecked. The Export Package button is available.
{% endstep %}

{% step %}
**Select Export Package**

Select Export Package.

**Expected result:** The dialog closes and a message appears on screen: "Agent export is in progress. You will receive an email with the download link shortly."

{% hint style="info" %}
**Concept:** The Platform builds the export package in the background rather than downloading it directly in the browser. This prevents large agents from timing out during export. Both the in-progress message and the delivery email go to the email address of the user who started the export.
{% endhint %}
{% endstep %}

{% step %}
**Retrieve the export package from your email**

Open the email account associated with your sandbox user.

Look for an email with the subject line: "Your agent export '‹your agent name›' is ready!"

Select Download in the email to retrieve the package.

**Expected result:** The agent package file downloads to your device. The email may also list any warnings raised during the export under "Please note:".

{% hint style="warning" %}
The download link in the email expires. If you return to the email later and the link no longer works, you must re-export the agent — select Export Agent again and repeat Steps 1–3. A new email with a new link will be sent.
{% endhint %}

{% hint style="info" %}
**Tip:** If the email does not arrive within 5 minutes, check your spam or junk folder. If it is not there either, check for a separate email with the subject "Your agent export failed" — it will include the reason and a View Agent button. If you receive a failure email, notify your instructor before proceeding.
{% endhint %}

{% hint style="success" %}
**Checkpoint:** Confirm you have received the export email and successfully downloaded the package file before continuing to Procedure 2.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 2 — Configure the Allowed Domains List

{% stepper %}
{% step %}
**Navigate to Access & Security**

In Agent Builder, open Agent Config and navigate to Access & Security.

*Access & Security screen showing the Allowed Domains section and + Add New Domain button*

{% hint style="info" %}
**Concept:** Allowed Domains is the list of web origins where your agent's embedded widget may run. A widget-key request from any origin not on this list is refused. With the list empty, the widget runs nowhere outside the Platform itself. This setting applies to widget keys only — it does not affect API keys, which are used for server-to-server calls.
{% endhint %}
{% endstep %}

{% step %}
**Add the whitelisted domain**

Under Allowed Domains, select + Add New Domain.

In the Enter URL field, type or paste the domain URL provided in your exercise materials.

{% hint style="warning" %}
Enter the domain exactly as the browser sends it. The platform checks the protocol (`https://`), subdomain (e.g., `app.`), and port. A mismatch in any of these — even switching `https` to `http` or adding or removing `www.` — will cause widget requests from that domain to be refused. Copy the URL from your exercise materials rather than typing it from memory.
{% endhint %}

Select Save.

**Expected result:** The domain appears in the Allowed Domains list.

{% hint style="success" %}
**Checkpoint:** Confirm the domain URL in the list matches the URL in your exercise materials exactly — same protocol, same subdomain, same port (if any). If it does not match, select the trash icon to remove the entry and repeat this step with the correct URL.
{% endhint %}
{% endstep %}

{% step %}
**Verify the domain entry**

Review the Allowed Domains list and confirm:

* The domain URL is present.
* The URL matches your exercise materials exactly (protocol, subdomain, and port).

**Expected result:** One domain entry is visible in the Allowed Domains list with the correct URL.

{% hint style="info" %}
**Tip:** To understand the difference between the two key types available in Access & Security: a Widget Key is safe to ship in browser code because it works only from the Platform and the Allowed Domains list. An API Key is a key-and-secret pair for server-to-server calls — the secret is shown only once when generated and cannot be retrieved later. For this exercise, you are configuring which domains may use a Widget Key.
{% endhint %}
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

<summary>Fixes for common problems in this lab</summary>

| Symptom                                                                 | Cause                                                                                             | Fix                                                                                                                                                                                                        |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Export Agent icon is greyed out or disabled**                         | Your sandbox user account does not have the Export Agent capability                               | Contact your instructor — the capability must be enabled for your account before you can proceed                                                                                                           |
| **Export email does not arrive within 5 minutes**                       | Email may have been filtered to spam, or the export may have failed                               | Check your spam/junk folder first. If not there, check for a failure email with subject "Your agent export failed." If you find a failure email, note the reason and notify your instructor                |
| **Export failure email received**                                       | The export process encountered an error after automatic retries                                   | Note the reason shown in the failure email and notify your instructor. Select View Agent in the email to return to the agent                                                                               |
| **Download link in the email no longer works**                          | The download link has expired                                                                     | Re-export the agent: select Export Agent in the canvas header, leave checkboxes unchecked, select Export Package, and wait for a new email with a new link                                                 |
| **Domain added but widget requests from that domain are still refused** | Protocol, subdomain, or port mismatch between the entered URL and the actual browser origin       | Remove the entry (trash icon), re-enter the URL exactly as the browser sends it — confirm `https://` vs `http://`, confirm subdomain (e.g., `app.` vs `www.`), confirm port if applicable — and save again |
| **Domain does not appear in the Allowed Domains list after saving**     | Save was not completed, or a validation error occurred                                            | Repeat Step 6: select + Add New Domain, enter the URL, and select Save. If a validation error appears, check the URL format                                                                                |
| **Ticking an export checkbox shows a security warning**                 | Expected platform behavior — the warning appears whenever any of the three checkboxes is selected | For this exercise, leave all checkboxes unchecked and dismiss the warning if it appeared. If you accidentally ticked a box, uncheck it before selecting Export Package                                     |

</details>

## Checkpoints and validation

### Embedded Checkpoints (Formative)

#### Checkpoint A — Export email received and package downloaded

Confirm both of the following before moving to Procedure 2:

* You received an email with the subject "Your agent export '‹your agent name›' is ready!"
* You selected Download and the package file saved to your device.

If the email has not arrived: check your spam folder. If it is still missing after 5 minutes, check for a failure email and notify your instructor.

#### Checkpoint B — Domain visible in Allowed Domains list

* At least one entry appears in the Allowed Domains list under `Agent Config → Access & Security`.
* The URL in the list matches the domain URL from your exercise materials exactly — same protocol, same subdomain, same port.

If the URL does not match: remove the entry with the trash icon and repeat Step 6.

### Summative Assessment

This lesson's summative assessment is a practical task graded on three observable outcomes. Your instructor or the exercise system will verify each of the following:

#### Item 1 — Export package received (EO-4)

**Graded criterion:** You received the export email and downloaded the agent package file.

**Confirm:** The export email arrived at your sandbox email address and you selected Download to retrieve the file.

**Correct outcome:** Export email received; package file downloaded.

#### Item 2 — Domain URL entered exactly (EO-4)

**Graded criterion:** The domain URL in the Allowed Domains list matches the URL provided in your exercise materials exactly — protocol, subdomain, and port all match.

**Confirm:** Open `Agent Config → Access & Security` and compare the entry in the Allowed Domains list against the URL in your exercise materials character by character.

**Correct outcome:** The URL in the list is an exact match. A mismatch in protocol (`http` vs. `https`), subdomain, or port is a grading failure — remove the entry and re-enter the correct URL.

#### Item 3 — Domain visible in Allowed Domains list (EO-4)

**Graded criterion:** The domain entry is present and saved in the Allowed Domains list.

**Confirm:** The domain appears as a row in the Allowed Domains section of `Agent Config → Access & Security`. If the list is empty, the save did not complete — repeat Step 6.

**Correct outcome:** One domain entry is visible in the list.

## Solution reference

<details>

<summary>The completed state of your work</summary>

The following describes the completed state of your sandbox environment after all procedures in this lesson are successfully executed.

### Export Procedure — Completed State

* **Export Agent dialog:** Opened via the Export Agent icon in the canvas header (or via `My Agents → ••• → Export Agent`)
* **Export options:** All three checkboxes left unchecked — Include secrets: unchecked; Include MCP configuration: unchecked; Include integration skills: unchecked
* **Export Package selected:** Yes
* **In-progress message:** "Agent export is in progress. You will receive an email with the download link shortly." — displayed after selecting Export Package
* **Export email received:** Subject line "Your agent export '‹your agent name›' is ready!" — received at the email address associated with your sandbox user
* **Package downloaded:** Agent package file downloaded via the Download button in the email

### Allowed Domains — Completed State

* **Navigation path:** `Agent Config → Access & Security → Allowed Domains`
* **Domain entry:** The domain URL from your exercise materials, entered exactly — correct protocol (`https://`), correct subdomain, correct port if applicable
* **Save completed:** Yes — the domain appears as a row in the Allowed Domains list
* **Key type this applies to:** Widget Key only — API keys are not affected by the Allowed Domains list

### Authentication Tab — Reference (Completed in Lesson 3)

The Authentication tab was configured in Lesson 3 and is not modified in this lesson. For reference, the completed state is:

* **Enable Authentication:** On
* **Authentication Provider:** Microsoft Entra ID
* **Directory (tenant) ID:** Value entered from the app registration's Overview page in the Azure portal
* **Application (client) ID:** Value entered from the app registration's Overview page in the Azure portal
* **Saved:** Yes

{% hint style="info" %}
**Tip:** If you need to verify the Authentication tab configuration, navigate to `Agent Config → Authentication` and confirm Enable Authentication is on and the provider fields are populated. Do not modify these settings — they were completed and validated in Lesson 3.
{% endhint %}

</details>

{% hint style="success" %}
**Lab complete.** Confirm every checkpoint above before you move on.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/academy/tier-2-core-skills/m03-agent-builder-fundamentals/lab-7-export-the-agent-bundle-and-configure.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
