Test an agent

Agent testing allows you to run an instance of your agent configuration without publishing or leaving the Agent action configuration. When you start a test, the Agent testing panel displays the inputs, test status, token usage, generated output, and trace information. You can keep the panel open while reviewing the agent configuration.

Note: 
  • The inputs available in the Agent testing panel depend on the agent configuration.

  • If the agent doesn't reference any input variables, you can run the test without providing input values.

  • Testing an agent consumes tokens.

  • Shared context is not supported during agent testing.

Test an agent

  1. Go to Agents > All agentflows.

  2. Open the Agent designer:

    1. New agentflow: Click Create agentflow.

    2. Existing agentflow: Select the agentflow you want from the agentflows page.

  3. Note: 
    • Agent testing is available only within an agentflow design.

    • If you are creating a new agentflow, Save an agentflow first, at least once, before you test it.

  1. Configure an Agent action or click on the configured Agent action. For more information on configuring an agent action, see Configure the Agent action.

  2. In the Agent action configuration, click Test agent.
    The Agent testing panel opens.

  3. (Optional) Enter the required input values. For more information, see Enter test inputs.

  4. Click Run test.

    The test starts and the Agent testing panel displays the status and test results. For more information, see View agent test results.

  5. Review the test results to identify issues and refine your agent action configuration.
    When testing is complete, close the Agent testing panel.

Enter test inputs

The inputs displayed in the Agent testing panel are based on the input variables referenced by the agent. Enter the values you want to use for the test.

Note: If the agent does not reference any input variables, the Agent testing panel displays a message indicating that you can run the test without entering input values.

The following options are available:

  • Use default values: Uses the configured default values for the input variables. Inputs without default values remain empty.

  • Set all inputs to null: Sets all input values to null.

  • Use previous inputs: Uses the input values from the previous test, if available.

View agent test results

After you run a test, the Agent testing panel displays the test run details and results. Use the Summary and Raw tabs to view the test results.

Summary

The Summary tab displays the agent test results, including generated output, tool usage, token usage, and trace information. The sections displayed can vary depending on the agent configuration and test execution.

Tokens

The Tokens section displays token usage for the test.

  • Input tokens: Number of tokens used for the test input.

  • Output tokens: Number of tokens generated in the output.

  • Tool call tokens: Number of tokens used for tool calls, when available. These tokens are included in the input and output token counts.

  • Total tokens: Sum of input and output tokens, including tool call tokens.

  • Token limit: Maximum number of tokens available for the test, when available.

  • Token limit status: Indicates whether the token usage is within the token limit.

If token information is not available, the field displays Not available.

Output

The Output section displays the output generated by the agent. Click Copy output to copy the generated output. The output fields displayed depend on the output configured for the agent.

Reasoning

The Reasoning section displays reasoning information returned by the model during the agent test, when available. Click Copy trace event to copy the reasoning trace information.

Tools

A Tools section is displayed for each tool call made during the agent test. The section name identifies the tool and can include the number of tokens used for the tool call.
Tool details can include:

  • Input : Displays the input passed to the tool.

  • Output : Displays the output returned by the tool.

Click Copy trace event to copy the tool trace information.

Work request

The Work request section displays the request processed by the agent during the test. Click Copy trace event to copy the work request trace information.

Raw

The Raw tab displays detailed execution information for the agent test, including information that may not be available in the Summary tab. When the test is complete, the execution steps are displayed in the order they occurred. Each step can include the time, step type, and token usage.

The step details can include:

  • Tools: Displays details for a tool call made during the test.

  • Output- Model (Structured Output): Displays the model output generated during the test.

  • Reasoning: Displays reasoning information returned by the model, when available.

  • Usage Tokens: Displays token usage information for the test.

Expand a step to review its detailed execution details.

Terminate an agent test

You can terminate an agent test that is currently running.

  • In the Agent testing panel, click Terminate.

Wait for the test to stop. The status changes to Terminated. Any output that was not generated before the test was terminated is not available.

Start a new test

  • After a test is complete or terminated, click Start new test to run another test.

The input values from the previous test can be reused by clicking Use previous inputs, when available.

If you changed the agent configuration after the previous test, start a new test to use the updated configuration.