Class BetaManagedAgentsAgentCustomToolUseEvent
-
- All Implemented Interfaces:
public final class BetaManagedAgentsAgentCustomToolUseEventEvent emitted when the agent calls a custom tool. The session goes idle until the client sends a
user.custom_tool_resultevent with the result. The client can send it as soon as this event arrives, without waiting forsession.status_idle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsAgentCustomToolUseEvent.BuilderA builder for BetaManagedAgentsAgentCustomToolUseEvent.
public final classBetaManagedAgentsAgentCustomToolUseEvent.InputInput parameters for the tool call.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this event. final BetaManagedAgentsAgentCustomToolUseEvent.Inputinput()Input parameters for the tool call. final Stringname()Name of the custom tool being called. final OffsetDateTimeprocessedAt()Timestamp when this tool use was processed. final Optional<String>sessionThreadId()When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("agent.custom_tool_use")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<BetaManagedAgentsAgentCustomToolUseEvent.Input>_input()Returns the raw JSON value of input. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<OffsetDateTime>_processedAt()Returns the raw JSON value of processedAt. final JsonField<String>_sessionThreadId()Returns the raw JSON value of sessionThreadId. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsAgentCustomToolUseEvent.BuildertoBuilder()final BetaManagedAgentsAgentCustomToolUseEventvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsAgentCustomToolUseEvent.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsAgentCustomToolUseEvent. -
-
Method Detail
-
input
final BetaManagedAgentsAgentCustomToolUseEvent.Input input()
Input parameters for the tool call.
-
processedAt
final OffsetDateTime processedAt()
Timestamp when this tool use was processed.
-
sessionThreadId
final Optional<String> sessionThreadId()
When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching
user.custom_tool_resultbycustom_tool_use_id, so clients do not send it back.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("agent.custom_tool_use")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_input
final JsonField<BetaManagedAgentsAgentCustomToolUseEvent.Input> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_processedAt
final JsonField<OffsetDateTime> _processedAt()
Returns the raw JSON value of processedAt.
Unlike processedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_sessionThreadId
final JsonField<String> _sessionThreadId()
Returns the raw JSON value of sessionThreadId.
Unlike sessionThreadId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsAgentCustomToolUseEvent.Builder toBuilder()
-
validate
final BetaManagedAgentsAgentCustomToolUseEvent 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.
-
builder
final static BetaManagedAgentsAgentCustomToolUseEvent.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsAgentCustomToolUseEvent.
The following fields are required:
.id() .input() .name() .processedAt()
-
-
-
-