Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion typescript-sdk/apps/dojo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@copilotkit/runtime-client-gql": "1.10.6-next.2",
"@copilotkit/shared": "1.10.6-next.2",
"@mastra/client-js": "^0.14.0",
"@mastra/core": "^0.19.0",
"@mastra/core": "^0.20.1",
"@mastra/dynamodb": "^0.15.4",
"@mastra/libsql": "^0.15.0",
"@mastra/loggers": "^0.10.14",
Expand Down
6 changes: 3 additions & 3 deletions typescript-sdk/integrations/mastra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@
},
"dependencies": {
"@ai-sdk/ui-utils": "^1.1.19",
"@mastra/client-js": "^0.14.0",
"@mastra/client-js": "^0.15.0",
"rxjs": "7.8.1"
},
"peerDependencies": {
"@ag-ui/core": ">=0.0.39",
"@ag-ui/client": ">=0.0.40",
"@copilotkit/runtime": "^1.10.5",
"@mastra/core": ">=0.19.0",
"@mastra/core": ">=0.20.1",
"zod": "^3.25.67"
},
"devDependencies": {
"@ag-ui/core": "workspace:*",
"@ag-ui/client": "workspace:*",
"@mastra/core": "^0.19.0",
"@mastra/core": "^0.20.1",
"@types/jest": "^29.5.14",
"@types/node": "^20.11.19",
"jest": "^29.7.0",
Expand Down
4 changes: 2 additions & 2 deletions typescript-sdk/integrations/mastra/src/mastra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export class MastraAgent extends AbstractAgent {
if (this.isLocalMastraAgent(this.agent)) {
// Local agent - use the agent's stream method directly
try {
const response = await this.agent.streamVNext(convertedMessages, {
const response = await this.agent.stream(convertedMessages, {
threadId,
resourceId,
runId,
Expand Down Expand Up @@ -311,7 +311,7 @@ export class MastraAgent extends AbstractAgent {
} else {
// Remote agent - use the remote agent's stream method
try {
const response = await this.agent.streamVNext({
const response = await this.agent.stream({
threadId,
resourceId,
runId,
Expand Down
21 changes: 2 additions & 19 deletions typescript-sdk/integrations/mastra/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,6 @@ export function getLocalAgents({
runtimeContext,
}: GetLocalAgentsOptions): Record<string, AbstractAgent> {
const agents = mastra.getAgents() || {};
const networks = mastra.vnext_getNetworks() || [];

const networkAGUI = networks.reduce(
(acc, network) => {
acc[network.name!] = new MastraAgent({
agentId: network.name!,
agent: network as unknown as LocalMastraAgent,
resourceId,
runtimeContext,
});
return acc;
},
{} as Record<string, AbstractAgent>,
);

const agentAGUI = Object.entries(agents).reduce(
(acc, [agentId, agent]) => {
Expand All @@ -125,10 +111,7 @@ export function getLocalAgents({
{} as Record<string, AbstractAgent>,
);

return {
...agentAGUI,
...networkAGUI,
};
return agentAGUI;
}

export interface GetLocalAgentOptions {
Expand Down Expand Up @@ -164,7 +147,7 @@ export interface GetNetworkOptions {
}

export function getNetwork({ mastra, networkId, resourceId, runtimeContext }: GetNetworkOptions) {
const network = mastra.vnext_getNetwork(networkId);
const network = mastra.getAgent(networkId);
if (!network) {
throw new Error(`Network ${networkId} not found`);
}
Expand Down
170 changes: 128 additions & 42 deletions typescript-sdk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading