Class: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadCreatedEvent

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

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_name:, processed_at:, session_thread_id:, workflow_run_id:, type: :"session.thread_created") ⇒ BetaManagedAgentsSessionThreadCreatedEvent

Emitted when a child thread is created. Written to the parent thread's output stream so clients observing the session see child creation.

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

Parameters:

  • id (String) —

    Unique identifier for this event.

  • agent_name (String) —

    Name of the callable agent the thread runs.

  • processed_at (Time) —

    Timestamp when the thread was created.

  • session_thread_id (String) —

    Public sthr_ ID of the newly created thread.

  • workflow_run_id (String, nil) —

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

  • type (Symbol, :"session.thread_created") (defaults to: :"session.thread_created")
  • id: (String)
  • agent_name: (String)
  • processed_at: (Time)
  • session_thread_id: (String)
  • workflow_run_id: (String, nil)
  • type: (:"session.thread_created") (defaults to: :"session.thread_created")


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

Instance Attribute Details

#agent_name ⇒ String

Name of the callable agent the thread runs.

Parameters:

  • value (String)

Returns:

  • (String)


18
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rb', line 18

required :agent_name, String

#id ⇒ String

Unique identifier for this event.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rb', line 12

required :id, String

#processed_at ⇒ Time

Timestamp when the thread was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


24
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rb', line 24

required :processed_at, Time

#session_thread_id ⇒ String

Public sthr_ ID of the newly created thread.

Parameters:

  • value (String)

Returns:

  • (String)


30
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rb', line 30

required :session_thread_id, String

#type ⇒ Symbol, :"session.thread_created"

Parameters:

  • value (:"session.thread_created")

Returns:

  • (Symbol, :"session.thread_created")


35
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rb', line 35

required :type, const: :"session.thread_created"

#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)


42
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rb', line 42

required :workflow_run_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { id: String, agent_name: String, processed_at: Time, session_thread_id: String, type: :"session.thread_created", workflow_run_id: String? }

Returns:

  • ({ id: String, agent_name: String, processed_at: Time, session_thread_id: String, type: :"session.thread_created", workflow_run_id: String? })


37
38
39
40
41
42
43
44
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_session_thread_created_event.rbs', line 37

def to_hash: -> {
  id: String,
  agent_name: String,
  processed_at: Time,
  session_thread_id: String,
  type: :"session.thread_created",
  workflow_run_id: String?
}