#[non_exhaustive]pub enum KnownSessionEvent {
Show 29 variants
AgentMessage(AgentMessageEvent),
AgentThinking(AgentThinkingEvent),
AgentToolUse(AgentToolUseEvent),
AgentToolResult(AgentToolResultEvent),
AgentMcpToolUse(AgentMcpToolUseEvent),
AgentMcpToolResult(AgentMcpToolResultEvent),
AgentCustomToolUse(AgentCustomToolUseEvent),
AgentThreadContextCompacted(EventEnvelope),
AgentThreadMessageSent(AgentThreadMessageSentEvent),
AgentThreadMessageReceived(AgentThreadMessageReceivedEvent),
SessionStatusRunning(EventEnvelope),
SessionStatusIdle(SessionStatusIdleEvent),
SessionStatusRescheduled(EventEnvelope),
SessionStatusTerminated(EventEnvelope),
SessionDeleted(EventEnvelope),
SessionError(SessionErrorEvent),
SessionOutcomeEvaluated(EventEnvelope),
SessionThreadCreated(SessionThreadCreatedEvent),
SessionThreadIdle(EventEnvelope),
SpanModelRequestStart(EventEnvelope),
SpanModelRequestEnd(SpanModelRequestEndEvent),
SpanOutcomeEvaluationStart(EventEnvelope),
SpanOutcomeEvaluationOngoing(EventEnvelope),
SpanOutcomeEvaluationEnd(EventEnvelope),
UserMessage(UserMessageEvent),
UserInterrupt(EventEnvelope),
UserCustomToolResult(UserCustomToolResultEvent),
UserToolConfirmation(UserToolConfirmationEvent),
UserDefineOutcome(UserDefineOutcomeEvent),
}managed-agents-preview only.Expand description
All event variants this SDK version recognizes.
Common envelope fields (id, processed_at) are present on most
events; we capture them as optional fields when the server includes
them and let new fields land in Other via the parent enum.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AgentMessage(AgentMessageEvent)
Agent response containing text content blocks.
AgentThinking(AgentThinkingEvent)
Agent thinking content, emitted separately from messages.
AgentToolUse(AgentToolUseEvent)
Agent invokes a pre-built agent tool (bash, file ops, etc.).
AgentToolResult(AgentToolResultEvent)
Result of a pre-built agent tool execution.
AgentMcpToolUse(AgentMcpToolUseEvent)
Agent invokes an MCP server tool.
AgentMcpToolResult(AgentMcpToolResultEvent)
Result of an MCP tool execution.
AgentCustomToolUse(AgentCustomToolUseEvent)
Agent invokes one of your custom tools. Respond with an
OutgoingUserEvent::CustomToolResult.
AgentThreadContextCompacted(EventEnvelope)
Conversation history was compacted.
AgentThreadMessageSent(AgentThreadMessageSentEvent)
Agent sent a message to another multi-agent thread.
AgentThreadMessageReceived(AgentThreadMessageReceivedEvent)
Agent received a message from another multi-agent thread.
SessionStatusRunning(EventEnvelope)
Session is now actively processing.
SessionStatusIdle(SessionStatusIdleEvent)
Session finished its current task and is waiting for input.
SessionStatusRescheduled(EventEnvelope)
Transient error; session is auto-retrying.
SessionStatusTerminated(EventEnvelope)
Session ended due to an unrecoverable error.
SessionDeleted(EventEnvelope)
Session was deleted; emitted as the final event before the session disappears from listings.
SessionError(SessionErrorEvent)
An error occurred during processing.
SessionOutcomeEvaluated(EventEnvelope)
An outcome evaluation reached a terminal status.
SessionThreadCreated(SessionThreadCreatedEvent)
Coordinator spawned a new multi-agent thread.
SessionThreadIdle(EventEnvelope)
A multi-agent thread finished its current work.
SpanModelRequestStart(EventEnvelope)
A model inference call has started.
SpanModelRequestEnd(SpanModelRequestEndEvent)
A model inference call has completed.
SpanOutcomeEvaluationStart(EventEnvelope)
Outcome evaluation has started.
SpanOutcomeEvaluationOngoing(EventEnvelope)
Heartbeat during an ongoing outcome evaluation.
SpanOutcomeEvaluationEnd(EventEnvelope)
Outcome evaluation has completed.
UserMessage(UserMessageEvent)
User-authored text message.
UserInterrupt(EventEnvelope)
User-issued interrupt (no body beyond envelope).
UserCustomToolResult(UserCustomToolResultEvent)
Result of a custom tool the user executed locally.
UserToolConfirmation(UserToolConfirmationEvent)
Allow / deny a pending agent or MCP tool call.
UserDefineOutcome(UserDefineOutcomeEvent)
Define an outcome for the agent to work toward.
Trait Implementations§
Source§impl Clone for KnownSessionEvent
impl Clone for KnownSessionEvent
Source§fn clone(&self) -> KnownSessionEvent
fn clone(&self) -> KnownSessionEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnownSessionEvent
impl Debug for KnownSessionEvent
Source§impl<'de> Deserialize<'de> for KnownSessionEvent
impl<'de> Deserialize<'de> for KnownSessionEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for KnownSessionEvent
impl PartialEq for KnownSessionEvent
Source§impl Serialize for KnownSessionEvent
impl Serialize for KnownSessionEvent
impl StructuralPartialEq for KnownSessionEvent
Auto Trait Implementations§
impl Freeze for KnownSessionEvent
impl RefUnwindSafe for KnownSessionEvent
impl Send for KnownSessionEvent
impl Sync for KnownSessionEvent
impl Unpin for KnownSessionEvent
impl UnsafeUnpin for KnownSessionEvent
impl UnwindSafe for KnownSessionEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more