Is it possible to connect an AI agent to a React-based UI so that it receives user messages and sends responses back to be displayed in the interface?
I tried using a Webhook node, and it successfully receives the user message, but the AI agent does not send the response back to the UI.
Hi @Abdelrahman2 Welcome to the community!
You can do that Via Webhook & Respond to Webhook Node to parse down data, so that when your application puts on a request it will wait for timeout for 60-120s and when the AI agent gives the response it would read that and would display in an application. An example workflow would be:
Here in this example your application would send a query that would be the input for the AI agent and it will respond with a aiResponse that you can display in your application. This structure is pretty solid, but if you want things to be less complex and easy to setup, just use chat input with its
Make Chat Publicly available option this would give you a link that you can embed using an iframe and this is really easy to setup without any prior configuration.
Let me know if you have any problems with that. Hope this helps