I suggest that Kagi implements a way to configure URL redirects in a way where it redirects to one site when using a desktop PC and another when using a mobile device.
A use-case would be wanting to redirect to Reddit's old site (old.reddit.com) on desktop and Reddit's mobile friendly site (can be accessed by appending /.i to the path) on mobile.
I have a few ideas as to how this could be implemented, taking into account that it has to work without JavaScript as well:
User agent matching: You could allow the user to insert a regex that filters the browser's user agent such that the redirect is only applied when the regex matches. A more user-friendly way would be to let the user choose from a set of options (mobile, desktop etc.), where the backend then does some internal checks to see which device the request is coming from. Unknown user agents would just be ignoed.
Media queries: You could allow the user to type a custom CSS media query which is then appended to the stylesheet on the result page, such that it duplicates the result link for each redirect and then each media query sets display: block; on its own result link and display: none; on all others. Again, this could be more user-friendly by having a pre-defined set of options like before, but this time mapped to specific screen sizes.