Class: Anthropic::Models::Beta::SessionCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::SessionCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/anthropic/models/beta/session_create_params.rb,
sig/anthropic/models/beta/session_create_params.rbs
Overview
Defined Under Namespace
Modules: Agent, InitialEvent, Resource
Instance Attribute Summary collapse
-
#agent ⇒ Anthropic::Models::Beta::BetaManagedAgentsAgentParams, ...
Agent identifier.
-
#betas ⇒ Array<Symbol, String, Anthropic::Models::AnthropicBeta>?
This endpoint is in beta: requests must send
managed-agents-2026-04-01in this header. -
#budget ⇒ Anthropic::Models::Beta::BetaManagedAgentsBudgetLimit?
Enforced spend ceiling for the session.
-
#environment_id ⇒ String
ID of the
environmentdefining the container configuration for this session. -
#initial_events ⇒ Array<Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserMessageEventParams, Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserDefineOutcomeEventParams>?
Initial events to send to the
sessionat creation, processed in order. -
#metadata ⇒ Hash{Symbol=>String}?
Arbitrary key-value metadata attached to the session.
-
#resources ⇒ Array<Anthropic::Models::Beta::BetaManagedAgentsGitHubRepositoryResourceParams, Anthropic::Models::Beta::BetaManagedAgentsFileResourceParams, Anthropic::Models::Beta::BetaManagedAgentsMemoryStoreResourceParam>?
Resources (e.g. repositories, files) to mount into the session's container.
-
#title ⇒ String?
Human-readable session title.
-
#vault_ids ⇒ Array<String>?
Vault IDs for stored credentials the agent can use during the session.
-
#workspace_id ⇒ String?
Optional header to select the Workspace for this request.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(agent:, environment_id:, budget: nil, initial_events: nil, metadata: nil, resources: nil, title: nil, vault_ids: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ SessionCreateParams
constructor
Some parameter documentations has been truncated, see SessionCreateParams for more details.
- #to_hash ⇒ { agent: Anthropic::Models::Beta::SessionCreateParams::agent, environment_id: String, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit, initial_events: ::Array[Anthropic::Models::Beta::SessionCreateParams::initial_event], metadata: ::Hash[Symbol, String], resources: ::Array[Anthropic::Models::Beta::SessionCreateParams::resource], title: String?, vault_ids: ::Array[String], betas: ::Array[Anthropic::Models::anthropic_beta], workspace_id: String, request_options: Anthropic::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(agent:, environment_id:, budget: nil, initial_events: nil, metadata: nil, resources: nil, title: nil, vault_ids: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ SessionCreateParams
Some parameter documentations has been truncated, see Anthropic::Models::Beta::SessionCreateParams for more details.
|
|
# File 'lib/anthropic/models/beta/session_create_params.rb', line 85
|
Instance Attribute Details
#agent ⇒ Anthropic::Models::Beta::BetaManagedAgentsAgentParams, ...
Agent identifier. Accepts the agent ID string, which pins the latest version
for the session, or an agent object with both id and version specified.
16 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 16 required :agent, union: -> { Anthropic::Beta::SessionCreateParams::Agent } |
#betas ⇒ Array<Symbol, String, Anthropic::Models::AnthropicBeta>?
This endpoint is in beta: requests must send managed-agents-2026-04-01 in this
header.
72 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 72 optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] } |
#budget ⇒ Anthropic::Models::Beta::BetaManagedAgentsBudgetLimit?
Enforced spend ceiling for the session. Omit to create an uncapped session.
Every model the session can run — the agent's model and each callable agent's
model — must have a public list price, or the request is rejected with reason
model_not_budgetable.
31 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 31 optional :budget, -> { Anthropic::Beta::BetaManagedAgentsBudgetLimit } |
#environment_id ⇒ String
ID of the environment defining the container configuration for this session.
22 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 22 required :environment_id, String |
#initial_events ⇒ Array<Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserMessageEventParams, Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserDefineOutcomeEventParams>?
Initial events to send to the session at creation, processed in order.
Supports user.message and user.define_outcome events. Maximum 50 events.
38 39 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 38 optional :initial_events, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::SessionCreateParams::InitialEvent] } |
#metadata ⇒ Hash{Symbol=>String}?
Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
46 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 46 optional :metadata, Anthropic::Internal::Type::HashOf[String] |
#resources ⇒ Array<Anthropic::Models::Beta::BetaManagedAgentsGitHubRepositoryResourceParams, Anthropic::Models::Beta::BetaManagedAgentsFileResourceParams, Anthropic::Models::Beta::BetaManagedAgentsMemoryStoreResourceParam>?
Resources (e.g. repositories, files) to mount into the session's container.
52 53 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 52 optional :resources, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::SessionCreateParams::Resource] } |
#title ⇒ String?
Human-readable session title.
59 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 59 optional :title, String, nil?: true |
#vault_ids ⇒ Array<String>?
Vault IDs for stored credentials the agent can use during the session.
65 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 65 optional :vault_ids, Anthropic::Internal::Type::ArrayOf[String] |
#workspace_id ⇒ String?
Optional header to select the Workspace for this request. The value is a
Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).
Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.
83 |
# File 'lib/anthropic/models/beta/session_create_params.rb', line 83 optional :workspace_id, String |
Class Method Details
.variants ⇒ Array(Anthropic::Models::Beta::BetaManagedAgentsAgentParams, Anthropic::Models::Beta::BetaManagedAgentsAgentWithOverridesParams, String)
|
|
# File 'lib/anthropic/models/beta/session_create_params.rb', line 124
|
Instance Method Details
#to_hash ⇒ { agent: Anthropic::Models::Beta::SessionCreateParams::agent, environment_id: String, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit, initial_events: ::Array[Anthropic::Models::Beta::SessionCreateParams::initial_event], metadata: ::Hash[Symbol, String], resources: ::Array[Anthropic::Models::Beta::SessionCreateParams::resource], title: String?, vault_ids: ::Array[String], betas: ::Array[Anthropic::Models::anthropic_beta], workspace_id: String, request_options: Anthropic::RequestOptions }
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'sig/anthropic/models/beta/session_create_params.rbs', line 79
def to_hash: -> {
agent: Anthropic::Models::Beta::SessionCreateParams::agent,
environment_id: String,
budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit,
initial_events: ::Array[Anthropic::Models::Beta::SessionCreateParams::initial_event],
metadata: ::Hash[Symbol, String],
resources: ::Array[Anthropic::Models::Beta::SessionCreateParams::resource],
title: String?,
vault_ids: ::Array[String],
betas: ::Array[Anthropic::Models::anthropic_beta],
workspace_id: String,
request_options: Anthropic::RequestOptions
}
|