@mastra/memory 1.42.0-alpha.2 → 1.42.0-alpha.4

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.
Files changed (44) hide show
  1. package/dist/docs/SKILL.md +1 -1
  2. package/dist/docs/assets/SOURCE_MAP.json +84 -84
  3. package/dist/docs/references/docs-agents-human-in-the-loop.md +2 -2
  4. package/dist/docs/references/docs-agents-networks.md +1 -1
  5. package/dist/docs/references/docs-guides-context-engineering.md +3 -3
  6. package/dist/docs/references/docs-harness-background-tasks.md +2 -2
  7. package/dist/docs/references/docs-harness-goals.md +2 -2
  8. package/dist/docs/references/docs-knowledge-overview.md +1 -1
  9. package/dist/docs/references/docs-memory-memory-processors.md +8 -8
  10. package/dist/docs/references/docs-memory-message-history.md +3 -3
  11. package/dist/docs/references/docs-memory-observational-memory.md +1 -1
  12. package/dist/docs/references/docs-memory-semantic-recall.md +2 -2
  13. package/dist/docs/references/docs-memory-working-memory.md +3 -2
  14. package/dist/docs/references/docs-signals-overview.md +1 -1
  15. package/dist/docs/references/docs-storage.md +12 -12
  16. package/dist/docs/references/docs-subagents.md +26 -3
  17. package/dist/docs/references/integrations-channels-github.md +1 -1
  18. package/dist/docs/references/integrations-channels-ring.md +2 -2
  19. package/dist/docs/references/integrations-databases-aurora-dsql.md +1 -1
  20. package/dist/docs/references/integrations-databases-elasticsearch.md +1 -1
  21. package/dist/docs/references/integrations-databases-libsql.md +6 -0
  22. package/dist/docs/references/integrations-databases-mongodb.md +1 -1
  23. package/dist/docs/references/integrations-databases-oracledb.md +1 -1
  24. package/dist/docs/references/integrations-databases-postgresql.md +9 -1
  25. package/dist/docs/references/integrations-databases-redis.md +1 -1
  26. package/dist/docs/references/integrations-databases-upstash.md +1 -1
  27. package/dist/docs/references/reference-memory-memory-class.md +3 -3
  28. package/dist/docs/references/reference-memory-observational-memory.md +7 -3
  29. package/dist/docs/references/reference-processors-token-limiter-processor.md +3 -3
  30. package/dist/index.cjs +1 -1
  31. package/dist/index.d.ts +2 -0
  32. package/dist/index.js +1 -1
  33. package/dist/processors/index.cjs +1 -1
  34. package/dist/processors/index.js +1 -1
  35. package/dist/processors/observational-memory/cache-boundary.d.ts +21 -0
  36. package/dist/processors/observational-memory/constants.d.ts +1 -1
  37. package/dist/processors/observational-memory/date-utils.d.ts +4 -0
  38. package/dist/processors/observational-memory/observational-memory.d.ts +1 -0
  39. package/dist/processors/observational-memory/processor.d.ts +3 -1
  40. package/dist/processors/observational-memory/thresholds.d.ts +2 -0
  41. package/dist/processors/observational-memory/types.d.ts +5 -0
  42. package/dist/{src-Bv05c6Nj.js → src-CVekC2V9.js} +102 -25
  43. package/dist/{src-D2dL-xVG.cjs → src-DaOrkH_R.cjs} +102 -25
  44. package/package.json +2 -2
@@ -3,7 +3,7 @@ name: mastra-memory
3
3
  description: Documentation for @mastra/memory. Use when working with @mastra/memory APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/memory"
