Class: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb,
sig/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Sessions::Threads#retrieve

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, agent:, archived_at:, created_at:, parent_thread_id:, session_id:, stats:, status:, type:, updated_at:, usage:) ⇒ Object

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread for more details.

An execution thread within a session. Each session has one primary thread plus zero or more child threads spawned by the coordinator.

Parameters:



# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 76

Instance Attribute Details

#agentAnthropic::Models::Beta::BetaManagedAgentsSessionThreadAgent

Resolved agent definition for a single session_thread. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from Session.agent.

Parameters:

  • value (Anthropic::Beta::BetaManagedAgentsSessionThreadAgent)

Returns:



21
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 21

required :agent, -> { Anthropic::Beta::BetaManagedAgentsSessionThreadAgent }

#archived_atTime?

A timestamp in RFC 3339 format

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


27
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 27

required :archived_at, Time, nil?: true

#created_atTime

A timestamp in RFC 3339 format

Parameters:

  • value (Time)

Returns:

  • (Time)


33
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 33

required :created_at, Time

#idString

Unique identifier for this thread.

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 13

required :id, String

#parent_thread_idString?

Parent thread that spawned this thread. Null for the primary thread.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


39
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 39

required :parent_thread_id, String, nil?: true

#session_idString

The session this thread belongs to.

Parameters:

  • value (String)

Returns:

  • (String)


45
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 45

required :session_id, String

#statsAnthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadStats?

Timing statistics for a session thread.

Parameters:

  • value (Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadStats, nil)

Returns:



51
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 51

required :stats, -> { Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadStats }, nil?: true

#statusSymbol, Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadStatus

SessionThreadStatus enum

Parameters:

  • value (Anthropic::Models::Beta::Sessions::beta_managed_agents_session_thread_status)

Returns:



57
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 57

required :status, enum: -> { Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadStatus }

#typeSymbol, Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread::Type

Parameters:

  • value (Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread::type_)

Returns:



62
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 62

required :type, enum: -> { Anthropic::Beta::Sessions::BetaManagedAgentsSessionThread::Type }

#updated_atTime

A timestamp in RFC 3339 format

Parameters:

  • value (Time)

Returns:

  • (Time)


68
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 68

required :updated_at, Time

#usageAnthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadUsage?

Cumulative token usage for a session thread across all turns.

Parameters:

  • value (Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadUsage, nil)

Returns:



74
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rb', line 74

required :usage, -> { Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadUsage }, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


57
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rbs', line 57

def to_hash: -> {