WebSocket
The PRX gateway provides a WebSocket endpoint for en temps reel, bidirectional communication with session d'agents. Cela permet reponses en streaming, live execution d'outil updates, et interactive conversations.
Connection
Connect vers le WebSocket endpoint at:
ws://127.0.0.1:3120/ws/sessions/:idMessage Protocol
Messages are exchanged as JSON objects avec un type field:
Client to Server
message-- send a user messagecancel-- cancel the current agent operationping-- keepalive ping
Server to Client
token-- streaming response tokentool_call-- agent is calling a tooltool_result-- execution d'outil completeddone-- agent response completeerror-- error occurredpong-- keepalive response
Configuration
toml
[gateway.websocket]
max_connections = 100
ping_interval_secs = 30
max_message_size_kb = 1024