AI Dictionary › AI Fundamentals

WebSocket

WebSocket is a protocol that establishes a persistent, bidirectional communication channel between browser and server: once the connection is open, both sides can send messages at any moment, with no need for the client to ask. It goes beyond HTTP's request-response model, where the server may speak only when spoken to.

Definition

How it works

The connection starts as a normal HTTP request with an upgrade handshake: if the server accepts, the channel turns into a WebSocket and stays open. From then on, messages travel both ways with minimal overhead and very low latency, ideal for small, frequent updates. The protocol includes ping-pong frames to keep the connection alive, with reconnection handled by the application.

Applications

In AI, WebSockets power real-time experiences: assistant voice APIs (speech-to-speech conversation with natural interruptions) run over WebSocket, as do many chats receiving streamed tokens and dashboards showing live agent status. Beyond AI they drive chat apps, multiplayer games, stock tickers and collaborative documents.

History & etymology

The protocol was born within the HTML5 effort: the first proposal dates to 2008, with Ian Hickson among the specification's protagonists, and standardization came in December 2011 with IETF RFC 6455. The name joins web and socket, the historic networking term (borrowed from electrical outlets) for the endpoint of a communication channel: literally, a connection socket for the web.

How it's used in Grace

Grace's interactive experiences, such as the arena and the duels where you challenge other users, rely on the same real-time communication logic that WebSocket makes possible. In the scenarios on voice assistants and chat, the term helps you specify bidirectionality and low-latency requirements to an AI.

Related terms

More in AI Fundamentals

Put it into practice

From our network

AGORÀ Intelligence: Enterprise AI Governance Platform

Govern AI at scale: policies, adoption and measurable results on your data. Built for boards and C-suite.

Visit agora-intelligence.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified, the AI coach that trains and certifies your prompt engineering, by Agora Intelligence.