Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions guides/ai-agents/ai-router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,9 @@ A few things to keep in mind:
## Router and Slack

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.

## Router and MCP

The router is also exposed to AI assistants over [Lightdash MCP](/references/integrations/lightdash-mcp) through the **`route_agent`** tool. After setting an active project, the assistant can pass the user's prompt to `route_agent` and Lightdash automatically activates the best-fit agent for the rest of the session — no manual `list_agents` / `set_agent` step required.

Unlike the web experience, MCP routes directly to the best-fit agent even when only one agent is accessible (there's no picker in an MCP client). Routing instructions and access controls behave the same way as in the Lightdash app.
12 changes: 8 additions & 4 deletions references/integrations/lightdash-mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,9 @@ The assistant will call `read_content` to fetch the source chart, modify the JSO

#### Agent context

- **Route agent** - Automatically select and activate the best agent for a user prompt within the active project. This is the preferred way to pick an agent — it mirrors the [AI Router](/guides/ai-agents/ai-router) experience in the Lightdash app, so MCP sessions get the same automatic agent selection.
- **List agents** - Discover available AI agents and their areas of expertise
- **Set agent** - Activate an agent to scope your session to its explores, instructions, and verified answers
- **Set agent** - Manually activate an agent to scope your session to its explores, instructions, and verified answers. Use this when you want to override automatic routing.
- **Get current agent** - Check which agent is active and view its full context
- **Clear agent** - Remove agent scoping and return to the full project context

Expand Down Expand Up @@ -523,9 +524,12 @@ When you activate an agent in your MCP session, your AI assistant receives:
### Example workflow

1. **Set your project** with `set_project`
2. **Browse available agents** with `list_agents` (e.g., "Sales Analyst", "Marketing Metrics")
3. **Activate an agent** with `set_agent` to load its context
4. **Ask your questions** — the agent's context automatically guides queries
2. **Let the router pick an agent** with `route_agent` — pass the user's prompt and Lightdash activates the best-fit agent automatically. Use `list_agents` + `set_agent` only when you want to inspect candidates or override the choice manually.
3. **Ask your questions** — the agent's context automatically guides queries

<Tip>
`route_agent` chooses between agents the user can already access — it never widens permissions. If only one agent is accessible, it activates that agent directly; if none are accessible, it returns an error so the assistant can fall back to the unscoped project context.
</Tip>

**Prompt:** _"What AI agents are available?"_

Expand Down
Loading