Guides
Working version 3.8.0 3.7.0
Working version 3.8.0 3.7.0

Agents Unit Testing

Agents Unit Testing

Agents Unit Testing (AUT) is a regression-testing workflow for unit testing your agents (Q&A, Concierge) that are part of your agentic hybrid application. This tool allows you to build scenario suites, run them on any agent version, and receive a clear pass/fail result before shipping changes.

Agent_unit_testing.png

Agent Types

The scenario form and run automatically adapt to the type of agent you're testing, showing only the fields relevant to your agent type. You can test the following agent types:

  • Concierge: Acts as a router that replaces the traditional intent engine by capturing user intent and routing to either a flow, a Q&A agent, or a task agent.

  • Q&A Agent: Retrieves information from knowledge bases to answer FAQ-style questions.

You can read more about Agents in the Orchestrator User Guide.

Create a Scenario

To create a testing scenario, follow these steps:

  1. In the Agents Unit Testing tab, select a group from the drop-down to view all agents in that group.

aut-group.png
  1. Select the agent to test. Click Change to go back and choose another agent.

agent_selected.png
  1. Click + New Scenario → Create manually.

new_scenario.png
  1. Fill in the form as described below. The form will vary depending on the Agent type.

Screenshot 2026-10-19 at 18.12.53.png
Q&A agent
  • Name: Enter a name for the scenario.

  • User utterance: Enter an utterance or a part of the utterance.

  • Run mode: Create a scenario to test your agent. You can select one of these modes:

    • Exact: Sends the specific phrase provided to the agent.

    • Simulator: Utilizes an LLM to improvise the dialogue, allowing for more natural variation in the test.

  • What to check: Optionally select one or several components to validate during the run, such as the answer, the retrieved document, or the goal.

    • Agent’s answer: Optionally, enter the agent's expected answer.

    • Retrieved document: Enter the knowledge-base document that the agent’s answer must come from. Use the document ID, or the document title if it has no ID. You can add up to 3 documents. When you reach the limit, the form does not accept another document and shows a message. The check passes only when every expected document is among the documents the agent retrieved. Each document is evaluated separately. This check is available for Q&A agents only, and it does not use an LLM.

      Screenshot 2026-10-19 at 18.14.44.png
    • Set a goal: Describe the goal the agent should reach.

  • Simulation data and tags:

    • Inputs: Provide inputs as key-value pairs. Use them to supply metadata (for example, an ID) so the agent retrieves the correct data from a structured knowledge base during isolated testing. Click +Add Input to add a key-value pair.

    • Tags: Enter a tag that will be used for search, grouping, filtering.

Screenshot 2026-10-19 at 18.16.06.png
Concierge agent
  • Name: Enter a name for the scenario.

  • User utterance: Enter an utterance or a part of the utterance.

  • Run mode: Create a scenario to test your agent. You can select one of these modes:

    • Exact: Sends the specific phrase provided to the agent.

    • Simulator: Utilizes an LLM to improvise the dialogue, allowing for more natural variation in the test.

  • Test with re-ask prompt: Turn this on to start the session as if the agent has already greeted the caller. Because the session already has a conversation history, the agent answers with its re-ask prompt instead of the welcome message. Hover over the info icon for details. This option is available for Concierge agents only and is off by default, including for existing scenarios. Scenarios with this option on show a Re-ask prompt label on their card.

    Screenshot 2026-10-19 at 18.19.38.png
  • What to check: Optionally select one or several components to validate during the run, such as the route, answer, or other configured checks.

    • Routes to: Select one of the agent's configured routes from the dropdown, or type a custom route name.

    • Welcome prompt: This check appears by default. Enter the greeting the concierge should open with (for example, How may I help you?). The check compares it with the agent's actual welcome message. If you don't want to check the greeting, click × to remove it. When Test with re-ask prompt is on, the agent does not send the welcome message. Click × to remove the Welcome prompt check, and use Agent’s answer to check the re-ask text.

    • Agent’s answer: Optionally, enter the agent's expected answer.

    • Set a goal: Describe the goal the agent should reach.

  • Simulation data and tags:

    • Inputs: Provide inputs as key-value pairs. Use them to supply metadata (for example, an ID) so the agent retrieves the correct data from a structured knowledge base during isolated testing. Click +Add Input to add a key-value pair.

    • Tags: Enter a tag that will be used for search, grouping, and filtering.

  1. Click Save when finished. The scenario will appear in the list.

