@mastra/memory 1.26.1-alpha.6 → 1.26.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 +86 -0
- package/dist/docs/SKILL.md +15 -9
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-agents-networks.md +2 -2
- package/dist/docs/references/docs-capabilities-subagents.md +2 -2
- package/dist/docs/references/docs-memory-memory-processors.md +5 -5
- package/dist/docs/references/docs-memory-message-history.md +1 -1
- package/dist/docs/references/docs-memory-observational-memory.md +1 -1
- package/dist/docs/references/docs-storage-overview.md +14 -13
- package/dist/docs/references/integrations-channels-github.md +103 -0
- package/dist/docs/references/{reference-storage-dsql.md → integrations-databases-aurora-dsql.md} +1 -1
- package/dist/docs/references/{reference-storage-dynamodb.md → integrations-databases-dynamodb.md} +1 -1
- package/dist/docs/references/{reference-storage-libsql.md → integrations-databases-libsql.md} +2 -2
- package/dist/docs/references/{reference-storage-mongodb.md → integrations-databases-mongodb.md} +1 -1
- package/dist/docs/references/{reference-storage-oracledb.md → integrations-databases-oracledb.md} +1 -1
- package/dist/docs/references/{reference-storage-postgresql.md → integrations-databases-postgresql.md} +1 -1
- package/dist/docs/references/{reference-storage-redis.md → integrations-databases-redis.md} +1 -1
- package/dist/docs/references/{reference-storage-upstash.md → integrations-databases-upstash.md} +1 -1
- package/dist/docs/references/reference-migrations-agentnetwork.md +100 -0
- package/dist/docs/references/reference-migrations-upgrade-to-v1-memory.md +288 -0
- package/dist/docs/references/reference-vectors-oracledb.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/processors/index.cjs +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts.map +1 -1
- package/dist/{src-B2WSEEmS.cjs → src-CTwoCwmY.cjs} +10 -10
- package/dist/{src-B2WSEEmS.cjs.map → src-CTwoCwmY.cjs.map} +1 -1
- package/dist/{src-B_n15_Xg.js → src-DGdlH4fo.js} +10 -10
- package/dist/{src-B_n15_Xg.js.map → src-DGdlH4fo.js.map} +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,91 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.26.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed a crash in Observational Memory token counting for tool calls that wait for approval. Threads that hold a tool invocation in the `approval-requested` or `approval-responded` state no longer throw `Unhandled tool-invocation state`, so memory extraction keeps running on approval-gated conversations. ([#20985](https://github.com/mastra-ai/mastra/pull/20985))
|
|
8
|
+
|
|
9
|
+
The counter also no longer stops on a tool-invocation state it does not know. A message that a different `@mastra/core` version wrote now gets an estimate instead of an error.
|
|
10
|
+
|
|
11
|
+
- Fixed thread deletion so it also removes observational memory vectors. Deleting a thread now clears its vectors from both the message indexes and the observation indexes, so text from a deleted thread is no longer returned by resource-scoped search. Deleting a single message still touches only the message indexes. ([#20981](https://github.com/mastra-ai/mastra/pull/20981))
|
|
12
|
+
|
|
13
|
+
Improved the report of a failed cleanup. If a vector store cannot delete from one index, thread deletion still succeeds and now logs a warning that names the index and the thread.
|
|
14
|
+
|
|
15
|
+
- Fixed a crash where updating a thread without a title (for example during observational memory buffering) could write a null title and violate the database's not-null constraint when running a newer @mastra/memory against an older storage package. Memory now checks whether the connected storage adapter supports partial thread updates and backfills the existing title for older adapters, so mixed-version deployments keep working. See #21041 for the original title-clobbering fix this makes backward compatible. ([#21257](https://github.com/mastra-ai/mastra/pull/21257))
|
|
16
|
+
|
|
17
|
+
- Storage adapters now declare support for partial thread updates, letting newer @mastra/memory preserve existing thread titles instead of overwriting them, while remaining safe against older versions. ([#21257](https://github.com/mastra-ai/mastra/pull/21257))
|
|
18
|
+
|
|
19
|
+
- Retry working memory extraction with JSON prompt injection when native structured output returns an empty object, so schema updates are no longer silently skipped when the model omits the `working-memory` extractor wrapper. Fixes #20503. ([#20565](https://github.com/mastra-ai/mastra/pull/20565))
|
|
20
|
+
|
|
21
|
+
- Remove the `image-size` dependency from `@mastra/memory` and measure image dimensions with the already-present `probe-image-size` instead. ([#21120](https://github.com/mastra-ai/mastra/pull/21120))
|
|
22
|
+
|
|
23
|
+
Every published version of `image-size` carries unfixed denial-of-service advisories (GHSA-w3rx-r6r6-pgpr / CVE-2025-71330 and GHSA-5p2g-fcmc-qvqq): a malformed image could hang its parse loop and exhaust the heap. The repository is archived, so no fixed release is coming, and the previous pin to `1.2.1` moved between two equally affected releases rather than remediating the flaw. Because image bytes reaching agent memory are untrusted, a crafted 32-byte image was enough to crash the process.
|
|
24
|
+
|
|
25
|
+
Dimension detection still covers the formats models accept (PNG, JPEG, WebP, GIF, AVIF, BMP, ICO, PSD, SVG, TIFF). Unrecognized formats now report unknown dimensions, which token counting already handled.
|
|
26
|
+
|
|
27
|
+
- Fix Observational Memory undercounting large tool results. Token accounting now serializes tool results in full instead of reusing the Observer-facing representation, which is truncated to 10k tokens. Oversized tool results now push OM past its thresholds and trigger compaction before the provider's context window overflows. ([#21045](https://github.com/mastra-ai/mastra/pull/21045))
|
|
28
|
+
|
|
29
|
+
- Fixed Observational Memory saving ephemeral `context` messages to storage as durable user messages. ([#19735](https://github.com/mastra-ai/mastra/pull/19735))
|
|
30
|
+
|
|
31
|
+
Messages passed through the `context` option of `agent.stream()` / `agent.generate()` belong to a single run and are not meant to be saved. Observational Memory built its observation window from the full message list, so once a buffering cycle fired it sealed and persisted those context messages too. They then came back from `listMessages` and memory recall on every later run, and showed up as user messages in any UI that hydrates from stored history.
|
|
32
|
+
|
|
33
|
+
Observational Memory now ignores `context`-sourced messages everywhere: when building the observation window, when sealing and persisting buffered chunks, and when counting tokens toward its thresholds. Context messages are still sent to the model for the run they belong to — only Observational Memory stops treating them as conversation history.
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
// Each turn sends per-request page state as context.
|
|
37
|
+
// This is no longer persisted once a buffering cycle runs.
|
|
38
|
+
await agent.stream(messages, {
|
|
39
|
+
context: [{ role: 'user', content: '<client-context>…page state…</client-context>' }],
|
|
40
|
+
memory: { thread, resource },
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Fixed observational memory so a single message that exceeds the token threshold now triggers an observation, even when it is the first message of a turn. ([#20846](https://github.com/mastra-ai/mastra/pull/20846))
|
|
45
|
+
|
|
46
|
+
Previously such a message reached neither code path. The observation path required a step number above 0. The async buffering path required the pending token count to stay below the threshold. As a result the observer was never called, even with the default configuration.
|
|
47
|
+
|
|
48
|
+
**What changed**
|
|
49
|
+
|
|
50
|
+
- Step 0 now runs an observation when the threshold is exceeded and no tool calls are pending.
|
|
51
|
+
- The active assistant response message is seeded, so observation markers are stored on it instead of on a user message.
|
|
52
|
+
- The messages of the in-flight turn are kept during post-observation cleanup, so the model can still answer the prompt that triggered the observation.
|
|
53
|
+
|
|
54
|
+
Fixes #16523.
|
|
55
|
+
|
|
56
|
+
- The recall tool no longer advertises mode="search" unless observational-memory vector retrieval, a vector store, and an embedder are all configured. Previously the tool description and input schema invited the model to call search when the semantic retrieval pipeline could not run. The search mode and query parameter are now omitted from the tool surface when search cannot succeed, and a stale search call (e.g. on a resumed run that skips input validation) returns the existing "Search is not configured" guidance instead of throwing. ([#20941](https://github.com/mastra-ai/mastra/pull/20941))
|
|
57
|
+
|
|
58
|
+
- Fixed observational memory stalling agent loops after a tool fails. ([#20788](https://github.com/mastra-ai/mastra/pull/20788))
|
|
59
|
+
|
|
60
|
+
- Fix schema-based working memory losing stored data on partial updates. When a model updated one section of working memory, unrelated sections could be wiped out. Tools can now set `strict: false` to opt out of strict structured-output schema rewriting, which previously forced every field to be required and left models no way to signal "leave this field alone". ([#20992](https://github.com/mastra-ai/mastra/pull/20992))
|
|
61
|
+
|
|
62
|
+
- Fixed generated thread titles being clobbered during a turn ([#21041](https://github.com/mastra-ai/mastra/pull/21041))
|
|
63
|
+
|
|
64
|
+
`updateThread` required both `title` and `metadata`, so callers that only needed to
|
|
65
|
+
change metadata (message persistence, working memory, observational memory, channel
|
|
66
|
+
subscriptions) had to read the thread and pass its title back. When title generation
|
|
67
|
+
finished between that read and the write, the freshly generated title was overwritten
|
|
68
|
+
with the stale one.
|
|
69
|
+
|
|
70
|
+
`title` and `metadata` are now independently optional: omitting one leaves that column
|
|
71
|
+
untouched. Callers that only change metadata no longer send a title, and message
|
|
72
|
+
persistence no longer rewrites a thread row it just read.
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`e7109ee`](https://github.com/mastra-ai/mastra/commit/e7109ee6f731bacc79c885906f3c7dca8d8f013a), [`b8ce7ec`](https://github.com/mastra-ai/mastra/commit/b8ce7ec96e39343c6c2f36d12d68a9ad816c09f7), [`2e4624e`](https://github.com/mastra-ai/mastra/commit/2e4624edb6917e61249cb60ee377735e7af7e4a9), [`45a9147`](https://github.com/mastra-ai/mastra/commit/45a914741f578754d79d8b7de7b4e4f304d8e14a), [`a3a3624`](https://github.com/mastra-ai/mastra/commit/a3a3624f646b98e409424d8defccbd334da9e8b8), [`6246914`](https://github.com/mastra-ai/mastra/commit/62469146636911f3cbbe0880bd011c6a897a59a7), [`6445eba`](https://github.com/mastra-ai/mastra/commit/6445eba6020abac681aba1cc9289f446cb400cbe), [`86b7b77`](https://github.com/mastra-ai/mastra/commit/86b7b777980d30f66e1fd134a37d2af4c22e54cc), [`1c75e32`](https://github.com/mastra-ai/mastra/commit/1c75e32f7fc0b9fb6f548b4407feaec8a1440212), [`296dc9a`](https://github.com/mastra-ai/mastra/commit/296dc9af29f3616e786c7825ec32e0df92d754c5), [`f59032a`](https://github.com/mastra-ai/mastra/commit/f59032a73699443555a08a479e7ac578975784f2), [`cdd5c33`](https://github.com/mastra-ai/mastra/commit/cdd5c33ac6c7118a9f139e6dc0e14e6a8ae31658), [`3f73c07`](https://github.com/mastra-ai/mastra/commit/3f73c076727e8c36b4fff7a1b40290fb68957fa8), [`6bff877`](https://github.com/mastra-ai/mastra/commit/6bff877e214695ff8d9c84b06c13a6e6bcf9f1ed), [`772c0c8`](https://github.com/mastra-ai/mastra/commit/772c0c897cec383258de2e6178147f8014767c7b), [`d7cf7fa`](https://github.com/mastra-ai/mastra/commit/d7cf7fafc1ae1b50bd8462dd0e6c671a8606db93), [`7c1ebb1`](https://github.com/mastra-ai/mastra/commit/7c1ebb15690c4b3f0eabb19077cf8af573311e57), [`0f9a448`](https://github.com/mastra-ai/mastra/commit/0f9a448502157e59f7b76f24360ad497168f5ef8), [`f5a17d9`](https://github.com/mastra-ai/mastra/commit/f5a17d95c19e7d4149996932bd8d1905089f031d), [`578bf2e`](https://github.com/mastra-ai/mastra/commit/578bf2e6a88e9d5b8bf502204e15a95dfbb679ae), [`c47165c`](https://github.com/mastra-ai/mastra/commit/c47165c983c87594c6952f1fd2fa51a90205034c), [`289f4ce`](https://github.com/mastra-ai/mastra/commit/289f4ce16e3293370440172132c52ee787cbc09f), [`df31eb0`](https://github.com/mastra-ai/mastra/commit/df31eb0c7087d782a0d9346e467f9a4af4b0eef6), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`4f16ff8`](https://github.com/mastra-ai/mastra/commit/4f16ff824bf2f9b0ddc93f210477c10c8a4fb1ab), [`b4c89b4`](https://github.com/mastra-ai/mastra/commit/b4c89b4371b0c86da57403ad1a3b3ef0681f3128), [`e6534fa`](https://github.com/mastra-ai/mastra/commit/e6534fab031216f6cb48c4c9907cbfdce9d60bc6), [`210cb7a`](https://github.com/mastra-ai/mastra/commit/210cb7a167998c7bbf72cb3b93e6eb0563330239), [`06b2d87`](https://github.com/mastra-ai/mastra/commit/06b2d87e63bcdd0ed59215c6789692b9b12de376), [`1c67d85`](https://github.com/mastra-ai/mastra/commit/1c67d85e9da8285662f4dbbf47e0378c3fee0747), [`ac01d63`](https://github.com/mastra-ai/mastra/commit/ac01d6355974aec73fdb8781449ed12bac582094), [`80a3324`](https://github.com/mastra-ai/mastra/commit/80a33245d3110204de6f56d61211523ffe338692), [`e44e8f3`](https://github.com/mastra-ai/mastra/commit/e44e8f370b66c339ddcaba946d33da6d3c3f06cd), [`d9d2881`](https://github.com/mastra-ai/mastra/commit/d9d2881ede6dd6c023d144215fc812062aed0890), [`a810a05`](https://github.com/mastra-ai/mastra/commit/a810a058f62ad407cfc1701e0be36ae91145d7cf), [`ba24be6`](https://github.com/mastra-ai/mastra/commit/ba24be662439c331ab23a600041f93803c89eca8), [`842b5fe`](https://github.com/mastra-ai/mastra/commit/842b5fe22b6a7fa811bd14e48eb9af523ac989f2), [`990611b`](https://github.com/mastra-ai/mastra/commit/990611ba76eb876d86c9c594371ae5f02f94b432), [`80bdf3a`](https://github.com/mastra-ai/mastra/commit/80bdf3ae16ade6ff63bde0cb16fa2df8ab7dd4dd), [`c967a5e`](https://github.com/mastra-ai/mastra/commit/c967a5eec150c5dc5418c4a4388982d1fb7ad27c), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`9ba1247`](https://github.com/mastra-ai/mastra/commit/9ba12470c77f1c03642d720ce67e517e878f666e), [`fd96298`](https://github.com/mastra-ai/mastra/commit/fd96298a8367622f4ebfcaa97b5b6c1fbbd14564), [`66bbfb5`](https://github.com/mastra-ai/mastra/commit/66bbfb5f05b473d39f88c0e4a481ccac41634f3a), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`f8da216`](https://github.com/mastra-ai/mastra/commit/f8da21633e7eb0e31c9ce0fc30567870d19416d3), [`4a09a9c`](https://github.com/mastra-ai/mastra/commit/4a09a9c0474ef643558fcb5f0edc542b82f1cab0), [`5f798b3`](https://github.com/mastra-ai/mastra/commit/5f798b3362e9bdf4d690f85245606e146eef60b9), [`6a84954`](https://github.com/mastra-ai/mastra/commit/6a84954a2667f85b6d59da652dab1bbff007ccb0), [`1e83a47`](https://github.com/mastra-ai/mastra/commit/1e83a4734ab61ba5926af6793e3569a78b72ed37), [`52d8ef0`](https://github.com/mastra-ai/mastra/commit/52d8ef03801f1deb7ee48532fc4190dd4a33916c), [`cdd5c33`](https://github.com/mastra-ai/mastra/commit/cdd5c33ac6c7118a9f139e6dc0e14e6a8ae31658), [`7fdcaa6`](https://github.com/mastra-ai/mastra/commit/7fdcaa66105d64290f9b14432a12ec99f39c4d3a), [`d6c56f9`](https://github.com/mastra-ai/mastra/commit/d6c56f951db3213330b98b0abafa9778c8770e58), [`e08e789`](https://github.com/mastra-ai/mastra/commit/e08e789c1bf4cd2fe46363f7a4728536ceccc9bd), [`bf936e2`](https://github.com/mastra-ai/mastra/commit/bf936e2c89b2ff0dad5695b873ddc009ba96d41e), [`7fb580a`](https://github.com/mastra-ai/mastra/commit/7fb580ac73fbcacf2ff00872a3395f73ae1b9fa5), [`ed5d606`](https://github.com/mastra-ai/mastra/commit/ed5d606739c5e3fbdfa9f272df7809aa5ab43b1d), [`f53d5bd`](https://github.com/mastra-ai/mastra/commit/f53d5bd4885b29e4ac29a428a6044088ea8d6aa3), [`32980a3`](https://github.com/mastra-ai/mastra/commit/32980a3e2413d0274ac244d32c37d910edc13f00), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`82e3365`](https://github.com/mastra-ai/mastra/commit/82e3365ef7c9bf7bee2e7a7029035ea262d68895), [`6104347`](https://github.com/mastra-ai/mastra/commit/61043473ba6bfd0a25156824e853e13165562e6c), [`35cc901`](https://github.com/mastra-ai/mastra/commit/35cc90102cf834a84827acaf9eee0b6d6d1e2a3b), [`a8b4cf0`](https://github.com/mastra-ai/mastra/commit/a8b4cf02823cffebc4751a53337dfacf097c1ae1), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`333785c`](https://github.com/mastra-ai/mastra/commit/333785c93cbb01e42c60167e995457c28897ddbf), [`bda2235`](https://github.com/mastra-ai/mastra/commit/bda22353ee28f2df0eaea555f7cae1549f979c0b), [`efd5c81`](https://github.com/mastra-ai/mastra/commit/efd5c81cc25fde3c2ddd86fc1178deb4ec176e19), [`1b482c2`](https://github.com/mastra-ai/mastra/commit/1b482c2d89244dd758c41e5f927a2b44041388d2), [`5dba2a4`](https://github.com/mastra-ai/mastra/commit/5dba2a41600385751f5aace79878904e1972609d), [`45bfb88`](https://github.com/mastra-ai/mastra/commit/45bfb88fd52f1dd3be20e2a38905777c96499c90), [`ff28284`](https://github.com/mastra-ai/mastra/commit/ff2828416f14daff9d956e6a352fdaa23c950979), [`4bcdfaf`](https://github.com/mastra-ai/mastra/commit/4bcdfaf0eac3199d7cb171b0a19a92c9c341eea4), [`e3b9307`](https://github.com/mastra-ai/mastra/commit/e3b9307098daefbfae2a52ae2ef51bc9fc701190), [`d6834c5`](https://github.com/mastra-ai/mastra/commit/d6834c5a7866b16734d23900163c2414ed70d791), [`f33264f`](https://github.com/mastra-ai/mastra/commit/f33264f517ae603279afd5c4251e2b40f6dd3618), [`689f2c4`](https://github.com/mastra-ai/mastra/commit/689f2c4b6c0835fe455702b01d21daa8abcd9331), [`fcd0667`](https://github.com/mastra-ai/mastra/commit/fcd0667a4e378be35c9a1b1eb19cce78fbfd7282), [`cfd0d9e`](https://github.com/mastra-ai/mastra/commit/cfd0d9ec77ec3c69dd96f79cdb579e03d79f22ce), [`acc3513`](https://github.com/mastra-ai/mastra/commit/acc3513b19f79bf0a7ec2998694580edca54086c), [`1670533`](https://github.com/mastra-ai/mastra/commit/1670533986f6bacf567746245348125e3a106448), [`a7eb4a1`](https://github.com/mastra-ai/mastra/commit/a7eb4a11450f6170274ed5141bffe821d4fdd5a6), [`0976933`](https://github.com/mastra-ai/mastra/commit/0976933142333ec78451feef265b68bcb45aa5e7), [`242b945`](https://github.com/mastra-ai/mastra/commit/242b94558777bfbdeb42cbfea84afff0b6ad0633), [`c52d346`](https://github.com/mastra-ai/mastra/commit/c52d3462ec831a5d95926ecd3d3373f5928ad2e5), [`af4636a`](https://github.com/mastra-ai/mastra/commit/af4636a74463275d71c1d13a38f7d2b738f128bf), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`2eabc09`](https://github.com/mastra-ai/mastra/commit/2eabc097d86d52fbd0123da36a7c874154cc384f), [`0023e79`](https://github.com/mastra-ai/mastra/commit/0023e7919431078280abd11c89d1edeae35fcc69), [`c2ad51e`](https://github.com/mastra-ai/mastra/commit/c2ad51e2467f901eecba8c9f4a45e22a50bd7c18), [`25ca73d`](https://github.com/mastra-ai/mastra/commit/25ca73d25dee7ce9f0ca72939e3a505c4db7257e), [`2f9ef3f`](https://github.com/mastra-ai/mastra/commit/2f9ef3f4ca06fc2dcdd5088c26b7f4da6a016791), [`e7eefcb`](https://github.com/mastra-ai/mastra/commit/e7eefcb162cda7c493e8c3bf43050ead0efbcb2c), [`fea5cae`](https://github.com/mastra-ai/mastra/commit/fea5caedc7e2cfea51784a15e015952692027abf), [`4d7aca2`](https://github.com/mastra-ai/mastra/commit/4d7aca2fe75f225c83d1502d63079568e6ec163f), [`e1cead1`](https://github.com/mastra-ai/mastra/commit/e1cead17b5f3653cf00d2f90cc19b113119c02ba), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`d9d93b2`](https://github.com/mastra-ai/mastra/commit/d9d93b25e4a65ad5fa153fa35be7ed149c8d587f), [`c4ec889`](https://github.com/mastra-ai/mastra/commit/c4ec889561c0264c43f66d04d587bee4ce35e792), [`4b59f78`](https://github.com/mastra-ai/mastra/commit/4b59f786cbc9a7d1ef07a07517dbd4b96865e99d), [`eeae63e`](https://github.com/mastra-ai/mastra/commit/eeae63e7fbe8e1f237adc69bca6e2ac13c5ca907), [`3dc97ea`](https://github.com/mastra-ai/mastra/commit/3dc97ea415fad353b48a13095fad1835933cc12a), [`94e7ae9`](https://github.com/mastra-ai/mastra/commit/94e7ae970b37c888cd1244ef013292639a2fe6d1), [`e6a2860`](https://github.com/mastra-ai/mastra/commit/e6a2860649cc51f87d32d78b766ae2126446ba07), [`7010c5d`](https://github.com/mastra-ai/mastra/commit/7010c5d15728bf9c5dfe4fb6b1bf80ce23bf143a), [`bab06b1`](https://github.com/mastra-ai/mastra/commit/bab06b18923873a584bdfc71a6b4ec7fb4727fb7), [`3d01cd3`](https://github.com/mastra-ai/mastra/commit/3d01cd387321b6f9c5cac31d487c84bf51b19c78), [`7bf3086`](https://github.com/mastra-ai/mastra/commit/7bf308663f0115ca74ad20554ade740f06640859), [`4c186a0`](https://github.com/mastra-ai/mastra/commit/4c186a017275f45e6ed4c09de0f89550e2d09e8c), [`b0fa077`](https://github.com/mastra-ai/mastra/commit/b0fa077bcbc9b08551846fe372a0d3d15b71ed72), [`0282e16`](https://github.com/mastra-ai/mastra/commit/0282e16115538c8e9b248b90f0748eb01cb5dc98), [`a8dd139`](https://github.com/mastra-ai/mastra/commit/a8dd1391a9fe9a6632c25809ef236980afa9a020), [`6a667b4`](https://github.com/mastra-ai/mastra/commit/6a667b4b7cd6a93fe41fcdd357b08c5a8c09b9ab), [`9be8878`](https://github.com/mastra-ai/mastra/commit/9be8878dcf0388e84fc4873e0eec27bd49b881a4), [`e5786be`](https://github.com/mastra-ai/mastra/commit/e5786be02bb903073082bd9d6da880ebaacc343f), [`2440e09`](https://github.com/mastra-ai/mastra/commit/2440e096ea6c2def1ccc1eb2d0f3f5b88c4af940), [`2093fbd`](https://github.com/mastra-ai/mastra/commit/2093fbd53bb744bae19ec89f6d73db9a66fbe8a7), [`a59049b`](https://github.com/mastra-ai/mastra/commit/a59049b1652a13efff66ac826326b5ed9a550342), [`7bd85ea`](https://github.com/mastra-ai/mastra/commit/7bd85ea7588b71c25ce9f4019c88f8539be5dcbc), [`83fa004`](https://github.com/mastra-ai/mastra/commit/83fa0044bfda8b703a83883dbd8bef204844d13f), [`a463cdf`](https://github.com/mastra-ai/mastra/commit/a463cdf1c95c3059e70f0bff27959e8558bb899d), [`e7a5da4`](https://github.com/mastra-ai/mastra/commit/e7a5da4ef8e4dd452d2f232961b4e682a85ffe43), [`7b4393d`](https://github.com/mastra-ai/mastra/commit/7b4393d557411fdcf07b0e30e5acaf7cc85154ae), [`0ea6b80`](https://github.com/mastra-ai/mastra/commit/0ea6b8001408ce02b56e8be0536b0fd8cbaf8ad2)]:
|
|
75
|
+
- @mastra/core@1.58.0
|
|
76
|
+
- @mastra/schema-compat@1.3.6
|
|
77
|
+
|
|
78
|
+
## 1.26.1-alpha.7
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Fixed a crash where updating a thread without a title (for example during observational memory buffering) could write a null title and violate the database's not-null constraint when running a newer @mastra/memory against an older storage package. Memory now checks whether the connected storage adapter supports partial thread updates and backfills the existing title for older adapters, so mixed-version deployments keep working. See #21041 for the original title-clobbering fix this makes backward compatible. ([#21257](https://github.com/mastra-ai/mastra/pull/21257))
|
|
83
|
+
|
|
84
|
+
- Storage adapters now declare support for partial thread updates, letting newer @mastra/memory preserve existing thread titles instead of overwriting them, while remaining safe against older versions. ([#21257](https://github.com/mastra-ai/mastra/pull/21257))
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [[`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b)]:
|
|
87
|
+
- @mastra/core@1.58.0-alpha.15
|
|
88
|
+
|
|
3
89
|
## 1.26.1-alpha.6
|
|
4
90
|
|
|
5
91
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -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.26.1
|
|
6
|
+
version: "1.26.1"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -31,6 +31,18 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
31
31
|
- [Working memory](references/docs-memory-working-memory.md) - Learn how to configure working memory in Mastra to store persistent user data, preferences.
|
|
32
32
|
- [Storage overview](references/docs-storage-overview.md) - Configure storage for Mastra to persist runtime state across agents, workflows, observability, evals, schedules, and memory.
|
|
33
33
|
|
|
34
|
+
### Integrations
|
|
35
|
+
|
|
36
|
+
- [GitHub](references/integrations-channels-github.md) - Notify a Mastra agent when subscribed GitHub pull requests change.
|
|
37
|
+
- [Aurora DSQL](references/integrations-databases-aurora-dsql.md) - Documentation for the Amazon Aurora DSQL storage implementation in Mastra.
|
|
38
|
+
- [DynamoDB](references/integrations-databases-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
|
|
39
|
+
- [libSQL](references/integrations-databases-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
|
|
40
|
+
- [MongoDB](references/integrations-databases-mongodb.md) - Documentation for the MongoDB storage implementation in Mastra.
|
|
41
|
+
- [OracleDB](references/integrations-databases-oracledb.md) - Documentation for the Oracle Database storage provider in Mastra.
|
|
42
|
+
- [PostgreSQL](references/integrations-databases-postgresql.md) - Documentation for the PostgreSQL storage implementation in Mastra.
|
|
43
|
+
- [Redis](references/integrations-databases-redis.md) - Documentation for the Redis storage implementation in Mastra.
|
|
44
|
+
- [Upstash](references/integrations-databases-upstash.md) - Documentation for the Upstash storage implementation in Mastra.
|
|
45
|
+
|
|
34
46
|
### Reference
|
|
35
47
|
|
|
36
48
|
- [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.
|
|
@@ -45,15 +57,9 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
45
57
|
- [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.
|
|
46
58
|
- [Reference: summarizeConversation()](references/reference-memory-summarizeConversation.md) - Documentation for the standalone `summarizeConversation()` function in Mastra, which summarizes messages you pass in and extracts structured values from them.
|
|
47
59
|
- [Reference: Memory.summarizeThread()](references/reference-memory-summarizeThread.md) - Documentation for the `Memory.summarizeThread()` method in Mastra, which summarizes a thread's conversation in one shot and extracts structured values from it.
|
|
60
|
+
- [Migration: AgentNetwork to .network()](references/reference-migrations-agentnetwork.md) - Learn how to migrate from AgentNetwork primitives to .network() in Mastra.
|
|
61
|
+
- [Memory](references/reference-migrations-upgrade-to-v1-memory.md) - Learn how to migrate memory-related changes when upgrading to v1.
|
|
48
62
|
- [Reference: TokenLimiterProcessor](references/reference-processors-token-limiter-processor.md) - Documentation for the TokenLimiterProcessor in Mastra, which limits the number of tokens in messages.
|
|
49
|
-
- [Reference: Aurora DSQL Storage](references/reference-storage-dsql.md) - Documentation for the Amazon Aurora DSQL storage implementation in Mastra.
|
|
50
|
-
- [Reference: DynamoDB storage](references/reference-storage-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
|
|
51
|
-
- [Reference: libSQL storage](references/reference-storage-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
|
|
52
|
-
- [Reference: MongoDB storage](references/reference-storage-mongodb.md) - Documentation for the MongoDB storage implementation in Mastra.
|
|
53
|
-
- [Reference: OracleDB storage](references/reference-storage-oracledb.md) - Documentation for the Oracle Database storage provider in Mastra.
|
|
54
|
-
- [Reference: PostgreSQL storage](references/reference-storage-postgresql.md) - Documentation for the PostgreSQL storage implementation in Mastra.
|
|
55
|
-
- [Reference: Redis Storage](references/reference-storage-redis.md) - Documentation for the Redis storage implementation in Mastra.
|
|
56
|
-
- [Reference: Upstash storage](references/reference-storage-upstash.md) - Documentation for the Upstash storage implementation in Mastra.
|
|
57
63
|
- [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.
|
|
58
64
|
- [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.
|
|
59
65
|
- [Reference: OracleDB vector store](references/reference-vectors-oracledb.md) - Documentation for the Oracle Database vector provider in Mastra.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) 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.
|
|
6
6
|
>
|
|
7
|
-
> See the [migration guide](https://mastra.ai/
|
|
7
|
+
> See the [migration guide](https://mastra.ai/reference/migrations/network-to-supervisor) to upgrade.
|
|
8
8
|
|
|
9
9
|
A **routing agent** uses an LLM to interpret a request and decide which primitives (subagents, workflows, or tools) to call, in what order, and with what data.
|
|
10
10
|
|
|
@@ -181,4 +181,4 @@ Requirements for automatic resumption:
|
|
|
181
181
|
## Related
|
|
182
182
|
|
|
183
183
|
- [Supervisor agents](https://mastra.ai/docs/capabilities/subagents)
|
|
184
|
-
- [Migration: `.network()` to supervisor agents](https://mastra.ai/
|
|
184
|
+
- [Migration: `.network()` to supervisor agents](https://mastra.ai/reference/migrations/network-to-supervisor)
|
|
@@ -16,7 +16,7 @@ Common use cases:
|
|
|
16
16
|
- Multi-step tasks that need different expertise at each stage
|
|
17
17
|
- Tasks where you need fine-grained control over delegation behavior
|
|
18
18
|
|
|
19
|
-
> **Note:** A parent agent that coordinates subagents is often called a supervisor. The supervisor pattern is one approach to building multi-agent systems in Mastra. For other patterns, read the [conceptual overview](https://mastra.ai/guides/
|
|
19
|
+
> **Note:** A parent agent that coordinates subagents is often called a supervisor. The supervisor pattern is one approach to building multi-agent systems in Mastra. For other patterns, read the [conceptual overview](https://mastra.ai/docs/guides/multi-agent-systems).
|
|
20
20
|
|
|
21
21
|
## Quickstart
|
|
22
22
|
|
|
@@ -453,5 +453,5 @@ Version overrides propagate automatically through delegation. See [Subagent vers
|
|
|
453
453
|
- [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
|
|
454
454
|
- [Agent approval](https://mastra.ai/docs/agents/agent-approval)
|
|
455
455
|
- [Memory in multi-agent systems](https://mastra.ai/docs/memory/overview)
|
|
456
|
-
- [Concept: Multi-agent systems](https://mastra.ai/guides/
|
|
456
|
+
- [Concept: Multi-agent systems](https://mastra.ai/docs/guides/multi-agent-systems)
|
|
457
457
|
- 📹 [Mastra supervisor agents workshop](https://www.youtube.com/watch?v=FNb2fL9WhQg\&t=1872s)
|
|
@@ -313,11 +313,11 @@ Both scenarios are safe - guardrails prevent inappropriate content from being pe
|
|
|
313
313
|
|
|
314
314
|
Some storage providers enforce record size limits that base64-encoded file attachments can exceed:
|
|
315
315
|
|
|
316
|
-
| Provider
|
|
317
|
-
|
|
|
318
|
-
| [DynamoDB](https://mastra.ai/
|
|
319
|
-
| [Convex](https://mastra.ai/
|
|
320
|
-
| [Cloudflare D1](https://mastra.ai/
|
|
316
|
+
| Provider | Record size limit |
|
|
317
|
+
| ----------------------------------------------------------------------- | ----------------- |
|
|
318
|
+
| [DynamoDB](https://mastra.ai/integrations/databases/dynamodb) | 400 KB |
|
|
319
|
+
| [Convex](https://mastra.ai/integrations/databases/convex) | 1 MiB |
|
|
320
|
+
| [Cloudflare D1](https://mastra.ai/integrations/databases/cloudflare-d1) | 1 MiB |
|
|
321
321
|
|
|
322
322
|
PostgreSQL, MongoDB, and libSQL have higher limits and are usually unaffected.
|
|
323
323
|
|
|
@@ -12,7 +12,7 @@ You can also retrieve message history to display past conversations in your UI.
|
|
|
12
12
|
>
|
|
13
13
|
> Sending the full history is redundant because Mastra loads messages from storage, and it can cause message ordering bugs when client-side timestamps conflict with stored timestamps.
|
|
14
14
|
>
|
|
15
|
-
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/
|
|
15
|
+
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui).
|
|
16
16
|
|
|
17
17
|
## Threads and resources
|
|
18
18
|
|
|
@@ -92,7 +92,7 @@ See [configuration options](https://mastra.ai/reference/memory/observational-mem
|
|
|
92
92
|
>
|
|
93
93
|
> Observational memory still relies on stored conversation history. Sending the full history is redundant and can cause message ordering bugs when client-side timestamps conflict with stored timestamps.
|
|
94
94
|
>
|
|
95
|
-
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/
|
|
95
|
+
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui).
|
|
96
96
|
|
|
97
97
|
> **Note:** OM currently only supports `@mastra/pg`, `@mastra/libsql`, `@mastra/mysql`, `@mastra/mongodb`, `@mastra/convex`, and `@mastra/oracledb` storage adapters. It uses background agents for managing memory. When no model is set, the default model is `google/gemini-2.5-flash`.
|
|
98
98
|
|
|
@@ -190,19 +190,20 @@ You can also route `observability` to a dedicated analytics backend. See the [ob
|
|
|
190
190
|
|
|
191
191
|
Each provider page includes installation instructions, configuration parameters, and usage examples:
|
|
192
192
|
|
|
193
|
-
- [
|
|
194
|
-
- [
|
|
195
|
-
- [
|
|
196
|
-
- [
|
|
197
|
-
- [
|
|
198
|
-
- [
|
|
199
|
-
- [
|
|
200
|
-
- [
|
|
201
|
-
- [
|
|
202
|
-
- [
|
|
203
|
-
- [
|
|
204
|
-
- [
|
|
205
|
-
- [
|
|
193
|
+
- [Cloudflare D1](https://mastra.ai/integrations/databases/cloudflare-d1)
|
|
194
|
+
- [Cloudflare KV & Durable Objects](https://mastra.ai/integrations/databases/cloudflare-kv)
|
|
195
|
+
- [Convex](https://mastra.ai/integrations/databases/convex)
|
|
196
|
+
- [DynamoDB](https://mastra.ai/integrations/databases/dynamodb)
|
|
197
|
+
- [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
|
|
198
|
+
- [LanceDB](https://mastra.ai/integrations/databases/lancedb)
|
|
199
|
+
- [libSQL](https://mastra.ai/integrations/databases/libsql)
|
|
200
|
+
- [Microsoft SQL Server](https://mastra.ai/integrations/databases/mssql)
|
|
201
|
+
- [MongoDB](https://mastra.ai/integrations/databases/mongodb)
|
|
202
|
+
- [Neon Postgres](https://mastra.ai/integrations/databases/neon)
|
|
203
|
+
- [OracleDB](https://mastra.ai/integrations/databases/oracledb)
|
|
204
|
+
- [PostgreSQL](https://mastra.ai/integrations/databases/postgresql)
|
|
205
|
+
- [Redis](https://mastra.ai/integrations/databases/redis)
|
|
206
|
+
- [Upstash](https://mastra.ai/integrations/databases/upstash)
|
|
206
207
|
|
|
207
208
|
> **Tip:** libSQL is the fastest path for local development because it doesn't require running a separate database server.
|
|
208
209
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# GitHub
|
|
4
|
+
|
|
5
|
+
The `@mastra/github-signals` provider lets an agent follow pull requests (PRs). It polls subscribed PRs and sends [notification signals](https://mastra.ai/docs/long-running-agents/signals) to the agent thread when relevant activity occurs.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install GitHub Signals and the memory packages used in this example:
|
|
10
|
+
|
|
11
|
+
**npm**:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @mastra/github-signals @mastra/libsql @mastra/memory
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**pnpm**:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Yarn**:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Bun**:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
GitHub Signals requires:
|
|
38
|
+
|
|
39
|
+
- A Mastra storage adapter with memory and notification support. The provider stores each subscription in the thread's metadata, so the thread must already exist.
|
|
40
|
+
- The `gitcrawl` command on `PATH`, configured to access the repositories you want to monitor. The provider runs `gitcrawl sync` and reads its SQLite database.
|
|
41
|
+
- The `sqlite3` command on `PATH`.
|
|
42
|
+
- The [GitHub CLI](https://cli.github.com/) installed and authenticated. The provider uses `gh api` to check whether comment authors have access to the repository before notifying the agent.
|
|
43
|
+
|
|
44
|
+
By default, comments from users with `admin`, `maintain`, or `write` access can trigger notifications. CodeRabbit and Devin bot comments are also allowed. Configure `authorizedPermissions`, `authorizedBots`, or `ignoredBots` when you need different rules.
|
|
45
|
+
|
|
46
|
+
## Agent and subscription
|
|
47
|
+
|
|
48
|
+
Create one `GithubSignals` instance and register it on the agent. Register the agent and a storage adapter on the Mastra instance:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { Agent } from '@mastra/core/agent'
|
|
52
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
53
|
+
import { Memory } from '@mastra/memory'
|
|
54
|
+
import { GithubSignals } from '@mastra/github-signals'
|
|
55
|
+
import { LibSQLStore } from '@mastra/libsql'
|
|
56
|
+
|
|
57
|
+
export const githubSignals = new GithubSignals()
|
|
58
|
+
|
|
59
|
+
export const devAgent = new Agent({
|
|
60
|
+
id: 'dev-agent',
|
|
61
|
+
name: 'Development Agent',
|
|
62
|
+
instructions: 'Triage pull request activity and help resolve issues.',
|
|
63
|
+
model: 'openai/gpt-5.6-sol',
|
|
64
|
+
memory: new Memory(),
|
|
65
|
+
signals: [githubSignals],
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
export const mastra = new Mastra({
|
|
69
|
+
agents: { devAgent },
|
|
70
|
+
storage: new LibSQLStore({
|
|
71
|
+
id: 'mastra-storage',
|
|
72
|
+
url: 'file:./mastra.db',
|
|
73
|
+
}),
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
After the agent has created a memory thread, subscribe that thread to a PR. Passing `owner` and `repo` works from any directory:
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
await githubSignals.subscribeThreadToPR({
|
|
81
|
+
threadId: 'thread-123',
|
|
82
|
+
resourceId: 'user-123',
|
|
83
|
+
pr: {
|
|
84
|
+
owner: 'acme',
|
|
85
|
+
repo: 'web-app',
|
|
86
|
+
number: 42,
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The provider syncs the PR immediately, stores the subscription, and starts polling every five minutes. Set `pollIntervalMs` in the `GithubSignals` constructor to change the interval. If the process restarts, call `startPollingForThread()` for each persisted thread subscription to resume polling.
|
|
92
|
+
|
|
93
|
+
## Pull request notifications
|
|
94
|
+
|
|
95
|
+
GitHub Signals notifies the agent when a subscribed PR has:
|
|
96
|
+
|
|
97
|
+
- A new authorized comment, commit, or other pull request activity.
|
|
98
|
+
- A change in unresolved review threads.
|
|
99
|
+
- Continuous integration (CI) checks that start, fail, or recover.
|
|
100
|
+
- Merge conflicts that appear or are resolved.
|
|
101
|
+
- A state change to closed, reopened, or merged.
|
|
102
|
+
|
|
103
|
+
The initial sync sends a baseline notification with the current PR state. A merge automatically removes the thread's subscription to that PR.
|
package/dist/docs/references/{reference-storage-dynamodb.md → integrations-databases-dynamodb.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# DynamoDB
|
|
3
|
+
# DynamoDB
|
|
4
4
|
|
|
5
5
|
The DynamoDB storage implementation provides a high-capacity and performant NoSQL database solution for Mastra, using a single-table design pattern with [ElectroDB](https://electrodb.dev/).
|
|
6
6
|
|
package/dist/docs/references/{reference-storage-libsql.md → integrations-databases-libsql.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# libSQL
|
|
3
|
+
# libSQL
|
|
4
4
|
|
|
5
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.
|
|
6
6
|
|
|
@@ -140,4 +140,4 @@ const thread = await memoryStore?.getThreadById({ threadId: '...' })
|
|
|
140
140
|
|
|
141
141
|
libSQL supports observability and is ideal for local development. Use the `realtime` [tracing strategy](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage) for immediate visibility while debugging.
|
|
142
142
|
|
|
143
|
-
For production environments with higher trace volumes, consider using [PostgreSQL](https://mastra.ai/
|
|
143
|
+
For production environments with higher trace volumes, consider using [PostgreSQL](https://mastra.ai/integrations/databases/postgresql) or [ClickHouse via composite storage](https://mastra.ai/reference/storage/composite).
|
package/dist/docs/references/{reference-storage-mongodb.md → integrations-databases-mongodb.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# MongoDB
|
|
3
|
+
# MongoDB
|
|
4
4
|
|
|
5
5
|
The MongoDB storage implementation provides a high-capacity storage solution using MongoDB databases with support for both document storage and vector operations.
|
|
6
6
|
|
package/dist/docs/references/{reference-storage-oracledb.md → integrations-databases-oracledb.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# OracleDB
|
|
3
|
+
# OracleDB
|
|
4
4
|
|
|
5
5
|
The OracleDB storage provider stores Mastra application state in Oracle Database. It implements Mastra's composite storage interface, so one `OracleStore` instance can back memory, workflow snapshots, observability, scores, scorer definitions, MCP client metadata, and agent registry data.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# Redis
|
|
3
|
+
# Redis
|
|
4
4
|
|
|
5
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.
|
|
6
6
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Migrate from AgentNetwork to `.network()`
|
|
4
|
+
|
|
5
|
+
As of `v0.20.0` for `@mastra/core`, the following changes apply.
|
|
6
|
+
|
|
7
|
+
## Upgrade from AI SDK v4 to v5
|
|
8
|
+
|
|
9
|
+
- Bump all your model provider packages by a major version.
|
|
10
|
+
|
|
11
|
+
> **Note:** This will ensure that they're all v5 models now.
|
|
12
|
+
|
|
13
|
+
## Memory is required
|
|
14
|
+
|
|
15
|
+
- Memory is now required for the agent network to function properly.
|
|
16
|
+
|
|
17
|
+
> **Note:** You must configure memory for the agent.
|
|
18
|
+
|
|
19
|
+
## Migration paths
|
|
20
|
+
|
|
21
|
+
If you were using the `AgentNetwork` primitive, you can replace the `AgentNetwork` with `Agent`.
|
|
22
|
+
|
|
23
|
+
Before:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { AgentNetwork } from '@mastra/core/network'
|
|
27
|
+
|
|
28
|
+
const agent = new AgentNetwork({
|
|
29
|
+
name: 'agent-network',
|
|
30
|
+
agents: [agent1, agent2],
|
|
31
|
+
tools: { tool1, tool2 },
|
|
32
|
+
model: 'openai/gpt-5.6-sol',
|
|
33
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
await agent.stream('Find me the weather in Tokyo.')
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { Agent } from '@mastra/core/agent'
|
|
43
|
+
import { Memory } from '@mastra/memory'
|
|
44
|
+
|
|
45
|
+
const memory = new Memory()
|
|
46
|
+
|
|
47
|
+
const agent = new Agent({
|
|
48
|
+
id: 'agent-network',
|
|
49
|
+
name: 'agent-network',
|
|
50
|
+
agents: { agent1, agent2 },
|
|
51
|
+
tools: { tool1, tool2 },
|
|
52
|
+
model: 'openai/gpt-5.6-sol',
|
|
53
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
54
|
+
memory,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
await agent.network('Find me the weather in Tokyo.')
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If you were using the `NewAgentNetwork` primitive, you can replace the `NewAgentNetwork` with `Agent`.
|
|
61
|
+
|
|
62
|
+
Before:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
import { NewAgentNetwork } from '@mastra/core/network/vnext'
|
|
66
|
+
|
|
67
|
+
const agent = new NewAgentNetwork({
|
|
68
|
+
id: 'agent-network',
|
|
69
|
+
name: 'agent-network',
|
|
70
|
+
agents: { agent1, agent2 },
|
|
71
|
+
workflows: { workflow1 },
|
|
72
|
+
tools: { tool1, tool2 },
|
|
73
|
+
model: 'openai/gpt-5.6-sol',
|
|
74
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
await agent.loop('Find me the weather in Tokyo.')
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
After:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { Agent } from '@mastra/core/agent'
|
|
84
|
+
import { Memory } from '@mastra/memory'
|
|
85
|
+
|
|
86
|
+
const memory = new Memory()
|
|
87
|
+
|
|
88
|
+
const agent = new Agent({
|
|
89
|
+
id: 'agent-network',
|
|
90
|
+
name: 'agent-network',
|
|
91
|
+
agents: { agent1, agent2 },
|
|
92
|
+
workflows: { workflow1 },
|
|
93
|
+
tools: { tool1, tool2 },
|
|
94
|
+
model: 'openai/gpt-5.6-sol',
|
|
95
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
96
|
+
memory,
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
await agent.network('Find me the weather in Tokyo.')
|
|
100
|
+
```
|