Debug a Virtual Agent topic

  • Release version: Zurich
  • Updated July 31, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Debug a Virtual Agent topic

    This guide helps ServiceNow customers investigate and resolve unexpected behavior in custom Virtual Agent topics, topic blocks, and controls. It covers best practices for debugging topics, interpreting warnings and errors, and troubleshooting common issues related to topic creation, previewing, and conversation flow.

    Show full answer Show less

    Best Practices for Debugging

    • Duplicate live topics: Always duplicate a live topic before making changes to preserve the original as a backup and reference. Deactivate the original topic before publishing the duplicate to avoid conflicts.
    • Test during development: Use the Test button in the Assistant Designer Asset library to preview conversations within Service Portal. Also test in any third-party messaging applications where you plan to deploy Virtual Agent to ensure consistent behavior.

    Debugging Tools in Test Chat Window

    The test chat window provides four tabs that assist in debugging and refining topics:

    • Analyze test phrases: Review how test inputs are interpreted.
    • Variables: Monitor and verify variable values during the conversation.
    • Context: Understand the conversation state and flow.
    • Logs: View processing messages and errors to identify issues.

    Identifying and Resolving Warnings and Errors

    • Control warnings: Controls missing required information display a red badge with issue counts. Selecting the badge lists specific problems to fix.
    • Topic-level warnings: A badge on the canvas indicates the number of issues across the whole topic.
    • Topic preview errors: Validation Issues tab on the sidebar shows detailed node-specific errors preventing topic execution. Links navigate directly to problematic nodes for correction.
    • Publishing restrictions: The Validation Issues tab appears when attempting to publish topics with unresolved errors and closes only once all issues are fixed.

    Common Virtual Agent Issues and Resolutions

    • Module designer not visible: Verify the user has the virtualagentadmin role and that the Virtual Agent plugin is activated.
    • Cannot edit a topic: Ensure the user is working within the same application scope as the topic.
    • Topic preview fails: Confirm all required fields are completed and the browser allows pop-ups from the instance.
    • Chat widget stuck on “Connecting...”: Check that active topics exist on the instance and are in the Active state.

    Reviewing Conversation Flows and Interaction Records

    Each Virtual Agent conversation generates an interaction record in the Interactions [interactions] table. This record logs the full transcript between the requester and virtual agent, including any live agent transfers if using Agent Chat. Reviewing these records helps analyze conversation behavior and identify issues.

    Troubleshooting Natural Language Understanding (NLU) Issues

    If expected intents are not matched, troubleshoot NLU prediction errors. Understand how Virtual Agent uses NLU topic discovery to return and prioritize intents, ensuring that your topics are correctly recognized and triggered during conversations.

    Investigate and resolve unexpected behavior in your custom Virtual Agent topics, topic blocks, and controls.

    For information about topic discovery issues, see LLM topic discovery in Virtual Agent and Resolve Natural Language Understanding (NLU) topic discovery issues.

    Duplicate a live topic before debugging and changing it

    Duplicate a topic rather than update a live topic. The unmodified original topic can serve as both a reference and a backup, and retaining the original enables you to restore the topic quickly. Remember to deactivate the original topic before publishing the duplicate.

    Debug a topic while testing your conversations

    As you create or update a topic in Assistant Designer Asset library, use the Test button in the topic header bar to preview the conversation. The chat test window shows the conversation as it appears within Service Portal. Elements in your conversation might appear differently in third-party messaging applications. Test your conversations in any third-party applications where you intend to deploy Virtual Agent.

    The test chat window displays four tabs that provide detailed information for debugging and refining your topic: Analyze test phrases, Variables, Context, and Logs. For details on these tabs, see Testing NLU/Keyword topics. The following example shows the processing messages and errors logged during testing.

    Watch for warnings on controls within your topic

    Figure 1. Warnings on a topic node in the Flow tab
    Number of warnings shown in red on the canvas and on the individual controls. For the Text User Input control, Node Name and Prompt are mandatory

    Controls that are missing necessary information show a red incomplete badge in the upper left corner of the control. The badge shows a number indicating the number of issues in that control. Select this badge to see a list of the issues in the control.

    Another warning badge appears in the upper left corner of the canvas to indicate the number of issues within the entire topic.

    Check for errors when a topic preview does not run

    Figure 2. Topic preview errors on the canvas
    The topic validator window giving a preview of errors on the canvas.

    Additional information appears in a Validation Issues tab on the sidebar of the Assistant Designer Asset library canvas when an error prevents the topic from running. The total number of Issues are listed, along with details and a hyperlink for each node. Select a hyperlink to go to the node, and use the information provided to correct any errors in your conversation. You can close the tab without correcting the issues, but until the issues are corrected, the Validation Issues tab appears when you select Publish. The Validation Issues tab closes if you select Publish after correcting all issues.

    Common Virtual Agent issues

    Issue Possible resolution
    Cannot see module designer under conversational interfaces
    • User might not have the virtual_agent_admin role.
    • Virtual Agent plugin might not be activated.
    Cannot edit a topic Logged-in user must be in the same application scope as the topic.
    Cannot preview topic
    • Make sure that all required fields are filled in on the node properties.
    • Ensure that your browser is configured to permit pop-ups from your instance.
    chat widget stuck at Connecting... One or more of your topics might be missing. Check the to ensure that topics are present on the instance and in the Active state.

    Review topics that run in a conversation flow

    Each Virtual Agent (VA) conversation in an instance automatically generates an interaction record in the Interactions [interactions] table, which logs the conversation between a requester and virtual and live agent. You can review the transcript of the conversation between the requester and virtual agent, including live agent transfers (if using Agent Chat). For details, see Virtual Agent interaction records.