Screenshot 2026-08-31 at 12.50.38.png
  1. If a scenario is lacking defined assertions, it will be labelled as Missing expected.

Screenshot 2026-08-31 at 12.55.37.png

Run a Scenario

To run the scenario, proceed as follows:

  1. Select a scenario and click Run. To run all scenarios simultaneously, click Run All.

run_scen_new.png
  1. Once the run finishes, each scenario shows its result:

    • PASSED: all checks passed. The card shows no check rows.

      Screenshot 2026-10-20 at 16.23.08.png


    • FAILED: one or more checks failed. The failed checks show the Expected value next to what the agent actually returned (marked as GOT).

      Screenshot 2026-10-20 at 16.25.05.png


    • PARTIAL: only part of the reply is correct. For example, the route is right, but the answer isn't.

      Screenshot 2026-10-20 at 16.57.17.png

The card shows expected values only for the checks you have set. For each failed or not-set check (route, welcome prompt, answer, goal, or document), the card shows one row that needs attention:

  • For failed checks, the row shows the Expected value next to what the agent actually returned (marked as GOT).

Screenshot 2026-10-23 at 14.22.57.png
  • For checks without an expected value, the row shows the actual value.

From these rows you can:

  • Click Use as expected to accept the actual value as the new expected value. The row disappears. If the agent didn’t route, accepting saves no route as the expected result.

  • Click Why it failed to see the reasoning behind the result. It appears once per card.

Screenshot 2026-10-23 at 14.24.24.png

For Concierge scenarios, the route and welcome prompt checks appear as Expected / GOT rows. Scenarios run with Test with re-ask show a Re-ask prompt label.

For Q&A scenarios, the retrieved documents appear as chips in the Document row. Click a chip to open that document in Pathfinder in a new tab.

    • If the check fails, the row shows the expected documents and the documents the agent retrieved (Expected / GOT).

    • If no expected documents are set, the row shows Not set yet. Click Use as expected to save the retrieved documents as the expected ones.

    • If the agent didn’t retrieve any documents, the row shows No document retrieved.

Screenshot 2026-10-23 at 14.32.07.png
  1. If the scenarios list is large, use filters.

scenario_filters.png

View the Results

Every run is recorded. The Results tab shows pass/fail counts across runs.

Screenshot 2026-08-31 at 13.04.59.png

For more details, click on a run. Click Download results to download the run results.

Screenshot 2026-08-31 at 13.06.12.png

For Q&A agents, the downloaded file also includes Expected Document and Actual Document columns.

Use filters to search across the run history.

filters.png

Edit a Scenario

To edit an existing scenario, follow the steps below:

  1. Locate the scenario you want to edit, then click it to open it.

  2. Click the Options menu → Edit scenario.

scenario_edit.png
  1. Update the fields as needed. The available fields depend on the agent type, as described in Create a Scenario.

Screenshot 2026-10-20 at 16.59.08.png
  1. Click Save to apply your changes, or Cancel to discard them.

If you edit a scenario after a run, that scenario’s previous result is hidden, including when you open the run from history. If you edit every scenario after a run, the run summary banner is hidden. Click Run to get current results.

Closing the summary banner doesn't remove the results shown on the scenario cards.

Group / Ungroup the Scenarios

If multiple scenarios exist, the LLM groups them logically for easier management. You can run the whole group at once.

  • To view scenarios as a list, click the Ungroup button.

Screenshot 2026-08-31 at 13.24.16.png
  • To regroup the scenarios, click the Magic group button.

Screenshot 2026-08-31 at 13.15.46.png

Search for a Scenario

To find a specific scenario, use the Search field at the top of the Agents Unit Testing tab.

  1. Enter a keyword matching the scenario name, tag, utterance (even a partial match), or an Input value.

Matching text is highlighted on the scenario card, including in the Expected and GOT values.

