@mastra/memory 1.5.1 → 1.5.2
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 +28 -0
- package/dist/{chunk-6PKWQ3GH.js → chunk-HNPAIFCZ.js} +59 -16
- package/dist/chunk-HNPAIFCZ.js.map +1 -0
- package/dist/{chunk-6XVTMLW4.cjs → chunk-PVFLHAZX.cjs} +59 -16
- package/dist/chunk-PVFLHAZX.cjs.map +1 -0
- package/dist/docs/SKILL.md +55 -0
- package/dist/docs/assets/SOURCE_MAP.json +103 -0
- package/dist/docs/references/docs-agents-agent-approval.md +558 -0
- package/dist/docs/references/docs-agents-agent-memory.md +209 -0
- package/dist/docs/references/docs-agents-network-approval.md +275 -0
- package/dist/docs/references/docs-agents-networks.md +299 -0
- package/dist/docs/references/docs-agents-supervisor-agents.md +304 -0
- package/dist/docs/references/docs-memory-memory-processors.md +314 -0
- package/dist/docs/references/docs-memory-message-history.md +260 -0
- package/dist/docs/references/docs-memory-observational-memory.md +248 -0
- package/dist/docs/references/docs-memory-overview.md +45 -0
- package/dist/docs/references/docs-memory-semantic-recall.md +272 -0
- package/dist/docs/references/docs-memory-storage.md +261 -0
- package/dist/docs/references/docs-memory-working-memory.md +400 -0
- package/dist/docs/references/reference-core-getMemory.md +50 -0
- package/dist/docs/references/reference-core-listMemory.md +56 -0
- package/dist/docs/references/reference-memory-clone-utilities.md +199 -0
- package/dist/docs/references/reference-memory-cloneThread.md +130 -0
- package/dist/docs/references/reference-memory-createThread.md +68 -0
- package/dist/docs/references/reference-memory-getThreadById.md +24 -0
- package/dist/docs/references/reference-memory-listThreads.md +145 -0
- package/dist/docs/references/reference-memory-memory-class.md +147 -0
- package/dist/docs/references/reference-memory-observational-memory.md +565 -0
- package/dist/docs/references/reference-processors-token-limiter-processor.md +115 -0
- package/dist/docs/references/reference-storage-dynamodb.md +282 -0
- package/dist/docs/references/reference-storage-libsql.md +135 -0
- package/dist/docs/references/reference-storage-mongodb.md +262 -0
- package/dist/docs/references/reference-storage-postgresql.md +526 -0
- package/dist/docs/references/reference-storage-upstash.md +160 -0
- package/dist/docs/references/reference-vectors-libsql.md +305 -0
- package/dist/docs/references/reference-vectors-mongodb.md +295 -0
- package/dist/docs/references/reference-vectors-pg.md +408 -0
- package/dist/docs/references/reference-vectors-upstash.md +294 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{observational-memory-AJWSMZVP.js → observational-memory-KAFD4QZK.js} +3 -3
- package/dist/{observational-memory-AJWSMZVP.js.map → observational-memory-KAFD4QZK.js.map} +1 -1
- package/dist/{observational-memory-Q5TO525O.cjs → observational-memory-Q47HN5YL.cjs} +17 -17
- package/dist/{observational-memory-Q5TO525O.cjs.map → observational-memory-Q47HN5YL.cjs.map} +1 -1
- package/dist/processors/index.cjs +15 -15
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observational-memory.d.ts +2 -2
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
- package/dist/processors/observational-memory/token-counter.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-6PKWQ3GH.js.map +0 -1
- package/dist/chunk-6XVTMLW4.cjs.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastra-memory
|
|
3
|
+
description: Documentation for @mastra/memory. Use when working with @mastra/memory APIs, configuration, or implementation.
|
|
4
|
+
metadata:
|
|
5
|
+
package: "@mastra/memory"
|
|
6
|
+
version: "1.5.2"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill whenever you are working with @mastra/memory to obtain the domain-specific knowledge.
|
|
12
|
+
|
|
13
|
+
## How to use
|
|
14
|
+
|
|
15
|
+
Read the individual reference documents for detailed explanations and code examples.
|
|
16
|
+
|
|
17
|
+
### Docs
|
|
18
|
+
|
|
19
|
+
- [Agent Approval](references/docs-agents-agent-approval.md) - Learn how to require approvals, suspend tool execution, and automatically resume suspended tools while keeping humans in control of agent workflows.
|
|
20
|
+
- [Agent Memory](references/docs-agents-agent-memory.md) - Learn how to add memory to agents to store message history and maintain context across interactions.
|
|
21
|
+
- [Network Approval](references/docs-agents-network-approval.md) - Learn how to require approvals, suspend execution, and resume suspended networks while keeping humans in control of agent network workflows.
|
|
22
|
+
- [Agent Networks](references/docs-agents-networks.md) - Learn how to coordinate multiple agents, workflows, and tools using agent networks for complex, non-deterministic task execution.
|
|
23
|
+
- [Supervisor Agents](references/docs-agents-supervisor-agents.md) - Learn how to coordinate multiple agents using the supervisor pattern with delegation hooks, iteration monitoring, message filtering, and task completion scoring.
|
|
24
|
+
- [Memory Processors](references/docs-memory-memory-processors.md) - Learn how to use memory processors in Mastra to filter, trim, and transform messages before they're sent to the language model to manage context window limits.
|
|
25
|
+
- [Message History](references/docs-memory-message-history.md) - Learn how to configure message history in Mastra to store recent messages from the current conversation.
|
|
26
|
+
- [Observational Memory](references/docs-memory-observational-memory.md) - Learn how Observational Memory keeps your agent's context window small while preserving long-term memory across conversations.
|
|
27
|
+
- [Memory overview](references/docs-memory-overview.md) - Learn how Mastra's memory system works with working memory, message history, semantic recall, and observational memory.
|
|
28
|
+
- [Semantic Recall](references/docs-memory-semantic-recall.md) - Learn how to use semantic recall in Mastra to retrieve relevant messages from past conversations using vector search and embeddings.
|
|
29
|
+
- [Storage](references/docs-memory-storage.md) - Configure storage for Mastra's memory system to persist conversations, workflows, and traces.
|
|
30
|
+
- [Working Memory](references/docs-memory-working-memory.md) - Learn how to configure working memory in Mastra to store persistent user data, preferences.
|
|
31
|
+
|
|
32
|
+
### Reference
|
|
33
|
+
|
|
34
|
+
- [Reference: Mastra.getMemory()](references/reference-core-getMemory.md) - Documentation for the `Mastra.getMemory()` method in Mastra, which retrieves a registered memory instance by its registry key.
|
|
35
|
+
- [Reference: Mastra.listMemory()](references/reference-core-listMemory.md) - Documentation for the `Mastra.listMemory()` method in Mastra, which returns all registered memory instances.
|
|
36
|
+
- [Reference: Cloned Thread Utilities](references/reference-memory-clone-utilities.md) - Documentation for utility methods to work with cloned threads in Mastra Memory.
|
|
37
|
+
- [Reference: Memory.cloneThread()](references/reference-memory-cloneThread.md) - Documentation for the `Memory.cloneThread()` method in Mastra, which creates a copy of a conversation thread with all its messages.
|
|
38
|
+
- [Reference: Memory.createThread()](references/reference-memory-createThread.md) - Documentation for the `Memory.createThread()` method in Mastra, which creates a new conversation thread in the memory system.
|
|
39
|
+
- [Reference: Memory.getThreadById()](references/reference-memory-getThreadById.md) - Documentation for the `Memory.getThreadById()` method in Mastra, which retrieves a specific thread by its ID.
|
|
40
|
+
- [Reference: Memory.listThreads()](references/reference-memory-listThreads.md) - Documentation for the `Memory.listThreads()` method in Mastra, which retrieves threads with optional filtering by resourceId and/or metadata.
|
|
41
|
+
- [Reference: Memory Class](references/reference-memory-memory-class.md) - Documentation for the `Memory` class in Mastra, which provides a robust system for managing conversation history and thread-based message storage.
|
|
42
|
+
- [Reference: Observational Memory](references/reference-memory-observational-memory.md) - API reference for Observational Memory in Mastra — a three-tier memory system that uses Observer and Reflector agents to maintain long-term memory across conversations.
|
|
43
|
+
- [Reference: Token Limiter Processor](references/reference-processors-token-limiter-processor.md) - Documentation for the TokenLimiterProcessor in Mastra, which limits the number of tokens in messages.
|
|
44
|
+
- [Reference: DynamoDB Storage](references/reference-storage-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
|
|
45
|
+
- [Reference: libSQL Storage](references/reference-storage-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
|
|
46
|
+
- [Reference: MongoDB Storage](references/reference-storage-mongodb.md) - Documentation for the MongoDB storage implementation in Mastra.
|
|
47
|
+
- [Reference: PostgreSQL Storage](references/reference-storage-postgresql.md) - Documentation for the PostgreSQL storage implementation in Mastra.
|
|
48
|
+
- [Reference: Upstash Storage](references/reference-storage-upstash.md) - Documentation for the Upstash storage implementation in Mastra.
|
|
49
|
+
- [Reference: libSQL Vector Store](references/reference-vectors-libsql.md) - Documentation for the LibSQLVector class in Mastra, which provides vector search using libSQL with vector extensions.
|
|
50
|
+
- [Reference: MongoDB Vector Store](references/reference-vectors-mongodb.md) - Documentation for the MongoDBVector class in Mastra, which provides vector search using MongoDB Atlas and Atlas Vector Search.
|
|
51
|
+
- [Reference: PG Vector Store](references/reference-vectors-pg.md) - Documentation for the PgVector class in Mastra, which provides vector search using PostgreSQL with pgvector extension.
|
|
52
|
+
- [Reference: Upstash Vector Store](references/reference-vectors-upstash.md) - Documentation for the UpstashVector class in Mastra, which provides vector search using Upstash Vector.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.5.2",
|
|
3
|
+
"package": "@mastra/memory",
|
|
4
|
+
"exports": {
|
|
5
|
+
"OBSERVATIONAL_MEMORY_DEFAULTS": {
|
|
6
|
+
"types": "dist/processors/index.d.ts",
|
|
7
|
+
"implementation": "dist/chunk-HNPAIFCZ.js"
|
|
8
|
+
},
|
|
9
|
+
"OBSERVATION_CONTEXT_INSTRUCTIONS": {
|
|
10
|
+
"types": "dist/processors/index.d.ts",
|
|
11
|
+
"implementation": "dist/chunk-HNPAIFCZ.js"
|
|
12
|
+
},
|
|
13
|
+
"OBSERVATION_CONTEXT_PROMPT": {
|
|
14
|
+
"types": "dist/processors/index.d.ts",
|
|
15
|
+
"implementation": "dist/chunk-HNPAIFCZ.js"
|
|
16
|
+
},
|
|
17
|
+
"OBSERVATION_CONTINUATION_HINT": {
|
|
18
|
+
"types": "dist/processors/index.d.ts",
|
|
19
|
+
"implementation": "dist/chunk-HNPAIFCZ.js"
|
|
20
|
+
},
|
|
21
|
+
"OBSERVER_SYSTEM_PROMPT": {
|
|
22
|
+
"types": "dist/processors/index.d.ts",
|
|
23
|
+
"implementation": "dist/chunk-HNPAIFCZ.js"
|
|
24
|
+
},
|
|
25
|
+
"ObservationalMemory": {
|
|
26
|
+
"types": "dist/processors/index.d.ts",
|
|
27
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
28
|
+
"line": 1258
|
|
29
|
+
},
|
|
30
|
+
"TokenCounter": {
|
|
31
|
+
"types": "dist/processors/index.d.ts",
|
|
32
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
33
|
+
"line": 919
|
|
34
|
+
},
|
|
35
|
+
"buildObserverPrompt": {
|
|
36
|
+
"types": "dist/processors/index.d.ts",
|
|
37
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
38
|
+
"line": 533
|
|
39
|
+
},
|
|
40
|
+
"buildObserverSystemPrompt": {
|
|
41
|
+
"types": "dist/processors/index.d.ts",
|
|
42
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
43
|
+
"line": 281
|
|
44
|
+
},
|
|
45
|
+
"extractCurrentTask": {
|
|
46
|
+
"types": "dist/processors/index.d.ts",
|
|
47
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
48
|
+
"line": 662
|
|
49
|
+
},
|
|
50
|
+
"formatMessagesForObserver": {
|
|
51
|
+
"types": "dist/processors/index.d.ts",
|
|
52
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
53
|
+
"line": 376
|
|
54
|
+
},
|
|
55
|
+
"hasCurrentTaskSection": {
|
|
56
|
+
"types": "dist/processors/index.d.ts",
|
|
57
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
58
|
+
"line": 650
|
|
59
|
+
},
|
|
60
|
+
"optimizeObservationsForContext": {
|
|
61
|
+
"types": "dist/processors/index.d.ts",
|
|
62
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
63
|
+
"line": 673
|
|
64
|
+
},
|
|
65
|
+
"parseObserverOutput": {
|
|
66
|
+
"types": "dist/processors/index.d.ts",
|
|
67
|
+
"implementation": "dist/chunk-HNPAIFCZ.js",
|
|
68
|
+
"line": 564
|
|
69
|
+
},
|
|
70
|
+
"extractWorkingMemoryContent": {
|
|
71
|
+
"types": "dist/index.d.ts",
|
|
72
|
+
"implementation": "dist/memory"
|
|
73
|
+
},
|
|
74
|
+
"extractWorkingMemoryTags": {
|
|
75
|
+
"types": "dist/index.d.ts",
|
|
76
|
+
"implementation": "dist/memory"
|
|
77
|
+
},
|
|
78
|
+
"removeWorkingMemoryTags": {
|
|
79
|
+
"types": "dist/index.d.ts",
|
|
80
|
+
"implementation": "dist/memory"
|
|
81
|
+
},
|
|
82
|
+
"MessageHistory": {
|
|
83
|
+
"types": "dist/index.d.ts",
|
|
84
|
+
"implementation": "dist/processors"
|
|
85
|
+
},
|
|
86
|
+
"SemanticRecall": {
|
|
87
|
+
"types": "dist/index.d.ts",
|
|
88
|
+
"implementation": "dist/processors"
|
|
89
|
+
},
|
|
90
|
+
"WorkingMemory": {
|
|
91
|
+
"types": "dist/index.d.ts",
|
|
92
|
+
"implementation": "dist/processors"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"modules": {
|
|
96
|
+
"processors": {
|
|
97
|
+
"index": "dist/processors/index.js",
|
|
98
|
+
"chunks": [
|
|
99
|
+
"chunk-HNPAIFCZ.js"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|