Class BetaManagedAgentsSessionThread
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionThreadAn execution thread within a
session. Each session has one primary thread plus zero or more child threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsSessionThread.BuilderA builder for BetaManagedAgentsSessionThread.
public final classBetaManagedAgentsSessionThread.AgentResolved agent definition for this thread. Snapshot of the agent at thread creation time.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this thread. final BetaManagedAgentsSessionThread.Agentagent()Resolved agent definition for this thread. final Optional<OffsetDateTime>archivedAt()When the thread was archived. final OffsetDateTimecreatedAt()When the thread was created. final Optional<String>parentThreadId()Parent thread that spawned this thread. final StringsessionId()The session this thread belongs to. final Optional<BetaManagedAgentsSessionThreadStats>stats()Timing statistics for this thread. final BetaManagedAgentsSessionThreadStatusstatus()Current execution status of the thread. final OffsetDateTimeupdatedAt()When the thread was last updated. final Optional<BetaManagedAgentsSessionThreadUsage>usage()Cumulative token usage for this thread. final Optional<String>workflowRunId()Identifier of the workflow run that created the thread, or nullfor any other thread.final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("session_thread")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<BetaManagedAgentsSessionThread.Agent>_agent()Returns the raw JSON value of agent. final JsonField<OffsetDateTime>_archivedAt()Returns the raw JSON value of archivedAt. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<String>_parentThreadId()Returns the raw JSON value of parentThreadId. final JsonField<String>_sessionId()Returns the raw JSON value of sessionId. final JsonField<BetaManagedAgentsSessionThreadStats>_stats()Returns the raw JSON value of stats. final JsonField<BetaManagedAgentsSessionThreadStatus>_status()Returns the raw JSON value of status. final JsonField<OffsetDateTime>_updatedAt()Returns the raw JSON value of updatedAt. final JsonField<BetaManagedAgentsSessionThreadUsage>_usage()Returns the raw JSON value of usage. final JsonField<String>_workflowRunId()Returns the raw JSON value of workflowRunId. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsSessionThread.BuildertoBuilder()final BetaManagedAgentsSessionThreadvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsSessionThread.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionThread. -
-
Method Detail
-
agent
final BetaManagedAgentsSessionThread.Agent agent()
Resolved agent definition for this thread. Snapshot of the agent at thread creation time.
-
archivedAt
final Optional<OffsetDateTime> archivedAt()
When the thread was archived. Null if not archived.
-
createdAt
final OffsetDateTime createdAt()
When the thread was created.
-
parentThreadId
final Optional<String> parentThreadId()
Parent thread that spawned this thread. Null for the primary thread.
-
stats
final Optional<BetaManagedAgentsSessionThreadStats> stats()
Timing statistics for this thread. Null until the thread's first status transition.
-
status
final BetaManagedAgentsSessionThreadStatus status()
Current execution status of the thread.
-
updatedAt
final OffsetDateTime updatedAt()
When the thread was last updated.
-
usage
final Optional<BetaManagedAgentsSessionThreadUsage> usage()
Cumulative token usage for this thread. Null until the thread's first idle transition.
-
workflowRunId
final Optional<String> workflowRunId()
Identifier of the workflow run that created the thread, or
nullfor any other thread.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("session_thread")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.
-
_agent
final JsonField<BetaManagedAgentsSessionThread.Agent> _agent()
Returns the raw JSON value of agent.
Unlike agent, this method doesn't throw if the JSON field has an unexpected type.
-
_archivedAt
final JsonField<OffsetDateTime> _archivedAt()
Returns the raw JSON value of archivedAt.
Unlike archivedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<OffsetDateTime> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_parentThreadId
final JsonField<String> _parentThreadId()
Returns the raw JSON value of parentThreadId.
Unlike parentThreadId, this method doesn't throw if the JSON field has an unexpected type.
-
_sessionId
final JsonField<String> _sessionId()
Returns the raw JSON value of sessionId.
Unlike sessionId, this method doesn't throw if the JSON field has an unexpected type.
-
_stats
final JsonField<BetaManagedAgentsSessionThreadStats> _stats()
Returns the raw JSON value of stats.
Unlike stats, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<BetaManagedAgentsSessionThreadStatus> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_updatedAt
final JsonField<OffsetDateTime> _updatedAt()
Returns the raw JSON value of updatedAt.
Unlike updatedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<BetaManagedAgentsSessionThreadUsage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_workflowRunId
final JsonField<String> _workflowRunId()
Returns the raw JSON value of workflowRunId.
Unlike workflowRunId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsSessionThread.Builder toBuilder()
-
validate
final BetaManagedAgentsSessionThread 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 BetaManagedAgentsSessionThread.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionThread.
The following fields are required:
.id() .agent() .archivedAt() .createdAt() .parentThreadId() .sessionId() .stats() .status() .updatedAt() .usage() .workflowRunId()
-
-
-
-