Screenshot 2026-10-23 at 14.43.23.png
  1. The list filters in real time as you type.

  2. Click the X icon to return to the full scenario list.

Search works within the currently selected agent and group. To search across a different agent, select it first as described in Create a Scenario.

Export Scenarios

You can export scenarios as CSV and re-import them. This lets you build and maintain scenarios in bulk without losing data on the round trip, and review exactly what will change before overwriting anything.

To export scenarios, click the Export All Scenarios button. The file downloads automatically. To download the results of a run, see View the Results.

Screenshot 2026-08-31 at 13.32.11.png

Depending on the Agent type, the exported file will contain the following columns:

  • QnA: name, utterance, expected answer, expected goal, expected document, inputs, tags. If a scenario has several expected documents, they're separated by a semicolon in the Expected Document column.

  • Concierge: name, utterance, expected route, expected answer, expected goal, re-ask prompt, inputs, tags.

Import Scenarios

To import the result as a scenario, follow these steps:

  1. Click + New Scenario → Upload from file.

Screenshot 2026-08-31 at 13.36.30.png
  1. Select a CSV or XLSX file.

  2. You will see a confirmation before the scenarios are overwritten.

Screenshot 2026-07-21 at 19.01.40.png
  1. Click Import to confirm.

If the file has no Expected Document column, the scenario keeps its existing expected documents. If the column is there but a cell is blank, that scenario's expected documents are cleared.

Coverage

The Coverage tab shows how thoroughly your scenarios exercise a Concierge agent's routing destinations, and how those scenarios have performed when run.

Screenshot 2026-08-31 at 14.12.54.png

At the top, four summary cards show:

Screenshot 2026-08-31 at 14.13.06.png
  • Routing destinations: the total number of destinations the agent can route to.

  • No scenarios: how many of those destinations have no scenarios yet.

  • Tested: the percentage and count of scenarios run at least once, out of all scenarios.

  • Pass rate: the percentage of run scenarios that passed.

Below the summary, the destinations table lists each destination with:

Screenshot 2026-08-31 at 14.13.15.png
  • Scenarios: the number of scenarios covering that destination.

  • Coverage: a bar showing the pass/fail breakdown of that destination's scenarios (Passed, Partial, Failed, Not yet run).

  • Pass Rate: the pass rate for that destination, or not run if none of its scenarios have been executed yet.

Use the Search field or the All / No scenarios / Has failures filters to narrow the list - for example, to quickly find destinations that still need scenarios or that have failing runs.

coverage_search.png

Coverage spans all scenarios regardless of when they were run. A gap means a destination the agent can route to has no scenario written for it yet.

Auto-generate Scenarios

For Concierge agents, the Auto-generate feature pulls the agent's routing destinations directly from the Orchestrator application and generates caller utterances for each one, so you can build test coverage without writing every scenario by hand.

To auto-generate scenarios:

  1. Click + New scenario → Auto-generate.

auto-gen_button.png
  1. In the dialog box that opens, set Scenarios per destination (up to 10 per destination).

Screenshot 2026-08-28 at 19.13.41.png
  1. Under Destinations, choose which destinations to generate scenarios for:

    • All: shows every destination configured for the agent.

    • Missing coverage: shows only destinations that don't have scenarios yet, so you can close coverage gaps.

  2. Use the checkboxes to select or deselect individual destinations, or the top checkbox to select/deselect all.

  3. Check the summary line (in our example, "2 destinations × 3 = 6 scenarios") and click Generate 6 scenarios.

  4. The generated scenarios are added grouped by destination/route.

Screenshot 2026-08-28 at 19.38.50.png
  1. AI-generated scenarios are tagged AI-GENERATED, have an utterance, the Expected route, and run mode Exact pre-filled.

Screenshot 2026-08-28 at 19.39.07.png
  1. They require manual review before becoming trusted regression tests. Click Verify on each scenario to confirm the utterance and expected route are correct. A verified scenario will no longer display the Verify label.

Screenshot 2026-08-28 at 19.39.40.png
  1. You can run a single scenario with Run, or run an entire destination group with Run group.

run_options.png