Skip to content

Conversation

@LekoArts
Copy link

Description

At Mastra we're working towards a v1.0.0 release and recently we released a beta version of that. Users can now install @beta versions of Mastra packages and try out the new changes. This version bumps also comes with breaking changes which also affect third-party packages like @ag-ui/mastra.

In our shared Slack channel I communicated with @tylerslaton so far about this and I'm open to handling however you prefer. Here's what I think we should do:

  • Publish some form of prerelease version of the package (that is not @latest)
  • Wait for Mastra v1 be released
  • Release a new major for @ag-ui/mastra, too

In this PR I've updated all examples, too, as they use the local version and would not work otherwise. It's probably easiest to create a release based off from this branch/PR and not merge the PR until Mastra v1. But if you want to do it in another way, let me know.

`,
model: openai("gpt-4o-mini"),
model: "openai/gpt-4o-mini",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mastra now has its own model router so we can remove AI SDK usage

tools: { weatherTool, browserTool },
memory: new Memory({
storage: new LibSQLStore({
id: "mastra-cli-example-db",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

execute: async ({ context }) => {
open(context.url);
return `Browsed ${context.url}`;
execute: async (inputData) => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"@ag-ui/client": ">=0.0.40",
"@copilotkit/runtime": "^1.10.5",
"@mastra/core": ">=0.20.1",
"zod": "^3.25.67"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zod is a peerDep of @mastra/core so not required to place it here, too

ExperimentalEmptyAdapter,
} from "@copilotkit/runtime";
import { RuntimeContext } from "@mastra/core/runtime-context";
import { RequestContext } from "@mastra/core/request-context";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}: {
path: string;
resourceId: string;
resourceId?: string;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mentioned this in Slack before, I think we can make this optional here because down the chain it's typed like that, too

threadId: input.threadId,
memoryConfig: {
workingMemory: {
scope: "thread",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
},
{
// To use this, run "pnpm mastra:dev" in a separate terminal window
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this is valid. I'm pretty sure the mastra:dev script would run the mastra-agent-local agent listed below, but I'm not entirely sure since that's whats bundled into the dojo (and not listed in the exports). This script entry's existence may be entirely invalid.

Regardless, the agent with id mastra is actually located elsewhere in the repo, in integrations/mastra/typescript/examples

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it the local agent one imports the mastra class, the remote one initializes a MastraClient which needs an URL. I got it working like that so that’s why I added the comment

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.

2 participants