Debug Switch Routing

Switch nodes are decision checkpoints. A switch evaluates a runtime value and routes execution to the configured branch. Use branch names that clearly map to the workflow's supported intents or scenarios.

Confirm that routing conditions are evaluated correctly and requests are directed to the appropriate branch using these steps:
  1. Go to AI Agent Studio and open the Workflows workflows tab.
  2. Select Edit Edit to modify a workflow.
  3. From the toolbar, select Debug Debug.
  4. Select the upstream intent-extraction node.
  5. Inspect the extracted intent or subscription value.
  6. Select the Switch node.
  7. Select Results.
  8. Inspect the switch input and the selected output branch.
  9. Follow the highlighted branch on the canvas.
  10. Inspect the first downstream node on that branch.
Verify routing decisions and identify potential issues that could cause requests to follow an incorrect branch using this checklist:
  • The user prompt interpretation
  • The upstream LLM prompt
  • The switch condition
  • The branch label or expected value
  • The downstream node's assumptions about routing values