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:
- Go to AI Agent Studio and open the
Workflows
tab. - Select Edit
to modify a workflow. - From the toolbar, select Debug
. - Select the upstream intent-extraction node.
- Inspect the extracted intent or subscription value.
- Select the Switch node.
- Select Results.
- Inspect the switch input and the selected output branch.
- Follow the highlighted branch on the canvas.
- 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