cadenya 0.12.0 → 0.14.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 +16 -0
- data/README.md +1 -1
- data/lib/cadenya/client.rb +2 -2
- data/lib/cadenya/models/agent_spec.rb +23 -1
- data/lib/cadenya/models/agents/agent_variation_info.rb +2 -1
- data/lib/cadenya/models/agents/agent_variation_spec.rb +1 -22
- data/lib/cadenya/models/agents/variation_add_memory_layer_params.rb +3 -2
- data/lib/cadenya/models/agents/variation_memory_layer_assignment.rb +7 -6
- data/lib/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_entry_outcome.rb +2 -2
- data/lib/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_layer_outcome.rb +4 -4
- data/lib/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_variation_memory_layer_outcome.rb +2 -2
- data/lib/cadenya/models/memory_layer.rb +4 -4
- data/lib/cadenya/models/memory_layer_list_params.rb +22 -1
- data/lib/cadenya/models/memory_layer_spec.rb +20 -2
- data/lib/cadenya/models/memory_layers/memory_entry.rb +2 -2
- data/lib/cadenya/models/memory_read.rb +2 -2
- data/lib/cadenya/models/memory_reference.rb +6 -5
- data/lib/cadenya/models/objective.rb +51 -16
- data/lib/cadenya/models/objective_create_params.rb +41 -16
- data/lib/cadenya/models/objective_event_data.rb +2 -2
- data/lib/cadenya/models/objective_info.rb +11 -9
- data/lib/cadenya/resources/agents/variations.rb +2 -2
- data/lib/cadenya/resources/memory_layers/entries.rb +2 -2
- data/lib/cadenya/resources/memory_layers.rb +14 -5
- data/lib/cadenya/resources/objectives.rb +4 -2
- data/lib/cadenya/version.rb +1 -1
- data/rbi/cadenya/client.rbi +2 -2
- data/rbi/cadenya/models/agent_spec.rbi +34 -0
- data/rbi/cadenya/models/agents/agent_variation_info.rbi +4 -2
- data/rbi/cadenya/models/agents/agent_variation_spec.rbi +0 -32
- data/rbi/cadenya/models/agents/variation_add_memory_layer_params.rbi +4 -2
- data/rbi/cadenya/models/agents/variation_memory_layer_assignment.rbi +10 -8
- data/rbi/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_entry_outcome.rbi +4 -4
- data/rbi/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_layer_outcome.rbi +8 -8
- data/rbi/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_variation_memory_layer_outcome.rbi +4 -4
- data/rbi/cadenya/models/memory_layer.rbi +4 -4
- data/rbi/cadenya/models/memory_layer_list_params.rbi +26 -0
- data/rbi/cadenya/models/memory_layer_spec.rbi +28 -2
- data/rbi/cadenya/models/memory_layers/memory_entry.rbi +2 -2
- data/rbi/cadenya/models/memory_read.rbi +2 -2
- data/rbi/cadenya/models/memory_reference.rbi +9 -7
- data/rbi/cadenya/models/objective.rbi +81 -28
- data/rbi/cadenya/models/objective_create_params.rbi +72 -28
- data/rbi/cadenya/models/objective_event_data.rbi +4 -4
- data/rbi/cadenya/models/objective_info.rbi +16 -12
- data/rbi/cadenya/resources/agents/variations.rbi +3 -3
- data/rbi/cadenya/resources/memory_layers/entries.rbi +2 -2
- data/rbi/cadenya/resources/memory_layers.rbi +12 -4
- data/rbi/cadenya/resources/objectives.rbi +15 -13
- data/sig/cadenya/models/agent_spec.rbs +14 -0
- data/sig/cadenya/models/agents/agent_variation_spec.rbs +0 -14
- data/sig/cadenya/models/memory_layer_list_params.rbs +14 -0
- data/sig/cadenya/models/memory_layer_spec.rbs +14 -0
- data/sig/cadenya/models/objective.rbs +30 -5
- data/sig/cadenya/models/objective_create_params.rbs +26 -5
- data/sig/cadenya/models/objective_info.rbs +4 -4
- data/sig/cadenya/resources/memory_layers.rbs +2 -0
- data/sig/cadenya/resources/objectives.rbs +2 -1
- 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: 12a4c26346682e6c70e9ce503df02f091ce2073e37f522e372106696b66f8437
|
|
4
|
+
data.tar.gz: e799c37f8c84900db9cdf5d4cfc0bacd2b623c7d8ff0407b12d2d89b2bfc88ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be228543f1c57ae71379a60d35bc0ceae0aa24498041a3ffc69b14f6b55b6a5c34f4e232e453933c148149ce46a0d49cca232683f8218b0e1ec22eeed8591b07
|
|
7
|
+
data.tar.gz: 9d93340c52c5d99382179ed1b51804720fe7464c7b55ac7c604a868ddbe52103718bdaab4f1632ea73c201b8324aef318a3673caa3e7481d2dbc766d7fcd05f9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.0 (2026-06-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/cadenya/cadenya-ruby/compare/v0.13.0...v0.14.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([4b8c8d2](https://github.com/cadenya/cadenya-ruby/commit/4b8c8d26a3e7e55103f11eeeae4f32f7893288ce))
|
|
10
|
+
|
|
11
|
+
## 0.13.0 (2026-06-11)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/cadenya/cadenya-ruby/compare/v0.12.0...v0.13.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([9a5ddd6](https://github.com/cadenya/cadenya-ruby/commit/9a5ddd6a2e2628aa7a73894216112b252ca8b0ba))
|
|
18
|
+
|
|
3
19
|
## 0.12.0 (2026-06-10)
|
|
4
20
|
|
|
5
21
|
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
data/lib/cadenya/client.rb
CHANGED
|
@@ -37,8 +37,8 @@ module Cadenya
|
|
|
37
37
|
attr_reader :objectives
|
|
38
38
|
|
|
39
39
|
# Manage memory layers and their entries. Layers are named containers that can be
|
|
40
|
-
# composed into an objective's memory
|
|
41
|
-
# layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
40
|
+
# composed into an objective's memory cascade; entries are the keyed values within
|
|
41
|
+
# a layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
42
42
|
# cannot be mutated through this API.
|
|
43
43
|
# @return [Cadenya::Resources::MemoryLayers]
|
|
44
44
|
attr_reader :memory_layers
|
|
@@ -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.
|
|
@@ -36,7 +36,8 @@ module Cadenya
|
|
|
36
36
|
|
|
37
37
|
# @!attribute memory_layer_assignments
|
|
38
38
|
# Read-only list of memory layer assignments for this variation, returned in
|
|
39
|
-
# ascending `position` (
|
|
39
|
+
# ascending `position` (most specific first — resolution order). Capped at 10
|
|
40
|
+
# entries.
|
|
40
41
|
#
|
|
41
42
|
# @return [Array<Cadenya::Models::Agents::VariationMemoryLayerAssignment>, nil]
|
|
42
43
|
optional :memory_layer_assignments,
|
|
@@ -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,
|
|
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
|
|
@@ -31,7 +31,8 @@ module Cadenya
|
|
|
31
31
|
optional :memory_layer_id, String, api_name: :memoryLayerId
|
|
32
32
|
|
|
33
33
|
# @!attribute position
|
|
34
|
-
# Position in the
|
|
34
|
+
# Position in the baseline cascade (lower = more specific). If omitted, the server
|
|
35
|
+
# appends at the most general end (max existing position + 1).
|
|
35
36
|
#
|
|
36
37
|
# @return [Integer, nil]
|
|
37
38
|
optional :position, Integer
|
|
@@ -48,7 +49,7 @@ module Cadenya
|
|
|
48
49
|
#
|
|
49
50
|
# @param memory_layer_id [String] Layer to attach. Accepts the canonical `memlyr_…` form or the `external_id:<valu
|
|
50
51
|
#
|
|
51
|
-
# @param position [Integer] Position in the
|
|
52
|
+
# @param position [Integer] Position in the baseline cascade (lower = more specific). If
|
|
52
53
|
#
|
|
53
54
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
54
55
|
end
|
|
@@ -17,9 +17,10 @@ module Cadenya
|
|
|
17
17
|
optional :memory_layer, -> { Cadenya::BareMetadata }, api_name: :memoryLayer
|
|
18
18
|
|
|
19
19
|
# @!attribute position
|
|
20
|
-
# Position in the variation's baseline
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# Position in the variation's baseline cascade. Position is specificity,
|
|
21
|
+
# CSS-style: a LOWER position is more specific and is consulted first; the
|
|
22
|
+
# highest-position assignment is the most general fallback. Gaps are fine — only
|
|
23
|
+
# relative position matters. Positions must be unique within a variation; a
|
|
23
24
|
# request that would collide with an existing assignment's position is rejected
|
|
24
25
|
# with InvalidArgument.
|
|
25
26
|
#
|
|
@@ -40,8 +41,8 @@ module Cadenya
|
|
|
40
41
|
# {Cadenya::Models::Agents::VariationMemoryLayerAssignment} for more details.
|
|
41
42
|
#
|
|
42
43
|
# VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a
|
|
43
|
-
# given position in the variation's baseline memory
|
|
44
|
-
# one assignment per memory_layer_id.
|
|
44
|
+
# given position in the variation's baseline memory cascade. A variation has at
|
|
45
|
+
# most one assignment per memory_layer_id.
|
|
45
46
|
#
|
|
46
47
|
# Variations only support whole-layer attachments — entry pinning is an
|
|
47
48
|
# objective-level capability.
|
|
@@ -50,7 +51,7 @@ module Cadenya
|
|
|
50
51
|
#
|
|
51
52
|
# @param memory_layer [Cadenya::Models::BareMetadata] BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
52
53
|
#
|
|
53
|
-
# @param position [Integer] Position in the variation's baseline
|
|
54
|
+
# @param position [Integer] Position in the variation's baseline cascade. Position is
|
|
54
55
|
end
|
|
55
56
|
end
|
|
56
57
|
end
|
|
@@ -31,8 +31,8 @@ module Cadenya
|
|
|
31
31
|
# MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
32
32
|
# by their key, which follows the S3 object key safe-character convention (see
|
|
33
33
|
# MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
34
|
-
# the same key may appear in multiple layers, in which case the
|
|
35
|
-
# determines which one wins for a given objective.
|
|
34
|
+
# the same key may appear in multiple layers, in which case the cascade walk
|
|
35
|
+
# determines which one wins for a given objective (most specific layer first).
|
|
36
36
|
#
|
|
37
37
|
# MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
38
38
|
# carry the entry body — callers that need the body must fetch the entry
|
|
@@ -29,11 +29,11 @@ module Cadenya
|
|
|
29
29
|
|
|
30
30
|
# @!attribute resource
|
|
31
31
|
# MemoryLayer is a named container of memory entries that can be composed into an
|
|
32
|
-
# objective's memory
|
|
33
|
-
# controls how its entries participate in the agent loop — see
|
|
34
|
-
# details.
|
|
32
|
+
# objective's memory cascade. Layers are workspace-scoped resources. The layer
|
|
33
|
+
# type controls how its entries participate in the agent loop — see
|
|
34
|
+
# MemoryLayerType for details.
|
|
35
35
|
#
|
|
36
|
-
# See "Memory
|
|
36
|
+
# See "Memory cascade composition" above for how layers compose at lookup time.
|
|
37
37
|
#
|
|
38
38
|
# @return [Cadenya::Models::MemoryLayer, nil]
|
|
39
39
|
optional :resource, -> { Cadenya::MemoryLayer }
|
|
@@ -24,8 +24,8 @@ module Cadenya
|
|
|
24
24
|
|
|
25
25
|
# @!attribute resource
|
|
26
26
|
# VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a
|
|
27
|
-
# given position in the variation's baseline memory
|
|
28
|
-
# one assignment per memory_layer_id.
|
|
27
|
+
# given position in the variation's baseline memory cascade. A variation has at
|
|
28
|
+
# most one assignment per memory_layer_id.
|
|
29
29
|
#
|
|
30
30
|
# Variations only support whole-layer attachments — entry pinning is an
|
|
31
31
|
# objective-level capability.
|
|
@@ -25,11 +25,11 @@ module Cadenya
|
|
|
25
25
|
# {Cadenya::Models::MemoryLayer} for more details.
|
|
26
26
|
#
|
|
27
27
|
# MemoryLayer is a named container of memory entries that can be composed into an
|
|
28
|
-
# objective's memory
|
|
29
|
-
# controls how its entries participate in the agent loop — see
|
|
30
|
-
# details.
|
|
28
|
+
# objective's memory cascade. Layers are workspace-scoped resources. The layer
|
|
29
|
+
# type controls how its entries participate in the agent loop — see
|
|
30
|
+
# MemoryLayerType for details.
|
|
31
31
|
#
|
|
32
|
-
# See "Memory
|
|
32
|
+
# See "Memory cascade composition" above for how layers compose at lookup time.
|
|
33
33
|
#
|
|
34
34
|
# @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
35
35
|
#
|
|
@@ -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.
|
|
@@ -26,21 +40,25 @@ module Cadenya
|
|
|
26
40
|
# @!attribute system_managed
|
|
27
41
|
# Server-set. True for layers managed by the system (e.g., episodic layers created
|
|
28
42
|
# automatically when an objective uses an episodic_key). System-managed layers
|
|
29
|
-
# cannot be assigned to objective
|
|
43
|
+
# cannot be assigned to objective cascades via the API and cannot be mutated by
|
|
30
44
|
# clients — their lifecycle is controlled entirely by the runtime.
|
|
31
45
|
#
|
|
32
46
|
# @return [Boolean, nil]
|
|
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
|
|
@@ -31,8 +31,8 @@ module Cadenya
|
|
|
31
31
|
# MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
32
32
|
# by their key, which follows the S3 object key safe-character convention (see
|
|
33
33
|
# MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
34
|
-
# the same key may appear in multiple layers, in which case the
|
|
35
|
-
# determines which one wins for a given objective.
|
|
34
|
+
# the same key may appear in multiple layers, in which case the cascade walk
|
|
35
|
+
# determines which one wins for a given objective (most specific layer first).
|
|
36
36
|
#
|
|
37
37
|
# MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
38
38
|
# carry the entry body — callers that need the body must fetch the entry
|
|
@@ -30,8 +30,8 @@ module Cadenya
|
|
|
30
30
|
# {Cadenya::Models::MemoryRead} for more details.
|
|
31
31
|
#
|
|
32
32
|
# MemoryRead is emitted each time the agent resolves a key against the memory
|
|
33
|
-
#
|
|
34
|
-
# emit this event.
|
|
33
|
+
# cascade and loads an entry. Lookups that miss (key not found in any layer) do
|
|
34
|
+
# not emit this event.
|
|
35
35
|
#
|
|
36
36
|
# @param memory_entry_id [String] The specific entry that was read.
|
|
37
37
|
#
|
|
@@ -4,9 +4,10 @@ module Cadenya
|
|
|
4
4
|
module Models
|
|
5
5
|
class MemoryReference < Cadenya::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute memory_entry_id
|
|
7
|
-
# When set,
|
|
8
|
-
# as a single-entry layer (only this key resolves at this position). The
|
|
9
|
-
# must belong to memory_layer_id; mismatches are rejected with
|
|
7
|
+
# When set, inserts only this entry from memory_layer_id into the cascade —
|
|
8
|
+
# behaves as a single-entry layer (only this key resolves at this position). The
|
|
9
|
+
# entry must belong to memory_layer_id; mismatches are rejected with
|
|
10
|
+
# InvalidArgument.
|
|
10
11
|
#
|
|
11
12
|
# @return [String, nil]
|
|
12
13
|
optional :memory_entry_id, String, api_name: :memoryEntryId
|
|
@@ -21,13 +22,13 @@ module Cadenya
|
|
|
21
22
|
# {Cadenya::Models::MemoryReference} for more details.
|
|
22
23
|
#
|
|
23
24
|
# MemoryReference identifies a memory layer or a specific entry within one, for
|
|
24
|
-
# composition into a memory
|
|
25
|
+
# composition into a memory cascade. Used on objectives (where entry pinning is
|
|
25
26
|
# permitted).
|
|
26
27
|
#
|
|
27
28
|
# memory*layer_id accepts both the canonical form (memlyr*…) and the external-id
|
|
28
29
|
# form (external_id:my-custom-id). The same applies to memory_entry_id when set.
|
|
29
30
|
#
|
|
30
|
-
# @param memory_entry_id [String] When set,
|
|
31
|
+
# @param memory_entry_id [String] When set, inserts only this entry from memory_layer_id into the cascade —
|
|
31
32
|
#
|
|
32
33
|
# @param memory_layer_id [String]
|
|
33
34
|
end
|
|
@@ -18,27 +18,31 @@ module Cadenya
|
|
|
18
18
|
# @return [Cadenya::Models::OperationMetadata]
|
|
19
19
|
required :metadata, -> { Cadenya::OperationMetadata }
|
|
20
20
|
|
|
21
|
-
# @!attribute
|
|
22
|
-
#
|
|
23
|
-
# baseline stack inherited from the selected variation.
|
|
21
|
+
# @!attribute episodic_memory
|
|
22
|
+
# Episodic is used to configure the episodic memory for the objective
|
|
24
23
|
#
|
|
25
|
-
#
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#
|
|
24
|
+
# @return [Cadenya::Models::Objective::EpisodicMemory, nil]
|
|
25
|
+
optional :episodic_memory, -> { Cadenya::Objective::EpisodicMemory }, api_name: :episodicMemory
|
|
26
|
+
|
|
27
|
+
# @!attribute memory_cascade
|
|
28
|
+
# Memory layers/entries layered over the baseline cascade inherited from the
|
|
29
|
+
# selected variation — element-level rules over inherited styles, in CSS terms.
|
|
29
30
|
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
31
|
+
# Array order is resolution order: EARLIER elements are more specific and are
|
|
32
|
+
# consulted first. Entries pinned via memory_entry_id behave as single-entry
|
|
33
|
+
# layers at their position.
|
|
32
34
|
#
|
|
33
|
-
#
|
|
35
|
+
# System-managed layers (e.g., episodic) cannot be referenced here; they attach
|
|
36
|
+
# themselves automatically based on the episodic key.
|
|
34
37
|
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
38
|
+
# Size cap: the TOTAL effective cascade (this field + the variation's memory layer
|
|
39
|
+
# assignments) must not exceed 10 entries. A request that would produce a larger
|
|
40
|
+
# cascade is rejected with InvalidArgument.
|
|
37
41
|
#
|
|
38
42
|
# @return [Array<Cadenya::Models::MemoryReference>, nil]
|
|
39
|
-
optional :
|
|
43
|
+
optional :memory_cascade,
|
|
40
44
|
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
|
|
41
|
-
api_name: :
|
|
45
|
+
api_name: :memoryCascade
|
|
42
46
|
|
|
43
47
|
# @!attribute secrets
|
|
44
48
|
# Secrets that can be used in the headers for tool calls using the secret
|
|
@@ -110,7 +114,7 @@ module Cadenya
|
|
|
110
114
|
api_name: :userData
|
|
111
115
|
end
|
|
112
116
|
|
|
113
|
-
# @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, info: nil,
|
|
117
|
+
# @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, episodic_memory: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, user_data: nil)
|
|
114
118
|
# Some parameter documentations has been truncated, see
|
|
115
119
|
# {Cadenya::Models::Objective} for more details.
|
|
116
120
|
#
|
|
@@ -130,9 +134,11 @@ module Cadenya
|
|
|
130
134
|
#
|
|
131
135
|
# @param data [Hash{Symbol=>Object}] Arbitrary data for the objective
|
|
132
136
|
#
|
|
137
|
+
# @param episodic_memory [Cadenya::Models::Objective::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
|
|
138
|
+
#
|
|
133
139
|
# @param info [Cadenya::Models::ObjectiveInfo] ObjectiveInfo provides read-only aggregated statistics about an objective's exec
|
|
134
140
|
#
|
|
135
|
-
# @param
|
|
141
|
+
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
136
142
|
#
|
|
137
143
|
# @param output [Hash{Symbol=>Object}] The output of the objective, populated when the objective completes. Will match
|
|
138
144
|
#
|
|
@@ -161,6 +167,35 @@ module Cadenya
|
|
|
161
167
|
# @!method self.values
|
|
162
168
|
# @return [Array<Symbol>]
|
|
163
169
|
end
|
|
170
|
+
|
|
171
|
+
# @see Cadenya::Models::Objective#episodic_memory
|
|
172
|
+
class EpisodicMemory < Cadenya::Internal::Type::BaseModel
|
|
173
|
+
# @!attribute key
|
|
174
|
+
# The caller-supplied episodic key. Objectives created with the same key (for the
|
|
175
|
+
# same agent) share one episodic memory layer.
|
|
176
|
+
#
|
|
177
|
+
# @return [String, nil]
|
|
178
|
+
optional :key, String
|
|
179
|
+
|
|
180
|
+
response_only do
|
|
181
|
+
# @!attribute memory_layer_id
|
|
182
|
+
# The episodic memory layer resolved (created or reused) for this objective's key.
|
|
183
|
+
# Populated by the system at objective creation.
|
|
184
|
+
#
|
|
185
|
+
# @return [String, nil]
|
|
186
|
+
optional :memory_layer_id, String, api_name: :memoryLayerId
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @!method initialize(key: nil, memory_layer_id: nil)
|
|
190
|
+
# Some parameter documentations has been truncated, see
|
|
191
|
+
# {Cadenya::Models::Objective::EpisodicMemory} for more details.
|
|
192
|
+
#
|
|
193
|
+
# Episodic is used to configure the episodic memory for the objective
|
|
194
|
+
#
|
|
195
|
+
# @param key [String] The caller-supplied episodic key. Objectives created with the same key
|
|
196
|
+
#
|
|
197
|
+
# @param memory_layer_id [String] The episodic memory layer resolved (created or reused) for this
|
|
198
|
+
end
|
|
164
199
|
end
|
|
165
200
|
end
|
|
166
201
|
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
|
|
@@ -34,27 +42,25 @@ module Cadenya
|
|
|
34
42
|
# @return [String, nil]
|
|
35
43
|
optional :initial_message, String, api_name: :initialMessage
|
|
36
44
|
|
|
37
|
-
# @!attribute
|
|
38
|
-
# Memory layers/entries
|
|
39
|
-
#
|
|
45
|
+
# @!attribute memory_cascade
|
|
46
|
+
# Memory layers/entries layered over the baseline cascade inherited from the
|
|
47
|
+
# selected variation — element-level rules over inherited styles, in CSS terms.
|
|
40
48
|
#
|
|
41
|
-
# Array order is
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
# position.
|
|
49
|
+
# Array order is resolution order: EARLIER elements are more specific and are
|
|
50
|
+
# consulted first. Entries pinned via memory_entry_id behave as single-entry
|
|
51
|
+
# layers at their position.
|
|
45
52
|
#
|
|
46
53
|
# System-managed layers (e.g., episodic) cannot be referenced here; they attach
|
|
47
|
-
# themselves automatically based on
|
|
48
|
-
#
|
|
49
|
-
# Stack size cap: the TOTAL effective stack (variation's memory layers
|
|
54
|
+
# themselves automatically based on the episodic key.
|
|
50
55
|
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
56
|
+
# Size cap: the TOTAL effective cascade (this field + the variation's memory layer
|
|
57
|
+
# assignments) must not exceed 10 entries. A request that would produce a larger
|
|
58
|
+
# cascade is rejected with InvalidArgument.
|
|
53
59
|
#
|
|
54
60
|
# @return [Array<Cadenya::Models::MemoryReference>, nil]
|
|
55
|
-
optional :
|
|
61
|
+
optional :memory_cascade,
|
|
56
62
|
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
|
|
57
|
-
api_name: :
|
|
63
|
+
api_name: :memoryCascade
|
|
58
64
|
|
|
59
65
|
# @!attribute metadata
|
|
60
66
|
# CreateOperationMetadata contains the user-provided fields for creating an
|
|
@@ -88,7 +94,7 @@ module Cadenya
|
|
|
88
94
|
# @return [String, nil]
|
|
89
95
|
optional :variation_id, String, api_name: :variationId
|
|
90
96
|
|
|
91
|
-
# @!method initialize(workspace_id:, agent_id:, data:, initial_message: nil,
|
|
97
|
+
# @!method initialize(workspace_id:, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_cascade: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
|
|
92
98
|
# Some parameter documentations has been truncated, see
|
|
93
99
|
# {Cadenya::Models::ObjectiveCreateParams} for more details.
|
|
94
100
|
#
|
|
@@ -98,9 +104,11 @@ module Cadenya
|
|
|
98
104
|
#
|
|
99
105
|
# @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
|
|
100
106
|
#
|
|
107
|
+
# @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
|
|
108
|
+
#
|
|
101
109
|
# @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
|
|
102
110
|
#
|
|
103
|
-
# @param
|
|
111
|
+
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
104
112
|
#
|
|
105
113
|
# @param metadata [Cadenya::Models::CreateOperationMetadata] CreateOperationMetadata contains the user-provided fields for creating
|
|
106
114
|
#
|
|
@@ -112,6 +120,23 @@ module Cadenya
|
|
|
112
120
|
#
|
|
113
121
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
114
122
|
|
|
123
|
+
class EpisodicMemory < Cadenya::Internal::Type::BaseModel
|
|
124
|
+
# @!attribute key
|
|
125
|
+
# The caller-supplied episodic key. Objectives created with the same key (for the
|
|
126
|
+
# same agent) share one episodic memory layer.
|
|
127
|
+
#
|
|
128
|
+
# @return [String, nil]
|
|
129
|
+
optional :key, String
|
|
130
|
+
|
|
131
|
+
# @!method initialize(key: nil)
|
|
132
|
+
# Some parameter documentations has been truncated, see
|
|
133
|
+
# {Cadenya::Models::ObjectiveCreateParams::EpisodicMemory} for more details.
|
|
134
|
+
#
|
|
135
|
+
# Episodic is used to configure the episodic memory for the objective
|
|
136
|
+
#
|
|
137
|
+
# @param key [String] The caller-supplied episodic key. Objectives created with the same key
|
|
138
|
+
end
|
|
139
|
+
|
|
115
140
|
class Secret < Cadenya::Internal::Type::BaseModel
|
|
116
141
|
# @!attribute name
|
|
117
142
|
#
|