Class: Cadenya::Models::ObjectiveCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/cadenya/models/objective_create_params.rb,
sig/cadenya/models/objective_create_params.rbs

Overview

See Also:

  • Cadenya::Resources::Objectives#create

Defined Under Namespace

Classes: EpisodicMemory, Secret

Constant Summary collapse

Cadenya =

Returns:

  • (:CreateOperationMetadata)

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(key:) ⇒ Object

Some parameter documentations has been truncated, see EpisodicMemory for more details.

Episodic is used to configure the episodic memory for the objective

Parameters:

  • key (String)

    The caller-supplied episodic key. Objectives created with the same key



# File 'lib/cadenya/models/objective_create_params.rb', line 168

Instance Attribute Details

#agent_idString

Parameters:

  • value (String)

Returns:

  • (String)


18
# File 'lib/cadenya/models/objective_create_params.rb', line 18

required :agent_id, String, api_name: :agentId

#episodic_memoryCadenya::Models::ObjectiveCreateParams::EpisodicMemory?

Episodic is used to configure the episodic memory for the objective



34
35
36
# File 'lib/cadenya/models/objective_create_params.rb', line 34

optional :episodic_memory,
-> { Cadenya::ObjectiveCreateParams::EpisodicMemory },
api_name: :episodicMemory

#first_user_messageString?

Optional explicit first user message for the LLM chat history. When not set, the selected variation's first_user_message_template is rendered with first_user_message_data instead. If neither this field nor a first_user_message_template is present, the request is rejected with InvalidArgument.

Parameters:

  • (String)

Returns:

  • (String, nil)


46
# File 'lib/cadenya/models/objective_create_params.rb', line 46

optional :first_user_message, String, api_name: :firstUserMessage

#first_user_message_dataHash{Symbol=>Object}?

Arbitrary data rendered into the selected variation's first_user_message_template (liquid) to produce the first user message. Separate from system_prompt_data, which renders the system prompt template.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


54
55
56
# File 'lib/cadenya/models/objective_create_params.rb', line 54

optional :first_user_message_data,
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
api_name: :firstUserMessageData

#memory_cascadeArray<Cadenya::Models::MemoryReference>?

Memory layers/entries layered over the baseline cascade inherited from the selected variation — element-level rules over inherited styles, in CSS terms.

Array order is resolution order: EARLIER elements are more specific and are consulted first. Entries pinned via memory_entry_id behave as single-entry layers at their position.

System-managed layers (e.g., episodic) cannot be referenced here; they attach themselves automatically based on the episodic key.

Size cap: the TOTAL effective cascade (this field + the variation's memory layer assignments) must not exceed 10 entries. A request that would produce a larger cascade is rejected with InvalidArgument.

Returns:



74
75
76
# File 'lib/cadenya/models/objective_create_params.rb', line 74

optional :memory_cascade,
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
api_name: :memoryCascade

#metadataCadenya::Models::CreateOperationMetadata?

CreateOperationMetadata contains the user-provided fields for creating an operation. Read-only fields (id, account_id, workspace_id, created_at, profile_id) are excluded since they are set by the server.



84
# File 'lib/cadenya/models/objective_create_params.rb', line 84

optional :metadata, -> { Cadenya::CreateOperationMetadata }

#pinned_parametersHash{Symbol=>String}?

Parameters forced onto this objective's tool calls. A pinned parameter is an overlay on a tool's JSON schema: the parameter is removed from what the LLM sees, and its value is always overwritten server-side with the pinned value — the model cannot choose a different value for it.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


93
# File 'lib/cadenya/models/objective_create_params.rb', line 93

optional :pinned_parameters, Cadenya::Internal::Type::HashOf[String], api_name: :pinnedParameters

#secretsArray<Cadenya::Models::ObjectiveCreateParams::Secret>?

Secrets that can be used in the headers for tool calls using the secret interpolation format.



100
# File 'lib/cadenya/models/objective_create_params.rb', line 100

optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveCreateParams::Secret] }

#subjectCadenya::Models::SubjectAssertion?

SubjectAssertion identifies a person within a tenant in the customer's own namespace — typically their user id. Asserting a subject upserts the subject record under the asserted tenant and associates the created resource with it. A subject assertion is only valid alongside a tenant assertion: subject identifiers are scoped to their tenant.



110
# File 'lib/cadenya/models/objective_create_params.rb', line 110

optional :subject, -> { Cadenya::SubjectAssertion }

#system_prompt_dataHash{Symbol=>Object}

Arbitrary data rendered into the selected variation's system_prompt_template (liquid) to produce the objective's system prompt. If the agent has a system_prompt_data_schema, this must satisfy it.

Parameters:

  • value (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object})


26
27
28
# File 'lib/cadenya/models/objective_create_params.rb', line 26

required :system_prompt_data,
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
api_name: :systemPromptData

#tenantCadenya::Models::TenantAssertion?

TenantAssertion identifies a tenant in the customer's own namespace — their org, company, or team identifier for an end user. Asserting a tenant upserts the tenant record in the workspace (keyed on id as the tenant's external_id) and associates the created resource with it.



119
# File 'lib/cadenya/models/objective_create_params.rb', line 119

optional :tenant, -> { Cadenya::TenantAssertion }

#variation_idString?

Optional explicit variation selection. Overrides the agent's variation_selection_mode.

Parameters:

  • (String)

Returns:

  • (String, nil)


126
# File 'lib/cadenya/models/objective_create_params.rb', line 126

optional :variation_id, String, api_name: :variationId

#workspace_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


13
# File 'lib/cadenya/models/objective_create_params.rb', line 13

optional :workspace_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


98
# File 'sig/cadenya/models/objective_create_params.rbs', line 98

def to_hash: -> {