Package akka.javasdk.agent
Interface SessionMessage
- All Known Implementing Classes:
SessionMessage.AiMessage,SessionMessage.MultimodalToolCallResponse,SessionMessage.MultimodalUserMessage,SessionMessage.ToolCallResponse,SessionMessage.UserMessage
public sealed interface SessionMessage
permits SessionMessage.MultimodalUserMessage, SessionMessage.UserMessage, SessionMessage.AiMessage, SessionMessage.ToolCallResponse, SessionMessage.MultimodalToolCallResponse
Interface for message representation used inside the SessionMemoryEntity state.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe model's reply, with any tool calls it requested and the token usage it incurred.static interfacestatic final recordThe multimodal result of a tool call, fed back to the model as input.static final recordA multimodal user message, e.g.static final recordToken usage for a singleSessionMessage.AiMessage.static final recordA tool call requested by the model as part of anSessionMessage.AiMessage.static final recordThe text result of a tool call, fed back to the model as input.static final recordA plain text user message. -
Method Summary
Modifier and TypeMethodDescriptionThe component id of the agent that produced this message.intsize()The approximate size of this message in bytes, used to enforce memory size limits.static intsizeInBytes(String text) static intsizeInBytes(List<SessionMessage.MessageContent> contents)
-
Method Details
-
sizeInBytes
-
sizeInBytes
-
size
int size()The approximate size of this message in bytes, used to enforce memory size limits. -
componentId
String componentId()The component id of the agent that produced this message.
-