Skip to content

UI Connector needs to be implemented with Websockets in addition to Socket.IO #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xsgbloom opened this issue Nov 13, 2024 · 2 comments

Comments

@xsgbloom
Copy link

xsgbloom commented Nov 13, 2024

UI Connector's documentation states clearly that it implements and allows for a Websocket connection Ref.

The problem is that UI Connector was implemented using socket.io, and socket.io is an extension of a Websocket... according to the socket.io documentation: "Socket.IO is NOT a WebSocket implementation. Although Socket.IO indeed uses WebSocket as a transport when possible, it adds additional metadata to each packet. That is why a WebSocket client will not be able to successfully connect to a Socket.IO server, and a Socket.IO client will not be able to connect to a plain WebSocket server either." Ref

This means that clients that do not have the ability to initiate a socket.io connection cannot make use of UI Connector.

Python does have a websockets library that can be used with asyncio or with threading.

@xsgbloom xsgbloom changed the title UI Connector needs to be implemented with Websockets, not socket.io. UI Connector needs to be implemented with Websockets in addition to Socket.IO Nov 13, 2024
@carinali100
Copy link
Contributor

Hi @xsgbloom . Thanks for the comment, the Agent Assist Backend Module is designed to be seamlessly integrate with the UI Module for Agent Assist https://cloud.google.com/agent-assist/docs/ui-modules#implement_the_ui_module_connector.

We have an SocketIO Client on the UI Module side to receive all the pub/sub messages emitted back from the Agent Assist Backend Module for Transcription, Proactive Knowledge Assist and Agent Coaching.

Could you clarify the use case for websocket library?

Regards,
Carina

@xsgbloom
Copy link
Author

Hi Carina,

For a time, Google's public-facing documentation about UI Connector stated "Establishes a WebSockets connection with the authenticated agent desktop based on a given conversation name." UI Connector implements a SocketIO connection, which is not a pure WebSocket, so the documentation was misleading. I've updated Google's public-facing documentation to be clearer that UI Connector implements a SocketIO WebSocket connection to avoid further confusion.

I opened this issue because I felt that UI Connector should be developed in accordance with its documentation. Since I've updated the documentation, this is no longer an issue.

I think implementing a pure WebSocket method of connecting to UI Connector is probably a bad idea because pure WebSockets are not tunneled over HTTP, they establish their own connection and transport protocol, and WebSockets don't have the SocketIO room concept, which is extraordinarily convenient for the UI Connector use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants