Routing Agent

AI Toolkit routing_agent Professional

Route conversations based on AI analysis

Overview

The Routing Agent determines the best conversation path through natural dialogue. Unlike simple intent recognition, this agent can ask clarifying questions to ensure accurate routing decisions.

How It Works

  1. Analyze Conversation: The agent reviews the conversation history to understand the user's needs
  2. Determine Clarity: Checks if there's enough information to confidently select a route
  3. Ask or Route: If unclear, asks the user a clarifying question. If clear, selects the best matching route
  4. Continue: The conversation flows through the selected route's output handle

Output Variable

The routing decision is stored:

Route: {{routing.route.label}}
Confidence: {{routing.confidence}}

Configuration Fields

Context Hint (Optional) handlebars

Optional context to guide the agent.

Show details

Supports Handlebars syntax:

{{variable_name}}
Routes options Required

Define the available routes for conversation routing.

Show details

Each option creates a separate output handle on the node. The flow continues through the handle corresponding to the selected/matched option.

Requirements:

  • Each option must have a unique ID
  • Minimum 2 options required
  • IDs should be valid identifiers (lowercase, underscores)
AI Configuration agent_settings

Configure the AI model and behavior.

Show details

Configuration options:

  • AI model selection
  • Temperature (0.0-2.0) - Higher = more creative, Lower = more consistent
  • Conversation context length - Amount of chat history to include
  • Personality instructions - Defines how the AI interacts

Temperature guide:

  • 0.0-0.5: Focused, deterministic, predictable
  • 0.5-1.0: Balanced between creativity and consistency
  • 1.0-2.0: Creative, varied, exploratory

Output Variables

This node stores its output in a variable that can be referenced in subsequent nodes using the {{variable}} syntax.

{{variable}}.route object

Selected route object with id and label

{{variable}}.route.id string

Route ID

{{variable}}.route.label string

Route label

{{variable}}.confidence number

Confidence score (0-1)

Connection Points

Input
Accepts incoming connections from other nodes
Output
Connects to the next node in the flow

More in AI Toolkit