Skip to main content
Give a single WhatsApp number, Telegram bot, or Slack app many skills by routing it to a deep agent that triages each message to a specialist sub-agent. The bridge wiring is unchanged from the other how-tos — only the agent behind the route changes.

Why a deep agent

A conversation route runs one registered agent by name, and its turn is that agent’s astream. To fan a single conversation out to several skills, the routed agent must be able to delegate — which is exactly what a deep agent does: it plans and calls sub-agents as its skills. The plain tools_agent cannot: its input schema omits subagents and rejects them loudly (extra="forbid", plus a defense-in-depth raise on both faces). Reach for a deep agent when one bot needs many skills.

Configure the specialists

The only thing you author is the roster of specialists — each a name, a description the triage agent routes on, a system_prompt, and the tools that specialist may use. This is a DeepSubAgentSpec roster:
Bake that roster into a small deep-agent-backed agent registered under a route-able name. The agent is a thin authored wrapper — the roster is its whole configuration:
triage_agent.py
A deep agent nests one level of sub-agents — a sub-agent may not itself declare sub-agents. Each specialist’s tools are ordinary client tools the deployment has loaded, so the specialist can only use what the turn’s execution key is also allowed to run.

Load it and route to it

Name the module under agents[] — importing it registers triage — and enable the deep-agent module it builds on.
manifest.yml
Point any conversation route at triage — the channel and execution-key wiring is exactly as in the other guides:
Now one number answers billing and tech-support questions, each handled by its specialist, with one shared conversation thread per client.

See also