Skip to content

Agents and routing

Every Slack bot is powered by a Quant AI agent. You can configure the bot to handle questions directly, delegate to specialist sub-agents, or combine both approaches.

The simplest configuration: the bot’s agent handles all questions itself. Configure the agent with a system prompt, tools, skills, and knowledge bases — just like any other agent in the dashboard.

This works well when the bot has a single, focused purpose (e.g. answering questions about internal documentation using a vector database collection).

When you select multiple sub-agents during bot creation, the bot automatically creates a router agent that delegates questions to the right specialist.

User question → Router agent → Evaluates sub-agents → call_agent(specialist) → Response
  1. The user sends a message in Slack
  2. The router agent receives the message and evaluates which sub-agent is best suited to answer
  3. The router invokes the specialist via the call_agent tool
  4. The specialist agent processes the question using its own tools, skills, and knowledge
  5. The specialist’s response flows back through the router to Slack

The router agent’s system prompt automatically includes the name and description of each sub-agent, so the AI model can make informed routing decisions.

You can configure the bot’s agent with its own tools, skills, and knowledge bases in addition to sub-agents. The agent handles simple questions directly and delegates complex or specialist questions to sub-agents.

For example, a bot might have a vector database collection for general FAQs (handled directly) and sub-agents for billing support and technical troubleshooting (delegated).

Sub-agent delegation uses the built-in call_agent tool:

ParameterRequiredDescription
agentIdYesID of the sub-agent to call
messageYesThe task or question to send
contextNoAdditional context for the sub-agent

The tool is automatically added to the bot’s agent when sub-agents are configured. You don’t need to add it manually.

  1. The router agent decides to delegate and calls call_agent with the target agent ID and message
  2. The system validates that the target is in the agent’s allowedSubAgents list
  3. A new agent execution starts for the sub-agent
  4. The router pauses until the sub-agent completes
  5. The sub-agent’s response is returned as the tool result
  6. The router continues, incorporating the sub-agent’s answer into its response
  • Server-side tools only — Sub-agents must use tools that execute automatically on the server (autoExecute: true). Client-side tools are not supported in sub-agent contexts.
  • Maximum depth: 3 levels — Sub-agents can themselves call sub-agents (e.g. L1 router → L2 specialist → L3 sub-specialist), up to 3 levels deep.
  • Stateless delegation — Each sub-agent call is independent. The sub-agent receives only the message and optional context, not the full conversation history. The router agent maintains the thread context.

As the bot works, a single message updates in place to show progress:

⏳ Thinking...

If routing to a sub-agent:

⏳ Routing to support-agent...

As tools execute:

🤖 support-agent → searching tickets...
✓ Found 3 matching tickets · filtering by priority

The final answer replaces the progress message entirely — no leftover progress indicators.

Progress updates are batched (up to one per second) to stay within Slack’s rate limits. If an error occurs, the progress message is replaced with: “Something went wrong — please try again.”

The agent created for a Slack bot appears in your AI Agents list with a Slack Bot badge. You can edit the agent’s system prompt, model, temperature, and other settings from the normal agent editor page. Changes take effect on the next conversation.