You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mastra/config/libsql.ts
+21-6Lines changed: 21 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -56,19 +56,25 @@ export const LibsqlMemory = new Memory({
56
56
logOutputs: true,
57
57
},
58
58
},
59
-
maxParallelCalls: 50,// Limit parallel embedding calls to avoid rate limits
59
+
maxParallelCalls: 20,// Limit parallel embedding calls to avoid rate limits
60
60
},
61
61
options: {
62
62
// Message management
63
63
readOnly: false,
64
64
observationalMemory: {
65
65
enabled: true,
66
-
scope: 'thread',// 'resource' | 'thread'
66
+
scope: 'resource',// 'resource' | 'thread'
67
67
model: 'google/gemini-2.5-flash',
68
-
shareTokenBudget: false,// Don't share token budget between observation and reflection to preserve context
68
+
retrieval: {vector: true,scope: 'resource'},
69
+
shareTokenBudget: true,// Don't share token budget between observation and reflection to preserve context
69
70
observation: {
70
71
instruction: 'You are an assistant that observes and remembers important information from the conversation. Pay attention to details, context, and any information that might be useful for future reference.',
71
-
messageTokens: 60_000,
72
+
messageTokens: 50_000,
73
+
bufferTokens: 5_000,
74
+
// Activate to retain 30% of threshold
75
+
bufferActivation: 0.85,
76
+
// Force synchronous observation at 1.5x threshold
77
+
blockAfter: 1.5,
72
78
modelSettings: {
73
79
temperature: 0.3,
74
80
maxOutputTokens: 64_000,
@@ -77,14 +83,17 @@ export const LibsqlMemory = new Memory({
77
83
},
78
84
},
79
85
reflection: {
86
+
bufferActivation: 0.5,
87
+
// Force synchronous reflection at 1.2x threshold
88
+
blockAfter: 1.2,
80
89
instruction: 'Based on the observations, generate concise and informative reflections that capture important details, context, and insights from the conversation. These reflections should be useful for future reference and help provide context for the assistant.',
0 commit comments