Skip to main content
Version: Next

sse_communication_protocol

File: plugins/communication_protocols/http/src/utcp_http/sse_communication_protocol.py

class SseCommunicationProtocol (CommunicationProtocol)​

Documentation

SSE communication protocol implementation for UTCP client.

Handles Server-Sent Events based tool providers with streaming capabilities.

Fields:​

  • MAX_RECONNECT_ATTEMPTS: int
  • MAX_RECONNECT_DELAY_MS: int
  • HANDSHAKE_TIMEOUT_SECONDS: float
  • MAX_EVENT_BUFFER_CHARS: int

Methods:​

async register_manual(self, caller, manual_call_template: CallTemplate) -> RegisterManualResult

Register a manual and its tools from an SSE provider.

async deregister_manual(self, caller, manual_call_template: CallTemplate) -> None

Deregister an SSE manual.

async call_tool(self, caller, tool_name: str, tool_args: Dict[str, Any], tool_call_template: CallTemplate) -> Any

Execute a tool call through SSE transport.

async call_tool_streaming(self, caller, tool_name: str, tool_args: Dict[str, Any], tool_call_template: CallTemplate) -> AsyncGenerator[Any, None]

Execute a tool call through SSE transport with streaming.