cadenya 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/cadenya/models/agent_spec.rb +16 -15
- data/lib/cadenya/models/agents/agent_schedule_spec.rb +21 -20
- data/lib/cadenya/models/agents/agent_variation_spec.rb +16 -14
- data/lib/cadenya/models/objective.rb +18 -16
- data/lib/cadenya/models/objective_create_params.rb +28 -25
- data/lib/cadenya/resources/objectives.rb +5 -5
- data/lib/cadenya/version.rb +1 -1
- data/rbi/cadenya/models/agent_spec.rbi +23 -19
- data/rbi/cadenya/models/agents/agent_schedule_spec.rbi +38 -36
- data/rbi/cadenya/models/agents/agent_variation_spec.rbi +25 -21
- data/rbi/cadenya/models/objective.rbi +24 -24
- data/rbi/cadenya/models/objective_create_params.rbi +39 -37
- data/rbi/cadenya/resources/objectives.rbi +16 -15
- data/sig/cadenya/models/agent_spec.rbs +9 -7
- data/sig/cadenya/models/agents/agent_schedule_spec.rbs +15 -15
- data/sig/cadenya/models/agents/agent_variation_spec.rbs +7 -7
- data/sig/cadenya/models/objective.rbs +14 -14
- data/sig/cadenya/models/objective_create_params.rbs +16 -16
- data/sig/cadenya/resources/objectives.rbs +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf555cd84ae5279087a5b60695fec05f03451abbb21cc910c5e85cb1ed52c56e
|
|
4
|
+
data.tar.gz: b7662e178b9f76f9e044bdff89f57bb78a75fd58ef92c9f7ac4c75ed45aef3a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb71eb5d8238a2f9d63ceadf1ebd77230fbed22f146eada9da0abeb2b578128646b6bbe3feaaf4cc179d5e894cd9c94ab96f413cbf63cbf72ebe94e1b6d42c66
|
|
7
|
+
data.tar.gz: 4bb21c37969a3c091aa854523f4e45e323ad513f299b384978befb9d975ad442b0ad24c0c064ae1ff41ec9b1cb781c92ce1bd744531504707ec912e79a4f800c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.28.0 (2026-07-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.27.0...v0.28.0](https://github.com/cadenya/cadenya-ruby/compare/v0.27.0...v0.28.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([c9dc7c5](https://github.com/cadenya/cadenya-ruby/commit/c9dc7c5f0fc9da27463add06430456abdaaa7163))
|
|
10
|
+
|
|
3
11
|
## 0.27.0 (2026-07-03)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.26.0...v0.27.0](https://github.com/cadenya/cadenya-ruby/compare/v0.26.0...v0.27.0)
|
data/README.md
CHANGED
|
@@ -36,18 +36,6 @@ module Cadenya
|
|
|
36
36
|
# @return [Integer, nil]
|
|
37
37
|
optional :episodic_memory_ttl, Integer, api_name: :episodicMemoryTtl
|
|
38
38
|
|
|
39
|
-
# @!attribute input_data_schema
|
|
40
|
-
# InputDataSchema is used for enforcing a data input when objectives are created.
|
|
41
|
-
# This is valuable when using liquid formatting in agent variation prompts. Input
|
|
42
|
-
# data schema is also valuable when using an agent as a sub-agent, as the schema
|
|
43
|
-
# is used as the tool's input parameter schema. If omitted, the sub-agent schema
|
|
44
|
-
# will be loaded with a simple "prompt" free text string as its schema.
|
|
45
|
-
#
|
|
46
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
47
|
-
optional :input_data_schema,
|
|
48
|
-
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
49
|
-
api_name: :inputDataSchema
|
|
50
|
-
|
|
51
39
|
# @!attribute output_definition
|
|
52
40
|
# Optional output definition for objectives created for this agent. When provided,
|
|
53
41
|
# Cadenya will append a tool to that will be called by the LLM in use by the
|
|
@@ -59,13 +47,26 @@ module Cadenya
|
|
|
59
47
|
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
60
48
|
api_name: :outputDefinition
|
|
61
49
|
|
|
50
|
+
# @!attribute system_prompt_data_schema
|
|
51
|
+
# SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
|
|
52
|
+
# are created. This is valuable when using liquid formatting in agent variation
|
|
53
|
+
# system prompt templates. The schema is also used when the agent is attached as a
|
|
54
|
+
# sub-agent, as it becomes the tool's input parameter schema. If omitted, the
|
|
55
|
+
# sub-agent schema will be loaded with a simple "prompt" free text string as its
|
|
56
|
+
# schema.
|
|
57
|
+
#
|
|
58
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
59
|
+
optional :system_prompt_data_schema,
|
|
60
|
+
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
61
|
+
api_name: :systemPromptDataSchema
|
|
62
|
+
|
|
62
63
|
# @!attribute webhook_events_url
|
|
63
64
|
# The URL that Cadenya will send events for any objective assigned to the agent.
|
|
64
65
|
#
|
|
65
66
|
# @return [String, nil]
|
|
66
67
|
optional :webhook_events_url, String, api_name: :webhookEventsUrl
|
|
67
68
|
|
|
68
|
-
# @!method initialize(variation_selection_mode:, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil,
|
|
69
|
+
# @!method 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)
|
|
69
70
|
# Some parameter documentations has been truncated, see
|
|
70
71
|
# {Cadenya::Models::AgentSpec} for more details.
|
|
71
72
|
#
|
|
@@ -79,10 +80,10 @@ module Cadenya
|
|
|
79
80
|
#
|
|
80
81
|
# @param episodic_memory_ttl [Integer] How long episodic memories should be retained.
|
|
81
82
|
#
|
|
82
|
-
# @param input_data_schema [Hash{Symbol=>Object}] InputDataSchema is used for enforcing a data input when objectives are created.
|
|
83
|
-
#
|
|
84
83
|
# @param output_definition [Hash{Symbol=>Object}] Optional output definition for objectives created for this agent.
|
|
85
84
|
#
|
|
85
|
+
# @param system_prompt_data_schema [Hash{Symbol=>Object}] SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
|
|
86
|
+
#
|
|
86
87
|
# @param webhook_events_url [String] The URL that Cadenya will send events for any objective assigned to the agent.
|
|
87
88
|
|
|
88
89
|
# Controls how variations are automatically selected when creating objectives
|
|
@@ -12,20 +12,21 @@ module Cadenya
|
|
|
12
12
|
# @return [Cadenya::Models::Agents::AgentScheduleSpecSchedule]
|
|
13
13
|
required :schedule, -> { Cadenya::Agents::AgentScheduleSpecSchedule }
|
|
14
14
|
|
|
15
|
-
# @!attribute
|
|
16
|
-
# Optional
|
|
17
|
-
#
|
|
15
|
+
# @!attribute first_user_message
|
|
16
|
+
# Optional explicit first user message passed to CreateObjective on each fire.
|
|
17
|
+
# Becomes the first user message in the objective's chat history. When unset, the
|
|
18
|
+
# fired objective defers to the selected variation's first_user_message_template.
|
|
18
19
|
#
|
|
19
|
-
# @return [
|
|
20
|
-
optional :
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :first_user_message, String, api_name: :firstUserMessage
|
|
21
22
|
|
|
22
|
-
# @!attribute
|
|
23
|
-
# Optional
|
|
24
|
-
#
|
|
25
|
-
#
|
|
23
|
+
# @!attribute first_user_message_data
|
|
24
|
+
# Optional data rendered into the variation's first_user_message_template when
|
|
25
|
+
# each fired objective is created. Separate from `system_prompt_data`, which
|
|
26
|
+
# renders the system prompt template.
|
|
26
27
|
#
|
|
27
|
-
# @return [
|
|
28
|
-
optional :
|
|
28
|
+
# @return [Object, nil]
|
|
29
|
+
optional :first_user_message_data, Cadenya::Internal::Type::Unknown, api_name: :firstUserMessageData
|
|
29
30
|
|
|
30
31
|
# @!attribute overlap_policy
|
|
31
32
|
# What to do when the previous run is still in flight. Defaults to SKIP.
|
|
@@ -35,13 +36,13 @@ module Cadenya
|
|
|
35
36
|
enum: -> { Cadenya::Agents::AgentScheduleSpec::OverlapPolicy },
|
|
36
37
|
api_name: :overlapPolicy
|
|
37
38
|
|
|
38
|
-
# @!attribute
|
|
39
|
-
# Optional data rendered into the variation's
|
|
40
|
-
# fired objective is created.
|
|
41
|
-
#
|
|
39
|
+
# @!attribute system_prompt_data
|
|
40
|
+
# Optional data rendered into the variation's system_prompt_template when each
|
|
41
|
+
# fired objective is created. If the agent has a system_prompt_data_schema, this
|
|
42
|
+
# must satisfy it.
|
|
42
43
|
#
|
|
43
44
|
# @return [Object, nil]
|
|
44
|
-
optional :
|
|
45
|
+
optional :system_prompt_data, Cadenya::Internal::Type::Unknown, api_name: :systemPromptData
|
|
45
46
|
|
|
46
47
|
# @!attribute variation_id
|
|
47
48
|
# Optional explicit variation. When unset, the agent's variation_selection_mode
|
|
@@ -50,7 +51,7 @@ module Cadenya
|
|
|
50
51
|
# @return [String, nil]
|
|
51
52
|
optional :variation_id, String, api_name: :variationId
|
|
52
53
|
|
|
53
|
-
# @!method initialize(schedule:,
|
|
54
|
+
# @!method initialize(schedule:, first_user_message: nil, first_user_message_data: nil, overlap_policy: nil, system_prompt_data: nil, variation_id: nil)
|
|
54
55
|
# Some parameter documentations has been truncated, see
|
|
55
56
|
# {Cadenya::Models::Agents::AgentScheduleSpec} for more details.
|
|
56
57
|
#
|
|
@@ -58,13 +59,13 @@ module Cadenya
|
|
|
58
59
|
#
|
|
59
60
|
# @param schedule [Cadenya::Models::Agents::AgentScheduleSpecSchedule] Schedule defines WHEN the schedule fires. Temporal-style structured form:
|
|
60
61
|
#
|
|
61
|
-
# @param
|
|
62
|
+
# @param first_user_message [String] Optional explicit first user message passed to CreateObjective on each fire.
|
|
62
63
|
#
|
|
63
|
-
# @param
|
|
64
|
+
# @param first_user_message_data [Object] Optional data rendered into the variation's first_user_message_template when
|
|
64
65
|
#
|
|
65
66
|
# @param overlap_policy [Symbol, Cadenya::Models::Agents::AgentScheduleSpec::OverlapPolicy] What to do when the previous run is still in flight. Defaults to SKIP.
|
|
66
67
|
#
|
|
67
|
-
# @param
|
|
68
|
+
# @param system_prompt_data [Object] Optional data rendered into the variation's system_prompt_template when each
|
|
68
69
|
#
|
|
69
70
|
# @param variation_id [String] Optional explicit variation. When unset, the agent's variation_selection_mode
|
|
70
71
|
|
|
@@ -25,6 +25,17 @@ module Cadenya
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :description, String
|
|
27
27
|
|
|
28
|
+
# @!attribute first_user_message_template
|
|
29
|
+
# Liquid template for the first user message of objectives using this variation.
|
|
30
|
+
# Rendered with CreateObjectiveRequest.first_user_message_data into
|
|
31
|
+
# Objective.first_user_message, the first user message in the LLM chat history.
|
|
32
|
+
# CreateObjectiveRequest.first_user_message, when set, overrides the rendered
|
|
33
|
+
# result. If neither this template nor first_user_message is present, objective
|
|
34
|
+
# creation is rejected with InvalidArgument.
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :first_user_message_template, String, api_name: :firstUserMessageTemplate
|
|
38
|
+
|
|
28
39
|
# @!attribute model_config
|
|
29
40
|
# ModelConfig defines the model configuration for a variation
|
|
30
41
|
#
|
|
@@ -45,21 +56,12 @@ module Cadenya
|
|
|
45
56
|
|
|
46
57
|
# @!attribute system_prompt_template
|
|
47
58
|
# Liquid template for the system prompt of objectives using this variation.
|
|
48
|
-
# Rendered with CreateObjectiveRequest.
|
|
59
|
+
# Rendered with CreateObjectiveRequest.system_prompt_data into
|
|
60
|
+
# Objective.system_prompt.
|
|
49
61
|
#
|
|
50
62
|
# @return [String, nil]
|
|
51
63
|
optional :system_prompt_template, String, api_name: :systemPromptTemplate
|
|
52
64
|
|
|
53
|
-
# @!attribute user_message_template
|
|
54
|
-
# Liquid template for the initial user message of objectives using this variation.
|
|
55
|
-
# Rendered with CreateObjectiveRequest.user_data and becomes the first user
|
|
56
|
-
# message in the LLM chat history. CreateObjectiveRequest.initial_message, when
|
|
57
|
-
# set, overrides the rendered result. If neither this template nor initial_message
|
|
58
|
-
# is present, objective creation is rejected with InvalidArgument.
|
|
59
|
-
#
|
|
60
|
-
# @return [String, nil]
|
|
61
|
-
optional :user_message_template, String, api_name: :userMessageTemplate
|
|
62
|
-
|
|
63
65
|
# @!attribute weight
|
|
64
66
|
# Weight for weighted random selection (>= 0). P(v) = v.weight / sum(all_weights).
|
|
65
67
|
# Only used when the agent's variation_selection_mode is WEIGHTED. A weight of 0
|
|
@@ -69,7 +71,7 @@ module Cadenya
|
|
|
69
71
|
# @return [Integer, nil]
|
|
70
72
|
optional :weight, Integer
|
|
71
73
|
|
|
72
|
-
# @!method initialize(compaction_config: nil, constraints: nil, description: nil,
|
|
74
|
+
# @!method initialize(compaction_config: nil, constraints: nil, description: nil, first_user_message_template: nil, model_config: nil, progressive_discovery: nil, system_prompt_template: nil, weight: nil)
|
|
73
75
|
# Some parameter documentations has been truncated, see
|
|
74
76
|
# {Cadenya::Models::Agents::AgentVariationSpec} for more details.
|
|
75
77
|
#
|
|
@@ -81,14 +83,14 @@ module Cadenya
|
|
|
81
83
|
#
|
|
82
84
|
# @param description [String] Human-readable description of what this variation does or when it should be used
|
|
83
85
|
#
|
|
86
|
+
# @param first_user_message_template [String] Liquid template for the first user message of objectives using this variation.
|
|
87
|
+
#
|
|
84
88
|
# @param model_config [Cadenya::Models::Agents::AgentVariationSpecModelConfig] ModelConfig defines the model configuration for a variation
|
|
85
89
|
#
|
|
86
90
|
# @param progressive_discovery [Cadenya::Models::Agents::AgentVariationSpecProgressiveDiscovery] ProgressiveDiscovery is used to indicate that the agent should automatically dis
|
|
87
91
|
#
|
|
88
92
|
# @param system_prompt_template [String] Liquid template for the system prompt of objectives using this variation.
|
|
89
93
|
#
|
|
90
|
-
# @param user_message_template [String] Liquid template for the initial user message of objectives using this variation.
|
|
91
|
-
#
|
|
92
94
|
# @param weight [Integer] Weight for weighted random selection (>= 0). P(v) = v.weight / sum(all_weights).
|
|
93
95
|
end
|
|
94
96
|
end
|
|
@@ -4,12 +4,12 @@ module Cadenya
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see Cadenya::Resources::Objectives#create
|
|
6
6
|
class Objective < Cadenya::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute
|
|
8
|
-
# The
|
|
9
|
-
# the
|
|
7
|
+
# @!attribute first_user_message
|
|
8
|
+
# The first user message in the LLM chat history, either provided explicitly at
|
|
9
|
+
# creation or rendered from the variation's first_user_message_template.
|
|
10
10
|
#
|
|
11
11
|
# @return [String]
|
|
12
|
-
required :
|
|
12
|
+
required :first_user_message, String, api_name: :firstUserMessage
|
|
13
13
|
|
|
14
14
|
# @!attribute metadata
|
|
15
15
|
# Metadata for ephemeral operations and activities (e.g., objectives, executions,
|
|
@@ -71,11 +71,13 @@ module Cadenya
|
|
|
71
71
|
# @return [String]
|
|
72
72
|
required :system_prompt, String, api_name: :systemPrompt
|
|
73
73
|
|
|
74
|
-
# @!attribute
|
|
75
|
-
# Arbitrary data
|
|
74
|
+
# @!attribute first_user_message_data
|
|
75
|
+
# Arbitrary data rendered into the variation's first_user_message_template
|
|
76
76
|
#
|
|
77
77
|
# @return [Hash{Symbol=>Object}, nil]
|
|
78
|
-
optional :
|
|
78
|
+
optional :first_user_message_data,
|
|
79
|
+
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
80
|
+
api_name: :firstUserMessageData
|
|
79
81
|
|
|
80
82
|
# @!attribute info
|
|
81
83
|
# ObjectiveInfo provides read-only aggregated statistics about an objective's
|
|
@@ -105,16 +107,16 @@ module Cadenya
|
|
|
105
107
|
# @return [String, nil]
|
|
106
108
|
optional :state_message, String, api_name: :stateMessage
|
|
107
109
|
|
|
108
|
-
# @!attribute
|
|
109
|
-
# Arbitrary data
|
|
110
|
+
# @!attribute system_prompt_data
|
|
111
|
+
# Arbitrary data rendered into the variation's system_prompt_template
|
|
110
112
|
#
|
|
111
113
|
# @return [Hash{Symbol=>Object}, nil]
|
|
112
|
-
optional :
|
|
114
|
+
optional :system_prompt_data,
|
|
113
115
|
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
114
|
-
api_name: :
|
|
116
|
+
api_name: :systemPromptData
|
|
115
117
|
end
|
|
116
118
|
|
|
117
|
-
# @!method initialize(config_snapshot:,
|
|
119
|
+
# @!method initialize(config_snapshot:, first_user_message:, metadata:, state:, system_prompt:, episodic_memory: nil, first_user_message_data: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, system_prompt_data: nil)
|
|
118
120
|
# Some parameter documentations has been truncated, see
|
|
119
121
|
# {Cadenya::Models::Objective} for more details.
|
|
120
122
|
#
|
|
@@ -124,7 +126,7 @@ module Cadenya
|
|
|
124
126
|
#
|
|
125
127
|
# @param config_snapshot [Cadenya::Models::ObjectiveConfigSnapshot] ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation, a
|
|
126
128
|
#
|
|
127
|
-
# @param
|
|
129
|
+
# @param first_user_message [String] The first user message in the LLM chat history, either provided explicitly at
|
|
128
130
|
#
|
|
129
131
|
# @param metadata [Cadenya::Models::OperationMetadata] Metadata for ephemeral operations and activities (e.g., objectives, executions,
|
|
130
132
|
#
|
|
@@ -132,10 +134,10 @@ module Cadenya
|
|
|
132
134
|
#
|
|
133
135
|
# @param system_prompt [String] system_prompt is read-only, derived from the selected variation's prompt
|
|
134
136
|
#
|
|
135
|
-
# @param data [Hash{Symbol=>Object}] Arbitrary data for the objective
|
|
136
|
-
#
|
|
137
137
|
# @param episodic_memory [Cadenya::Models::Objective::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
|
|
138
138
|
#
|
|
139
|
+
# @param first_user_message_data [Hash{Symbol=>Object}] Arbitrary data rendered into the variation's first_user_message_template
|
|
140
|
+
#
|
|
139
141
|
# @param info [Cadenya::Models::ObjectiveInfo] ObjectiveInfo provides read-only aggregated statistics about an objective's exec
|
|
140
142
|
#
|
|
141
143
|
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
@@ -148,7 +150,7 @@ module Cadenya
|
|
|
148
150
|
#
|
|
149
151
|
# @param state_message [String] Optional human-readable detail about the current state (e.g. a failure reason).
|
|
150
152
|
#
|
|
151
|
-
# @param
|
|
153
|
+
# @param system_prompt_data [Hash{Symbol=>Object}] Arbitrary data rendered into the variation's system_prompt_template
|
|
152
154
|
|
|
153
155
|
# The current lifecycle state of the objective.
|
|
154
156
|
#
|
|
@@ -17,12 +17,15 @@ module Cadenya
|
|
|
17
17
|
# @return [String]
|
|
18
18
|
required :agent_id, String, api_name: :agentId
|
|
19
19
|
|
|
20
|
-
# @!attribute
|
|
21
|
-
# Arbitrary data
|
|
22
|
-
#
|
|
20
|
+
# @!attribute system_prompt_data
|
|
21
|
+
# Arbitrary data rendered into the selected variation's system_prompt_template
|
|
22
|
+
# (liquid) to produce the objective's system prompt. If the agent has a
|
|
23
|
+
# system_prompt_data_schema, this must satisfy it.
|
|
23
24
|
#
|
|
24
25
|
# @return [Hash{Symbol=>Object}]
|
|
25
|
-
required :
|
|
26
|
+
required :system_prompt_data,
|
|
27
|
+
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
28
|
+
api_name: :systemPromptData
|
|
26
29
|
|
|
27
30
|
# @!attribute episodic_memory
|
|
28
31
|
# Episodic is used to configure the episodic memory for the objective
|
|
@@ -32,15 +35,25 @@ module Cadenya
|
|
|
32
35
|
-> { Cadenya::ObjectiveCreateParams::EpisodicMemory },
|
|
33
36
|
api_name: :episodicMemory
|
|
34
37
|
|
|
35
|
-
# @!attribute
|
|
36
|
-
# Optional
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
38
|
+
# @!attribute first_user_message
|
|
39
|
+
# Optional explicit first user message for the LLM chat history. When not set, the
|
|
40
|
+
# selected variation's first_user_message_template is rendered with
|
|
41
|
+
# first_user_message_data instead. If neither this field nor a
|
|
42
|
+
# first_user_message_template is present, the request is rejected with
|
|
40
43
|
# InvalidArgument.
|
|
41
44
|
#
|
|
42
45
|
# @return [String, nil]
|
|
43
|
-
optional :
|
|
46
|
+
optional :first_user_message, String, api_name: :firstUserMessage
|
|
47
|
+
|
|
48
|
+
# @!attribute first_user_message_data
|
|
49
|
+
# Arbitrary data rendered into the selected variation's
|
|
50
|
+
# first_user_message_template (liquid) to produce the first user message. Separate
|
|
51
|
+
# from `system_prompt_data`, which renders the system prompt template.
|
|
52
|
+
#
|
|
53
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
54
|
+
optional :first_user_message_data,
|
|
55
|
+
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
56
|
+
api_name: :firstUserMessageData
|
|
44
57
|
|
|
45
58
|
# @!attribute memory_cascade
|
|
46
59
|
# Memory layers/entries layered over the baseline cascade inherited from the
|
|
@@ -77,16 +90,6 @@ module Cadenya
|
|
|
77
90
|
# @return [Array<Cadenya::Models::ObjectiveCreateParams::Secret>, nil]
|
|
78
91
|
optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveCreateParams::Secret] }
|
|
79
92
|
|
|
80
|
-
# @!attribute user_data
|
|
81
|
-
# Arbitrary data rendered into the selected variation's user_message_template
|
|
82
|
-
# (liquid) to produce the initial user message. Separate from `data`, which
|
|
83
|
-
# renders the system prompt template.
|
|
84
|
-
#
|
|
85
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
86
|
-
optional :user_data,
|
|
87
|
-
Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
|
|
88
|
-
api_name: :userData
|
|
89
|
-
|
|
90
93
|
# @!attribute variation_id
|
|
91
94
|
# Optional explicit variation selection. Overrides the agent's
|
|
92
95
|
# variation_selection_mode.
|
|
@@ -94,7 +97,7 @@ module Cadenya
|
|
|
94
97
|
# @return [String, nil]
|
|
95
98
|
optional :variation_id, String, api_name: :variationId
|
|
96
99
|
|
|
97
|
-
# @!method initialize(workspace_id:, agent_id:,
|
|
100
|
+
# @!method initialize(workspace_id:, agent_id:, system_prompt_data:, episodic_memory: nil, first_user_message: nil, first_user_message_data: nil, memory_cascade: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
|
|
98
101
|
# Some parameter documentations has been truncated, see
|
|
99
102
|
# {Cadenya::Models::ObjectiveCreateParams} for more details.
|
|
100
103
|
#
|
|
@@ -102,11 +105,13 @@ module Cadenya
|
|
|
102
105
|
#
|
|
103
106
|
# @param agent_id [String]
|
|
104
107
|
#
|
|
105
|
-
# @param
|
|
108
|
+
# @param system_prompt_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's system_prompt_template
|
|
106
109
|
#
|
|
107
110
|
# @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
|
|
108
111
|
#
|
|
109
|
-
# @param
|
|
112
|
+
# @param first_user_message [String] Optional explicit first user message for the LLM chat history. When not set,
|
|
113
|
+
#
|
|
114
|
+
# @param first_user_message_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's first_user_message_templat
|
|
110
115
|
#
|
|
111
116
|
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
112
117
|
#
|
|
@@ -114,8 +119,6 @@ module Cadenya
|
|
|
114
119
|
#
|
|
115
120
|
# @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
|
|
116
121
|
#
|
|
117
|
-
# @param user_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's user_message_template
|
|
118
|
-
#
|
|
119
122
|
# @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
|
|
120
123
|
#
|
|
121
124
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -20,17 +20,19 @@ module Cadenya
|
|
|
20
20
|
#
|
|
21
21
|
# Creates a new objective in the workspace
|
|
22
22
|
#
|
|
23
|
-
# @overload create(workspace_id, agent_id:,
|
|
23
|
+
# @overload create(workspace_id, agent_id:, system_prompt_data:, episodic_memory: nil, first_user_message: nil, first_user_message_data: nil, memory_cascade: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
|
|
24
24
|
#
|
|
25
25
|
# @param workspace_id [String]
|
|
26
26
|
#
|
|
27
27
|
# @param agent_id [String]
|
|
28
28
|
#
|
|
29
|
-
# @param
|
|
29
|
+
# @param system_prompt_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's system_prompt_template
|
|
30
30
|
#
|
|
31
31
|
# @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
|
|
32
32
|
#
|
|
33
|
-
# @param
|
|
33
|
+
# @param first_user_message [String] Optional explicit first user message for the LLM chat history. When not set,
|
|
34
|
+
#
|
|
35
|
+
# @param first_user_message_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's first_user_message_templat
|
|
34
36
|
#
|
|
35
37
|
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
36
38
|
#
|
|
@@ -38,8 +40,6 @@ module Cadenya
|
|
|
38
40
|
#
|
|
39
41
|
# @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
|
|
40
42
|
#
|
|
41
|
-
# @param user_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's user_message_template
|
|
42
|
-
#
|
|
43
43
|
# @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
|
|
44
44
|
#
|
|
45
45
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/cadenya/version.rb
CHANGED
|
@@ -38,17 +38,6 @@ module Cadenya
|
|
|
38
38
|
sig { params(episodic_memory_ttl: Integer).void }
|
|
39
39
|
attr_writer :episodic_memory_ttl
|
|
40
40
|
|
|
41
|
-
# InputDataSchema is used for enforcing a data input when objectives are created.
|
|
42
|
-
# This is valuable when using liquid formatting in agent variation prompts. Input
|
|
43
|
-
# data schema is also valuable when using an agent as a sub-agent, as the schema
|
|
44
|
-
# is used as the tool's input parameter schema. If omitted, the sub-agent schema
|
|
45
|
-
# will be loaded with a simple "prompt" free text string as its schema.
|
|
46
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
47
|
-
attr_reader :input_data_schema
|
|
48
|
-
|
|
49
|
-
sig { params(input_data_schema: T::Hash[Symbol, T.anything]).void }
|
|
50
|
-
attr_writer :input_data_schema
|
|
51
|
-
|
|
52
41
|
# Optional output definition for objectives created for this agent. When provided,
|
|
53
42
|
# Cadenya will append a tool to that will be called by the LLM in use by the
|
|
54
43
|
# variant to extract information in the format provided here. Use this option when
|
|
@@ -59,6 +48,20 @@ module Cadenya
|
|
|
59
48
|
sig { params(output_definition: T::Hash[Symbol, T.anything]).void }
|
|
60
49
|
attr_writer :output_definition
|
|
61
50
|
|
|
51
|
+
# SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
|
|
52
|
+
# are created. This is valuable when using liquid formatting in agent variation
|
|
53
|
+
# system prompt templates. The schema is also used when the agent is attached as a
|
|
54
|
+
# sub-agent, as it becomes the tool's input parameter schema. If omitted, the
|
|
55
|
+
# sub-agent schema will be loaded with a simple "prompt" free text string as its
|
|
56
|
+
# schema.
|
|
57
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
58
|
+
attr_reader :system_prompt_data_schema
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
params(system_prompt_data_schema: T::Hash[Symbol, T.anything]).void
|
|
62
|
+
end
|
|
63
|
+
attr_writer :system_prompt_data_schema
|
|
64
|
+
|
|
62
65
|
# The URL that Cadenya will send events for any objective assigned to the agent.
|
|
63
66
|
sig { returns(T.nilable(String)) }
|
|
64
67
|
attr_reader :webhook_events_url
|
|
@@ -74,8 +77,8 @@ module Cadenya
|
|
|
74
77
|
description: String,
|
|
75
78
|
enable_episodic_memory: T::Boolean,
|
|
76
79
|
episodic_memory_ttl: Integer,
|
|
77
|
-
input_data_schema: T::Hash[Symbol, T.anything],
|
|
78
80
|
output_definition: T::Hash[Symbol, T.anything],
|
|
81
|
+
system_prompt_data_schema: T::Hash[Symbol, T.anything],
|
|
79
82
|
webhook_events_url: String
|
|
80
83
|
).returns(T.attached_class)
|
|
81
84
|
end
|
|
@@ -95,17 +98,18 @@ module Cadenya
|
|
|
95
98
|
# layer's expiry forward by this duration, and stored entries expire this long
|
|
96
99
|
# after they are written. If not set, episodic memories are retained indefinitely.
|
|
97
100
|
episodic_memory_ttl: nil,
|
|
98
|
-
# InputDataSchema is used for enforcing a data input when objectives are created.
|
|
99
|
-
# This is valuable when using liquid formatting in agent variation prompts. Input
|
|
100
|
-
# data schema is also valuable when using an agent as a sub-agent, as the schema
|
|
101
|
-
# is used as the tool's input parameter schema. If omitted, the sub-agent schema
|
|
102
|
-
# will be loaded with a simple "prompt" free text string as its schema.
|
|
103
|
-
input_data_schema: nil,
|
|
104
101
|
# Optional output definition for objectives created for this agent. When provided,
|
|
105
102
|
# Cadenya will append a tool to that will be called by the LLM in use by the
|
|
106
103
|
# variant to extract information in the format provided here. Use this option when
|
|
107
104
|
# you want structured data to be created by your objectives.
|
|
108
105
|
output_definition: nil,
|
|
106
|
+
# SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
|
|
107
|
+
# are created. This is valuable when using liquid formatting in agent variation
|
|
108
|
+
# system prompt templates. The schema is also used when the agent is attached as a
|
|
109
|
+
# sub-agent, as it becomes the tool's input parameter schema. If omitted, the
|
|
110
|
+
# sub-agent schema will be loaded with a simple "prompt" free text string as its
|
|
111
|
+
# schema.
|
|
112
|
+
system_prompt_data_schema: nil,
|
|
109
113
|
# The URL that Cadenya will send events for any objective assigned to the agent.
|
|
110
114
|
webhook_events_url: nil
|
|
111
115
|
)
|
|
@@ -119,8 +123,8 @@ module Cadenya
|
|
|
119
123
|
description: String,
|
|
120
124
|
enable_episodic_memory: T::Boolean,
|
|
121
125
|
episodic_memory_ttl: Integer,
|
|
122
|
-
input_data_schema: T::Hash[Symbol, T.anything],
|
|
123
126
|
output_definition: T::Hash[Symbol, T.anything],
|
|
127
|
+
system_prompt_data_schema: T::Hash[Symbol, T.anything],
|
|
124
128
|
webhook_events_url: String
|
|
125
129
|
}
|
|
126
130
|
)
|