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
24 changes: 20 additions & 4 deletions integrations/mastra/typescript/src/mastra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,19 @@ export class MastraAgent extends AbstractAgent {
// Local agent - use the agent's stream method directly
try {
const response = await this.agent.stream(convertedMessages, {
threadId,
resourceId,
runId,
clientTools,
runtimeContext,
memory: {
resource: resourceId,
thread: {
id: threadId
}
},

// Deprecated but still set for compatability
threadId,
resourceId
});

// For local agents, the response should already be a stream
Expand Down Expand Up @@ -332,11 +340,19 @@ export class MastraAgent extends AbstractAgent {
// Remote agent - use the remote agent's stream method
try {
const response = await this.agent.stream({
threadId,
resourceId,
runId,
messages: convertedMessages,
clientTools,
memory: {
resource: resourceId,
thread: {
id: threadId
}
},

// Deprecated but still set for compatability
threadId,
resourceId
});

// Remote agents should have a processDataStream method
Expand Down