Skip to Content

Router Prompt

By the end of this page your router will follow rules that member skills alone can’t express — priorities, tie-breaks and policies.

Prerequisites

  • A system with two or more connected agents (Connect agents).
  • Admin or Developer role.

What it is

The Router Prompt is free text added to the instructions the router uses when it classifies a message. It doesn’t replace skills — it sits alongside them, as extra guidance for the decision.

Most systems don’t need one. Add a Router Prompt when you have a rule about how to choose, not a fact about what an agent does:

Good useWhy
”Payment and invoice wording always goes to Billing, even if it mentions a product.”A priority rule that spans two agents.
”If a message mentions both stock and revenue, prefer Inventory Specialist.”An explicit tie-break.
”Never route account-deletion requests; use the default action.”A policy the skills shouldn’t carry.

If the rule is really “this agent handles X”, put it in the agent’s skill instead — that’s what the router matches on first.

Write one

Open the Router Prompt panel

On the router card, click the Router Prompt pill. The left panel is headed Router Prompt“Custom instructions injected into the classification prompt to guide routing behavior.”

Type your rules

Use the editor for short, imperative lines — one rule per line. Markdown is fine; the router reads it as plain instructions.

The Router Prompt editor with routing rules typed in, and the AI Assist button above it
Prefer Revenue Analyst for anything about money, totals, or trends. Prefer Inventory Specialist for stock, SKUs, and reorder questions. If a message covers both, answer the stock part first. Route pricing-policy questions to Revenue Analyst.

Save

Click Save in the header. The panel notes that these instructions are injected into the classification prompt as additional guidance for routing decisions.

Generate one with AI Assist

AI Assist drafts a Router Prompt from your members’ own skills — a good starting point when you have several specialists.

Click AI Assist

The dialog is titled Generate Router Prompt“Select agents and provide instructions to generate routing rules.”

The Generate Router Prompt dialog with an LLM configuration, agent selection chips, and a special instructions field

Choose the context

  • LLM Configuration — which model drafts the prompt. Project default is fine.
  • Include agents as context — tick the members to describe. Each chip shows how many skills it will contribute. Select all and Clear are shortcuts.
  • Special Instructions (optional) — the rules you want reflected, in your own words. For example: “Always prioritize Billing agent for payment-related queries.”

Click Generate

The generated prompt replaces the editor’s contents and the dialog closes. Read it before saving — treat it as a draft, not a finished rule set. Then click Save.

⚠️

Generating overwrites whatever is in the editor. Copy anything you want to keep before you generate.

Keep it short

The Router Prompt is sent on every classified turn, so length costs latency and tokens on every message. A dozen lines is plenty. If it’s growing past that, the underlying problem is usually blurred skill boundaries between members.

Common issues

  • “Failed to generate. Please try again.” — The selected LLM configuration is unavailable or the request timed out. Try Project default.
  • The prompt seems to be ignored — Classification may not be running: one member, or a greeting-type message, skips it. See How routing works.
  • Routing got worse after editing — Contradictory rules. Cut the prompt back to the smallest set that fixes your failing cases.
  • AI Assist produced generic text — No agents were ticked, or the ticked agents have thin skills. Improve the skills and regenerate.

Next