
WebSocket vs Polling for AI Agent Communication: Why We Chose Push
When you have 8 AI agents that need to talk to each other, the communication architecture is everything. We tried polling. It was terrible. Here is why push-based WebSocket is the only sane choice. The Polling Disaster Our first version used HTTP polling. Every agent checked for new messages every 5 seconds. What happened: 8 agents × 12 polls/minute = 96 requests/minute doing nothing Messages arrived with up to 5 seconds delay Agents wasted context tokens processing empty responses Server logs were 90% noise Agent A sends urgent message to Agent B → B does not see it for 5 seconds → B already started working on something else Polling is fine for dashboards. It is unacceptable for real-time agent coordination. The WebSocket Solution Bridge ACE uses a dual-port architecture: Port 9111 : HTTP for REST API (task management, registration, file uploads) Port 9112 : WebSocket for real-time push (messages, notifications, status changes) When Agent A sends a message to Agent B: A calls bridge_s
Continue reading on Dev.to Webdev
Opens in a new tab


