FeatureMessageServer

Represents a server responsible for managing and facilitating communication of feature messages. Typically used for sending and handling messages within a remote server context.

A server is a pat of a Kotlin AI Agent. The server is started inside the same process as the running agent. It is used to broadcast agent execution events to connected clients (e.g., a running IDE). Please see description for a client in ai.koog.agents.core.feature.remote.client.FeatureMessageRemoteClient.

Features:

Inheritors

Properties

Link copied to clipboard
abstract val isStarted: StateFlow<Boolean>

Represents the current state of the server, indicating whether it has been started and is actively running.

Functions

Link copied to clipboard
abstract suspend fun close()
Link copied to clipboard
abstract suspend fun sendMessage(message: FeatureMessage)

Sends a feature message for further processing or delivery to connected clients via server-sent events (SSE).

Link copied to clipboard
abstract suspend fun start()

Starts the server, initializing any necessary resources, and beginning to listen for incoming client connections or events.