Skip to content

Router Agent

Router Agent decides which way the flow continues. You define a list of intentions (for example “Quote”, “Issue” or “Other request”) with a description of each one. When a message arrives, the AI model reads it, decides which intention it matches and sends it, unchanged, through that intention’s output. The other outputs do not continue.

Use it at the start of a flow when each type of request should be handled differently: for example, by a different agent or with another sequence of steps.

When to use it

  • Splitting customer messages into sales, support and billing.
  • Sending urgent issues to a branch that alerts the team and the rest to an automatic reply.
  • Telling whether an email is an invoice, an order or advertising before processing it.
  • Choosing which specialised agent handles each conversation.

Configuration

ConnectionWhat to connect
Data InputThe message or data to classify, for example from Chat Input.
Model (required)The AI model that analyses the intention.
FieldWhat it does
Number of Intentions (required)How many intentions you want to tell apart. At least 2. Default: 2. Changing it adds or removes the field groups of each intention and their outputs.
System PromptExtra classification instructions, for example criteria for borderline cases.
Name (required, one per intention)The intention’s name. It is also the name of its output on the canvas.
Description (one per intention)When this intention should be chosen. The clearer it is, the better the model classifies.

Each intention appears as a group Intention 1, Intention 2, and so on, with its Name and Description fields. The component comes with the second intention already filled in as the default intention.

The default intention. If an intention’s name or description contains words such as “default”, “fallback”, “other”, “else”, “por defecto” or “otro”, that intention receives the messages that match no other. If there is no default intention and a message matches none, it does not continue through any output.

The advanced Confidence Threshold field currently does not change the classification.

Batch processing

With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.

Output

One output per intention, named after what you wrote in Name. Only the output of the detected intention delivers the original message; connect each one to the part of the flow that should handle that case, for example a specialised Agent.

Example

The renovation company Obras Prisma receives requests by chat. It sets up three intentions:

  1. Name: Quote. Description: The customer wants a price or a quote for a job.
  2. Name: Issue. Description: The customer has a problem with an ongoing or finished job.
  3. Name: Other request. Description: Default intention for any other message.

The Quote output goes to an agent that collects the job details, Issue to an agent that opens a ticket for the technical team, and Other request to a general assistant.

  • Supervisor Agent: distributes the request among agents without splitting the flow into branches.
  • Agent: to handle each branch.