Overview
FERAL uses two WebSocket endpoints:
Both use JSON-encoded
FeralMessage frames.
FeralMessage Format
Every message over either WebSocket follows this envelope:Client Protocol (/v1/session)
Connection Lifecycle
1
Connect
2
Handshake
The brain sends a
session_init message with capabilities and current context.3
Exchange messages
Client sends commands, brain responds. Both sides can initiate.
4
Disconnect
Either side can close the socket. The brain persists the session in memory.
Client → Brain Message Types
Brain → Client Message Types
Hardware Protocol (/v1/node)
Connection Lifecycle
1
Connect
2
Register
The node sends its device manifest immediately after connection.
3
Stream data
The node pushes sensor data; the brain sends commands.
4
Disconnect
Node closes the socket. The brain marks the device as offline.
Node → Brain Message Types
Brain → Node Message Types
Example: Full Client Conversation
Keep-Alive
Both protocols use ping/pong frames. The brain sends aping every 30 seconds. Nodes and clients must respond within 10 seconds or the connection is considered dead.