Package-level declarations

Types

Link copied to clipboard
@Serializable
@SerialName(value = "ERROR")
data class AgentErrorToEnvironmentMessage(val sessionUuid: Uuid, val error: AgentServiceError) : AgentToEnvironmentMessage

Represents an error response from the server. These may occur for several reasons:

Link copied to clipboard
@Serializable
@SerialName(value = "TERMINATION")
data class AgentTerminationToEnvironmentMessage(val sessionUuid: Uuid, val content: AgentToolCallToEnvironmentContent? = null, val error: AgentServiceError? = null) : AgentToEnvironmentMessage

Represents a termination message sent on behalf of the server. Indicates that the server has no further actions for the client to perform, and is usually accompanied by the final result of the inquiry. Can also be received as an acknowledgement of a client-initiated termination, in which case the result will be absent.

Link copied to clipboard
@Serializable
sealed interface AgentToEnvironmentMessage

Represents a message sent from an agent to the environment. This is a base interface for all communication from agents to their respective environments. Each message under this interface is tied to a specific session identified by a universally unique identifier.

Link copied to clipboard
@Serializable
@SerialName(value = "ACTION_MULTIPLE")
data class AgentToolCallsToEnvironmentMessage(val sessionUuid: Uuid, val content: List<AgentToolCallToEnvironmentContent>) : AgentToolCallToEnvironmentMessage

Represents a message sent from the server to the environment to perform multiple tool calls.

Link copied to clipboard
@Serializable
data class AgentToolCallToEnvironmentContent(val agentId: String, val toolCallId: String?, val toolName: String, val toolArgs: JsonObject)

Content of tool call messages sent from the agent.

Link copied to clipboard

Marker interface for tool calls (single and multiple)

Represents the content of a message used to initialize a AI agent environment.

Represents a message sent from the AI agent environment to initialize the agent with necessary configurations, tools, and strategy information.

data class AIAgentEnvironmentToolResultToAgentContent(val toolCallId: String?, val toolName: String, val agentId: String, val message: String, val toolResult: ToolResult? = null) : EnvironmentToolResultToAgentContent

Represents the content of tool result messages sent to an agent after a tool call is executed within the local environment. This provides the result of the tool execution alongside metadata such as the tool's name, the related agent identifier, and the tool call identifier if applicable.

Link copied to clipboard

Represents the abstract base class for the content of environment-to-agent initialization messages.

Link copied to clipboard

Abstract class representing an initialization message sent from the environment to an AI agent. This message serves as a starting point for initializing an agent's session or setting up its operational context. It is part of the communication flow between the environment and the agent.

Link copied to clipboard
@Serializable
sealed interface EnvironmentToAgentContent

Represents the content of messages sent from the environment.

Link copied to clipboard
@Serializable
@SerialName(value = "ERROR")
data class EnvironmentToAgentErrorMessage(val sessionUuid: Uuid, val error: AgentServiceError) : EnvironmentToAgentMessage

Represents an environment error that occurred outside tool execution. For errors resulting from failed Tool executions, use EnvironmentToolResultSingleToAgentMessage instead.

Link copied to clipboard
@Serializable
sealed interface EnvironmentToAgentMessage

Base class of all messages sent from the environment to the AI agent. All client messages, except for init, are associated with a specific session.

Link copied to clipboard
@Serializable
data class EnvironmentToAgentTerminationContent(val agentId: String, val message: String = "Terminating on client behalf") : EnvironmentToAgentContent

Represents the content of TERMINATION messages sent from the environment.

Link copied to clipboard
@Serializable
@SerialName(value = "TERMINATION")
data class EnvironmentToAgentTerminationMessage(val sessionUuid: Uuid, val content: EnvironmentToAgentTerminationContent? = null, val error: AgentServiceError? = null) : EnvironmentToAgentMessage

Represents a termination request sent on behalf of the environment. These are a communication essential, as they signal to the server that it should perform cleanup for a particular session.

@Serializable
@SerialName(value = "OBSERVATIONS_MULTIPLE")
data class EnvironmentToolResultMultipleToAgentMessage(val sessionUuid: Uuid, val content: List<EnvironmentToolResultToAgentContent>) : EnvironmentToolResultToAgentMessage

Represents a message sent after multiple tool calls. Bundles multiple execution outcomes: environment changes, errors encountered, etc.

@Serializable
@SerialName(value = "OBSERVATION")
data class EnvironmentToolResultSingleToAgentMessage(val sessionUuid: Uuid, val content: EnvironmentToolResultToAgentContent) : EnvironmentToolResultToAgentMessage

Represents a message sent after a tool call. Encapsulates execution outcomes: if and how exactly the environment changed, were there any errors while executing, etc.

Link copied to clipboard

Content of tool call result messages sent to the agent.

Link copied to clipboard

Marker interface for messages sent from the environment to an agent, specifically related to tool results. These messages convey the outcome of tool executions, including session-specific context.