mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
Fix overly synchronous and blocking memory behaviour (#3015)
* Creating a thread in preExecute before hook and de-coupling that from `saveMemory()` logic in `packages/core/src/agent/index.ts` * `saveMemory()` is now called `fetchMemory` because it no longer saves any messages, just fetches all the memory context required * We no longer generate the thread title in a blocking way, we do that in the `after` hook in parallel with saving all the user and llm output messages * Saving of new user messages is no longer a blocking operation in `saveMemory` but rather happens in the `after` hook in parallel, no longer blocking the actual LLM call.
This commit is contained in:
parent
2f6a8b615f
commit
3084e13f32
2 changed files with 105 additions and 89 deletions
Loading…
Add table
Add a link
Reference in a new issue