6
- version: "1.42.0-alpha.2"
6
+ version: "1.42.0-alpha.4"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,243 +1,243 @@
1
1
  {
2
- "version": "1.42.0-alpha.2",
2
+ "version": "1.42.0-alpha.4",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {
5
5
  "AUTO_MODEL_BY_PROVIDER": {
6
6
  "types": "dist/processors/observational-memory/auto-model.d.ts",
7
- "implementation": "dist/src-Bv05c6Nj.js",
8
- "line": 32945
7
+ "implementation": "dist/src-CVekC2V9.js",
8
+ "line": 32963
9
9
  },
10
10
  "Extractor": {
11
11
  "types": "dist/processors/observational-memory/extractor.d.ts",
12
- "implementation": "dist/src-Bv05c6Nj.js",
12
+ "implementation": "dist/src-CVekC2V9.js",
13
13
  "line": 24432
14
14
  },
15
15
  "ModelByInputTokens": {
16
16
  "types": "dist/processors/observational-memory/model-by-input-tokens.d.ts",
17
- "implementation": "dist/src-Bv05c6Nj.js",
18
- "line": 32728
17
+ "implementation": "dist/src-CVekC2V9.js",
18
+ "line": 32746
19
19
  },
20
20
  "OBSERVATIONAL_MEMORY_DEFAULTS": {
21
21
  "types": "dist/processors/observational-memory/constants.d.ts",
22
- "implementation": "dist/src-Bv05c6Nj.js",
22
+ "implementation": "dist/src-CVekC2V9.js",
23
23
  "line": 24168
24
24
  },
25
25
  "OBSERVATION_CONTEXT_INSTRUCTIONS": {
26
26
  "types": "dist/processors/observational-memory/constants.d.ts",
27
- "implementation": "dist/src-Bv05c6Nj.js",
27
+ "implementation": "dist/src-CVekC2V9.js",
28
28
  "line": 24229
29
29
  },
30
30
  "OBSERVATION_CONTEXT_PROMPT": {
31
31
  "types": "dist/processors/observational-memory/constants.d.ts",
32
- "implementation": "dist/src-Bv05c6Nj.js",
32
+ "implementation": "dist/src-CVekC2V9.js",
33
33
  "line": 24211
34
34
  },
35
35
  "OBSERVATION_CONTEXT_PROMPT_THREAD": {
36
36
  "types": "dist/processors/observational-memory/constants.d.ts",
37
- "implementation": "dist/src-Bv05c6Nj.js",
37
+ "implementation": "dist/src-CVekC2V9.js",
38
38
  "line": 24216
39
39
  },
40
40
  "OBSERVATION_CONTINUATION_HINT": {
41
41
  "types": "dist/processors/observational-memory/constants.d.ts",
42
- "implementation": "dist/src-Bv05c6Nj.js",
42
+ "implementation": "dist/src-CVekC2V9.js",
43
43
  "line": 24198
44
44
  },
45
45
  "OBSERVER_SYSTEM_PROMPT": {
46
46
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
47
- "implementation": "dist/src-Bv05c6Nj.js",
48
- "line": 26880
47
+ "implementation": "dist/src-CVekC2V9.js",
48
+ "line": 26898
49
49
  },
50
50
  "ObservationalMemory": {
51
51
  "types": "dist/processors/observational-memory/observational-memory.d.ts",
52
- "implementation": "dist/src-Bv05c6Nj.js",
53
- "line": 38063
52
+ "implementation": "dist/src-CVekC2V9.js",
53
+ "line": 38086
54
54
  },
55
55
  "ObservationalMemoryProcessor": {
56
56
  "types": "dist/processors/observational-memory/processor.d.ts",
57
- "implementation": "dist/src-Bv05c6Nj.js",
58
- "line": 40897
57
+ "implementation": "dist/src-CVekC2V9.js",
58
+ "line": 40966
59
59
  },
60
60
  "TokenCounter": {
61
61
  "types": "dist/processors/observational-memory/token-counter.d.ts",
62
- "implementation": "dist/src-Bv05c6Nj.js",
63
- "line": 29410
62
+ "implementation": "dist/src-CVekC2V9.js",
63
+ "line": 29428
64
64
  },
65
65
  "WorkingMemoryExtractor": {
66
66
  "types": "dist/processors/observational-memory/working-memory-extractor.d.ts",
67
- "implementation": "dist/src-Bv05c6Nj.js",
68
- "line": 30466
67
+ "implementation": "dist/src-CVekC2V9.js",
68
+ "line": 30484
69
69
  },
70
70
  "buildObserverPrompt": {
71
71
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
72
- "implementation": "dist/src-Bv05c6Nj.js",
73
- "line": 27562
72
+ "implementation": "dist/src-CVekC2V9.js",
73
+ "line": 27580
74
74
  },
75
75
  "buildObserverSystemPrompt": {
76
76
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
77
- "implementation": "dist/src-Bv05c6Nj.js",
78
- "line": 26774
77
+ "implementation": "dist/src-CVekC2V9.js",
78
+ "line": 26792
79
79
  },
80
80
  "combineObservationGroupRanges": {
81
81
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
82
- "implementation": "dist/src-Bv05c6Nj.js",
83
- "line": 31048
82
+ "implementation": "dist/src-CVekC2V9.js",
83
+ "line": 31066
84
84
  },
85
85
  "deriveObservationGroupProvenance": {
86
86
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
87
- "implementation": "dist/src-Bv05c6Nj.js",
88
- "line": 31092
87
+ "implementation": "dist/src-CVekC2V9.js",
88
+ "line": 31110
89
89
  },
90
90
  "extractCurrentTask": {
91
91
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
92
- "implementation": "dist/src-Bv05c6Nj.js",
93
- "line": 27875
92
+ "implementation": "dist/src-CVekC2V9.js",
93
+ "line": 27893
94
94
  },
95
95
  "formatMessagesForObserver": {
96
96
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
97
- "implementation": "dist/src-Bv05c6Nj.js",
98
- "line": 27313
97
+ "implementation": "dist/src-CVekC2V9.js",
98
+ "line": 27331
99
99
  },
100
100
  "getObservationContextPrompt": {
101
101
  "types": "dist/processors/observational-memory/constants.d.ts",
102
- "implementation": "dist/src-Bv05c6Nj.js",
102
+ "implementation": "dist/src-CVekC2V9.js",
103
103
  "line": 24222
104
104
  },
105
105
  "getObservationsAsOf": {
106
106
  "types": "dist/processors/observational-memory/observation-utils.d.ts",
107
- "implementation": "dist/src-Bv05c6Nj.js",
108
- "line": 41243
107
+ "implementation": "dist/src-CVekC2V9.js",
108
+ "line": 41319
109
109
  },
110
110
  "hasCurrentTaskSection": {
111
111
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
112
- "implementation": "dist/src-Bv05c6Nj.js",
113
- "line": 27863
112
+ "implementation": "dist/src-CVekC2V9.js",
113
+ "line": 27881
114
114
  },
115
115
  "injectAnchorIds": {
116
116
  "types": "dist/processors/observational-memory/anchor-ids.d.ts",
117
- "implementation": "dist/src-Bv05c6Nj.js",
117
+ "implementation": "dist/src-CVekC2V9.js",
118
118
  "line": 25432
119
119
  },
120
120
  "optimizeObservationsForContext": {
121
121
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
122
- "implementation": "dist/src-Bv05c6Nj.js",
123
- "line": 27896
122
+ "implementation": "dist/src-CVekC2V9.js",
123
+ "line": 27914
124
124
  },
125
125
  "parseAnchorId": {
126
126
  "types": "dist/processors/observational-memory/anchor-ids.d.ts",
127
- "implementation": "dist/src-Bv05c6Nj.js",
127
+ "implementation": "dist/src-CVekC2V9.js",
128
128
  "line": 25416
129
129
  },
130
130
  "parseObservationGroups": {
131
131
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
132
- "implementation": "dist/src-Bv05c6Nj.js",
133
- "line": 31003
132
+ "implementation": "dist/src-CVekC2V9.js",
133
+ "line": 31021
134
134
  },
135
135
  "parseObserverOutput": {
136
136
  "types": "dist/processors/observational-memory/observer-agent.d.ts",
137
- "implementation": "dist/src-Bv05c6Nj.js",
138
- "line": 27573
137
+ "implementation": "dist/src-CVekC2V9.js",
138
+ "line": 27591
139
139
  },
140
140
  "reconcileObservationGroupsFromReflection": {
141
141
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
142
- "implementation": "dist/src-Bv05c6Nj.js",
143
- "line": 31111
142
+ "implementation": "dist/src-CVekC2V9.js",
143
+ "line": 31129
144
144
  },
145
145
  "renderObservationGroupsForReflection": {
146
146
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
147
- "implementation": "dist/src-Bv05c6Nj.js",
148
- "line": 31077
147
+ "implementation": "dist/src-CVekC2V9.js",
148
+ "line": 31095
149
149
  },
150
150
  "resolveAutoModelId": {
151
151
  "types": "dist/processors/observational-memory/auto-model.d.ts",
152
- "implementation": "dist/src-Bv05c6Nj.js",
153
- "line": 32965
152
+ "implementation": "dist/src-CVekC2V9.js",
153
+ "line": 32983
154
154
  },
155
155
  "stripEphemeralAnchorIds": {
156
156
  "types": "dist/processors/observational-memory/anchor-ids.d.ts",
157
- "implementation": "dist/src-Bv05c6Nj.js",
157
+ "implementation": "dist/src-CVekC2V9.js",
158
158
  "line": 25455
159
159
  },
160
160
  "stripObservationGroups": {
161
161
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
162
- "implementation": "dist/src-Bv05c6Nj.js",
163
- "line": 31020
162
+ "implementation": "dist/src-CVekC2V9.js",
163
+ "line": 31038
164
164
  },
165
165
  "summarizeConversation": {
166
166
  "types": "dist/processors/observational-memory/summarize.d.ts",
167
- "implementation": "dist/src-Bv05c6Nj.js",
168
- "line": 30078
167
+ "implementation": "dist/src-CVekC2V9.js",
168
+ "line": 30096
169
169
  },
170
170
  "wrapInObservationGroup": {
171
171
  "types": "dist/processors/observational-memory/observation-groups.d.ts",
172
- "implementation": "dist/src-Bv05c6Nj.js",
173
- "line": 30974
172
+ "implementation": "dist/src-CVekC2V9.js",
173
+ "line": 30992
174
174
  },
175
175
  "KnowledgeSemanticIndexCoordinator": {
176
176
  "types": "dist/removed-subconscious.d.ts",
177
- "implementation": "dist/src-Bv05c6Nj.js",
178
- "line": 30572
177
+ "implementation": "dist/src-CVekC2V9.js",
178
+ "line": 30590
179
179
  },
180
180
  "Memory": {
181
181
  "types": "dist/index.d.ts",
182
- "implementation": "dist/src-Bv05c6Nj.js",
183
- "line": 41495
182
+ "implementation": "dist/src-CVekC2V9.js",
183
+ "line": 41571
184
184
  },
185
185
  "SUMMARIZE_THREAD_DEFAULTS": {
186
186
  "types": "dist/processors/observational-memory/summarize.d.ts",
187
- "implementation": "dist/src-Bv05c6Nj.js",
188
- "line": 30034
187
+ "implementation": "dist/src-CVekC2V9.js",
188
+ "line": 30052
189
189
  },
190
190
  "StaleKnowledgeSemanticIndexError": {
191
191
  "types": "dist/removed-subconscious.d.ts",
192
- "implementation": "dist/src-Bv05c6Nj.js",
193
- "line": 30578
192
+ "implementation": "dist/src-CVekC2V9.js",
193
+ "line": 30596
194
194
  },
195
195
  "Subconscious": {
196
196
  "types": "dist/removed-subconscious.d.ts",
197
- "implementation": "dist/src-Bv05c6Nj.js",
198
- "line": 30566
197
+ "implementation": "dist/src-CVekC2V9.js",
198
+ "line": 30584
199
199
  },
200
200
  "WORKING_MEMORY_STATE_ID": {
201
201
  "types": "dist/processors/working-memory-state/processor.d.ts",
202
- "implementation": "dist/src-Bv05c6Nj.js",
203
- "line": 32774
202
+ "implementation": "dist/src-CVekC2V9.js",
203
+ "line": 32792
204
204
  },
205
205
  "WORKING_MEMORY_STATE_PROCESSOR_ID": {
206
206
  "types": "dist/processors/working-memory-state/processor.d.ts",
207
- "implementation": "dist/src-Bv05c6Nj.js",
208
- "line": 32775
207
+ "implementation": "dist/src-CVekC2V9.js",
208
+ "line": 32793
209
209
  },
210
210
  "WorkingMemoryStateProcessor": {
211
211
  "types": "dist/processors/working-memory-state/processor.d.ts",
212
- "implementation": "dist/src-Bv05c6Nj.js",
213
- "line": 32776
212
+ "implementation": "dist/src-CVekC2V9.js",
213
+ "line": 32794
214
214
  },
215
215
  "deepMergeWorkingMemory": {
216
216
  "types": "dist/tools/working-memory.d.ts",
217
- "implementation": "dist/src-Bv05c6Nj.js",
218
- "line": 30157
217
+ "implementation": "dist/src-CVekC2V9.js",
218
+ "line": 30175
219
219
  },
220
220
  "extractWorkingMemoryContent": {
221
221
  "types": "dist/index.d.ts",
222
- "implementation": "dist/src-Bv05c6Nj.js",
223
- "line": 41308
222
+ "implementation": "dist/src-CVekC2V9.js",
223
+ "line": 41384
224
224
  },
225
225
  "extractWorkingMemoryTags": {
226
226
  "types": "dist/index.d.ts",
227
- "implementation": "dist/src-Bv05c6Nj.js",
228
- "line": 41276
227
+ "implementation": "dist/src-CVekC2V9.js",
228
+ "line": 41352
229
229
  },
230
230
  "removeWorkingMemoryTags": {
231
231
  "types": "dist/index.d.ts",
232
- "implementation": "dist/src-Bv05c6Nj.js",
233
- "line": 41289
232
+ "implementation": "dist/src-CVekC2V9.js",
233
+ "line": 41365
234
234
  }
235
235
  },
236
236
  "modules": {
237
237
  "processors": {
238
238
  "index": "dist/processors/index.js",
239
239
  "chunks": [
240
- "src-Bv05c6Nj.js"
240
+ "src-CVekC2V9.js"
241
241
  ]
242
242
  }
243
243
  }
@@ -179,7 +179,7 @@ const approvedFingerprints = new Set<string>()
179
179
  export const approvalBoundAgent = new Agent({
180
180
  id: 'approval-bound-agent',
181
181
  name: 'Approval Bound Agent',
182
- model: 'openai/gpt-6.1-sol',
182
+ model: 'openai/gpt-6.2-sol',
183
183
  tools: { issueRefundTool, deleteRecordTool },
184
184
  hooks: {
185
185
  beforeToolCall: ({ toolName, input }) => {
@@ -671,7 +671,7 @@ const supervisorAgent = new Agent({
671
671
  name: 'Supervisor Agent',
672
672
  instructions: `You coordinate data retrieval tasks.
673
673
  Delegate to data-agent for user lookups.`,
674
- model: 'openai/gpt-6.1-sol',
674
+ model: 'openai/gpt-6.2-sol',
675
675
  agents: { dataAgent },
676
676
  memory: new Memory(),
677
677
  })
@@ -31,7 +31,7 @@ export const routingAgent = new Agent({
31
31
  name: 'Routing Agent',
32
32
  instructions: `
33
33
  You are a network of writers and researchers. The user will ask you to research a topic. Always respond with a complete report—no bullet points. Write in full paragraphs, like a blog post. Do not answer with incomplete or uncertain information.`,
34
- model: 'openai/gpt-6.1-sol',
34
+ model: 'openai/gpt-6.2-sol',
35
35
  agents: {
36
36
  researchAgent,
37
37
  writingAgent,
@@ -34,7 +34,7 @@ export const supportAgent = new Agent({
34
34
  name: 'Support Agent',
35
35
  instructions: `You help customers understand their account.
36
36
  Use plain language and don't invent account details.`,
37
- model: 'openai/gpt-6.1-sol',
37
+ model: 'openai/gpt-6.2-sol',
38
38
  })
39
39
  ```
40
40
 
@@ -167,7 +167,7 @@ import { Memory } from '@mastra/memory'
167
167
  export const assistant = new Agent({
168
168
  id: 'assistant',
169
169
  name: 'Assistant',
170
- model: 'openai/gpt-6.1-sol',
170
+ model: 'openai/gpt-6.2-sol',
171
171
  memory: new Memory({
172
172
  options: {
173
173
  lastMessages: 20,
@@ -202,7 +202,7 @@ import { Memory } from '@mastra/memory'
202
202
  export const assistant = new Agent({
203
203
  id: 'assistant',
204
204
  name: 'Assistant',
205
- model: 'openai/gpt-6.1-sol',
205
+ model: 'openai/gpt-6.2-sol',
206
206
  memory: new Memory({
207
207
  options: {
208
208
  observationalMemory: true,
@@ -85,7 +85,7 @@ import { Agent } from '@mastra/core/agent'
85
85
  export const researcher = new Agent({
86
86
  id: 'researcher',
87
87
  instructions: 'You research topics and answer questions.',
88
- model: 'openai/gpt-6.1-sol',
88
+ model: 'openai/gpt-6.2-sol',
89
89
  tools: { researchTool, summarizeTool },
90
90
  backgroundTasks: {
91
91
  tools: {
@@ -286,7 +286,7 @@ import { Agent } from '@mastra/core/agent'
286
286
  const supervisor = new Agent({
287
287
  id: 'supervisor',
288
288
  instructions: 'Coordinate research and writing using the available agents.',
289
- model: 'openai/gpt-6.1-sol',
289
+ model: 'openai/gpt-6.2-sol',
290
290
  agents: { researchAgent, writingAgent },
291
291
  backgroundTasks: {
292
292
  tools: {
@@ -33,7 +33,7 @@ const worker = new Agent({
33
33
  id: 'worker',
34
34
  name: 'worker',
35
35
  instructions: 'You complete software tasks end to end.',
36
- model: 'openai/gpt-6.1-sol',
36
+ model: 'openai/gpt-6.2-sol',
37
37
  memory,
38
38
  goal: {
39
39
  judge: 'openai/gpt-6-luna',
@@ -93,7 +93,7 @@ const worker = new Agent({
93
93
  id: 'worker',
94
94
  name: 'worker',
95
95
  instructions: 'You complete software tasks end to end.',
96
- model: 'openai/gpt-6.1-sol',
96
+ model: 'openai/gpt-6.2-sol',
97
97
  memory,
98
98
  goal: {
99
99
  // A resolver function lets you inject provider credentials and read the
@@ -57,7 +57,7 @@ export const agent = new Agent({
57
57
  id: 'assistant',
58
58
  name: 'Assistant',
59
59
  instructions: 'You help your team and keep its knowledge up to date.',
60
- model: 'openai/gpt-6.1-sol',
60
+ model: 'openai/gpt-6.2-sol',
61
61
  memory: new Memory({ storage }),
62
62
  knowledge,
63
63
  })
@@ -57,7 +57,7 @@ const agent = new Agent({
57
57
  id: 'test-agent',
58
58
  name: 'Test Agent',
59
59
  instructions: 'You are a helpful assistant',
60
- model: 'openai/gpt-6.1-sol',
60
+ model: 'openai/gpt-6.2-sol',
61
61
  memory: new Memory({
62
62
  storage: new LibSQLStore({
63
63
  id: 'memory-store',
@@ -109,7 +109,7 @@ import { openai } from '@ai-sdk/openai'
109
109
  const agent = new Agent({
110
110
  name: 'semantic-agent',
111
111
  instructions: 'You are a helpful assistant with semantic memory',
112
- model: 'openai/gpt-6.1-sol',
112
+ model: 'openai/gpt-6.2-sol',
113
113
  memory: new Memory({
114
114
  storage: new LibSQLStore({
115
115
  id: 'memory-store',
@@ -159,7 +159,7 @@ import { openai } from '@ai-sdk/openai'
159
159
  const agent = new Agent({
160
160
  name: 'working-memory-agent',
161
161
  instructions: 'You are an assistant with working memory',
162
- model: 'openai/gpt-6.1-sol',
162
+ model: 'openai/gpt-6.2-sol',
163
163
  memory: new Memory({
164
164
  storage: new LibSQLStore({
165
165
  id: 'memory-store',
@@ -191,7 +191,7 @@ const customMessageHistory = new MessageHistory({
191
191
  const agent = new Agent({
192
192
  name: 'custom-memory-agent',
193
193
  instructions: 'You are a helpful assistant',
194
- model: 'openai/gpt-6.1-sol',
194
+ model: 'openai/gpt-6.2-sol',
195
195
  memory: new Memory({
196
196
  storage: new LibSQLStore({ id: 'memory-store', url: 'file:memory.db' }),
197
197
  options: {
@@ -264,7 +264,7 @@ const agent = new Agent({
264
264
  id: 'safe-agent',
265
265
  name: 'safe-agent',
266
266
  instructions: 'You are a helpful assistant',
267
- model: 'openai/gpt-6.1-sol',
267
+ model: 'openai/gpt-6.2-sol',
268
268
  memory: new Memory({ options: { lastMessages: 10 } }),
269
269
  // Your guardrail runs BEFORE memory saves
270
270
  outputProcessors: [contentBlocker],
@@ -304,7 +304,7 @@ const agent = new Agent({
304
304
  id: 'validated-agent',
305
305
  name: 'validated-agent',
306
306
  instructions: 'You are a helpful assistant',
307
- model: 'openai/gpt-6.1-sol',
307
+ model: 'openai/gpt-6.2-sol',
308
308
  memory: new Memory({ options: { lastMessages: 10 } }),
309
309
  // Your guardrail runs AFTER memory loads history
310
310
  inputProcessors: [inputValidator],
@@ -340,7 +340,7 @@ const agent = new Agent({
340
340
  id: 'writer',
341
341
  name: 'writer',
342
342
  instructions: 'You write step-by-step migration guides.',
343
- model: 'openai/gpt-6.1-sol',
343
+ model: 'openai/gpt-6.2-sol',
344
344
  memory,
345
345
  })
346
346
 
@@ -427,7 +427,7 @@ export const supportAgent = new Agent({
427
427
  id: 'support-agent',
428
428
  name: 'Support agent',
429
429
  instructions: 'Answer customer support questions.',
430
- model: 'openai/gpt-6.1-sol',
430
+ model: 'openai/gpt-6.2-sol',
431
431
  memory: new Memory({ options: { lastMessages: 10 } }),
432
432
  inputProcessors: [new AttachmentUploader()],
433
433
  })
@@ -196,7 +196,7 @@ export const supportAgent = new Agent({
196
196
  id: 'support-agent',
197
197
  name: 'Support agent',
198
198
  instructions: 'Answer customer support questions.',
199
- model: 'openai/gpt-6.1-sol',
199
+ model: 'openai/gpt-6.2-sol',
200
200
  memory: new Memory({
201
201
  options: {
202
202
  generateTitle: true,
@@ -219,7 +219,7 @@ export const supportAgent = new Agent({
219
219
  id: 'support-agent',
220
220
  name: 'Support agent',
221
221
  instructions: 'Answer customer support questions.',
222
- model: 'openai/gpt-6.1-sol',
222
+ model: 'openai/gpt-6.2-sol',
223
223
  memory: new Memory({
224
224
  options: {
225
225
  generateTitle: {
@@ -254,7 +254,7 @@ export const supportAgent = new Agent({
254
254
  id: 'support-agent',
255
255
  name: 'Support agent',
256
256
  instructions: 'Answer customer support questions.',
257
- model: 'openai/gpt-6.1-sol',
257
+ model: 'openai/gpt-6.2-sol',
258
258
  memory: new Memory({
259
259
  options: {
260
260
  generateTitle: {
@@ -176,7 +176,7 @@ const memory = new Memory({
176
176
  })
177
177
  ```
178
178
 
179
- Use a model with a large context window (128,000 tokens or more) that's fast enough to run in the background. Mastra has tested `google/gemini-2.5-flash`, `openai/gpt-6-luna`, `anthropic/claude-haiku-5.5` and `deepseek/deepseek-flash`.
179
+ Use a model with a large context window (128,000 tokens or more) that's fast enough to run in the background. Mastra has tested `google/gemini-2.5-flash`, `openai/gpt-6-luna`, `anthropic/claude-haiku-5-5` and `deepseek/deepseek-flash`.
180
180
 
181
181
  To use a different model per role, set `observation.model` and `reflection.model` instead, and leave the top-level `model` out. Setting both throws. Some models keep so much detail that their reflections can stay above the threshold; in testing, `google/gemini-2.5-flash` did this. A common split uses a detail-preserving model as the Observer and one that condenses more aggressively, such as `deepseek/deepseek-flash`, as the Reflector. See [different models per agent](https://mastra.ai/reference/memory/observational-memory).
182
182
 
@@ -38,7 +38,7 @@ const agent = new Agent({
38
38
  id: 'support-agent',
39
39
  name: 'SupportAgent',
40
40
  instructions: 'You are a helpful support agent.',
41
- model: 'openai/gpt-6.1-sol',
41
+ model: 'openai/gpt-6.2-sol',
42
42
  memory: new Memory({
43
43
  storage: new LibSQLStore({
44
44
  id: 'agent-storage',
@@ -68,7 +68,7 @@ const agent = new Agent({
68
68
  id: 'support-agent',
69
69
  name: 'SupportAgent',
70
70
  instructions: 'You are a helpful support agent.',
71
- model: 'openai/gpt-6.1-sol',
71
+ model: 'openai/gpt-6.2-sol',
72
72
  memory: new Memory({
73
73
  storage: new MongoDBStore({
74
74
  id: 'agent-storage',
@@ -34,7 +34,7 @@ const agent = new Agent({
34
34
  id: 'personal-assistant',
35
35
  name: 'PersonalAssistant',
36
36
  instructions: 'You are a helpful personal assistant.',
37
- model: 'openai/gpt-6.1-sol',
37
+ model: 'openai/gpt-6.2-sol',
38
38
  memory: new Memory({
39
39
  options: {
40
40
  workingMemory: {
@@ -269,7 +269,8 @@ When a schema is provided, the agent receives the working memory as a JSON objec
269
269
  Schema-based working memory uses **merge semantics**, meaning the agent only needs to include fields it wants to add or update. Existing fields are preserved automatically.
270
270
 
271
271
  - **Object fields are deep merged:** Only provided fields are updated; others remain unchanged
272
- - **Set a field to `null` to delete it:** This explicitly removes the field from memory
272
+ - **`null` in agent updates:** Optional schema fields set to `null` keep their existing value. A `null` only removes a key the schema doesn't declare as an optional property, such as a key in a record-style object
273
+ - **`null` in direct merges:** `memory.mergeWorkingMemory()` deletes a field when its value is `null`, including optional fields. Omit the field to keep its value
273
274
  - **Arrays are replaced entirely:** When an array field is provided, it replaces the existing array (arrays aren't merged element-by-element)
274
275
 
275
276
  ### Concurrent updates
@@ -31,7 +31,7 @@ const agent = new Agent({
31
31
  id: 'support-agent',
32
32
  name: 'Support Agent',
33
33
  instructions: 'Help the user compare options.',
34
- model: 'openai/gpt-6.1-sol',
34
+ model: 'openai/gpt-6.2-sol',
35
35
  memory: new Memory({
36
36
  storage: new LibSQLStore({
37
37
  id: 'signals-storage',
@@ -30,17 +30,17 @@ Use storage when your application needs any of these behaviors:
30
30
 
31
31
  Mastra storage is organized into **domains**. A domain owns one type of runtime data, and a storage adapter implements one or more domains.
32
32
 
33
- | Domain | What it stores |
34
- | ----------------- | --------------------------------------------------------------------------- |
35
- | `memory` | Threads, messages, resources, working memory, and other agent memory state. |
36
- | `workflows` | Workflow snapshots used to suspend and resume runs. |
37
- | `observability` | Traces, spans, metrics, logs, and feedback. |
38
- | `scores` | Eval score records. |
39
- | `datasets` | Dataset records and dataset items used by evals and experiments. |
40
- | `experiments` | Experiment runs and per-item experiment results. |
41
- | `backgroundTasks` | Background task records and execution state. |
42
- | `schedules` | Schedule definitions and trigger history. |
43
- | `threadState` | Durable task, goal, and thread state. |
33
+ | Domain | What it stores |
34
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `memory` | Threads, messages, resources, working memory, and other agent memory state, including the [pending signals](https://mastra.ai/docs/server/pubsub) of evented agents. |
36
+ | `workflows` | Workflow snapshots used to suspend and resume runs. |
37
+ | `observability` | Traces, spans, metrics, logs, and feedback. |
38
+ | `scores` | Eval score records. |
39
+ | `datasets` | Dataset records and dataset items used by evals and experiments. |
40
+ | `experiments` | Experiment runs and per-item experiment results. |
41
+ | `backgroundTasks` | Background task records and execution state. |
42
+ | `schedules` | Schedule definitions and trigger history. |
43
+ | `threadState` | Durable task, goal, and thread state. |
44
44
 
45
45
  Adapter support varies by domain. For the full domain list and built-in schemas, see the [storage overview reference](https://mastra.ai/reference/storage/overview).
46
46
 
@@ -146,7 +146,7 @@ export const supportAgent = new Agent({
146
146
  id: 'support-agent',
147
147
  name: 'Support agent',
148
148
  instructions: 'Answer customer support questions.',
149
- model: 'openai/gpt-6.1-sol',
149
+ model: 'openai/gpt-6.2-sol',
150
150
  memory: new Memory({
151
151
  storage: new PostgresStore({
152
152
  id: 'support-agent-storage',