Class BetaManagedAgentsStreamSessionThreadEvents
-
- All Implemented Interfaces:
public final class BetaManagedAgentsStreamSessionThreadEventsServer-sent event in a single thread's stream.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsStreamSessionThreadEvents.VisitorAn interface that defines how to map each variant of BetaManagedAgentsStreamSessionThreadEvents to a value of type T.
-
Method Summary
-
-
Method Detail
-
userMessage
final Optional<BetaManagedAgentsUserMessageEvent> userMessage()
A user message event in the session conversation.
-
userInterrupt
final Optional<BetaManagedAgentsUserInterruptEvent> userInterrupt()
An interrupt event that pauses agent execution and returns control to the user.
-
userToolConfirmation
final Optional<BetaManagedAgentsUserToolConfirmationEvent> userToolConfirmation()
A tool confirmation event that approves or denies a pending tool execution.
-
userCustomToolResult
final Optional<BetaManagedAgentsUserCustomToolResultEvent> userCustomToolResult()
Event sent by the client providing the result of a custom tool execution.
-
agentCustomToolUse
final Optional<BetaManagedAgentsAgentCustomToolUseEvent> agentCustomToolUse()
Event emitted when the agent calls a custom tool. The session goes idle until the client sends a
user.custom_tool_resultevent with the result.
-
agentMessage
final Optional<BetaManagedAgentsAgentMessageEvent> agentMessage()
An agent response event in the session conversation.
-
agentThinking
final Optional<BetaManagedAgentsAgentThinkingEvent> agentThinking()
Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.
-
agentMcpToolUse
final Optional<BetaManagedAgentsAgentMcpToolUseEvent> agentMcpToolUse()
Event emitted when the agent invokes a tool provided by an MCP server.
-
agentMcpToolResult
final Optional<BetaManagedAgentsAgentMcpToolResultEvent> agentMcpToolResult()
Event representing the result of an MCP tool execution.
-
agentToolUse
final Optional<BetaManagedAgentsAgentToolUseEvent> agentToolUse()
Event emitted when the agent invokes a built-in agent tool.
-
agentToolResult
final Optional<BetaManagedAgentsAgentToolResultEvent> agentToolResult()
Event representing the result of an agent tool execution.
-
agentThreadMessageReceived
final Optional<BetaManagedAgentsAgentThreadMessageReceivedEvent> agentThreadMessageReceived()
Delivery event written to the target thread's input stream when an agent-to-agent message arrives.
-
agentThreadMessageSent
final Optional<BetaManagedAgentsAgentThreadMessageSentEvent> agentThreadMessageSent()
Observability event emitted to the sender's output stream when an agent-to-agent message is sent.
-
agentThreadContextCompacted
final Optional<BetaManagedAgentsAgentThreadContextCompactedEvent> agentThreadContextCompacted()
Indicates that context compaction (summarization) occurred during the session.
-
sessionError
final Optional<BetaManagedAgentsSessionErrorEvent> sessionError()
An error event indicating a problem occurred during session execution.
-
sessionStatusRescheduled
final Optional<BetaManagedAgentsSessionStatusRescheduledEvent> sessionStatusRescheduled()
Indicates the session is recovering from an error state and is rescheduled for execution.
-
sessionStatusRunning
final Optional<BetaManagedAgentsSessionStatusRunningEvent> sessionStatusRunning()
Indicates the session is actively running and the agent is working.
-
sessionStatusIdle
final Optional<BetaManagedAgentsSessionStatusIdleEvent> sessionStatusIdle()
Indicates the agent has paused and is awaiting user input.
-
sessionStatusTerminated
final Optional<BetaManagedAgentsSessionStatusTerminatedEvent> sessionStatusTerminated()
Indicates the session has terminated, either due to an error or completion.
-
sessionThreadCreated
final Optional<BetaManagedAgentsSessionThreadCreatedEvent> sessionThreadCreated()
Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.
-
spanOutcomeEvaluationStart
final Optional<BetaManagedAgentsSpanOutcomeEvaluationStartEvent> spanOutcomeEvaluationStart()
Emitted when an outcome evaluation cycle begins.
-
spanOutcomeEvaluationEnd
final Optional<BetaManagedAgentsSpanOutcomeEvaluationEndEvent> spanOutcomeEvaluationEnd()
Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of
needs_revisionmeans another evaluation cycle follows;satisfied,max_iterations_reached,failed, orinterruptedare terminal — no further evaluation cycles follow.
-
spanModelRequestStart
final Optional<BetaManagedAgentsSpanModelRequestStartEvent> spanModelRequestStart()
Emitted when a model request is initiated by the agent.
-
spanModelRequestEnd
final Optional<BetaManagedAgentsSpanModelRequestEndEvent> spanModelRequestEnd()
Emitted when a model request completes.
-
spanOutcomeEvaluationOngoing
final Optional<BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent> spanOutcomeEvaluationOngoing()
Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding
span.outcome_evaluation_startandspan.outcome_evaluation_endevents.
-
userDefineOutcome
final Optional<BetaManagedAgentsUserDefineOutcomeEvent> userDefineOutcome()
Echo of a
user.define_outcomeinput event. Carries the server-generatedoutcome_idthat subsequentspan.outcome_evaluation_*events reference.
-
sessionDeleted
final Optional<BetaManagedAgentsSessionDeletedEvent> sessionDeleted()
Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.
-
sessionThreadStatusRunning
final Optional<BetaManagedAgentsSessionThreadStatusRunningEvent> sessionThreadStatusRunning()
A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
sessionThreadStatusIdle
final Optional<BetaManagedAgentsSessionThreadStatusIdleEvent> sessionThreadStatusIdle()
A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
sessionThreadStatusTerminated
final Optional<BetaManagedAgentsSessionThreadStatusTerminatedEvent> sessionThreadStatusTerminated()
A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
userToolResult
final Optional<BetaManagedAgentsUserToolResultEvent> userToolResult()
Event sent by the client providing the result of an agent-toolset tool execution. Only valid on
self_hostedenvironments, where sandbox-routed tools are executed by the client rather than the server.
-
sessionThreadStatusRescheduled
final Optional<BetaManagedAgentsSessionThreadStatusRescheduledEvent> sessionThreadStatusRescheduled()
A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
sessionUpdated
final Optional<BetaManagedAgentsSessionUpdatedEvent> sessionUpdated()
Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.
-
systemMessage
final Optional<BetaManagedAgentsSystemMessageEvent> systemMessage()
A mid-conversation system message event. Carries system-role content that is appended to the session as a
role: "system"turn.
-
isUserMessage
final Boolean isUserMessage()
-
isUserInterrupt
final Boolean isUserInterrupt()
-
isUserToolConfirmation
final Boolean isUserToolConfirmation()
-
isUserCustomToolResult
final Boolean isUserCustomToolResult()
-
isAgentCustomToolUse
final Boolean isAgentCustomToolUse()
-
isAgentMessage
final Boolean isAgentMessage()
-
isAgentThinking
final Boolean isAgentThinking()
-
isAgentMcpToolUse
final Boolean isAgentMcpToolUse()
-
isAgentMcpToolResult
final Boolean isAgentMcpToolResult()
-
isAgentToolUse
final Boolean isAgentToolUse()
-
isAgentToolResult
final Boolean isAgentToolResult()
-
isAgentThreadMessageReceived
final Boolean isAgentThreadMessageReceived()
-
isAgentThreadMessageSent
final Boolean isAgentThreadMessageSent()
-
isAgentThreadContextCompacted
final Boolean isAgentThreadContextCompacted()
-
isSessionError
final Boolean isSessionError()
-
isSessionStatusRescheduled
final Boolean isSessionStatusRescheduled()
-
isSessionStatusRunning
final Boolean isSessionStatusRunning()
-
isSessionStatusIdle
final Boolean isSessionStatusIdle()
-
isSessionStatusTerminated
final Boolean isSessionStatusTerminated()
-
isSessionThreadCreated
final Boolean isSessionThreadCreated()
-
isSpanOutcomeEvaluationStart
final Boolean isSpanOutcomeEvaluationStart()
-
isSpanOutcomeEvaluationEnd
final Boolean isSpanOutcomeEvaluationEnd()
-
isSpanModelRequestStart
final Boolean isSpanModelRequestStart()
-
isSpanModelRequestEnd
final Boolean isSpanModelRequestEnd()
-
isSpanOutcomeEvaluationOngoing
final Boolean isSpanOutcomeEvaluationOngoing()
-
isUserDefineOutcome
final Boolean isUserDefineOutcome()
-
isSessionDeleted
final Boolean isSessionDeleted()
-
isSessionThreadStatusRunning
final Boolean isSessionThreadStatusRunning()
-
isSessionThreadStatusIdle
final Boolean isSessionThreadStatusIdle()
-
isSessionThreadStatusTerminated
final Boolean isSessionThreadStatusTerminated()
-
isUserToolResult
final Boolean isUserToolResult()
-
isSessionThreadStatusRescheduled
final Boolean isSessionThreadStatusRescheduled()
-
isSessionUpdated
final Boolean isSessionUpdated()
-
isSystemMessage
final Boolean isSystemMessage()
-
asUserMessage
final BetaManagedAgentsUserMessageEvent asUserMessage()
A user message event in the session conversation.
-
asUserInterrupt
final BetaManagedAgentsUserInterruptEvent asUserInterrupt()
An interrupt event that pauses agent execution and returns control to the user.
-
asUserToolConfirmation
final BetaManagedAgentsUserToolConfirmationEvent asUserToolConfirmation()
A tool confirmation event that approves or denies a pending tool execution.
-
asUserCustomToolResult
final BetaManagedAgentsUserCustomToolResultEvent asUserCustomToolResult()
Event sent by the client providing the result of a custom tool execution.
-
asAgentCustomToolUse
final BetaManagedAgentsAgentCustomToolUseEvent asAgentCustomToolUse()
Event emitted when the agent calls a custom tool. The session goes idle until the client sends a
user.custom_tool_resultevent with the result.
-
asAgentMessage
final BetaManagedAgentsAgentMessageEvent asAgentMessage()
An agent response event in the session conversation.
-
asAgentThinking
final BetaManagedAgentsAgentThinkingEvent asAgentThinking()
Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.
-
asAgentMcpToolUse
final BetaManagedAgentsAgentMcpToolUseEvent asAgentMcpToolUse()
Event emitted when the agent invokes a tool provided by an MCP server.
-
asAgentMcpToolResult
final BetaManagedAgentsAgentMcpToolResultEvent asAgentMcpToolResult()
Event representing the result of an MCP tool execution.
-
asAgentToolUse
final BetaManagedAgentsAgentToolUseEvent asAgentToolUse()
Event emitted when the agent invokes a built-in agent tool.
-
asAgentToolResult
final BetaManagedAgentsAgentToolResultEvent asAgentToolResult()
Event representing the result of an agent tool execution.
-
asAgentThreadMessageReceived
final BetaManagedAgentsAgentThreadMessageReceivedEvent asAgentThreadMessageReceived()
Delivery event written to the target thread's input stream when an agent-to-agent message arrives.
-
asAgentThreadMessageSent
final BetaManagedAgentsAgentThreadMessageSentEvent asAgentThreadMessageSent()
Observability event emitted to the sender's output stream when an agent-to-agent message is sent.
-
asAgentThreadContextCompacted
final BetaManagedAgentsAgentThreadContextCompactedEvent asAgentThreadContextCompacted()
Indicates that context compaction (summarization) occurred during the session.
-
asSessionError
final BetaManagedAgentsSessionErrorEvent asSessionError()
An error event indicating a problem occurred during session execution.
-
asSessionStatusRescheduled
final BetaManagedAgentsSessionStatusRescheduledEvent asSessionStatusRescheduled()
Indicates the session is recovering from an error state and is rescheduled for execution.
-
asSessionStatusRunning
final BetaManagedAgentsSessionStatusRunningEvent asSessionStatusRunning()
Indicates the session is actively running and the agent is working.
-
asSessionStatusIdle
final BetaManagedAgentsSessionStatusIdleEvent asSessionStatusIdle()
Indicates the agent has paused and is awaiting user input.
-
asSessionStatusTerminated
final BetaManagedAgentsSessionStatusTerminatedEvent asSessionStatusTerminated()
Indicates the session has terminated, either due to an error or completion.
-
asSessionThreadCreated
final BetaManagedAgentsSessionThreadCreatedEvent asSessionThreadCreated()
Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.
-
asSpanOutcomeEvaluationStart
final BetaManagedAgentsSpanOutcomeEvaluationStartEvent asSpanOutcomeEvaluationStart()
Emitted when an outcome evaluation cycle begins.
-
asSpanOutcomeEvaluationEnd
final BetaManagedAgentsSpanOutcomeEvaluationEndEvent asSpanOutcomeEvaluationEnd()
Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of
needs_revisionmeans another evaluation cycle follows;satisfied,max_iterations_reached,failed, orinterruptedare terminal — no further evaluation cycles follow.
-
asSpanModelRequestStart
final BetaManagedAgentsSpanModelRequestStartEvent asSpanModelRequestStart()
Emitted when a model request is initiated by the agent.
-
asSpanModelRequestEnd
final BetaManagedAgentsSpanModelRequestEndEvent asSpanModelRequestEnd()
Emitted when a model request completes.
-
asSpanOutcomeEvaluationOngoing
final BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent asSpanOutcomeEvaluationOngoing()
Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding
span.outcome_evaluation_startandspan.outcome_evaluation_endevents.
-
asUserDefineOutcome
final BetaManagedAgentsUserDefineOutcomeEvent asUserDefineOutcome()
Echo of a
user.define_outcomeinput event. Carries the server-generatedoutcome_idthat subsequentspan.outcome_evaluation_*events reference.
-
asSessionDeleted
final BetaManagedAgentsSessionDeletedEvent asSessionDeleted()
Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.
-
asSessionThreadStatusRunning
final BetaManagedAgentsSessionThreadStatusRunningEvent asSessionThreadStatusRunning()
A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
asSessionThreadStatusIdle
final BetaManagedAgentsSessionThreadStatusIdleEvent asSessionThreadStatusIdle()
A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
asSessionThreadStatusTerminated
final BetaManagedAgentsSessionThreadStatusTerminatedEvent asSessionThreadStatusTerminated()
A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
asUserToolResult
final BetaManagedAgentsUserToolResultEvent asUserToolResult()
Event sent by the client providing the result of an agent-toolset tool execution. Only valid on
self_hostedenvironments, where sandbox-routed tools are executed by the client rather than the server.
-
asSessionThreadStatusRescheduled
final BetaManagedAgentsSessionThreadStatusRescheduledEvent asSessionThreadStatusRescheduled()
A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
asSessionUpdated
final BetaManagedAgentsSessionUpdatedEvent asSessionUpdated()
Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.
-
asSystemMessage
final BetaManagedAgentsSystemMessageEvent asSystemMessage()
A mid-conversation system message event. Carries system-role content that is appended to the session as a
role: "system"turn.
-
accept
final <T extends Any> T accept(BetaManagedAgentsStreamSessionThreadEvents.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = betaManagedAgentsStreamSessionThreadEvents.accept(new BetaManagedAgentsStreamSessionThreadEvents.Visitor<Optional<String>>() { @Override public Optional<String> visitUserMessage(BetaManagedAgentsUserMessageEvent userMessage) { return Optional.of(userMessage.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsStreamSessionThreadEvents validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofUserMessage
final static BetaManagedAgentsStreamSessionThreadEvents ofUserMessage(BetaManagedAgentsUserMessageEvent userMessage)
A user message event in the session conversation.
-
ofUserInterrupt
final static BetaManagedAgentsStreamSessionThreadEvents ofUserInterrupt(BetaManagedAgentsUserInterruptEvent userInterrupt)
An interrupt event that pauses agent execution and returns control to the user.
-
ofUserToolConfirmation
final static BetaManagedAgentsStreamSessionThreadEvents ofUserToolConfirmation(BetaManagedAgentsUserToolConfirmationEvent userToolConfirmation)
A tool confirmation event that approves or denies a pending tool execution.
-
ofUserCustomToolResult
final static BetaManagedAgentsStreamSessionThreadEvents ofUserCustomToolResult(BetaManagedAgentsUserCustomToolResultEvent userCustomToolResult)
Event sent by the client providing the result of a custom tool execution.
-
ofAgentCustomToolUse
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentCustomToolUse(BetaManagedAgentsAgentCustomToolUseEvent agentCustomToolUse)
Event emitted when the agent calls a custom tool. The session goes idle until the client sends a
user.custom_tool_resultevent with the result.
-
ofAgentMessage
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentMessage(BetaManagedAgentsAgentMessageEvent agentMessage)
An agent response event in the session conversation.
-
ofAgentThinking
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentThinking(BetaManagedAgentsAgentThinkingEvent agentThinking)
Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.
-
ofAgentMcpToolUse
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentMcpToolUse(BetaManagedAgentsAgentMcpToolUseEvent agentMcpToolUse)
Event emitted when the agent invokes a tool provided by an MCP server.
-
ofAgentMcpToolResult
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentMcpToolResult(BetaManagedAgentsAgentMcpToolResultEvent agentMcpToolResult)
Event representing the result of an MCP tool execution.
-
ofAgentToolUse
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentToolUse(BetaManagedAgentsAgentToolUseEvent agentToolUse)
Event emitted when the agent invokes a built-in agent tool.
-
ofAgentToolResult
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentToolResult(BetaManagedAgentsAgentToolResultEvent agentToolResult)
Event representing the result of an agent tool execution.
-
ofAgentThreadMessageReceived
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentThreadMessageReceived(BetaManagedAgentsAgentThreadMessageReceivedEvent agentThreadMessageReceived)
Delivery event written to the target thread's input stream when an agent-to-agent message arrives.
-
ofAgentThreadMessageSent
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentThreadMessageSent(BetaManagedAgentsAgentThreadMessageSentEvent agentThreadMessageSent)
Observability event emitted to the sender's output stream when an agent-to-agent message is sent.
-
ofAgentThreadContextCompacted
final static BetaManagedAgentsStreamSessionThreadEvents ofAgentThreadContextCompacted(BetaManagedAgentsAgentThreadContextCompactedEvent agentThreadContextCompacted)
Indicates that context compaction (summarization) occurred during the session.
-
ofSessionError
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionError(BetaManagedAgentsSessionErrorEvent sessionError)
An error event indicating a problem occurred during session execution.
-
ofSessionStatusRescheduled
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionStatusRescheduled(BetaManagedAgentsSessionStatusRescheduledEvent sessionStatusRescheduled)
Indicates the session is recovering from an error state and is rescheduled for execution.
-
ofSessionStatusRunning
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionStatusRunning(BetaManagedAgentsSessionStatusRunningEvent sessionStatusRunning)
Indicates the session is actively running and the agent is working.
-
ofSessionStatusIdle
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionStatusIdle(BetaManagedAgentsSessionStatusIdleEvent sessionStatusIdle)
Indicates the agent has paused and is awaiting user input.
-
ofSessionStatusTerminated
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionStatusTerminated(BetaManagedAgentsSessionStatusTerminatedEvent sessionStatusTerminated)
Indicates the session has terminated, either due to an error or completion.
-
ofSessionThreadCreated
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionThreadCreated(BetaManagedAgentsSessionThreadCreatedEvent sessionThreadCreated)
Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.
-
ofSpanOutcomeEvaluationStart
final static BetaManagedAgentsStreamSessionThreadEvents ofSpanOutcomeEvaluationStart(BetaManagedAgentsSpanOutcomeEvaluationStartEvent spanOutcomeEvaluationStart)
Emitted when an outcome evaluation cycle begins.
-
ofSpanOutcomeEvaluationEnd
final static BetaManagedAgentsStreamSessionThreadEvents ofSpanOutcomeEvaluationEnd(BetaManagedAgentsSpanOutcomeEvaluationEndEvent spanOutcomeEvaluationEnd)
Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of
needs_revisionmeans another evaluation cycle follows;satisfied,max_iterations_reached,failed, orinterruptedare terminal — no further evaluation cycles follow.
-
ofSpanModelRequestStart
final static BetaManagedAgentsStreamSessionThreadEvents ofSpanModelRequestStart(BetaManagedAgentsSpanModelRequestStartEvent spanModelRequestStart)
Emitted when a model request is initiated by the agent.
-
ofSpanModelRequestEnd
final static BetaManagedAgentsStreamSessionThreadEvents ofSpanModelRequestEnd(BetaManagedAgentsSpanModelRequestEndEvent spanModelRequestEnd)
Emitted when a model request completes.
-
ofSpanOutcomeEvaluationOngoing
final static BetaManagedAgentsStreamSessionThreadEvents ofSpanOutcomeEvaluationOngoing(BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent spanOutcomeEvaluationOngoing)
Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding
span.outcome_evaluation_startandspan.outcome_evaluation_endevents.
-
ofUserDefineOutcome
final static BetaManagedAgentsStreamSessionThreadEvents ofUserDefineOutcome(BetaManagedAgentsUserDefineOutcomeEvent userDefineOutcome)
Echo of a
user.define_outcomeinput event. Carries the server-generatedoutcome_idthat subsequentspan.outcome_evaluation_*events reference.
-
ofSessionDeleted
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionDeleted(BetaManagedAgentsSessionDeletedEvent sessionDeleted)
Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.
-
ofSessionThreadStatusRunning
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionThreadStatusRunning(BetaManagedAgentsSessionThreadStatusRunningEvent sessionThreadStatusRunning)
A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
ofSessionThreadStatusIdle
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionThreadStatusIdle(BetaManagedAgentsSessionThreadStatusIdleEvent sessionThreadStatusIdle)
A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
ofSessionThreadStatusTerminated
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionThreadStatusTerminated(BetaManagedAgentsSessionThreadStatusTerminatedEvent sessionThreadStatusTerminated)
A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
ofUserToolResult
final static BetaManagedAgentsStreamSessionThreadEvents ofUserToolResult(BetaManagedAgentsUserToolResultEvent userToolResult)
Event sent by the client providing the result of an agent-toolset tool execution. Only valid on
self_hostedenvironments, where sandbox-routed tools are executed by the client rather than the server.
-
ofSessionThreadStatusRescheduled
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionThreadStatusRescheduled(BetaManagedAgentsSessionThreadStatusRescheduledEvent sessionThreadStatusRescheduled)
A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.
-
ofSessionUpdated
final static BetaManagedAgentsStreamSessionThreadEvents ofSessionUpdated(BetaManagedAgentsSessionUpdatedEvent sessionUpdated)
Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.
-
ofSystemMessage
final static BetaManagedAgentsStreamSessionThreadEvents ofSystemMessage(BetaManagedAgentsSystemMessageEvent systemMessage)
A mid-conversation system message event. Carries system-role content that is appended to the session as a
role: "system"turn.
-
-
-
-