DEFINITION
Webhook vs WebSocket Delivery
Webhook and WebSocket Delivery Modes for Agent Events
Definition
Two complementary event delivery patterns: webhooks provide at-least-once HTTP POST delivery for cloud/remote agents (with retry logic), while websockets enable real-time bidirectional communication for local agents. E2a supports both to accommodate different deployment topologies.
Examples in the Wild
- Example 1:Cloud-deployed agent receives email via webhook with automatic retry on failure
- Example 2:Local agent maintains persistent websocket connection for instant email notifications
- Example 3:Hybrid setup: local agents use websocket, external services use webhook