|
| 1 | +--- |
| 2 | +title: "AI Router" |
| 3 | +sidebarTitle: "AI Router" |
| 4 | +description: "Automatically route questions to the best-fit agent, so users don't have to pick one first." |
| 5 | +--- |
| 6 | + |
| 7 | +<Info> |
| 8 | + The AI Router is part of the AI agents add-on. [View pricing](https://www.lightdash.com/pricing) |
| 9 | +</Info> |
| 10 | + |
| 11 | +When you have more than one AI agent in a project, users have to know which agent to ask. The **AI Router** removes that decision: type a question, and Lightdash picks the agent best suited to answer it. |
| 12 | + |
| 13 | +The router compares each agent's description, instructions, data access, and verified questions to decide where a question should go. |
| 14 | + |
| 15 | +<Note> |
| 16 | + The router only chooses **between agents the user can already access**. It never widens an agent's data access or bypasses permissions — it only changes *which* of the user's available agents answers a given question. |
| 17 | +</Note> |
| 18 | + |
| 19 | +<Frame> |
| 20 | + <img src="/images/guides/ai-agents/ai-router-ask-ai.gif" alt="Ask AI router landing page" /> |
| 21 | +</Frame> |
| 22 | + |
| 23 | +## When the router runs |
| 24 | + |
| 25 | +The router needs **at least two agents you can access** in a project. With a single accessible agent there's nothing to route between, so Lightdash opens that agent directly. |
| 26 | + |
| 27 | +When the router is confident, it routes your question straight to the best agent and starts the conversation. When it isn't, it shows a short picker with the recommended agent highlighted so you can choose. |
| 28 | + |
| 29 | +<Frame> |
| 30 | + <img className="block dark:hidden" src="/images/guides/ai-agents/ai-router-picker.png" alt="Picker showing candidate agents" /> |
| 31 | + <img className="hidden dark:block" src="/images/guides/ai-agents/ai-router-picker-dark.png" alt="Picker showing candidate agents" /> |
| 32 | +</Frame> |
| 33 | + |
| 34 | +If you've set a [default agent](/guides/ai-agents/using-ai-agents#faqs), it opens first even when the router is enabled. Pick **Auto** from the agent dropdown to let the router decide instead. |
| 35 | + |
| 36 | +<Frame> |
| 37 | + <img className="block dark:hidden" src="/images/guides/ai-agents/ai-router-auto-option.png" alt="Auto option in the agent selector" /> |
| 38 | + <img className="hidden dark:block" src="/images/guides/ai-agents/ai-router-auto-option-dark.png" alt="Auto option in the agent selector" /> |
| 39 | +</Frame> |
| 40 | + |
| 41 | +## Enabling the router |
| 42 | + |
| 43 | +The router is configured at the **organization level** and requires **Organization Admin** permissions. |
| 44 | + |
| 45 | +<Steps> |
| 46 | + <Step title="Open AI settings"> |
| 47 | + Go to **Settings → Organization Settings → Ask AI → General**. |
| 48 | + </Step> |
| 49 | + <Step title="Make sure AI features are on"> |
| 50 | + The router can only be turned on when **Enable AI features for users** is already enabled. If AI features are off, the router toggle is disabled with the hint *"Enable AI features first to use the Router."* |
| 51 | + </Step> |
| 52 | + <Step title="Turn on the AI Router"> |
| 53 | + Toggle on **AI Router** — *"Route user questions to the best agent automatically, instead of asking users to pick."* |
| 54 | + </Step> |
| 55 | +</Steps> |
| 56 | + |
| 57 | +<Frame> |
| 58 | + <img className="block dark:hidden" src="/images/guides/ai-agents/ai-router-settings-toggle.png" alt="AI Router toggle in Ask AI general settings" /> |
| 59 | + <img className="hidden dark:block" src="/images/guides/ai-agents/ai-router-settings-toggle-dark.png" alt="AI Router toggle in Ask AI general settings" /> |
| 60 | +</Frame> |
| 61 | + |
| 62 | +## Routing instructions |
| 63 | + |
| 64 | +By default the router decides on its own, but you can give it **routing instructions** to steer specific kinds of questions toward specific agents — for example, *"send billing questions to the Finance agent."* Instructions are written per project and authored by admins. |
| 65 | + |
| 66 | +<Steps> |
| 67 | + <Step title="Open routing instructions"> |
| 68 | + With the router enabled, scroll down on the **Ask AI → General** page to the **Routing instructions** card. |
| 69 | + </Step> |
| 70 | + <Step title="Pick a project"> |
| 71 | + Choose the project these instructions apply to. Routing instructions are scoped per project. |
| 72 | + </Step> |
| 73 | + <Step title="Write your rules"> |
| 74 | + Describe how questions should be directed. Type **@** to tag a specific agent, then click **Save instructions**. |
| 75 | + </Step> |
| 76 | +</Steps> |
| 77 | + |
| 78 | +A few things to keep in mind: |
| 79 | + |
| 80 | +- **Rules are advisory.** They guide the router's choice but **never override an agent's access restrictions**. A rule can only point to agents the user can already access. |
| 81 | +- **Tagged agents must belong to the project.** You can only tag agents that exist in the selected project. |
| 82 | +- **Fewer than two agents?** You can still write and save instructions, but the router won't run in that project until at least two accessible agents exist. Lightdash shows a note when this is the case. |
| 83 | + |
| 84 | +## Router and Slack |
| 85 | + |
| 86 | +The same routing logic powers **multi-agent Slack channels**. In a multi-agent channel you mention the single Lightdash Slack app and Lightdash automatically picks the best agent for your question — no need to know which agent to address. See [Slack channels: single-agent vs. multi-agent](/guides/ai-agents/getting-started#slack-channels-single-agent-vs-multi-agent) for setup. |
0 commit comments