> 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-6-test-validate-and-troubleshoot-the-agent.md). Agents can also search and read this documentation through its [MCP server](https://docs.uptiq.ai/~gitbook/mcp).

# Lab 6: Test, validate and troubleshoot the agent

Hands-on lab for lesson 6 of module M03, test, validate and troubleshoot the agent.

{% @uptiq-training/training-labels content="Module 3 | brand
Lesson 6 of 8 | brand
Lab 6 | success
20 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 | current
Lesson 7: Export the agent bundle and configure access controls | soon
Lab 7: Export the agent bundle and configure access controls
Lesson 8: Apply financial skills to a configured agent | soon
Lab 8: Apply financial skills to a configured agent" %}

## Lab overview

**Exercise title:** Test, Validate, and Troubleshoot the Agent

**Difficulty level:** Apply (Bloom Level 3 — you will perform real testing and troubleshooting tasks, not just observe them)

**Estimated hands-on time:** 20 minutes (approximately 8 minutes guided, 8 minutes independent troubleshooting, 4 minutes review)

**What you will do:** Test your borrower onboarding agent using the Agent Playground, review its execution flow using the Flow tab, confirm its configuration is complete using the Overview tab, and independently identify and correct an intentional guardrail configuration error using the same tools.

**Prerequisites:** You must have completed the previous lab phases before starting this exercise:

* Phase 1 (Configure): Your borrower onboarding agent is fully configured — Basic Details, Instructions, Agent Behaviour, Runtime & Versioning (executor 1.4), Skills & Capabilities, Knowledge Attachment, Triggers, Secrets & Variables, and Guardrails are all saved.
* Phase 2 (Test) begins here. The sandbox agent has been pre-configured with one intentional error for Phase 4 (independent troubleshooting). Do not attempt to fix anything until you reach Step 7.

## Your sandbox environment

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

**Connection details you will need during this lab:**

| **Field**              | **Where to find it**                                                                                                                |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Agent Builder URL**  | Your instructor will provide the direct URL to your pre-configured borrower onboarding agent in Agent Builder                       |
| **Widget key**         | Pre-created in `Agent Config > Access & Security`. If missing, you will create one during Step 1.                                   |
| **Sandbox agent name** | Displayed in the Agent Builder canvas header — confirm it reads "Borrower Onboarding Agent" (or the name your instructor specified) |

**Pre-provisioned resources — you do not need to set these up:**

* **Borrower onboarding agent:** Fully configured through Phase 1. All configuration screens are complete.
* **Knowledge base:** A borrower onboarding knowledge base is already attached to the agent. You do not need to upload or sync any files.
* **Chat trigger:** A chat trigger is already configured. The agent will respond to messages sent through the Agent Playground.
* **Intentional error:** The sandbox agent has one pre-configured guardrail error for Phase 4. It is present now but you will not look for it until Step 7.

{% hint style="warning" %}
Do not open `Agent Config > Guardrails` before you reach Step 7. Seeing the error before the independent troubleshooting phase removes the diagnostic challenge the exercise is designed to give you.
{% endhint %}

## Configuration template

This lab does not require you to author a configuration file. All configuration was completed in Phase 1.

The one configuration change you will make in this lab — correcting the Sensitive Data Masking guardrail in Phase 4 — is a UI-only action in `Agent Config > Guardrails`. No YAML, no code, and no file upload is required.

The correct final guardrail configuration is documented in Section 7 (Solution Reference) so you can verify your work after completing Step 9.

## Step-by-step instructions

### Procedure 1 — Run a Test in the Agent Playground

{% stepper %}
{% step %}
**Open the Agent Playground**

In the Builder Canvas header, select Try Agent.

The Agent Playground opens in a new browser tab. You should see a chat interface with your borrower onboarding agent ready to receive messages.

{% hint style="warning" %}
If the Try Agent button is disabled or you see an error when the Playground opens, you may be missing a widget key. Go to `Agent Config > Access & Security`, select + Add Key, enter a Key Name (for example, "Test Widget"), choose Widget Key as the Key Type, select Generate Key, and copy the key before closing the dialog. Then return to the canvas and select Try Agent again.
{% endhint %}

*Agent Playground open in a new tab, chat interface visible and ready to receive input*

{% hint style="info" %}
The Agent Playground is an interactive testing surface, not a quality assurance tool. Because the agent uses a language model, the same input can produce different output on different runs. A single successful response tells you the agent is working — it does not tell you the agent will always work correctly. Systematic quality validation requires Evals (scored datasets). You are using the Playground here for exploration and basic verification.
{% endhint %}
{% endstep %}

{% step %}
**Send a Sample Borrower Inquiry**

In the chat input field, type the following message exactly and press Enter (or select Send):

> I need to start my loan application. My name is John Smith and I'm applying for a 30-year fixed mortgage.

Wait for the agent to respond. Response time will vary — allow up to 30 seconds.
{% endstep %}

{% step %}
**Verify the Agent Used the Knowledge Base**

Read the agent's response. Confirm that it references borrower onboarding content — for example, it mentions required documents, next steps in the onboarding process, or specific loan product information from the attached knowledge base.

You should see a response that draws on the knowledge base content rather than a generic answer from the model's training data alone.

{% hint style="info" %}
**Checkpoint:** The agent's response should reference specific borrower onboarding content. If the response is generic (for example, a general explanation of mortgages with no reference to your institution's process), the knowledge retrieval skill may not be active or the knowledge base may not have been synced. See Section 5 — Troubleshooting for the fix.
{% endhint %}

{% hint style="info" %}
When the agent uses the Knowledge Search skill, it retrieves relevant passages from the attached knowledge base and grounds its response in that content. A response that ignores the knowledge base and answers from general model training is a configuration problem, not a model limitation.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 2 — Review the Flow Tab

{% stepper %}
{% step %}
**Open the Flow Tab**

Return to the Builder Canvas browser tab. In the canvas, select the Flow tab (the second tab, to the right of the Overview tab).

*Builder Canvas with the Flow tab selected, showing execution steps listed under "What the Agent will do"*
{% endstep %}

{% step %}
**Review the Execution Steps**

Read through the steps listed under What the Agent will do. These steps show how the agent plans to decompose and execute a borrower onboarding task — the sequence of stages, which skills may be used, and how larger workflows break into smaller operational steps.

If the Flow tab displays "No Plan Found" instead of execution steps, note that this is expected behavior for a new agent that has not yet generated a checklist from successful runtime runs. It is not an error.

{% hint style="info" %}
**Checkpoint:** If you see execution steps, review them and confirm they reflect a borrower onboarding workflow (receiving a request, retrieving knowledge, processing borrower information, and so on). If you see "No Plan Found," note it and continue — this does not affect the rest of the lab.
{% endhint %}

{% hint style="info" %}
The Flow tab shows execution steps when the agent has Execution Plan/Checklist entries. Checklists are reusable execution plans that the agent generates and refines automatically over time based on successful runtime plans. A brand-new agent has no history yet, so "No Plan Found" is the correct state. You will use the Flow tab in Step 7 as a troubleshooting tool — understanding what it shows (and what it does not show) is part of that skill.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 3 — Review the Overview Tab

{% stepper %}
{% step %}
**Confirm Configuration Completeness on the Overview Tab**

Select the Overview tab (the first tab on the Builder Canvas — it is the default view).

*Builder Canvas Overview tab showing the agent at center with all four cards — Triggers, Knowledge, Skills, and Integrations — populated*

Confirm that all four cards are populated:

* **Triggers** — shows the chat trigger you configured in Phase 1. The count should be at least 1.
* **Knowledge** — shows the attached borrower onboarding knowledge base. The count should be at least 1. An empty card reads "No knowledge added yet" — if you see this, the knowledge base was not attached correctly in Phase 1.
* **Skills** — shows the active skills, including Knowledge Search and any other skills you enabled. The count should reflect what you configured.
* **Integrations** — shows any connected services. This may be empty if no integrations were configured in Phase 1.

{% hint style="info" %}
**Checkpoint:** All four cards should be populated as expected. If any card is empty when it should not be, that card represents a missing configuration from Phase 1. Note which card is empty and raise it with your instructor before continuing.
{% endhint %}

{% hint style="info" %}
**Tip:** The Overview tab is your pre-deployment checklist. Before you export or deploy any agent, use this view to confirm that nothing is missing. An empty card is always a signal to investigate — it never means "this section is optional."
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 4 — Independently Diagnose and Correct the Intentional Error

{% hint style="warning" %}
Steps 7 through 9 are the independent troubleshooting phase. There are no step-by-step instructions from this point. You will use the tools you have practiced — the Flow tab and the Guardrails screen — to find and fix the error on your own. Read the objective for each step, then work through it independently.
{% endhint %}

{% stepper %}
{% step %}
**Identify the Configuration Error**

**Your objective:** Use the Flow tab and the Guardrails screen to identify the intentional configuration error in the sandbox agent. The error is a missing guardrail for a sensitive data field.

Start with the Flow tab. Review the execution steps and look for a step where sensitive borrower data is processed. Then open `Agent Config > Guardrails` and examine the Sensitive Data Masking configuration.

*Guardrails list in Agent Config showing Sensitive Data Masking status*

You are looking for one of the following conditions:

* Sensitive Data Masking is turned **off** entirely, or
* Sensitive Data Masking is on but the entity type for a specific sensitive field is **missing from the Deny list** (or the Allow list and Deny list are inverted)

{% hint style="info" %}
**Checkpoint:** Before moving to Step 8, confirm that you have identified the specific error — not just that something is wrong, but what is wrong and where. Write it down if it helps: "Sensitive Data Masking is \[on/off]. The missing entity type is \[field name]. The configuration needs \[specific change]."
{% endhint %}
{% endstep %}

{% step %}
**Correct the Error**

**Your objective:** Fix the Sensitive Data Masking configuration so that the sensitive field identified in Step 7 is correctly masked.

In `Agent Config > Guardrails`:

1. If Sensitive Data Masking is off, turn it on.
2. Select the **gear icon** in the Sensitive Data Masking row to open the configuration.
3. Add the missing entity type to the **Deny list** — or, if the Allow list and Deny list are inverted, correct the configuration so the sensitive field is masked rather than passed through.
4. Select **Save**.

{% hint style="warning" %}
Deny list and Allow list work in opposite directions. A Deny list masks only the entity types you select. An Allow list passes the selected types through and masks everything else. If the configuration is inverted — the sensitive field is on the Allow list when it should be on the Deny list — simply adding it to the Deny list is not enough. You need to move it to the correct list.
{% endhint %}
{% endstep %}

{% step %}
**Verify the Correction and Re-Export the Agent**

**Your objective:** Confirm the Guardrails screen shows the correct configuration, then re-export the agent so the corrected configuration is captured in the package.

First, verify: the Guardrails screen should show Sensitive Data Masking on, with the correct entity types configured in the Deny list (or Allow list, depending on your provider setup).

Then re-export:

1. Select the **Export Agent** icon in the canvas header.
2. Leave all three checkboxes (Include secrets, Include MCP configuration, Include integration skills) unchecked unless your instructor specifies otherwise.
3. Select **Export Package**.
4. Watch for the confirmation message: *"Agent export is in progress. You will receive an email with the download link shortly."*
5. Check your email for the download link and select **Download** to retrieve the corrected package.

*Export Agent package dialog with checkboxes visible*

{% hint style="info" %}
**Checkpoint:** The export email should arrive within a few minutes. If it does not arrive, check your spam folder. If you receive a failure email instead, note the reason shown in the email and raise it with your instructor.
{% endhint %}

{% hint style="success" %}
**Best practice:** Always re-export after correcting a configuration error. An exported package is a snapshot — if you correct the agent but do not re-export, the package you previously downloaded still contains the error. The corrected package is the one that can be safely imported into another environment.
{% endhint %}
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

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

| **Symptom**                                                                                          | **Cause**                                                                                           | **Fix**                                                                                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Try Agent button is disabled**                                                                     | The Trigger Agent capability is not enabled for your account, or no widget key exists               | Create a widget key: `Agent Config > Access & Security > + Add Key > Widget Key > Generate Key`. If the button remains disabled after creating a key, contact your instructor — the capability may need to be enabled at the account level.                |
| **Agent Playground opens but the agent gives a generic response not grounded in the knowledge base** | Knowledge retrieval skill is not active, or the knowledge base was not synced before being attached | Verify Knowledge Search is enabled in `Agent Config > Skills & Capabilities > Pre-attached Skills`. Also confirm the knowledge base shows a completed sync version in the Knowledge section of Console. Agents answer from the latest synced version only. |
| **Agent Playground opens but the agent does not respond at all**                                     | No chat trigger is configured, or the trigger is misconfigured                                      | Open `Agent Config > Triggers` and confirm a chat trigger exists with a Trigger Source, Trigger Name, and Description all filled in.                                                                                                                       |
| **Flow tab shows "No Plan Found"**                                                                   | The agent has not yet generated a checklist from successful runtime runs — expected for a new agent | This is not an error. Continue with the lab. The Flow tab will populate over time as the agent completes successful runs.                                                                                                                                  |
| **Overview tab shows an empty Knowledge card**                                                       | The knowledge base was not attached in Phase 1, or was detached                                     | On the Knowledge card, select **+ Add Knowledge**, choose **Use Existing Knowledge**, find the borrower onboarding knowledge base, tick it, and select **Add**.                                                                                            |
| **Overview tab shows an empty Triggers card**                                                        | No trigger was configured in Phase 1                                                                | On the Triggers card, select **+ Add Triggers** and configure a chat trigger (Trigger Source: Chat, Trigger Name, Description).                                                                                                                            |
| **Cannot find the intentional error in Step 7**                                                      | Looking in the wrong screen (Instructions or Skills instead of Guardrails)                          | Go directly to `Agent Config > Guardrails`. The error is in the Sensitive Data Masking configuration — either the guardrail is off, or a specific entity type is missing from the Deny list.                                                               |
| **Corrected the wrong entity type in Step 8**                                                        | Added a guardrail for a different field than the one that was missing                               | Return to `Agent Config > Guardrails`, open the Sensitive Data Masking gear, and review the Deny list against the sensitive field you identified in Step 7. Remove any incorrectly added types and add the correct one. Select Save.                       |
| **Export email does not arrive**                                                                     | Email may be in spam, or the export failed                                                          | Check your spam folder first. If a failure email arrived instead, note the reason and raise it with your instructor. Re-export by selecting Export Agent in the canvas header again.                                                                       |
| **Export download link has expired**                                                                 | The link has a time limit that depends on the deployment's file storage configuration               | Re-export the agent to receive a new email with a fresh download link.                                                                                                                                                                                     |

</details>

## Checkpoints and validation

### Embedded Checkpoints (Formative)

These checkpoints are embedded in the step-by-step instructions above. They are summarized here for quick reference.

#### Checkpoint 1 — Agent Playground response (after Step 3)

Confirm the agent's response references borrower onboarding content from the attached knowledge base, not generic mortgage information from the model's training data.

* **How to confirm:** Read the response and look for institution-specific content, required document lists, or onboarding process steps.
* **If it fails:** Verify Knowledge Search is active in `Agent Config > Skills & Capabilities`. Confirm the knowledge base has a completed sync. See Troubleshooting row 2.

#### Checkpoint 2 — Flow tab review (after Step 5)

Confirm you have reviewed the execution steps (or noted "No Plan Found" as expected behavior).

* **How to confirm:** You can describe what the Flow tab showed — either the execution steps or the "No Plan Found" state — and why each is a valid outcome.
* **If it fails:** There is no failure state here. Both outcomes (steps visible, or "No Plan Found") are correct depending on the agent's runtime history.

#### Checkpoint 3 — Overview tab completeness (after Step 6)

Confirm all four cards (Triggers, Knowledge, Skills, Integrations) are populated as expected.

* **How to confirm:** Each card shows a count greater than zero for the resources configured in Phase 1. The Integrations card may be empty if no integrations were configured.
* **If it fails:** Note which card is empty and raise it with your instructor before continuing to Phase 4.

#### Checkpoint 4 — Error identified (during Step 7)

Confirm you have identified the specific Sensitive Data Masking configuration error before moving to Step 8.

* **How to confirm:** You can state what is wrong (guardrail off, or specific entity type missing from Deny list) and what the correct configuration should be.
* **If it fails:** Return to `Agent Config > Guardrails` and examine the Sensitive Data Masking row and its gear configuration carefully. See Troubleshooting row 7.

#### Checkpoint 5 — Correction verified (after Step 8)

Confirm the Guardrails screen shows Sensitive Data Masking on with the correct entity types in the Deny list.

* **How to confirm:** Open `Agent Config > Guardrails`, select the gear on the Sensitive Data Masking row, and verify the entity type for the sensitive field is present in the Deny list.
* **If it fails:** The entity type may have been added to the wrong list (Allow list instead of Deny list), or the wrong entity type was selected. Review the Deny list and correct it. Select Save.

#### Checkpoint 6 — Re-export confirmed (after Step 9)

Confirm you received the export email and downloaded the corrected agent package.

* **How to confirm:** The download link in the email is active and the package file downloads successfully.
* **If it fails:** See Troubleshooting rows 8 and 9.

## Solution reference

<details>

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

This section shows the correct final state of the agent after all steps in this lab are successfully completed. Use it to verify your work.

### Agent Playground Test

**What a successful test looks like:**

* The Agent Playground opened from the canvas header without errors.
* The sample inquiry ("I need to start my loan application. My name is John Smith and I'm applying for a 30-year fixed mortgage.") received a response that referenced borrower onboarding content from the attached knowledge base.
* The response did not consist solely of generic mortgage information from the model's training data.

### Flow Tab

**What a correct Flow tab review looks like:**

* You selected the Flow tab (second tab on the Builder Canvas).
* The tab showed either execution steps under "What the Agent will do" (if the agent has generated checklists from prior runs) or the message "No Plan Found" (if the agent is new and has no checklist history).
* You correctly identified "No Plan Found" as expected behavior, not an error.

### Overview Tab

**What a correct Overview tab review looks like:**

All four cards are populated:

| **Card**         | **Expected state**                                                                     |
| ---------------- | -------------------------------------------------------------------------------------- |
| **Triggers**     | At least 1 trigger (the chat trigger configured in Phase 1)                            |
| **Knowledge**    | At least 1 knowledge base (the borrower onboarding knowledge base attached in Phase 1) |
| **Skills**       | Active skills including Knowledge Search and any others enabled in Phase 1             |
| **Integrations** | Any connected services configured in Phase 1 (may be empty if none were configured)    |

### Guardrails — Corrected Configuration

**What the correct Sensitive Data Masking configuration looks like after Step 8:**

* **Sensitive Data Masking:** On
* **Masking provider:** The provider configured in Phase 1 (Regex for SSN and card numbers, or Google Cloud DLP for broader coverage — your Phase 1 configuration determines which)
* **Entity rule:** Deny list
* **Deny list contents:** Includes the entity type for the sensitive field that was missing in the intentional error (the exact field name will be specified in your exercise materials — your instructor will confirm which entity type you should have added)

{% hint style="warning" %}
The exact entity type that was missing is specified in the exercise materials your instructor provides. If you are unsure whether you added the correct type, compare your Deny list against the exercise materials before re-exporting.
{% endhint %}

### Re-Export

**What a successful re-export looks like:**

* You selected Export Agent in the canvas header after correcting the guardrail.
* You selected Export Package with all three checkboxes unchecked (unless your instructor specified otherwise).
* You received an email with the subject line "Your agent export 'Borrower Onboarding Agent' is ready!" (or the agent name your instructor specified).
* You downloaded the package using the link in the email.
* The downloaded package reflects the corrected Sensitive Data Masking configuration.

{% hint style="info" %}
The export package is a complete snapshot of the agent's configuration at the moment of export — identity, instructions, skills, knowledge, triggers, guardrails, and runtime settings. Exporting after a correction ensures the package you share or import elsewhere contains the fixed configuration. An uncorrected package exported before Step 8 would carry the error into any environment it is imported into.
{% 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-6-test-validate-and-troubleshoot-the-agent.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.
