Class: Cadenya::Models::AgentSpec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::AgentSpec
- Defined in:
- lib/cadenya/models/agent_spec.rb,
sig/cadenya/models/agent_spec.rbs
Defined Under Namespace
Modules: VariationSelectionMode
Instance Attribute Summary collapse
-
#description ⇒ String?
Description of the agent's purpose.
-
#enable_episodic_memory ⇒ Boolean?
Enable episodic memory for objectives created for this agent.
-
#episodic_memory_ttl ⇒ Integer?
How long episodic memories should be retained.
-
#output_definition ⇒ Hash{Symbol=>Object}?
Optional output definition for objectives created for this agent.
-
#system_prompt_data_schema ⇒ Hash{Symbol=>Object}?
SystemPromptDataSchema enforces the shape of system_prompt_data when objectives are created.
-
#variation_selection_mode ⇒ Symbol, Cadenya::Models::AgentSpec::VariationSelectionMode
Controls how variations are automatically selected when creating objectives Defaults to RANDOM when unspecified.
-
#webhook_events_url ⇒ String?
The URL that Cadenya will send events for any objective assigned to the agent.
Instance Method Summary collapse
-
#initialize(variation_selection_mode:, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, output_definition: nil, system_prompt_data_schema: nil, webhook_events_url: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see AgentSpec for more details.
- #to_hash ⇒ {
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(variation_selection_mode:, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, output_definition: nil, system_prompt_data_schema: nil, webhook_events_url: nil) ⇒ Object
Some parameter documentations has been truncated, see Cadenya::Models::AgentSpec for more details.
Agent specification (user-provided configuration)
|
|
# File 'lib/cadenya/models/agent_spec.rb', line 69
|
Instance Attribute Details
#description ⇒ String?
Description of the agent's purpose
19 |
# File 'lib/cadenya/models/agent_spec.rb', line 19 optional :description, String |
#enable_episodic_memory ⇒ Boolean?
Enable episodic memory for objectives created for this agent. When true, objective creation requires an episodic_memory key and the system finds or creates a memory layer for that (agent, key) pair, letting the agent store and retrieve memories across objectives that share the key. Memory is agent-level so all variations of the agent share the same layers.
29 |
# File 'lib/cadenya/models/agent_spec.rb', line 29 optional :enable_episodic_memory, Cadenya::Internal::Type::Boolean, api_name: :enableEpisodicMemory |
#episodic_memory_ttl ⇒ Integer?
How long episodic memories should be retained. Each new objective slides the layer's expiry forward by this duration, and stored entries expire this long after they are written. If not set, episodic memories are retained indefinitely.
37 |
# File 'lib/cadenya/models/agent_spec.rb', line 37 optional :episodic_memory_ttl, Integer, api_name: :episodicMemoryTtl |
#output_definition ⇒ Hash{Symbol=>Object}?
Optional output definition for objectives created for this agent. When provided, Cadenya will append a tool to that will be called by the LLM in use by the variant to extract information in the format provided here. Use this option when you want structured data to be created by your objectives.
46 47 48 |
# File 'lib/cadenya/models/agent_spec.rb', line 46 optional :output_definition, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown], api_name: :outputDefinition |
#system_prompt_data_schema ⇒ Hash{Symbol=>Object}?
SystemPromptDataSchema enforces the shape of system_prompt_data when objectives are created. This is valuable when using liquid formatting in agent variation system prompt templates. The schema is also used when the agent is attached as a sub-agent, as it becomes the tool's input parameter schema. If omitted, the sub-agent schema will be loaded with a simple "prompt" free text string as its schema.
59 60 61 |
# File 'lib/cadenya/models/agent_spec.rb', line 59 optional :system_prompt_data_schema, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown], api_name: :systemPromptDataSchema |
#variation_selection_mode ⇒ Symbol, Cadenya::Models::AgentSpec::VariationSelectionMode
Controls how variations are automatically selected when creating objectives Defaults to RANDOM when unspecified
11 12 13 |
# File 'lib/cadenya/models/agent_spec.rb', line 11 required :variation_selection_mode, enum: -> { Cadenya::AgentSpec::VariationSelectionMode }, api_name: :variationSelectionMode |
#webhook_events_url ⇒ String?
The URL that Cadenya will send events for any objective assigned to the agent.
67 |
# File 'lib/cadenya/models/agent_spec.rb', line 67 optional :webhook_events_url, String, api_name: :webhookEventsUrl |
Instance Method Details
#to_hash ⇒ {
53 |
# File 'sig/cadenya/models/agent_spec.rbs', line 53
def to_hash: -> {
|