@mastra/memory 1.22.1-alpha.0 → 1.22.1
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.
- package/CHANGELOG.md +19 -0
- package/dist/{chunk-KKP6DG65.js → chunk-2NSPHF6Q.js} +10 -4
- package/dist/chunk-2NSPHF6Q.js.map +1 -0
- package/dist/{chunk-KXO2ZPM3.cjs → chunk-YWAAIUB6.cjs} +10 -4
- package/dist/chunk-YWAAIUB6.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +38 -38
- package/dist/docs/references/docs-agents-agent-approval.md +2 -0
- package/dist/docs/references/docs-agents-background-tasks.md +2 -0
- package/dist/docs/references/docs-agents-goals.md +2 -0
- package/dist/docs/references/docs-agents-networks.md +2 -0
- package/dist/docs/references/docs-agents-supervisor-agents.md +2 -0
- package/dist/docs/references/docs-evals-evals-with-memory.md +2 -0
- package/dist/docs/references/docs-memory-memory-processors.md +2 -0
- package/dist/docs/references/docs-memory-message-history.md +2 -0
- package/dist/docs/references/docs-memory-multi-user-threads.md +2 -0
- package/dist/docs/references/docs-memory-observational-memory.md +2 -0
- package/dist/docs/references/docs-memory-overview.md +5 -1
- package/dist/docs/references/docs-memory-semantic-recall.md +2 -0
- package/dist/docs/references/docs-memory-storage.md +6 -0
- package/dist/docs/references/docs-memory-working-memory.md +2 -0
- package/dist/docs/references/reference-core-getMemory.md +2 -0
- package/dist/docs/references/reference-core-listMemory.md +2 -0
- package/dist/docs/references/reference-memory-clone-utilities.md +2 -0
- package/dist/docs/references/reference-memory-cloneThread.md +2 -0
- package/dist/docs/references/reference-memory-createThread.md +2 -0
- package/dist/docs/references/reference-memory-getThreadById.md +2 -0
- package/dist/docs/references/reference-memory-listThreads.md +2 -0
- package/dist/docs/references/reference-memory-memory-class.md +2 -0
- package/dist/docs/references/reference-memory-observational-memory.md +2 -0
- package/dist/docs/references/reference-processors-token-limiter-processor.md +2 -0
- package/dist/docs/references/reference-storage-dsql.md +2 -0
- package/dist/docs/references/reference-storage-dynamodb.md +2 -0
- package/dist/docs/references/reference-storage-libsql.md +2 -0
- package/dist/docs/references/reference-storage-mongodb.md +2 -0
- package/dist/docs/references/reference-storage-postgresql.md +2 -0
- package/dist/docs/references/reference-storage-redis.md +2 -0
- package/dist/docs/references/reference-storage-upstash.md +2 -0
- package/dist/docs/references/reference-vectors-libsql.md +2 -0
- package/dist/docs/references/reference-vectors-mongodb.md +2 -0
- package/dist/docs/references/reference-vectors-pg.md +2 -0
- package/dist/docs/references/reference-vectors-upstash.md +2 -0
- package/dist/index.cjs +13 -13
- package/dist/index.js +1 -1
- package/dist/{observational-memory-GSJXSJXG.cjs → observational-memory-CZ22AU3H.cjs} +28 -28
- package/dist/{observational-memory-GSJXSJXG.cjs.map → observational-memory-CZ22AU3H.cjs.map} +1 -1
- package/dist/{observational-memory-PBLNZABH.js → observational-memory-QL6BKIQX.js} +3 -3
- package/dist/{observational-memory-PBLNZABH.js.map → observational-memory-QL6BKIQX.js.map} +1 -1
- package/dist/processors/index.cjs +26 -26
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/token-counter.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-KKP6DG65.js.map +0 -1
- package/dist/chunk-KXO2ZPM3.cjs.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.22.1
|
|
2
|
+
"version": "1.22.1",
|
|
3
3
|
"package": "@mastra/memory",
|
|
4
4
|
"exports": {
|
|
5
5
|
"Extractor": {
|
|
6
6
|
"types": "dist/processors/index.d.ts",
|
|
7
|
-
"implementation": "dist/chunk-
|
|
7
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
8
8
|
"line": 316
|
|
9
9
|
},
|
|
10
10
|
"ModelByInputTokens": {
|
|
11
11
|
"types": "dist/processors/index.d.ts",
|
|
12
|
-
"implementation": "dist/chunk-
|
|
12
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
13
13
|
"line": 1354
|
|
14
14
|
},
|
|
15
15
|
"OBSERVER_SYSTEM_PROMPT": {
|
|
16
16
|
"types": "dist/processors/index.d.ts",
|
|
17
|
-
"implementation": "dist/chunk-
|
|
17
|
+
"implementation": "dist/chunk-2NSPHF6Q.js"
|
|
18
18
|
},
|
|
19
19
|
"ObservationalMemory": {
|
|
20
20
|
"types": "dist/processors/index.d.ts",
|
|
21
|
-
"implementation": "dist/chunk-
|
|
22
|
-
"line":
|
|
21
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
22
|
+
"line": 27532
|
|
23
23
|
},
|
|
24
24
|
"ObservationalMemoryProcessor": {
|
|
25
25
|
"types": "dist/processors/index.d.ts",
|
|
26
|
-
"implementation": "dist/chunk-
|
|
27
|
-
"line":
|
|
26
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
27
|
+
"line": 30163
|
|
28
28
|
},
|
|
29
29
|
"TokenCounter": {
|
|
30
30
|
"types": "dist/processors/index.d.ts",
|
|
31
|
-
"implementation": "dist/chunk-
|
|
31
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
32
32
|
"line": 26857
|
|
33
33
|
},
|
|
34
34
|
"WorkingMemoryExtractor": {
|
|
35
35
|
"types": "dist/processors/index.d.ts",
|
|
36
|
-
"implementation": "dist/chunk-
|
|
36
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
37
37
|
"line": 20684
|
|
38
38
|
},
|
|
39
39
|
"buildObserverPrompt": {
|
|
40
40
|
"types": "dist/processors/index.d.ts",
|
|
41
|
-
"implementation": "dist/chunk-
|
|
41
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
42
42
|
"line": 4465
|
|
43
43
|
},
|
|
44
44
|
"buildObserverSystemPrompt": {
|
|
45
45
|
"types": "dist/processors/index.d.ts",
|
|
46
|
-
"implementation": "dist/chunk-
|
|
46
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
47
47
|
"line": 3732
|
|
48
48
|
},
|
|
49
49
|
"combineObservationGroupRanges": {
|
|
50
50
|
"types": "dist/processors/index.d.ts",
|
|
51
|
-
"implementation": "dist/chunk-
|
|
51
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
52
52
|
"line": 1446
|
|
53
53
|
},
|
|
54
54
|
"deriveObservationGroupProvenance": {
|
|
55
55
|
"types": "dist/processors/index.d.ts",
|
|
56
|
-
"implementation": "dist/chunk-
|
|
56
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
57
57
|
"line": 1480
|
|
58
58
|
},
|
|
59
59
|
"extractCurrentTask": {
|
|
60
60
|
"types": "dist/processors/index.d.ts",
|
|
61
|
-
"implementation": "dist/chunk-
|
|
61
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
62
62
|
"line": 4588
|
|
63
63
|
},
|
|
64
64
|
"formatMessagesForObserver": {
|
|
65
65
|
"types": "dist/processors/index.d.ts",
|
|
66
|
-
"implementation": "dist/chunk-
|
|
66
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
67
67
|
"line": 4187
|
|
68
68
|
},
|
|
69
69
|
"getObservationsAsOf": {
|
|
70
70
|
"types": "dist/processors/index.d.ts",
|
|
71
|
-
"implementation": "dist/chunk-
|
|
72
|
-
"line":
|
|
71
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
72
|
+
"line": 30385
|
|
73
73
|
},
|
|
74
74
|
"hasCurrentTaskSection": {
|
|
75
75
|
"types": "dist/processors/index.d.ts",
|
|
76
|
-
"implementation": "dist/chunk-
|
|
76
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
77
77
|
"line": 4576
|
|
78
78
|
},
|
|
79
79
|
"injectAnchorIds": {
|
|
80
80
|
"types": "dist/processors/index.d.ts",
|
|
81
|
-
"implementation": "dist/chunk-
|
|
81
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
82
82
|
"line": 3287
|
|
83
83
|
},
|
|
84
84
|
"optimizeObservationsForContext": {
|
|
85
85
|
"types": "dist/processors/index.d.ts",
|
|
86
|
-
"implementation": "dist/chunk-
|
|
86
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
87
87
|
"line": 4599
|
|
88
88
|
},
|
|
89
89
|
"parseAnchorId": {
|
|
90
90
|
"types": "dist/processors/index.d.ts",
|
|
91
|
-
"implementation": "dist/chunk-
|
|
91
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
92
92
|
"line": 3260
|
|
93
93
|
},
|
|
94
94
|
"parseObservationGroups": {
|
|
95
95
|
"types": "dist/processors/index.d.ts",
|
|
96
|
-
"implementation": "dist/chunk-
|
|
96
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
97
97
|
"line": 1415
|
|
98
98
|
},
|
|
99
99
|
"parseObserverOutput": {
|
|
100
100
|
"types": "dist/processors/index.d.ts",
|
|
101
|
-
"implementation": "dist/chunk-
|
|
101
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
102
102
|
"line": 4479
|
|
103
103
|
},
|
|
104
104
|
"reconcileObservationGroupsFromReflection": {
|
|
105
105
|
"types": "dist/processors/index.d.ts",
|
|
106
|
-
"implementation": "dist/chunk-
|
|
106
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
107
107
|
"line": 1504
|
|
108
108
|
},
|
|
109
109
|
"renderObservationGroupsForReflection": {
|
|
110
110
|
"types": "dist/processors/index.d.ts",
|
|
111
|
-
"implementation": "dist/chunk-
|
|
111
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
112
112
|
"line": 1460
|
|
113
113
|
},
|
|
114
114
|
"stripEphemeralAnchorIds": {
|
|
115
115
|
"types": "dist/processors/index.d.ts",
|
|
116
|
-
"implementation": "dist/chunk-
|
|
116
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
117
117
|
"line": 3317
|
|
118
118
|
},
|
|
119
119
|
"stripObservationGroups": {
|
|
120
120
|
"types": "dist/processors/index.d.ts",
|
|
121
|
-
"implementation": "dist/chunk-
|
|
121
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
122
122
|
"line": 1437
|
|
123
123
|
},
|
|
124
124
|
"wrapInObservationGroup": {
|
|
125
125
|
"types": "dist/processors/index.d.ts",
|
|
126
|
-
"implementation": "dist/chunk-
|
|
126
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
127
127
|
"line": 1408
|
|
128
128
|
},
|
|
129
129
|
"OBSERVATIONAL_MEMORY_DEFAULTS": {
|
|
@@ -144,39 +144,39 @@
|
|
|
144
144
|
},
|
|
145
145
|
"Memory": {
|
|
146
146
|
"types": "dist/index.d.ts",
|
|
147
|
-
"implementation": "dist/chunk-
|
|
147
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
148
148
|
"line": 22108
|
|
149
149
|
},
|
|
150
150
|
"MessageHistory": {
|
|
151
151
|
"types": "dist/index.d.ts",
|
|
152
|
-
"implementation": "dist/chunk-
|
|
152
|
+
"implementation": "dist/chunk-2NSPHF6Q.js"
|
|
153
153
|
},
|
|
154
154
|
"SemanticRecall": {
|
|
155
155
|
"types": "dist/index.d.ts",
|
|
156
|
-
"implementation": "dist/chunk-
|
|
156
|
+
"implementation": "dist/chunk-2NSPHF6Q.js"
|
|
157
157
|
},
|
|
158
158
|
"WorkingMemory": {
|
|
159
159
|
"types": "dist/index.d.ts",
|
|
160
|
-
"implementation": "dist/chunk-
|
|
160
|
+
"implementation": "dist/chunk-2NSPHF6Q.js"
|
|
161
161
|
},
|
|
162
162
|
"deepMergeWorkingMemory": {
|
|
163
163
|
"types": "dist/index.d.ts",
|
|
164
|
-
"implementation": "dist/chunk-
|
|
164
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
165
165
|
"line": 21747
|
|
166
166
|
},
|
|
167
167
|
"extractWorkingMemoryContent": {
|
|
168
168
|
"types": "dist/index.d.ts",
|
|
169
|
-
"implementation": "dist/chunk-
|
|
169
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
170
170
|
"line": 22063
|
|
171
171
|
},
|
|
172
172
|
"extractWorkingMemoryTags": {
|
|
173
173
|
"types": "dist/index.d.ts",
|
|
174
|
-
"implementation": "dist/chunk-
|
|
174
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
175
175
|
"line": 22031
|
|
176
176
|
},
|
|
177
177
|
"removeWorkingMemoryTags": {
|
|
178
178
|
"types": "dist/index.d.ts",
|
|
179
|
-
"implementation": "dist/chunk-
|
|
179
|
+
"implementation": "dist/chunk-2NSPHF6Q.js",
|
|
180
180
|
"line": 22044
|
|
181
181
|
},
|
|
182
182
|
"WORKING_MEMORY_STATE_ID": {
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"processors": {
|
|
198
198
|
"index": "dist/processors/index.js",
|
|
199
199
|
"chunks": [
|
|
200
|
-
"chunk-
|
|
200
|
+
"chunk-2NSPHF6Q.js",
|
|
201
201
|
"chunk-LSJJAJAF.js"
|
|
202
202
|
]
|
|
203
203
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Agent approval
|
|
2
4
|
|
|
3
5
|
Agents sometimes require the same [human-in-the-loop](https://mastra.ai/docs/workflows/human-in-the-loop) oversight used in workflows when calling tools that handle sensitive operations, like deleting resources or running long processes. With agent approval you can suspend a tool call before it executes so a human can approve or decline it, or let tools suspend themselves to request additional context from the user.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Agent networks
|
|
2
4
|
|
|
3
5
|
> **Deprecated — Use supervisor agents:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/agents/supervisor-agents) using `agent.stream()` or `agent.generate()` are now the recommended approach. It provides the same multi-agent coordination with better control, a simpler API, and easier debugging.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Evals with memory
|
|
2
4
|
|
|
3
5
|
Agents that use memory in `thread` scope — including observational memory — require a thread ID at run time. When an eval invokes the agent without one, you'll see:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Memory processors
|
|
2
4
|
|
|
3
5
|
Memory processors transform and filter messages as they pass through an agent with memory enabled. They manage context window limits, remove unnecessary content, and optimize the information sent to the language model.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Message history
|
|
2
4
|
|
|
3
5
|
Message history is the most basic and important form of memory. It gives the LLM a view of recent messages in the context window, enabling your agent to reference earlier exchanges and respond coherently.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Multi-user threads
|
|
2
4
|
|
|
3
5
|
A single Mastra thread can be shared by multiple users, each with their own name and functional role. You carry speaker identity in the message body so the agent can tell users apart while reading from a single shared thread.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Memory
|
|
2
4
|
|
|
3
5
|
Memory enables your agent to remember user messages, agent replies, and tool results across interactions, giving it the context it needs to stay consistent, maintain conversation flow, and produce better answers over time.
|
|
@@ -174,7 +176,9 @@ Each delegation creates a fresh `threadId` and a deterministic `resourceId` for
|
|
|
174
176
|
|
|
175
177
|
- **Thread ID**: Unique per delegation. The subagent starts with a clean message history every time it's called.
|
|
176
178
|
- **Resource ID**: Derived as `{parentResourceId}-{agentName}`. Because the resource ID is stable across delegations, resource-scoped memory persists between calls. A subagent remembers facts from previous delegations by the same user.
|
|
177
|
-
- **Memory instance**: If a subagent has no memory configured, it inherits the supervisor's `Memory` instance. If the subagent defines its own, that takes precedence.
|
|
179
|
+
- **Memory instance**: If a subagent has no memory configured, it inherits the supervisor's `Memory` instance, including all of its options. If the subagent defines its own, that takes precedence.
|
|
180
|
+
|
|
181
|
+
> **Note:** Title generation (`generateTitle`) is a top-level thread concern and is **not** applied to inherited subagent threads. Because each delegation creates an ephemeral thread that no one sees, running title generation for it would waste an LLM call per delegation. To generate titles for a subagent's own threads, give that subagent its own memory configuration.
|
|
178
182
|
|
|
179
183
|
The supervisor forwards its conversation context to the subagent so it has enough background to complete the task. Only the delegation prompt and the subagent's response are saved — the full parent conversation isn't stored. You can control which messages reach the subagent with the [`messageFilter`](https://mastra.ai/docs/agents/supervisor-agents) callback.
|
|
180
184
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Semantic recall
|
|
2
4
|
|
|
3
5
|
If you ask your friend what they did last weekend, they will search in their memory for events associated with "last weekend" and then tell you what they did. That's sort of like how semantic recall works in Mastra.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Storage
|
|
2
4
|
|
|
3
5
|
For agents to remember previous interactions, Mastra needs a storage adapter. Use one of the [supported providers](#supported-providers) and pass it to your Mastra instance.
|
|
@@ -100,6 +102,10 @@ export const mastra = new Mastra({
|
|
|
100
102
|
|
|
101
103
|
This is useful when different types of data have different performance or operational requirements, such as low-latency storage for memory, durable storage for workflows, and high-throughput storage for observability.
|
|
102
104
|
|
|
105
|
+
#### Retention
|
|
106
|
+
|
|
107
|
+
Storage grows without bound by default. To cap growth, declare per-table `maxAge` policies in the `retention` config and call `storage.prune()` from your own scheduler to delete old rows. Anything you don't configure is kept forever. See [Storage retention](https://mastra.ai/reference/storage/retention) for `prune()` and the full config shape.
|
|
108
|
+
|
|
103
109
|
### Agent-level storage
|
|
104
110
|
|
|
105
111
|
Agent-level storage overrides storage configured at the instance level. Add storage to a specific agent when you need to keep data separate or use different providers per agent.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Working Memory
|
|
2
4
|
|
|
3
5
|
While [message history](https://mastra.ai/docs/memory/message-history) and [semantic recall](https://mastra.ai/docs/memory/semantic-recall) help agents remember conversations, working memory allows them to maintain persistent information about users across interactions.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Mastra.getMemory()
|
|
2
4
|
|
|
3
5
|
The `.getMemory()` method retrieves a memory instance from the Mastra registry by its key. Memory instances are registered in the Mastra constructor and can be referenced by stored agents.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Cloned thread utilities
|
|
2
4
|
|
|
3
5
|
The Memory class provides utility methods for working with cloned threads. These methods help you check clone status, retrieve clone metadata, navigate clone relationships, and track clone history.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Memory.cloneThread()
|
|
2
4
|
|
|
3
5
|
The `.cloneThread()` method creates a copy of an existing conversation thread, including all its messages. This enables creating divergent conversation paths from a specific point in a conversation. When semantic recall is enabled, the method also creates vector embeddings for the cloned messages.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Memory.createThread()
|
|
2
4
|
|
|
3
5
|
The `.createThread()` method creates a new conversation thread in the memory system. Each thread represents a distinct conversation or context and can contain multiple messages.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Memory class
|
|
2
4
|
|
|
3
5
|
The `Memory` class provides a robust system for managing conversation history and thread-based message storage in Mastra. It enables persistent storage of conversations, semantic search capabilities, and efficient message retrieval. You must configure a storage provider for conversation history, and if you enable semantic recall you will also need to provide a vector store and embedder.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# DynamoDB storage
|
|
2
4
|
|
|
3
5
|
The DynamoDB storage implementation provides a scalable and performant NoSQL database solution for Mastra, leveraging a single-table design pattern with [ElectroDB](https://electrodb.dev/).
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# libSQL storage
|
|
2
4
|
|
|
3
5
|
[libSQL](https://docs.turso.tech/libsql) is an open-source, SQLite-compatible database that supports both local and remote deployments. It can be used to store message history, workflow snapshots, traces, and eval scores.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Redis Storage
|
|
2
4
|
|
|
3
5
|
The Redis storage implementation provides a high-performance storage solution using direct Redis connections via [`node-redis`](https://github.com/redis/node-redis) (the official Redis client for Node.js). It supports standalone Redis, and through custom client configuration, Redis Sentinel and Cluster deployments.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# libSQL vector store
|
|
2
4
|
|
|
3
5
|
The libSQL storage implementation provides a SQLite-compatible vector search [libSQL](https://github.com/tursodatabase/libsql), a fork of SQLite with vector extensions, and [Turso](https://turso.tech/) with vector extensions, offering a lightweight and efficient vector database solution. It's part of the `@mastra/libsql` package and offers efficient vector similarity search with metadata filtering.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# MongoDB vector store
|
|
2
4
|
|
|
3
5
|
The `MongoDBVector` class provides vector search using [MongoDB Atlas Vector Search](https://www.mongodb.com/docs/atlas/atlas-vector-search/). It enables efficient similarity search and metadata filtering within your MongoDB collections.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# PG vector store
|
|
2
4
|
|
|
3
5
|
The PgVector class provides vector search using [PostgreSQL](https://www.postgresql.org/) with [pgvector](https://github.com/pgvector/pgvector) extension. It provides robust vector similarity search capabilities within your existing PostgreSQL database.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
1
3
|
# Upstash vector store
|
|
2
4
|
|
|
3
5
|
The UpstashVector class provides vector search using [Upstash Vector](https://upstash.com/vector), a serverless vector database service that provides vector similarity search with metadata filtering capabilities and hybrid search support.
|
package/dist/index.cjs
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYWAAIUB6_cjs = require('./chunk-YWAAIUB6.cjs');
|
|
4
4
|
var chunk43FJOLKM_cjs = require('./chunk-43FJOLKM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Extractor", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkYWAAIUB6_cjs.Extractor; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Memory", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkYWAAIUB6_cjs.Memory; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "MessageHistory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkYWAAIUB6_cjs.MessageHistory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ModelByInputTokens", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkYWAAIUB6_cjs.ModelByInputTokens; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "SemanticRecall", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkYWAAIUB6_cjs.SemanticRecall; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "WorkingMemory", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkYWAAIUB6_cjs.WorkingMemory; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "WorkingMemoryExtractor", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkYWAAIUB6_cjs.WorkingMemoryExtractor; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "deepMergeWorkingMemory", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkYWAAIUB6_cjs.deepMergeWorkingMemory; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "extractWorkingMemoryContent", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkYWAAIUB6_cjs.extractWorkingMemoryContent; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractWorkingMemoryTags", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkYWAAIUB6_cjs.extractWorkingMemoryTags; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkYWAAIUB6_cjs.getObservationsAsOf; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "removeWorkingMemoryTags", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkYWAAIUB6_cjs.removeWorkingMemoryTags; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "WORKING_MEMORY_STATE_ID", {
|
|
57
57
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Extractor, Memory, MessageHistory, ModelByInputTokens, SemanticRecall, WorkingMemory, WorkingMemoryExtractor, deepMergeWorkingMemory, extractWorkingMemoryContent, extractWorkingMemoryTags, getObservationsAsOf, removeWorkingMemoryTags } from './chunk-
|
|
1
|
+
export { Extractor, Memory, MessageHistory, ModelByInputTokens, SemanticRecall, WorkingMemory, WorkingMemoryExtractor, deepMergeWorkingMemory, extractWorkingMemoryContent, extractWorkingMemoryTags, getObservationsAsOf, removeWorkingMemoryTags } from './chunk-2NSPHF6Q.js';
|
|
2
2
|
export { WORKING_MEMORY_STATE_ID, WORKING_MEMORY_STATE_PROCESSOR_ID, WorkingMemoryStateProcessor } from './chunk-WCGXQIEN.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|