Skip to main content
Going further

Multi-agent routing

Bigger jobs are easier when each agent does one thing well — and agents that share the work need a way to pass a visitor between them. In copadre, every handoff runs on one simple device: a routing token written as #slug#. This page covers the mechanics; the two patterns built on top of them — using a concierge and chaining specialists — each have their own page.

How routing works

Every agent has a routing reference — a short slug like support or sales. To route to an agent, another agent emits that slug wrapped in hashes, e.g. #support#, as the very start of its reply. copadre intercepts the token, switches the conversation to that agent, and the visitor never sees the token itself — they simply see the conversation continue with the new agent’s reply.

  • Any agent can emit a token — a dedicated router deciding where a visitor belongs, or an ordinary agent handing the conversation on. What varies is the pattern, not the mechanics.
  • The token must stand alone. A routing reply is the bare #slug# and nothing else — even a stray full stop or a friendly word around it stops copadre reading it cleanly.
  • The whole conversation travels with the visitor. The receiving agent sees everything said so far, so a handoff never needs a recap.
  • Routing is scoped to your organisation — a token only ever resolves to one of your own agents.

What happens at runtime. copadre allows up to two routing hops per visitor message. If it still can’t place the message after that, that’s the out-of-knowledge signal: the visitor gets your out-of-knowledge message and the gap is logged for you to review. If a token names an agent that isn’t live, copadre logs a routing problem and falls back to the current agent — so keep the agent references in your prompts in step with the agents you actually have.

Naming and slugs

You don’t invent slugs by hand. copadre derives each agent’s routing reference from its name — lowercased, with spaces turned to hyphens and anything outside a–z 0–9 - dropped (so “Sales Enquiries” becomes sales-enquiries). Rename an agent and copadre re-derives the slug and updates the #slug# references inside your prompts for you. In your prompts, just reference each agent by its slug, wrapped in hashes.

Two shapes: clusters and chains

The same #slug# token supports two distinct arrangements, and it helps to know which one you’re building:

  • A cluster — one concierge fronting a group of specialists. The concierge places each visitor, and a specialist hands the conversation back through the concierge when asked for something outside its remit. This is our recommendation whenever visitors’ needs are unpredictable and several specialists share one front door. See using a concierge.
  • A chain — a deliberate sequence of specialists for a known, ordered workflow. Each specialist completes its task and, as its success signal, emits the next specialist’s token, handing the visitor straight on to an agent with a follow-on job — qualify, then book, then confirm. See chaining specialists.

The two mix happily: a chain can sit behind a concierge (the concierge routes into the first link), and the final link can hand back with the concierge’s token when the sequence is done. The rule of thumb: route back through a concierge when a request has drifted outside a specialist’s remit, and route forward to a named specialist when your workflow says “this task is done, the next begins”.

Ready to build one? Start with using a concierge for a cluster, chaining specialists for a chain, or the starter cluster for a working set of three you can adapt.

copadre · co-PAH-dray

© 2025–2026 This Company (Digital) Limited. Privacy · Terms