Class InboundMessage
ConversationInbox.
An InboundMessage carries everything the holder node needs to start (or inject mid-turn) a turn for a
conversation it did not originally receive: target ConversationId, the agentRef the requester
targeted (validated against the conversation's binding per design §3.6), the raw user input, priority tier, optional
idempotency key, the Principal that initiated the input, and arbitrary string metadata.
Notably absent from this envelope is agentExecutionContextId: the deliver-side context id is meaningless on
the holder side, and including it here would only enable accidental misuse. Holder rewraps the user input as a
QueuedInput with its own session's ctxId before forwarding to the session's
internal queue (design §5.6.3).
Construction is via the nested InboundMessage.Builder. The id is supplied by the inbox implementation at
deliver time and assigned through the builder before build().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic InboundMessage.Builderbuilder()at.aimon.core.agent.conversation.ConversationIdgetId()Returns the inbox-assigned id.at.aimon.core.base.Principalat.aimon.core.agent.queue.QueuedInputPriorityat.aimon.core.agent.SubmitOptionsPer-turnSubmitOptionspreserved end-to-end fromWebSubmitRequestso the holder-side dispatch forwards the original caller-supplied executor metadata when it eventually callssession.submitAsync(input, submitOptions, listener).
-
Method Details
-
builder
-
getId
Returns the inbox-assigned id.Callers building an envelope to
deliver()may leave this unset — the inbox implementation issues the id at delivery time and the manager observes it viaConversationInbox.deliver's return value. Aftercollect(), the id is always present.- Returns:
- the id, or
Optional.empty()when the envelope has not yet been stamped by an inbox
-
getConversationId
public at.aimon.core.agent.conversation.ConversationId getConversationId() -
getAgentRef
-
getUserInput
-
getPriority
public at.aimon.core.agent.queue.QueuedInputPriority getPriority() -
getIdempotencyKey
-
getInitiator
public at.aimon.core.base.Principal getInitiator() -
getDeliveredAt
-
getMetadata
-
getSubmitOptions
public at.aimon.core.agent.SubmitOptions getSubmitOptions()Per-turnSubmitOptionspreserved end-to-end fromWebSubmitRequestso the holder-side dispatch forwards the original caller-supplied executor metadata when it eventually callssession.submitAsync(input, submitOptions, listener). Defaults toSubmitOptions.empty()when the producer did not supply any.Codec note: all four built-in inbox codecs (in-memory, Redis, Postgres, MongoDB) round-trip this field. Heterogeneous
Map<String, Object>values insidesystemPromptVariables/executionAttributes/userInfo.metadataare best-effort across persistent backends: scalar types (String, Number, Boolean, Date) and nested Map/List of those round-trip cleanly; custom POJOs surface as nestedMapon the consumer side because the wire format is JSON / BSON without polymorphic type information.
-