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: Agent

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:, updated_at:, usage:, workflow_run_id:, type: :session_thread) ⇒ BetaManagedAgentsSessionThread

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

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

Parameters:



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

Instance Attribute Details

#agent ⇒ Anthropic::Models::Beta::BetaManagedAgentsSessionThreadAgent, ...

Resolved agent definition for this thread. Snapshot of the agent at thread creation time.



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

required :agent, union: -> { Anthropic::Beta::Sessions::BetaManagedAgentsSessionThread::Agent }

#archived_at ⇒ Time?

When the thread was archived. Null if not archived.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :archived_at, Time, nil?: true

#created_at ⇒ Time

When the thread was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#id ⇒ String

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_id ⇒ String?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :parent_thread_id, String, nil?: true

#session_id ⇒ String

The session this thread belongs to.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :session_id, String

#stats ⇒ Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadStats?

Timing statistics for this thread. Null until the thread's first status transition.

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

#status ⇒ Symbol, Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadStatus

Current execution status of the thread.

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 }

#type ⇒ Symbol, :session_thread

Parameters:

  • value (:session_thread)

Returns:

  • (Symbol, :session_thread)


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

required :type, const: :session_thread

#updated_at ⇒ Time

When the thread was last updated.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :updated_at, Time

#usage ⇒ Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadUsage?

Cumulative token usage for this thread. Null until the thread's first idle transition.

Parameters:

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

Returns:



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

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

#workflow_run_id ⇒ String?

Identifier of the workflow run that created the thread, or null for any other thread.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :workflow_run_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { id: String, agent: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread::agent, archived_at: Time?, created_at: Time, parent_thread_id: String?, session_id: String, stats: Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadStats?, status: Anthropic::Models::Beta::Sessions::beta_managed_agents_session_thread_status, type: :session_thread, updated_at: Time, usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadUsage?, workflow_run_id: String? }

Returns:

  • ({ id: String, agent: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread::agent, archived_at: Time?, created_at: Time, parent_thread_id: String?, session_id: String, stats: Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadStats?, status: Anthropic::Models::Beta::Sessions::beta_managed_agents_session_thread_status, type: :session_thread, updated_at: Time, usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadUsage?, workflow_run_id: String? })


61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_session_thread.rbs', line 61

def to_hash: -> {
  id: String,
  agent: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThread::agent,
  archived_at: Time?,
  created_at: Time,
  parent_thread_id: String?,
  session_id: String,
  stats: Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadStats?,
  status: Anthropic::Models::Beta::Sessions::beta_managed_agents_session_thread_status,
  type: :session_thread,
  updated_at: Time,
  usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionThreadUsage?,
  workflow_run_id: String?
}