pub struct SendMessagesRequest {
pub agent_mode: Option<SendAgentMode>,
pub messages: Vec<SendMessageItem>,
pub mode: Option<SendMode>,
pub prepend: Option<bool>,
pub request_headers: Option<HashMap<String, String>>,
pub traceparent: Option<String>,
pub tracestate: Option<String>,
pub wait: Option<bool>,
}Expand description
Parameters for sending zero or more user messages to the session in a single turn. Remote-backed (Mission Control) sessions do not support this method and will return an error.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§agent_mode: Option<SendAgentMode>The UI mode the agent was in when these messages were sent. Defaults to the session’s current mode.
messages: Vec<SendMessageItem>The user messages to append to the conversation, in order. May be empty, in which case a single turn runs over the existing history with no new user message.
mode: Option<SendMode>How to deliver the messages. enqueue (default) appends to the message queue. immediate interjects during an in-progress turn.
prepend: Option<bool>If true, adds the messages to the front of the queue instead of the end
request_headers: Option<HashMap<String, String>>Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key.
traceparent: Option<String>W3C Trace Context traceparent header for distributed tracing of this agent turn
tracestate: Option<String>W3C Trace Context tracestate header for distributed tracing
wait: Option<bool>If true, await completion of the agentic loop for this turn before returning. Defaults to false (fire-and-forget). When true, the result still contains the same messageIds; the caller can rely on the agent having processed the messages before the call resolves. Transport-dependent tail semantics: on a LOCAL (in-process) session the wait additionally blocks until the completed turn’s event tail has been dispatched to this session’s in-process subscribers, so a subsequent read of subscriber state already reflects the turn; on a REMOTE session the wait resolves once the loop completes and mirrored delivery follows over the wire. Callers that need the stronger local guarantee on remote sessions should await the event stream explicitly.
Trait Implementations§
Source§impl Clone for SendMessagesRequest
impl Clone for SendMessagesRequest
Source§fn clone(&self) -> SendMessagesRequest
fn clone(&self) -> SendMessagesRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more