Skip to content

Update dependency @mastra/memory to v1 - #13

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/mastra-memory-1.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/mastra-memory-1.x

Conversation

@renovate

@renovate renovate Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@mastra/memory (source) 0.2.10 → 1.41.0 age confidence

Release Notes

mastra-ai/mastra (@​mastra/memory)

v1.41.0

Compare Source

Minor Changes
  • Changes to an experimental, upcoming memory feature. (#​28353)

    experimental_subconscious and the Memory knowledge option are removed: setting either now throws, saying to attach Knowledge to the agent instead (knowledge: false is still accepted). Subconscious and KnowledgeSemanticIndexCoordinator stay exported from @mastra/memory so older code still loads, and throw when constructed. @mastra/core/knowledge exports Knowledge with its option and result types and the Knowledge storage domain; the tool, pin and semantic-index helpers are internal.

    Agent scopes are plain "<type>:<value>" strings that say who the run is; what the run may read or write comes from whoever consumes them, such as Knowledge's scope declarations.

    A message can carry its own scopes: session.sendMessage({ content, scopes }). A run's scopes are fixed when it starts, so a message whose scopes differ from the running run's waits for it to end, then starts its own run in the same conversation. sendSignal reports this as { action: 'blocked', reason: 'scope-mismatch', runId }. queueMessage, queueSignal, sendNotificationSignal and steer take scopes the same way: a queued or steering message, or a notification, whose scopes differ from the running run's starts its own run with its scopes after that run instead of joining it. A deferred notification keeps the scopes it was sent with. Scopes are set in process only: remote callers (the agent controller HTTP routes and @mastra/client-js) can't send them. To derive scopes from a request, give the agent a scopes function that reads trusted request context. When the thread's claimed owner runs in another process, a message with scopes isn't queued: sendMessage rejects with an error saying scopes don't cross processes. Messages without scopes still join that owner's run.

    Attach Knowledge with new Agent({ knowledge, scopes }). Knowledge needs scopes, the scope types its runs may hold and who gets which role on them: new Knowledge({ storage, scopes: { ...knowledgeMemoryScopes() } }) declares Memory's thread:/resource: scopes and an org: scope; {} declares none. A run holding a scope that isn't declared fails. Tools are off by default: tools: true gives the read and write tools, tools: { read: true } the read tools only, and pinnedContext: true (or { maxPins, maxTokens }) delivers pinned pages every turn and adds knowledge_pin. knowledge.readScopeFor(principals) returns what holders of those scopes can read, for host code reading the store directly. knowledge.explainAccess(runScopes, { scope } | { page }) says why a run can or can't reach a scope or page; it's host-only, so never expose it through an agent tool or an unauthenticated route. knowledge.onChange(listener) reports each committed write made through knowledge.getStorage() (tools included) by id, for live UIs; re-read each page under the viewer's read scope before showing it. A scope declaration can carry a displayLabel for UIs, and knowledge.scopeDeclaration(key) returns a declaration's display fields.

    Knowledge is a tree of pages. The tools are five: knowledge_search, knowledge_read (a page with its notes, or a scope's pages), knowledge_page (op: 'write' | 'move' | 'merge'), knowledge_note (op: 'add' | 'restamp' | 'remove') and knowledge_pin (op: 'pin' | 'unpin'). Notes are at most about 250 tokens and page descriptions about 100; long text goes in a page body.

    Search is keyword search by default. Give Knowledge a vector store and an embedder and knowledge_search blends keyword and semantic results; pages and notes written through the tools are embedded as they're written. Every semantic hit is re-checked against what the run can read before it's ranked, so hidden content never fills result slots. Content written straight to the store isn't embedded.

  • Observational Memory semantic search now works with a vector store that generates embeddings itself, so no embedder is needed. (#​27005)

    With MongoDB Automated Embedding, MongoDB embeds each observation when it is written and the search string when you query:

    const memory = new Memory({
      storage,
      vector: new MongoDBVector({ id: 'vec', uri, dbName, autoEmbed: { model: 'voyage-4' } }),
      options: { observationalMemory: { retrieval: { vector: true } } },
    });
    
    await memory.searchMessages({ query: 'What deadline did we agree on?', resourceId: 'user-123' });

    The agent's recall tool searches the same way. Observations are indexed under memory_observations_selfembed. Configurations that pass an embedder keep working unchanged.

Patch Changes

v1.40.0

Compare Source

Minor Changes
  • Added compact observer failure details and a reference to the failed memory-operation span when Observational Memory interrupts an agent. Observer context-window exhaustion is recorded as a limit, while the affected agent records an interruption. (#​28703)

    Failure markers in streams and persisted messages, and tripwire metadata, now include observerFailure with the observer span reference and failure classification.

Patch Changes

v1.39.1

Compare Source

Patch Changes
  • dependencies updates: (#​28417)

  • Fixed Observational Memory injecting the continuation hint on threads that have no observations yet when retrieval is enabled. The hint (a synthetic user message telling the model earlier context was summarized) now only appears once observations have actually replaced messages. Fixes #​26562 (#​26826)

  • Observational memory now detects context-overflow errors with the shared provider error reader from @​mastra/core, so it recovers from the same overflow shapes the rest of Mastra recognizes, including overflow named only in a provider's response body or stream error frame. These packages now require @​mastra/core 1.80.0 or newer. (#​28496)

    If your package manager reports a peer conflict after this release, upgrade @​mastra/core first, then the package:

    pnpm add @mastra/core@^1.80.0
    pnpm add @mastra/memory@latest

    Before, a project could pair @​mastra/memory with @​mastra/core 1.78 and install cleanly; after, that pairing is refused at install time instead of failing at runtime.

  • Fixed observational memory dropping messages when the Observer model returns an empty response. An empty or whitespace-only Observer reply is now retried like a model error, with backoff, up to observation.maxRetries. If every attempt comes back empty, lastObservedAt stays where it was, so those messages remain pending, and failurePolicy decides how the turn proceeds. A provider that always returns empty output therefore uses the full retry budget before failurePolicy applies. (#​27294)

    summarizeConversation() and memory.summarizeThread() now throw once retries are exhausted on empty Observer output, instead of returning summary: ''.

  • Fixed Observational Memory keeping a run's original user message in the prompt after it had been observed. Once memory has observed the request and the model has answered it, the request leaves the prompt and the observations stand in for it for the rest of the run, as they already did on later turns. (#​28364)

    Keeping it had two costs:

    • A stale instruction. Many steps later the old request still appeared next to observations that already recorded it and what was done about it, and could read as a new instruction.
    • A lost prompt cache on the next turn. The request sat ahead of every tool call the run made after it, and the next turn dropped it. So the next turn's prompt matched the cached one only up to that point, and every one of those tool calls had to be written to the cache again. In a run with about 40k tokens of tool results after the request, the next turn now reuses nearly all of its prompt from cache instead of almost none.

    Tool results and messages the model has not read yet still stay in the prompt until it reads them. The request message stays stored; only details the observer did not copy into its observations, such as a pasted link, are no longer sent once it has been observed.

  • Fixed observational memory dropping messages when the Observer model replies with text but no observations, such as a refusal ("I can't help with that"). These replies are now retried the same way as an empty reply, with the same observation.maxRetries budget, and failurePolicy decides the turn once retries run out. A reply that carries only other Observer sections, such as <current-task>, is still accepted. (#​28456)

    In resource scope, a thread the Observer leaves out of its reply no longer has its cursor advanced. Its messages are observed in a later cycle. A reply whose <thread> blocks name none of the requested threads is retried.

    Observer sections written on one line, such as <observations>- note</observations>, are now parsed instead of being ignored.

  • Keep the current user request and delayed tool results in the prompt when a durable Observational Memory turn resumes on another worker. Preserve completed live background results when reconciling stored messages. (#​28045)

  • Fixed a long agent run ending with a context-window error after observational memory had already recovered from one. Recovery now moves the rest of the run's response to a new message, so a later overflow in the same run can be observed and retried too. (#​28358)

  • Fixed per-request observationalMemory: false and { enabled: false } overrides so they disable observational memory for that request while preserving message history and subsequent enabled runs. Fixes #​27814. (#​28143)

  • Fixed @mastra/memory failing to load in Node ESM with Cannot find module 'probe-image-size/sync'. (#​28139)

  • Fixed working-memory data leaking into recalled history after raw message writes and partial message edits. Preserved observation markers and omitted content fields. Message edits now index the visible text the message keeps after the edit, so semantic recall no longer drops a message whose edit only touches working memory or metadata. Fixes #​27946. (#​28149)

  • Fixed Observational Memory calls continuing after an agent run is cancelled. Synchronous observation and reflection now stop with their run and leave the run's messages unobserved for a later cycle. Async buffering and background reflection keep running after the run is cancelled, and settled() still waits for them; only the run's own waits on that work stop. Fixes #​27792. (#​28158)

  • Fixed Observational Memory crashing when stored conversation history contains a failed tool call with a structured error instead of a text message. Both token counting and the observer now handle these errors, so Observational Memory keeps working on later turns instead of stopping. Fixes #​28407. (#​28440)

  • Fixed agents saying they can't save information when working memory uses agentManaged: false. The instructions now say that memory updates automatically after each response. Agents acknowledge new information instead of claiming they can't save it. Only readOnly: true tells agents they cannot update working memory. (#​28441)

  • Updated dependencies [ce5d473, a15ea70, ce5d473, f396b43, c253e13, 0a913e0, c8f8e41, 3dfe2eb, 152e380, 08640de, b7ff751, 24a821b, 551189d, 99e4867, a1e248b, 0afde2c, 38ff787, 929a728, 1fc075a, 1fc075a, a5a9179, 38ff787, 52db47c, 8e1247c, ed76bdc, 2f655e5, ac953f0, ca04e2c, 9ffb79b, 155e3ac, be5c929, 7adffbb, e39aa42, 0d7d5cb, 7c20f00, e20bbd0, c9ff73d, f51a29e, 7d58088, 4ad204d, f5ebbf3, decd0a0, e56f88e, cd4722a, db2a1a6, 6a4a607, 2499c00, de53c27, d580530, a6077b7, 5bd713b, 5c0a994, d3f5000, 682ebf6, 11c83d5, dd6205e, 97ade4e, 8ae87fa, fe73073, 2ca9e35, d1aee64, 20f40eb, 7adffbb, e718b91, 9a9085e, 35806cb, 2fed0ad, 823a389, 6fea510, 9a83d42, 703b0a1, bfce5b6, 95c6e7c, 2447071, ff35b8c, 59421d0, 501b207, 3143101, 2829b0e, e053569, d9245dd, ab1727d, 4fc17c6, a9ad47d, 358c711, dbdfaee, cf0ca8b, 2ded35c, 875a657, d3e8ec7, ddb7721, d1aee64, d58fe2a, 7662736, 5e88354, 5bb592a, bd508a2, 6f5eadb, 578cb67, 4278b9d, 2ac8cf1, 1283717, 875a657, 2b9f9a5, 307b711, 45c1d16, dc10589, 339da0b, 34ee1d1, 8c61247, a9f392e, fdd2201, 5c56910, b7ff751, 0811cda, 1e31034, 17444a7, a7cc444, 3cdaaa8, 3be96ae, 852110d, b63456b, f156ad0, 580452a, 4303017]:

v1.39.0

Compare Source

Minor Changes
  • Observational memory's 'auto' model can now follow the credentials a request can actually use. Pass canUseProvider in the observational memory config to decide whether 'auto' prefers Gemini, instead of relying on GOOGLE_GENERATIVE_AI_API_KEY in the server environment: (#​26666)

    new Memory({
      options: {
        observationalMemory: {
          model: 'auto',
          canUseProvider: (providerId, { requestContext }) => hasCredential(requestContext, providerId),
        },
      },
    });
  • Support embedding specification v4 models from AI SDK v7. Core accepts v4 embedding models and exports embedV4; Memory and RAG use the matching SDK to generate embeddings while preserving v1, v2, and v3 behavior. (#​27710)

Patch Changes
  • Fixed Gemini 3 agents with working memory failing with "Function call is missing a thought_signature" when continuing a turn (for example after a client tool result). Gemini signs only the first tool call in a parallel step; when that call was updateWorkingMemory, removing it from saved history left the step without a signed first call. The next tool call in the step is now saved with Google's documented skip_thought_signature_validator signature, so the step replays on any Gemini client. (#​27787)

  • Fixed observational memory preserving assistant message identity during feedback continuations. (#​26346)

  • Moving a thread to another resource with memory.updateThreadResourceId() now also moves the thread's observational memory recall entries. Before, recall search under the new resource could not find observations the thread made before the move. (#​27336)

    await memory.updateThreadResourceId({ threadId: 'thread-1', resourceId: 'team-1' });
    
    // Past observations from thread-1 are now found under its new resource
    await memory.searchMessages({ query: 'deploy target', resourceId: 'team-1' });
  • Fixed Subconscious reminders never reaching the main agent in AgentController sessions. Reminder checks, memory questions and their follow-ups now run on the reminder's own thread. (#​27558)

  • Fixed observational memory set to 'auto' sometimes calling google/gemini-2.5-flash without a Google key. When a turn crossed the observation threshold and observed right away, the observer lost track of the main model and fell back to Gemini, so turns failed for accounts without Google with Could not find API key … google/gemini-2.5-flash. That observation now uses the step's main model, as the other observation paths already did. When canUseProvider is set and no main model can be found, 'auto' now fails with a clear error instead of picking a Gemini model it cannot call. (#​27449)

  • Observational memory now aborts and retries an Observer, Reflector, or extraction model call that produces no output for 5 minutes. Before, a provider that accepted the request but never answered could stall the call indefinitely, holding up the thread's observation work. The limit measure

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (in timezone America/Los_Angeles)

  • Branch creation
    • Monday through Friday (* * * * 1-5)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate

renovate Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: @convex-dev/mastra@0.0.1-alpha.8
npm error Found: @mastra/core@0.8.3
npm error node_modules/@mastra/core
npm error   dev @mastra/core@"0.8.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @mastra/core@">=1.80.0-0 <2.0.0-0" from @mastra/memory@1.41.0
npm error node_modules/@mastra/memory
npm error   dev @mastra/memory@"1.41.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2026-11-08T17_07_10_952Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-11-08T17_07_10_952Z-debug-0.log

@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from 22b8036 to 8cc0688 Compare April 16, 2026 20:15
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from 8cc0688 to b975e21 Compare April 27, 2026 23:44
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 4 times, most recently from 6a1a0ed to 177738e Compare May 27, 2026 22:42
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 3 times, most recently from c2cb6f5 to e98fed9 Compare June 6, 2026 00:49
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 2 times, most recently from 3c1db7d to f857d87 Compare June 12, 2026 23:30
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 3 times, most recently from 2a8f5a6 to 9634220 Compare June 20, 2026 14:43
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 2 times, most recently from 42539f1 to 475e5f8 Compare June 27, 2026 06:36
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 3 times, most recently from 17548b2 to 8adfe93 Compare July 6, 2026 00:34
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from 8adfe93 to f3b22b7 Compare July 10, 2026 23:54
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from f3b22b7 to 2bf3cec Compare July 18, 2026 02:00
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 2 times, most recently from d6ee87c to 955f251 Compare August 1, 2026 02:21
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 2 times, most recently from a47bb4a to 7685be9 Compare August 8, 2026 21:51
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 3 times, most recently from 986f57c to 1fe5e4d Compare August 22, 2026 05:16
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from 1fe5e4d to b36cd98 Compare August 29, 2026 13:03
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 2 times, most recently from 75f08c9 to d31ce80 Compare September 6, 2026 05:52
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 3 times, most recently from 7807e1a to 92ca6c5 Compare September 18, 2026 21:56
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 3 times, most recently from 178e84b to d9bc27b Compare September 28, 2026 02:33
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 4 times, most recently from f9276af to 323e271 Compare October 9, 2026 10:57
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch 6 times, most recently from 2c04fc2 to 7859c52 Compare October 14, 2026 23:17
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from 7859c52 to 1157ed2 Compare November 8, 2026 14:51
@renovate
renovate Bot force-pushed the renovate/mastra-memory-1.x branch from 1157ed2 to 9bdd332 Compare November 8, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants