Switching agents mid-conversation

Hello everyone, it’s my first post here, be sure to let me know if I forget to mention something important.
We’ve started using n8n a couple months ago to prototype our web APIs to access the internal databse and to start working on an agest that could use those APIs to help our clients.

To follow GDPR guidelines, we are severly prohibited to distribute any personal data outside our network, so we created this small workaround where (ideally) there should be an internal agent, running on Ollama, that is able to authenticate the user, then pass the auth data to an external model (an openAI assistant at this very moment) without leaking private data.

I then need to write the flow(s) that are able to handle this exchange. The steps would be as follows:

  • the Auth agent gets personal data from the customer;
  • it authenticates the customer via a tool GetCustomerData();
  • it passes those data to the other agent that will continue the conversation, while closing the current one.

My problem is, how can I handle the exchange?
A. I cannot check with an IF node if the tool outputted valid auth data because it’s not connected to it.
B. Even if I could, how would I be able to transfer the customer on the new chat? I cannot send programmed messages on the chat afaik, so no url redirection or just a message containing the url of the new chat.

I understand the focus of n8n is to automate tasks using AI agents, but nodes linked to the chat are severely lacking in functionality. Having said that, this is an example of workflow I tried, but it obviously doesn’t work. I thanks whoever’ll help me in advance, have a great day!

edit: fixed workflow’s json embed