cadenya 0.12.0 → 0.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc33022d12e62f8273e8a7aa25cc2f020c231e6ce29f66775f9b144747d5658f
4
- data.tar.gz: 619df9b5f16e896b922e1f8a1fa312f175a869154eb78a54c29a641e20f09b6b
3
+ metadata.gz: 9d745ee46b5834e75465c12e027582ba88c12d3ec89e31546dba9fbb952a52ae
4
+ data.tar.gz: 14109f1c53873b94aac6562a48669211f8845299f19ec8d10ff89968f2f5e862
5
5
  SHA512:
6
- metadata.gz: 67d08c0901b15069f74e1a8a071876d9ac7c2871f5d73c2986c28ce4b6c01fe564a3385e6bd932f018a6392094d10e3d0a860f9bcd199435cc4fb99beb3a52d4
7
- data.tar.gz: e6bd7a52e5e2a517108f7eeb6a3902c4662ed72c4158e06da10fc0862fc9292191d479ede3e87662a6104d9a680fe62d9e05d51be0f3b15ed9015907780415f4
6
+ metadata.gz: 0ee1346f5e40ac85863bfe7ea5181159a810e92a1f68c0f83e357887caa589c711aa167a03061483b82ef8d2856c7497466817b09794379fb47b3cf534be5786
7
+ data.tar.gz: 36de46a6cd4079c7f527c33c71126c54c6f74db804452e2ba90838b4bfa6a0fc03e65654b8360944653f38d05bc7da357d2f86383284f058cc74b3e490f5b90e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.0 (2026-06-11)
4
+
5
+ Full Changelog: [v0.12.0...v0.13.0](https://github.com/cadenya/cadenya-ruby/compare/v0.12.0...v0.13.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([9a5ddd6](https://github.com/cadenya/cadenya-ruby/commit/9a5ddd6a2e2628aa7a73894216112b252ca8b0ba))
10
+
3
11
  ## 0.12.0 (2026-06-10)
4
12
 
5
13
  Full Changelog: [v0.11.0...v0.12.0](https://github.com/cadenya/cadenya-ruby/compare/v0.11.0...v0.12.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "cadenya", "~> 0.12.0"
20
+ gem "cadenya", "~> 0.13.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -18,6 +18,24 @@ module Cadenya
18
18
  # @return [String, nil]
19
19
  optional :description, String
20
20
 
21
+ # @!attribute enable_episodic_memory
22
+ # Enable episodic memory for objectives created for this agent. When true,
23
+ # objective creation requires an episodic_memory key and the system finds or
24
+ # creates a memory layer for that (agent, key) pair, letting the agent store and
25
+ # retrieve memories across objectives that share the key. Memory is agent-level so
26
+ # all variations of the agent share the same layers.
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :enable_episodic_memory, Cadenya::Internal::Type::Boolean, api_name: :enableEpisodicMemory
30
+
31
+ # @!attribute episodic_memory_ttl
32
+ # How long episodic memories should be retained. Each new objective slides the
33
+ # layer's expiry forward by this duration, and stored entries expire this long
34
+ # after they are written. If not set, episodic memories are retained indefinitely.
35
+ #
36
+ # @return [Integer, nil]
37
+ optional :episodic_memory_ttl, Integer, api_name: :episodicMemoryTtl
38
+
21
39
  # @!attribute input_data_schema
22
40
  # InputDataSchema is used for enforcing a data input when objectives are created.
23
41
  # This is valuable when using liquid formatting in agent variation prompts. Input
@@ -47,7 +65,7 @@ module Cadenya
47
65
  # @return [String, nil]
48
66
  optional :webhook_events_url, String, api_name: :webhookEventsUrl
49
67
 
50
- # @!method initialize(variation_selection_mode:, description: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil)
68
+ # @!method initialize(variation_selection_mode:, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil)
51
69
  # Some parameter documentations has been truncated, see
52
70
  # {Cadenya::Models::AgentSpec} for more details.
53
71
  #
@@ -57,6 +75,10 @@ module Cadenya
57
75
  #
58
76
  # @param description [String] Description of the agent's purpose
59
77
  #
78
+ # @param enable_episodic_memory [Boolean] Enable episodic memory for objectives created for this agent.
79
+ #
80
+ # @param episodic_memory_ttl [Integer] How long episodic memories should be retained.
81
+ #
60
82
  # @param input_data_schema [Hash{Symbol=>Object}] InputDataSchema is used for enforcing a data input when objectives are created.
61
83
  #
62
84
  # @param output_definition [Hash{Symbol=>Object}] Optional output definition for objectives created for this agent.
@@ -25,23 +25,6 @@ module Cadenya
25
25
  # @return [String, nil]
26
26
  optional :description, String
27
27
 
28
- # @!attribute enable_episodic_memory
29
- # Enable episodic memory for objectives using this variation. When true, the
30
- # system automatically creates a document namespace for each objective using the
31
- # objective's episodic_key as the external_id, allowing the agent to store and
32
- # retrieve documents specific to that episode.
33
- #
34
- # @return [Boolean, nil]
35
- optional :enable_episodic_memory, Cadenya::Internal::Type::Boolean, api_name: :enableEpisodicMemory
36
-
37
- # @!attribute episodic_memory_ttl
38
- # How long episodic memories should be retained. After this duration, episodic
39
- # document namespaces can be automatically cleaned up. If not set, episodic
40
- # memories are retained indefinitely.
41
- #
42
- # @return [Integer, nil]
43
- optional :episodic_memory_ttl, Integer, api_name: :episodicMemoryTtl
44
-
45
28
  # @!attribute model_config
46
29
  # ModelConfig defines the model configuration for a variation
47
30
  #
@@ -86,7 +69,7 @@ module Cadenya
86
69
  # @return [Integer, nil]
87
70
  optional :weight, Integer
88
71
 
89
- # @!method initialize(compaction_config: nil, constraints: nil, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, model_config: nil, progressive_discovery: nil, system_prompt_template: nil, user_message_template: nil, weight: nil)
72
+ # @!method initialize(compaction_config: nil, constraints: nil, description: nil, model_config: nil, progressive_discovery: nil, system_prompt_template: nil, user_message_template: nil, weight: nil)
90
73
  # Some parameter documentations has been truncated, see
91
74
  # {Cadenya::Models::Agents::AgentVariationSpec} for more details.
92
75
  #
@@ -98,10 +81,6 @@ module Cadenya
98
81
  #
99
82
  # @param description [String] Human-readable description of what this variation does or when it should be used
100
83
  #
101
- # @param enable_episodic_memory [Boolean] Enable episodic memory for objectives using this variation.
102
- #
103
- # @param episodic_memory_ttl [Integer] How long episodic memories should be retained.
104
- #
105
84
  # @param model_config [Cadenya::Models::Agents::AgentVariationSpecModelConfig] ModelConfig defines the model configuration for a variation
106
85
  #
107
86
  # @param progressive_discovery [Cadenya::Models::Agents::AgentVariationSpecProgressiveDiscovery] ProgressiveDiscovery is used to indicate that the agent should automatically dis
@@ -12,6 +12,12 @@ module Cadenya
12
12
  # @return [String]
13
13
  required :workspace_id, String
14
14
 
15
+ # @!attribute agent_id
16
+ # Filter to episodic layers belonging to this agent.
17
+ #
18
+ # @return [String, nil]
19
+ optional :agent_id, String
20
+
15
21
  # @!attribute bundle_key
16
22
  # Filter by bundle_key — return only resources owned by this bundle.
17
23
  #
@@ -24,6 +30,14 @@ module Cadenya
24
30
  # @return [String, nil]
25
31
  optional :cursor, String
26
32
 
33
+ # @!attribute episodic_key_prefix
34
+ # Filter to episodic layers whose episodic key starts with this prefix (e.g.
35
+ # "customer/" matches "customer/42" and "customer/43"). Useful for namespaced
36
+ # keys, similar to a redis key scan.
37
+ #
38
+ # @return [String, nil]
39
+ optional :episodic_key_prefix, String
40
+
27
41
  # @!attribute include_info
28
42
  # When set to true you may use more of your alloted API rate-limit
29
43
  #
@@ -60,13 +74,20 @@ module Cadenya
60
74
  # @return [Symbol, Cadenya::Models::MemoryLayerListParams::Type, nil]
61
75
  optional :type, enum: -> { Cadenya::MemoryLayerListParams::Type }
62
76
 
63
- # @!method initialize(workspace_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, type: nil, request_options: {})
77
+ # @!method initialize(workspace_id:, agent_id: nil, bundle_key: nil, cursor: nil, episodic_key_prefix: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, type: nil, request_options: {})
78
+ # Some parameter documentations has been truncated, see
79
+ # {Cadenya::Models::MemoryLayerListParams} for more details.
80
+ #
64
81
  # @param workspace_id [String]
65
82
  #
83
+ # @param agent_id [String] Filter to episodic layers belonging to this agent.
84
+ #
66
85
  # @param bundle_key [String] Filter by bundle_key — return only resources owned by this bundle.
67
86
  #
68
87
  # @param cursor [String] Pagination cursor from previous response
69
88
  #
89
+ # @param episodic_key_prefix [String] Filter to episodic layers whose episodic key starts with this prefix
90
+ #
70
91
  # @param include_info [Boolean] When set to true you may use more of your alloted API rate-limit
71
92
  #
72
93
  # @param limit [Integer] Maximum number of results to return
@@ -16,6 +16,20 @@ module Cadenya
16
16
  optional :description, String
17
17
 
18
18
  response_only do
19
+ # @!attribute agent_id
20
+ # Server-set on episodic layers: the agent this layer belongs to. Unset for
21
+ # non-episodic layers.
22
+ #
23
+ # @return [String, nil]
24
+ optional :agent_id, String, api_name: :agentId
25
+
26
+ # @!attribute episodic_key
27
+ # Server-set on episodic layers: the caller-supplied episodic key the layer was
28
+ # created for. Unset for non-episodic layers.
29
+ #
30
+ # @return [String, nil]
31
+ optional :episodic_key, String, api_name: :episodicKey
32
+
19
33
  # @!attribute expires_at
20
34
  # For layers with a finite lifetime (e.g., episodic), the time at which the layer
21
35
  # becomes eligible for cleanup. Set by the system; unset for persistent layers.
@@ -33,14 +47,18 @@ module Cadenya
33
47
  optional :system_managed, Cadenya::Internal::Type::Boolean, api_name: :systemManaged
34
48
  end
35
49
 
36
- # @!method initialize(type:, description: nil, expires_at: nil, system_managed: nil)
50
+ # @!method initialize(type:, agent_id: nil, description: nil, episodic_key: nil, expires_at: nil, system_managed: nil)
37
51
  # Some parameter documentations has been truncated, see
38
52
  # {Cadenya::Models::MemoryLayerSpec} for more details.
39
53
  #
40
54
  # @param type [Symbol, Cadenya::Models::MemoryLayerSpec::Type]
41
55
  #
56
+ # @param agent_id [String] Server-set on episodic layers: the agent this layer belongs to. Unset for
57
+ #
42
58
  # @param description [String] Human-readable description of the layer's purpose. Encouraged for
43
59
  #
60
+ # @param episodic_key [String] Server-set on episodic layers: the caller-supplied episodic key the layer
61
+ #
44
62
  # @param expires_at [Time] For layers with a finite lifetime (e.g., episodic), the time at which the
45
63
  #
46
64
  # @param system_managed [Boolean] Server-set. True for layers managed by the system (e.g., episodic layers
@@ -18,6 +18,12 @@ module Cadenya
18
18
  # @return [Cadenya::Models::OperationMetadata]
19
19
  required :metadata, -> { Cadenya::OperationMetadata }
20
20
 
21
+ # @!attribute episodic_memory
22
+ # Episodic is used to configure the episodic memory for the objective
23
+ #
24
+ # @return [Cadenya::Models::Objective::EpisodicMemory, nil]
25
+ optional :episodic_memory, -> { Cadenya::Objective::EpisodicMemory }, api_name: :episodicMemory
26
+
21
27
  # @!attribute memory_stack
22
28
  # Memory layers/entries to push onto this objective's memory stack on top of the
23
29
  # baseline stack inherited from the selected variation.
@@ -110,7 +116,7 @@ module Cadenya
110
116
  api_name: :userData
111
117
  end
112
118
 
113
- # @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, info: nil, memory_stack: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, user_data: nil)
119
+ # @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, episodic_memory: nil, info: nil, memory_stack: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, user_data: nil)
114
120
  # Some parameter documentations has been truncated, see
115
121
  # {Cadenya::Models::Objective} for more details.
116
122
  #
@@ -130,6 +136,8 @@ module Cadenya
130
136
  #
131
137
  # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective
132
138
  #
139
+ # @param episodic_memory [Cadenya::Models::Objective::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
140
+ #
133
141
  # @param info [Cadenya::Models::ObjectiveInfo] ObjectiveInfo provides read-only aggregated statistics about an objective's exec
134
142
  #
135
143
  # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
@@ -161,6 +169,35 @@ module Cadenya
161
169
  # @!method self.values
162
170
  # @return [Array<Symbol>]
163
171
  end
172
+
173
+ # @see Cadenya::Models::Objective#episodic_memory
174
+ class EpisodicMemory < Cadenya::Internal::Type::BaseModel
175
+ # @!attribute key
176
+ # The caller-supplied episodic key. Objectives created with the same key (for the
177
+ # same agent) share one episodic memory layer.
178
+ #
179
+ # @return [String, nil]
180
+ optional :key, String
181
+
182
+ response_only do
183
+ # @!attribute memory_layer_id
184
+ # The episodic memory layer resolved (created or reused) for this objective's key.
185
+ # Populated by the system at objective creation.
186
+ #
187
+ # @return [String, nil]
188
+ optional :memory_layer_id, String, api_name: :memoryLayerId
189
+ end
190
+
191
+ # @!method initialize(key: nil, memory_layer_id: nil)
192
+ # Some parameter documentations has been truncated, see
193
+ # {Cadenya::Models::Objective::EpisodicMemory} for more details.
194
+ #
195
+ # Episodic is used to configure the episodic memory for the objective
196
+ #
197
+ # @param key [String] The caller-supplied episodic key. Objectives created with the same key
198
+ #
199
+ # @param memory_layer_id [String] The episodic memory layer resolved (created or reused) for this
200
+ end
164
201
  end
165
202
  end
166
203
  end
@@ -24,6 +24,14 @@ module Cadenya
24
24
  # @return [Hash{Symbol=>Object}]
25
25
  required :data, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
26
26
 
27
+ # @!attribute episodic_memory
28
+ # Episodic is used to configure the episodic memory for the objective
29
+ #
30
+ # @return [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory, nil]
31
+ optional :episodic_memory,
32
+ -> { Cadenya::ObjectiveCreateParams::EpisodicMemory },
33
+ api_name: :episodicMemory
34
+
27
35
  # @!attribute initial_message
28
36
  # Optional override for the initial message sent to the agent. This becomes the
29
37
  # first user message in the LLM chat history. When not set, the selected
@@ -88,7 +96,7 @@ module Cadenya
88
96
  # @return [String, nil]
89
97
  optional :variation_id, String, api_name: :variationId
90
98
 
91
- # @!method initialize(workspace_id:, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
99
+ # @!method initialize(workspace_id:, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
92
100
  # Some parameter documentations has been truncated, see
93
101
  # {Cadenya::Models::ObjectiveCreateParams} for more details.
94
102
  #
@@ -98,6 +106,8 @@ module Cadenya
98
106
  #
99
107
  # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
100
108
  #
109
+ # @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
110
+ #
101
111
  # @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
102
112
  #
103
113
  # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
@@ -112,6 +122,23 @@ module Cadenya
112
122
  #
113
123
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
114
124
 
125
+ class EpisodicMemory < Cadenya::Internal::Type::BaseModel
126
+ # @!attribute key
127
+ # The caller-supplied episodic key. Objectives created with the same key (for the
128
+ # same agent) share one episodic memory layer.
129
+ #
130
+ # @return [String, nil]
131
+ optional :key, String
132
+
133
+ # @!method initialize(key: nil)
134
+ # Some parameter documentations has been truncated, see
135
+ # {Cadenya::Models::ObjectiveCreateParams::EpisodicMemory} for more details.
136
+ #
137
+ # Episodic is used to configure the episodic memory for the objective
138
+ #
139
+ # @param key [String] The caller-supplied episodic key. Objectives created with the same key
140
+ end
141
+
115
142
  class Secret < Cadenya::Internal::Type::BaseModel
116
143
  # @!attribute name
117
144
  #
@@ -108,16 +108,23 @@ module Cadenya
108
108
  )
109
109
  end
110
110
 
111
+ # Some parameter documentations has been truncated, see
112
+ # {Cadenya::Models::MemoryLayerListParams} for more details.
113
+ #
111
114
  # Lists all memory layers in the workspace
112
115
  #
113
- # @overload list(workspace_id, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, type: nil, request_options: {})
116
+ # @overload list(workspace_id, agent_id: nil, bundle_key: nil, cursor: nil, episodic_key_prefix: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, type: nil, request_options: {})
114
117
  #
115
118
  # @param workspace_id [String]
116
119
  #
120
+ # @param agent_id [String] Filter to episodic layers belonging to this agent.
121
+ #
117
122
  # @param bundle_key [String] Filter by bundle_key — return only resources owned by this bundle.
118
123
  #
119
124
  # @param cursor [String] Pagination cursor from previous response
120
125
  #
126
+ # @param episodic_key_prefix [String] Filter to episodic layers whose episodic key starts with this prefix
127
+ #
121
128
  # @param include_info [Boolean] When set to true you may use more of your alloted API rate-limit
122
129
  #
123
130
  # @param limit [Integer] Maximum number of results to return
@@ -142,7 +149,9 @@ module Cadenya
142
149
  method: :get,
143
150
  path: ["v1/workspaces/%1$s/memory_layers", workspace_id],
144
151
  query: query.transform_keys(
152
+ agent_id: "agentId",
145
153
  bundle_key: "bundleKey",
154
+ episodic_key_prefix: "episodicKeyPrefix",
146
155
  include_info: "includeInfo",
147
156
  sort_order: "sortOrder"
148
157
  ),
@@ -20,7 +20,7 @@ module Cadenya
20
20
  #
21
21
  # Creates a new objective in the workspace
22
22
  #
23
- # @overload create(workspace_id, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
23
+ # @overload create(workspace_id, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
24
24
  #
25
25
  # @param workspace_id [String]
26
26
  #
@@ -28,6 +28,8 @@ module Cadenya
28
28
  #
29
29
  # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
30
30
  #
31
+ # @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
32
+ #
31
33
  # @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
32
34
  #
33
35
  # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cadenya
4
- VERSION = "0.12.0"
4
+ VERSION = "0.13.0"
5
5
  end
@@ -18,6 +18,26 @@ module Cadenya
18
18
  sig { params(description: String).void }
19
19
  attr_writer :description
20
20
 
21
+ # Enable episodic memory for objectives created for this agent. When true,
22
+ # objective creation requires an episodic_memory key and the system finds or
23
+ # creates a memory layer for that (agent, key) pair, letting the agent store and
24
+ # retrieve memories across objectives that share the key. Memory is agent-level so
25
+ # all variations of the agent share the same layers.
26
+ sig { returns(T.nilable(T::Boolean)) }
27
+ attr_reader :enable_episodic_memory
28
+
29
+ sig { params(enable_episodic_memory: T::Boolean).void }
30
+ attr_writer :enable_episodic_memory
31
+
32
+ # How long episodic memories should be retained. Each new objective slides the
33
+ # layer's expiry forward by this duration, and stored entries expire this long
34
+ # after they are written. If not set, episodic memories are retained indefinitely.
35
+ sig { returns(T.nilable(Integer)) }
36
+ attr_reader :episodic_memory_ttl
37
+
38
+ sig { params(episodic_memory_ttl: Integer).void }
39
+ attr_writer :episodic_memory_ttl
40
+
21
41
  # InputDataSchema is used for enforcing a data input when objectives are created.
22
42
  # This is valuable when using liquid formatting in agent variation prompts. Input
23
43
  # data schema is also valuable when using an agent as a sub-agent, as the schema
@@ -52,6 +72,8 @@ module Cadenya
52
72
  variation_selection_mode:
53
73
  Cadenya::AgentSpec::VariationSelectionMode::OrSymbol,
54
74
  description: String,
75
+ enable_episodic_memory: T::Boolean,
76
+ episodic_memory_ttl: Integer,
55
77
  input_data_schema: T::Hash[Symbol, T.anything],
56
78
  output_definition: T::Hash[Symbol, T.anything],
57
79
  webhook_events_url: String
@@ -63,6 +85,16 @@ module Cadenya
63
85
  variation_selection_mode:,
64
86
  # Description of the agent's purpose
65
87
  description: nil,
88
+ # Enable episodic memory for objectives created for this agent. When true,
89
+ # objective creation requires an episodic_memory key and the system finds or
90
+ # creates a memory layer for that (agent, key) pair, letting the agent store and
91
+ # retrieve memories across objectives that share the key. Memory is agent-level so
92
+ # all variations of the agent share the same layers.
93
+ enable_episodic_memory: nil,
94
+ # How long episodic memories should be retained. Each new objective slides the
95
+ # layer's expiry forward by this duration, and stored entries expire this long
96
+ # after they are written. If not set, episodic memories are retained indefinitely.
97
+ episodic_memory_ttl: nil,
66
98
  # InputDataSchema is used for enforcing a data input when objectives are created.
67
99
  # This is valuable when using liquid formatting in agent variation prompts. Input
68
100
  # data schema is also valuable when using an agent as a sub-agent, as the schema
@@ -85,6 +117,8 @@ module Cadenya
85
117
  variation_selection_mode:
86
118
  Cadenya::AgentSpec::VariationSelectionMode::OrSymbol,
87
119
  description: String,
120
+ enable_episodic_memory: T::Boolean,
121
+ episodic_memory_ttl: Integer,
88
122
  input_data_schema: T::Hash[Symbol, T.anything],
89
123
  output_definition: T::Hash[Symbol, T.anything],
90
124
  webhook_events_url: String
@@ -51,25 +51,6 @@ module Cadenya
51
51
  sig { params(description: String).void }
52
52
  attr_writer :description
53
53
 
54
- # Enable episodic memory for objectives using this variation. When true, the
55
- # system automatically creates a document namespace for each objective using the
56
- # objective's episodic_key as the external_id, allowing the agent to store and
57
- # retrieve documents specific to that episode.
58
- sig { returns(T.nilable(T::Boolean)) }
59
- attr_reader :enable_episodic_memory
60
-
61
- sig { params(enable_episodic_memory: T::Boolean).void }
62
- attr_writer :enable_episodic_memory
63
-
64
- # How long episodic memories should be retained. After this duration, episodic
65
- # document namespaces can be automatically cleaned up. If not set, episodic
66
- # memories are retained indefinitely.
67
- sig { returns(T.nilable(Integer)) }
68
- attr_reader :episodic_memory_ttl
69
-
70
- sig { params(episodic_memory_ttl: Integer).void }
71
- attr_writer :episodic_memory_ttl
72
-
73
54
  # ModelConfig defines the model configuration for a variation
74
55
  sig do
75
56
  returns(T.nilable(Cadenya::Agents::AgentVariationSpecModelConfig))
@@ -139,8 +120,6 @@ module Cadenya
139
120
  Cadenya::Agents::AgentVariationSpecCompactionConfig::OrHash,
140
121
  constraints: Cadenya::Agents::AgentVariationSpecConstraints::OrHash,
141
122
  description: String,
142
- enable_episodic_memory: T::Boolean,
143
- episodic_memory_ttl: Integer,
144
123
  model_config:
145
124
  Cadenya::Agents::AgentVariationSpecModelConfig::OrHash,
146
125
  progressive_discovery:
@@ -158,15 +137,6 @@ module Cadenya
158
137
  constraints: nil,
159
138
  # Human-readable description of what this variation does or when it should be used
160
139
  description: nil,
161
- # Enable episodic memory for objectives using this variation. When true, the
162
- # system automatically creates a document namespace for each objective using the
163
- # objective's episodic_key as the external_id, allowing the agent to store and
164
- # retrieve documents specific to that episode.
165
- enable_episodic_memory: nil,
166
- # How long episodic memories should be retained. After this duration, episodic
167
- # document namespaces can be automatically cleaned up. If not set, episodic
168
- # memories are retained indefinitely.
169
- episodic_memory_ttl: nil,
170
140
  # ModelConfig defines the model configuration for a variation
171
141
  model_config: nil,
172
142
  # ProgressiveDiscovery is used to indicate that the agent should automatically
@@ -199,8 +169,6 @@ module Cadenya
199
169
  Cadenya::Agents::AgentVariationSpecCompactionConfig,
200
170
  constraints: Cadenya::Agents::AgentVariationSpecConstraints,
201
171
  description: String,
202
- enable_episodic_memory: T::Boolean,
203
- episodic_memory_ttl: Integer,
204
172
  model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
205
173
  progressive_discovery:
206
174
  Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
@@ -14,6 +14,13 @@ module Cadenya
14
14
  sig { returns(String) }
15
15
  attr_accessor :workspace_id
16
16
 
17
+ # Filter to episodic layers belonging to this agent.
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :agent_id
20
+
21
+ sig { params(agent_id: String).void }
22
+ attr_writer :agent_id
23
+
17
24
  # Filter by bundle_key — return only resources owned by this bundle.
18
25
  sig { returns(T.nilable(String)) }
19
26
  attr_reader :bundle_key
@@ -28,6 +35,15 @@ module Cadenya
28
35
  sig { params(cursor: String).void }
29
36
  attr_writer :cursor
30
37
 
38
+ # Filter to episodic layers whose episodic key starts with this prefix (e.g.
39
+ # "customer/" matches "customer/42" and "customer/43"). Useful for namespaced
40
+ # keys, similar to a redis key scan.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :episodic_key_prefix
43
+
44
+ sig { params(episodic_key_prefix: String).void }
45
+ attr_writer :episodic_key_prefix
46
+
31
47
  # When set to true you may use more of your alloted API rate-limit
32
48
  sig { returns(T.nilable(T::Boolean)) }
33
49
  attr_reader :include_info
@@ -73,8 +89,10 @@ module Cadenya
73
89
  sig do
74
90
  params(
75
91
  workspace_id: String,
92
+ agent_id: String,
76
93
  bundle_key: String,
77
94
  cursor: String,
95
+ episodic_key_prefix: String,
78
96
  include_info: T::Boolean,
79
97
  limit: Integer,
80
98
  prefix: String,
@@ -86,10 +104,16 @@ module Cadenya
86
104
  end
87
105
  def self.new(
88
106
  workspace_id:,
107
+ # Filter to episodic layers belonging to this agent.
108
+ agent_id: nil,
89
109
  # Filter by bundle_key — return only resources owned by this bundle.
90
110
  bundle_key: nil,
91
111
  # Pagination cursor from previous response
92
112
  cursor: nil,
113
+ # Filter to episodic layers whose episodic key starts with this prefix (e.g.
114
+ # "customer/" matches "customer/42" and "customer/43"). Useful for namespaced
115
+ # keys, similar to a redis key scan.
116
+ episodic_key_prefix: nil,
93
117
  # When set to true you may use more of your alloted API rate-limit
94
118
  include_info: nil,
95
119
  # Maximum number of results to return
@@ -110,8 +134,10 @@ module Cadenya
110
134
  override.returns(
111
135
  {
112
136
  workspace_id: String,
137
+ agent_id: String,
113
138
  bundle_key: String,
114
139
  cursor: String,
140
+ episodic_key_prefix: String,
115
141
  include_info: T::Boolean,
116
142
  limit: Integer,
117
143
  prefix: String,
@@ -19,6 +19,22 @@ module Cadenya
19
19
  sig { params(description: String).void }
20
20
  attr_writer :description
21
21
 
22
+ # Server-set on episodic layers: the agent this layer belongs to. Unset for
23
+ # non-episodic layers.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :agent_id
26
+
27
+ sig { params(agent_id: String).void }
28
+ attr_writer :agent_id
29
+
30
+ # Server-set on episodic layers: the caller-supplied episodic key the layer was
31
+ # created for. Unset for non-episodic layers.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_reader :episodic_key
34
+
35
+ sig { params(episodic_key: String).void }
36
+ attr_writer :episodic_key
37
+
22
38
  # For layers with a finite lifetime (e.g., episodic), the time at which the layer
23
39
  # becomes eligible for cleanup. Set by the system; unset for persistent layers.
24
40
  sig { returns(T.nilable(Time)) }
@@ -40,16 +56,24 @@ module Cadenya
40
56
  sig do
41
57
  params(
42
58
  type: Cadenya::MemoryLayerSpec::Type::OrSymbol,
59
+ agent_id: String,
43
60
  description: String,
61
+ episodic_key: String,
44
62
  expires_at: Time,
45
63
  system_managed: T::Boolean
46
64
  ).returns(T.attached_class)
47
65
  end
48
66
  def self.new(
49
67
  type:,
68
+ # Server-set on episodic layers: the agent this layer belongs to. Unset for
69
+ # non-episodic layers.
70
+ agent_id: nil,
50
71
  # Human-readable description of the layer's purpose. Encouraged for user-created
51
72
  # layers; system-managed layers may have a generated description.
52
73
  description: nil,
74
+ # Server-set on episodic layers: the caller-supplied episodic key the layer was
75
+ # created for. Unset for non-episodic layers.
76
+ episodic_key: nil,
53
77
  # For layers with a finite lifetime (e.g., episodic), the time at which the layer
54
78
  # becomes eligible for cleanup. Set by the system; unset for persistent layers.
55
79
  expires_at: nil,
@@ -65,7 +89,9 @@ module Cadenya
65
89
  override.returns(
66
90
  {
67
91
  type: Cadenya::MemoryLayerSpec::Type::OrSymbol,
92
+ agent_id: String,
68
93
  description: String,
94
+ episodic_key: String,
69
95
  expires_at: Time,
70
96
  system_managed: T::Boolean
71
97
  }
@@ -19,6 +19,15 @@ module Cadenya
19
19
  sig { params(metadata: Cadenya::OperationMetadata::OrHash).void }
20
20
  attr_writer :metadata
21
21
 
22
+ # Episodic is used to configure the episodic memory for the objective
23
+ sig { returns(T.nilable(Cadenya::Objective::EpisodicMemory)) }
24
+ attr_reader :episodic_memory
25
+
26
+ sig do
27
+ params(episodic_memory: Cadenya::Objective::EpisodicMemory::OrHash).void
28
+ end
29
+ attr_writer :episodic_memory
30
+
22
31
  # Memory layers/entries to push onto this objective's memory stack on top of the
23
32
  # baseline stack inherited from the selected variation.
24
33
  #
@@ -125,6 +134,7 @@ module Cadenya
125
134
  state: Cadenya::Objective::State::OrSymbol,
126
135
  system_prompt: String,
127
136
  data: T::Hash[Symbol, T.anything],
137
+ episodic_memory: Cadenya::Objective::EpisodicMemory::OrHash,
128
138
  info: Cadenya::ObjectiveInfo::OrHash,
129
139
  memory_stack: T::Array[Cadenya::MemoryReference::OrHash],
130
140
  output: T::Hash[Symbol, T.anything],
@@ -150,6 +160,8 @@ module Cadenya
150
160
  system_prompt:,
151
161
  # Arbitrary data for the objective
152
162
  data: nil,
163
+ # Episodic is used to configure the episodic memory for the objective
164
+ episodic_memory: nil,
153
165
  # ObjectiveInfo provides read-only aggregated statistics about an objective's
154
166
  # execution
155
167
  info: nil,
@@ -195,6 +207,7 @@ module Cadenya
195
207
  state: Cadenya::Objective::State::TaggedSymbol,
196
208
  system_prompt: String,
197
209
  data: T::Hash[Symbol, T.anything],
210
+ episodic_memory: Cadenya::Objective::EpisodicMemory,
198
211
  info: Cadenya::ObjectiveInfo,
199
212
  memory_stack: T::Array[Cadenya::MemoryReference],
200
213
  output: T::Hash[Symbol, T.anything],
@@ -236,6 +249,50 @@ module Cadenya
236
249
  def self.values
237
250
  end
238
251
  end
252
+
253
+ class EpisodicMemory < Cadenya::Internal::Type::BaseModel
254
+ OrHash =
255
+ T.type_alias do
256
+ T.any(
257
+ Cadenya::Objective::EpisodicMemory,
258
+ Cadenya::Internal::AnyHash
259
+ )
260
+ end
261
+
262
+ # The caller-supplied episodic key. Objectives created with the same key (for the
263
+ # same agent) share one episodic memory layer.
264
+ sig { returns(T.nilable(String)) }
265
+ attr_reader :key
266
+
267
+ sig { params(key: String).void }
268
+ attr_writer :key
269
+
270
+ # The episodic memory layer resolved (created or reused) for this objective's key.
271
+ # Populated by the system at objective creation.
272
+ sig { returns(T.nilable(String)) }
273
+ attr_reader :memory_layer_id
274
+
275
+ sig { params(memory_layer_id: String).void }
276
+ attr_writer :memory_layer_id
277
+
278
+ # Episodic is used to configure the episodic memory for the objective
279
+ sig do
280
+ params(key: String, memory_layer_id: String).returns(T.attached_class)
281
+ end
282
+ def self.new(
283
+ # The caller-supplied episodic key. Objectives created with the same key (for the
284
+ # same agent) share one episodic memory layer.
285
+ key: nil,
286
+ # The episodic memory layer resolved (created or reused) for this objective's key.
287
+ # Populated by the system at objective creation.
288
+ memory_layer_id: nil
289
+ )
290
+ end
291
+
292
+ sig { override.returns({ key: String, memory_layer_id: String }) }
293
+ def to_hash
294
+ end
295
+ end
239
296
  end
240
297
  end
241
298
  end
@@ -22,6 +22,18 @@ module Cadenya
22
22
  sig { returns(T::Hash[Symbol, T.anything]) }
23
23
  attr_accessor :data
24
24
 
25
+ # Episodic is used to configure the episodic memory for the objective
26
+ sig { returns(T.nilable(Cadenya::ObjectiveCreateParams::EpisodicMemory)) }
27
+ attr_reader :episodic_memory
28
+
29
+ sig do
30
+ params(
31
+ episodic_memory:
32
+ Cadenya::ObjectiveCreateParams::EpisodicMemory::OrHash
33
+ ).void
34
+ end
35
+ attr_writer :episodic_memory
36
+
25
37
  # Optional override for the initial message sent to the agent. This becomes the
26
38
  # first user message in the LLM chat history. When not set, the selected
27
39
  # variation's user_message_template is rendered with user_data instead. If neither
@@ -101,6 +113,8 @@ module Cadenya
101
113
  workspace_id: String,
102
114
  agent_id: String,
103
115
  data: T::Hash[Symbol, T.anything],
116
+ episodic_memory:
117
+ Cadenya::ObjectiveCreateParams::EpisodicMemory::OrHash,
104
118
  initial_message: String,
105
119
  memory_stack: T::Array[Cadenya::MemoryReference::OrHash],
106
120
  metadata: Cadenya::CreateOperationMetadata::OrHash,
@@ -116,6 +130,8 @@ module Cadenya
116
130
  # Arbitrary data for the objective. May be used in liquid templates for prompts
117
131
  # configured on the agent variation
118
132
  data:,
133
+ # Episodic is used to configure the episodic memory for the objective
134
+ episodic_memory: nil,
119
135
  # Optional override for the initial message sent to the agent. This becomes the
120
136
  # first user message in the LLM chat history. When not set, the selected
121
137
  # variation's user_message_template is rendered with user_data instead. If neither
@@ -162,6 +178,7 @@ module Cadenya
162
178
  workspace_id: String,
163
179
  agent_id: String,
164
180
  data: T::Hash[Symbol, T.anything],
181
+ episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
165
182
  initial_message: String,
166
183
  memory_stack: T::Array[Cadenya::MemoryReference],
167
184
  metadata: Cadenya::CreateOperationMetadata,
@@ -175,6 +192,37 @@ module Cadenya
175
192
  def to_hash
176
193
  end
177
194
 
195
+ class EpisodicMemory < Cadenya::Internal::Type::BaseModel
196
+ OrHash =
197
+ T.type_alias do
198
+ T.any(
199
+ Cadenya::ObjectiveCreateParams::EpisodicMemory,
200
+ Cadenya::Internal::AnyHash
201
+ )
202
+ end
203
+
204
+ # The caller-supplied episodic key. Objectives created with the same key (for the
205
+ # same agent) share one episodic memory layer.
206
+ sig { returns(T.nilable(String)) }
207
+ attr_reader :key
208
+
209
+ sig { params(key: String).void }
210
+ attr_writer :key
211
+
212
+ # Episodic is used to configure the episodic memory for the objective
213
+ sig { params(key: String).returns(T.attached_class) }
214
+ def self.new(
215
+ # The caller-supplied episodic key. Objectives created with the same key (for the
216
+ # same agent) share one episodic memory layer.
217
+ key: nil
218
+ )
219
+ end
220
+
221
+ sig { override.returns({ key: String, memory_layer_id: String }) }
222
+ def to_hash
223
+ end
224
+ end
225
+
178
226
  class Secret < Cadenya::Internal::Type::BaseModel
179
227
  OrHash =
180
228
  T.type_alias do
@@ -84,8 +84,10 @@ module Cadenya
84
84
  sig do
85
85
  params(
86
86
  workspace_id: String,
87
+ agent_id: String,
87
88
  bundle_key: String,
88
89
  cursor: String,
90
+ episodic_key_prefix: String,
89
91
  include_info: T::Boolean,
90
92
  limit: Integer,
91
93
  prefix: String,
@@ -97,10 +99,16 @@ module Cadenya
97
99
  end
98
100
  def list(
99
101
  workspace_id,
102
+ # Filter to episodic layers belonging to this agent.
103
+ agent_id: nil,
100
104
  # Filter by bundle_key — return only resources owned by this bundle.
101
105
  bundle_key: nil,
102
106
  # Pagination cursor from previous response
103
107
  cursor: nil,
108
+ # Filter to episodic layers whose episodic key starts with this prefix (e.g.
109
+ # "customer/" matches "customer/42" and "customer/43"). Useful for namespaced
110
+ # keys, similar to a redis key scan.
111
+ episodic_key_prefix: nil,
104
112
  # When set to true you may use more of your alloted API rate-limit
105
113
  include_info: nil,
106
114
  # Maximum number of results to return
@@ -21,6 +21,8 @@ module Cadenya
21
21
  workspace_id: String,
22
22
  agent_id: String,
23
23
  data: T::Hash[Symbol, T.anything],
24
+ episodic_memory:
25
+ Cadenya::ObjectiveCreateParams::EpisodicMemory::OrHash,
24
26
  initial_message: String,
25
27
  memory_stack: T::Array[Cadenya::MemoryReference::OrHash],
26
28
  metadata: Cadenya::CreateOperationMetadata::OrHash,
@@ -36,6 +38,8 @@ module Cadenya
36
38
  # Arbitrary data for the objective. May be used in liquid templates for prompts
37
39
  # configured on the agent variation
38
40
  data:,
41
+ # Episodic is used to configure the episodic memory for the objective
42
+ episodic_memory: nil,
39
43
  # Optional override for the initial message sent to the agent. This becomes the
40
44
  # first user message in the LLM chat history. When not set, the selected
41
45
  # variation's user_message_template is rendered with user_data instead. If neither
@@ -4,6 +4,8 @@ module Cadenya
4
4
  {
5
5
  variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
6
6
  description: String,
7
+ enable_episodic_memory: bool,
8
+ episodic_memory_ttl: Integer,
7
9
  input_data_schema: ::Hash[Symbol, top],
8
10
  output_definition: ::Hash[Symbol, top],
9
11
  webhook_events_url: String
@@ -16,6 +18,14 @@ module Cadenya
16
18
 
17
19
  def description=: (String) -> String
18
20
 
21
+ attr_reader enable_episodic_memory: bool?
22
+
23
+ def enable_episodic_memory=: (bool) -> bool
24
+
25
+ attr_reader episodic_memory_ttl: Integer?
26
+
27
+ def episodic_memory_ttl=: (Integer) -> Integer
28
+
19
29
  attr_reader input_data_schema: ::Hash[Symbol, top]?
20
30
 
21
31
  def input_data_schema=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
@@ -31,6 +41,8 @@ module Cadenya
31
41
  def initialize: (
32
42
  variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
33
43
  ?description: String,
44
+ ?enable_episodic_memory: bool,
45
+ ?episodic_memory_ttl: Integer,
34
46
  ?input_data_schema: ::Hash[Symbol, top],
35
47
  ?output_definition: ::Hash[Symbol, top],
36
48
  ?webhook_events_url: String
@@ -39,6 +51,8 @@ module Cadenya
39
51
  def to_hash: -> {
40
52
  variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
41
53
  description: String,
54
+ enable_episodic_memory: bool,
55
+ episodic_memory_ttl: Integer,
42
56
  input_data_schema: ::Hash[Symbol, top],
43
57
  output_definition: ::Hash[Symbol, top],
44
58
  webhook_events_url: String
@@ -8,8 +8,6 @@ module Cadenya
8
8
  compaction_config: Cadenya::Agents::AgentVariationSpecCompactionConfig,
9
9
  constraints: Cadenya::Agents::AgentVariationSpecConstraints,
10
10
  description: String,
11
- enable_episodic_memory: bool,
12
- episodic_memory_ttl: Integer,
13
11
  model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
14
12
  progressive_discovery: Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
15
13
  system_prompt_template: String,
@@ -34,14 +32,6 @@ module Cadenya
34
32
 
35
33
  def description=: (String) -> String
36
34
 
37
- attr_reader enable_episodic_memory: bool?
38
-
39
- def enable_episodic_memory=: (bool) -> bool
40
-
41
- attr_reader episodic_memory_ttl: Integer?
42
-
43
- def episodic_memory_ttl=: (Integer) -> Integer
44
-
45
35
  attr_reader model_config: Cadenya::Agents::AgentVariationSpecModelConfig?
46
36
 
47
37
  def model_config=: (
@@ -70,8 +60,6 @@ module Cadenya
70
60
  ?compaction_config: Cadenya::Agents::AgentVariationSpecCompactionConfig,
71
61
  ?constraints: Cadenya::Agents::AgentVariationSpecConstraints,
72
62
  ?description: String,
73
- ?enable_episodic_memory: bool,
74
- ?episodic_memory_ttl: Integer,
75
63
  ?model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
76
64
  ?progressive_discovery: Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
77
65
  ?system_prompt_template: String,
@@ -83,8 +71,6 @@ module Cadenya
83
71
  compaction_config: Cadenya::Agents::AgentVariationSpecCompactionConfig,
84
72
  constraints: Cadenya::Agents::AgentVariationSpecConstraints,
85
73
  description: String,
86
- enable_episodic_memory: bool,
87
- episodic_memory_ttl: Integer,
88
74
  model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
89
75
  progressive_discovery: Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
90
76
  system_prompt_template: String,
@@ -3,8 +3,10 @@ module Cadenya
3
3
  type memory_layer_list_params =
4
4
  {
5
5
  workspace_id: String,
6
+ agent_id: String,
6
7
  bundle_key: String,
7
8
  cursor: String,
9
+ episodic_key_prefix: String,
8
10
  include_info: bool,
9
11
  limit: Integer,
10
12
  prefix: String,
@@ -20,6 +22,10 @@ module Cadenya
20
22
 
21
23
  attr_accessor workspace_id: String
22
24
 
25
+ attr_reader agent_id: String?
26
+
27
+ def agent_id=: (String) -> String
28
+
23
29
  attr_reader bundle_key: String?
24
30
 
25
31
  def bundle_key=: (String) -> String
@@ -28,6 +34,10 @@ module Cadenya
28
34
 
29
35
  def cursor=: (String) -> String
30
36
 
37
+ attr_reader episodic_key_prefix: String?
38
+
39
+ def episodic_key_prefix=: (String) -> String
40
+
31
41
  attr_reader include_info: bool?
32
42
 
33
43
  def include_info=: (bool) -> bool
@@ -56,8 +66,10 @@ module Cadenya
56
66
 
57
67
  def initialize: (
58
68
  workspace_id: String,
69
+ ?agent_id: String,
59
70
  ?bundle_key: String,
60
71
  ?cursor: String,
72
+ ?episodic_key_prefix: String,
61
73
  ?include_info: bool,
62
74
  ?limit: Integer,
63
75
  ?prefix: String,
@@ -69,8 +81,10 @@ module Cadenya
69
81
 
70
82
  def to_hash: -> {
71
83
  workspace_id: String,
84
+ agent_id: String,
72
85
  bundle_key: String,
73
86
  cursor: String,
87
+ episodic_key_prefix: String,
74
88
  include_info: bool,
75
89
  limit: Integer,
76
90
  prefix: String,
@@ -3,7 +3,9 @@ module Cadenya
3
3
  type memory_layer_spec =
4
4
  {
5
5
  type: Cadenya::Models::MemoryLayerSpec::type_,
6
+ agent_id: String,
6
7
  description: String,
8
+ episodic_key: String,
7
9
  expires_at: Time,
8
10
  system_managed: bool
9
11
  }
@@ -15,6 +17,14 @@ module Cadenya
15
17
 
16
18
  def description=: (String) -> String
17
19
 
20
+ attr_reader agent_id: String?
21
+
22
+ def agent_id=: (String) -> String
23
+
24
+ attr_reader episodic_key: String?
25
+
26
+ def episodic_key=: (String) -> String
27
+
18
28
  attr_reader expires_at: Time?
19
29
 
20
30
  def expires_at=: (Time) -> Time
@@ -25,14 +35,18 @@ module Cadenya
25
35
 
26
36
  def initialize: (
27
37
  type: Cadenya::Models::MemoryLayerSpec::type_,
38
+ ?agent_id: String,
28
39
  ?description: String,
40
+ ?episodic_key: String,
29
41
  ?expires_at: Time,
30
42
  ?system_managed: bool
31
43
  ) -> void
32
44
 
33
45
  def to_hash: -> {
34
46
  type: Cadenya::Models::MemoryLayerSpec::type_,
47
+ agent_id: String,
35
48
  description: String,
49
+ episodic_key: String,
36
50
  expires_at: Time,
37
51
  system_managed: bool
38
52
  }
@@ -8,6 +8,7 @@ module Cadenya
8
8
  state: Cadenya::Models::Objective::state,
9
9
  system_prompt: String,
10
10
  data: ::Hash[Symbol, top],
11
+ episodic_memory: Cadenya::Objective::EpisodicMemory,
11
12
  info: Cadenya::ObjectiveInfo,
12
13
  memory_stack: ::Array[Cadenya::MemoryReference],
13
14
  output: ::Hash[Symbol, top],
@@ -22,6 +23,12 @@ module Cadenya
22
23
 
23
24
  attr_accessor metadata: Cadenya::OperationMetadata
24
25
 
26
+ attr_reader episodic_memory: Cadenya::Objective::EpisodicMemory?
27
+
28
+ def episodic_memory=: (
29
+ Cadenya::Objective::EpisodicMemory
30
+ ) -> Cadenya::Objective::EpisodicMemory
31
+
25
32
  attr_reader memory_stack: ::Array[Cadenya::MemoryReference]?
26
33
 
27
34
  def memory_stack=: (
@@ -71,6 +78,7 @@ module Cadenya
71
78
  state: Cadenya::Models::Objective::state,
72
79
  system_prompt: String,
73
80
  ?data: ::Hash[Symbol, top],
81
+ ?episodic_memory: Cadenya::Objective::EpisodicMemory,
74
82
  ?info: Cadenya::ObjectiveInfo,
75
83
  ?memory_stack: ::Array[Cadenya::MemoryReference],
76
84
  ?output: ::Hash[Symbol, top],
@@ -87,6 +95,7 @@ module Cadenya
87
95
  state: Cadenya::Models::Objective::state,
88
96
  system_prompt: String,
89
97
  data: ::Hash[Symbol, top],
98
+ episodic_memory: Cadenya::Objective::EpisodicMemory,
90
99
  info: Cadenya::ObjectiveInfo,
91
100
  memory_stack: ::Array[Cadenya::MemoryReference],
92
101
  output: ::Hash[Symbol, top],
@@ -118,6 +127,22 @@ module Cadenya
118
127
 
119
128
  def self?.values: -> ::Array[Cadenya::Models::Objective::state]
120
129
  end
130
+
131
+ type episodic_memory = { key: String, memory_layer_id: String }
132
+
133
+ class EpisodicMemory < Cadenya::Internal::Type::BaseModel
134
+ attr_reader key: String?
135
+
136
+ def key=: (String) -> String
137
+
138
+ attr_reader memory_layer_id: String?
139
+
140
+ def memory_layer_id=: (String) -> String
141
+
142
+ def initialize: (?key: String, ?memory_layer_id: String) -> void
143
+
144
+ def to_hash: -> { key: String, memory_layer_id: String }
145
+ end
121
146
  end
122
147
  end
123
148
  end
@@ -5,6 +5,7 @@ module Cadenya
5
5
  workspace_id: String,
6
6
  agent_id: String,
7
7
  data: ::Hash[Symbol, top],
8
+ episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
8
9
  initial_message: String,
9
10
  memory_stack: ::Array[Cadenya::MemoryReference],
10
11
  metadata: Cadenya::CreateOperationMetadata,
@@ -24,6 +25,12 @@ module Cadenya
24
25
 
25
26
  attr_accessor data: ::Hash[Symbol, top]
26
27
 
28
+ attr_reader episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory?
29
+
30
+ def episodic_memory=: (
31
+ Cadenya::ObjectiveCreateParams::EpisodicMemory
32
+ ) -> Cadenya::ObjectiveCreateParams::EpisodicMemory
33
+
27
34
  attr_reader initial_message: String?
28
35
 
29
36
  def initial_message=: (String) -> String
@@ -58,6 +65,7 @@ module Cadenya
58
65
  workspace_id: String,
59
66
  agent_id: String,
60
67
  data: ::Hash[Symbol, top],
68
+ ?episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
61
69
  ?initial_message: String,
62
70
  ?memory_stack: ::Array[Cadenya::MemoryReference],
63
71
  ?metadata: Cadenya::CreateOperationMetadata,
@@ -71,6 +79,7 @@ module Cadenya
71
79
  workspace_id: String,
72
80
  agent_id: String,
73
81
  data: ::Hash[Symbol, top],
82
+ episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
74
83
  initial_message: String,
75
84
  memory_stack: ::Array[Cadenya::MemoryReference],
76
85
  metadata: Cadenya::CreateOperationMetadata,
@@ -80,6 +89,18 @@ module Cadenya
80
89
  request_options: Cadenya::RequestOptions
81
90
  }
82
91
 
92
+ type episodic_memory = { key: String, memory_layer_id: String }
93
+
94
+ class EpisodicMemory < Cadenya::Internal::Type::BaseModel
95
+ attr_reader key: String?
96
+
97
+ def key=: (String) -> String
98
+
99
+ def initialize: (?key: String) -> void
100
+
101
+ def to_hash: -> { key: String, memory_layer_id: String }
102
+ end
103
+
83
104
  type secret = { name: String, value: String }
84
105
 
85
106
  class Secret < Cadenya::Internal::Type::BaseModel
@@ -27,8 +27,10 @@ module Cadenya
27
27
 
28
28
  def list: (
29
29
  String workspace_id,
30
+ ?agent_id: String,
30
31
  ?bundle_key: String,
31
32
  ?cursor: String,
33
+ ?episodic_key_prefix: String,
32
34
  ?include_info: bool,
33
35
  ?limit: Integer,
34
36
  ?prefix: String,
@@ -13,6 +13,7 @@ module Cadenya
13
13
  String workspace_id,
14
14
  agent_id: String,
15
15
  data: ::Hash[Symbol, top],
16
+ ?episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
16
17
  ?initial_message: String,
17
18
  ?memory_stack: ::Array[Cadenya::MemoryReference],
18
19
  ?metadata: Cadenya::CreateOperationMetadata,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadenya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cadenya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-10 00:00:00.000000000 Z
11
+ date: 2026-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi