Class WebSubmitRequest

java.lang.Object
at.aimon.session.web.WebSubmitRequest

public final class WebSubmitRequest extends Object
Immutable submit request envelope for WebAgentSessionManager.submit(WebSubmitRequest).

Carries the target ConversationId, the agentRef the caller intends to bind to the conversation, the raw user input, optional session options, optional idempotency key, priority tier (defaults to QueuedInputPriority.NEXT), and the Principal that initiated the input.

The optional contextDiscriminator selects which AgentExecutionContext instance the session should bind to when a single agent definition is split into multiple agent-scoped contexts (per tenant, per environment, etc.). When unset the manager derives the bare agent:<agentRef> id; when set the id becomes agent:<agentRef>:<discriminator> and must match an entry pre-registered on the application's OrcaAgentExecutionContextManager. Like OpenAttributes, it is read on cache miss only — once a session is cached, subsequent submits with a different discriminator do not re-open the session.

Constructed via WebSubmitRequest.Builder; per project convention "prefer class over record".

  • Method Details

    • builder

      public static WebSubmitRequest.Builder builder()
    • getConversationId

      public at.aimon.core.agent.conversation.ConversationId getConversationId()
    • getAgentRef

      public String getAgentRef()
    • getContextDiscriminator

      public Optional<String> getContextDiscriminator()
      Optional discriminator used to select among multiple AgentExecutionContext instances of the same agent (e.g., per tenant). Read by the manager on cache miss to derive the AgentExecutionContextId threaded into the AgentSessionOpener.
      Returns:
      the discriminator, or empty when the bare agent:<agentRef> context should be used
    • getUserInput

      public String getUserInput()
    • getOptions

      public at.aimon.core.agent.session.AgentSessionOptions getOptions()
    • getSubmitOptions

      public at.aimon.core.agent.SubmitOptions getSubmitOptions()
      Per-turn options forwarded to AgentSession.submitAsync(input, submitOptions, listener) when this request is dispatched. Defaults to SubmitOptions.empty() so legacy callers see unchanged behavior.
    • getOpenAttributes

      public at.aimon.core.agent.session.OpenAttributes getOpenAttributes()
      Caller-provided open attributes forwarded to the configured AgentSessionOpener on cache miss.

      Attributes are consumed only when the manager actually invokes the opener for a fresh session — they have no effect on submits that hit an already-cached session. Defaults to OpenAttributes.empty() so legacy callers see unchanged behavior.

    • getIdempotencyKey

      public Optional<String> getIdempotencyKey()
    • getPriority

      public at.aimon.core.agent.queue.QueuedInputPriority getPriority()
    • getInitiator

      public at.aimon.core.base.Principal getInitiator()