Member Junction
    Preparing search index...
    • Picks the agent and route for one message, or null when no turn starts.

      The order is MJ's: the first tagged agent the host allows, then (under Always only) the last agent that answered, the conversation's pinned agent, the host's default agent, and the conversation manager. A candidate the host doesn't allow is skipped. A continuity candidate that a routing decision chose (ContinuityDecisionRouted) takes the DecisionRouted label.

      A continuity or default candidate that isKnownAgent doesn't recognise falls back to the conversation manager, as MJ always has, rather than to the next route. A tagged agent is taken as tagged.

      Parameters

      • candidates: AgentTurnCandidates

        The agent each route would use.

      • rules: AgentTurnRules

        The host's reply mode and allowed list.

      • isKnownAgent: (agentId: string) => boolean

        True when the agent exists in the client's agent catalog.

      Returns AgentTurnTarget | null