Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions integrations/mastra/typescript/src/mastra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ export class MastraAgent extends AbstractAgent {

// Handle local agent memory management (from Mastra implementation)
if (this.isLocalMastraAgent(this.agent)) {
const memory = await this.agent.getMemory();
const memory = await this.agent.getMemory({
runtimeContext: this.runtimeContext
});

if (
memory &&
Expand Down Expand Up @@ -181,7 +183,9 @@ export class MastraAgent extends AbstractAgent {
onRunFinished: async () => {
if (this.isLocalMastraAgent(this.agent)) {
try {
const memory = await this.agent.getMemory();
const memory = await this.agent.getMemory({
runtimeContext: this.runtimeContext
});
if (memory) {
const workingMemory = await memory.getWorkingMemory({
threadId: input.threadId,
Expand Down Expand Up @@ -337,6 +341,7 @@ export class MastraAgent extends AbstractAgent {
runId,
messages: convertedMessages,
clientTools,
runtimeContext,
});

// Remote agents should have a processDataStream method
Expand Down