MastraAI

M

MastraAI

The TypeScript Agent FrameworkFrom the team that brought you Gatsby: prototype and productionize AI features with a modern JavaScript stack.

Join

workflow deduplication

is it possible to only run a single workflow for a specific input at a time? e.g. if you trigger a workflow again and it's already running for the same input, then it ignores it and doesn't trigger another run? basically something like https://docs.dbos.dev/typescript/tutorials/queue-tutorial#deduplication...

Vercel AI SDK v5 Compatibility

With the greatest respect, who at Mastra is going to take responsibility for making sure the AI SDK v5 compatibility is fully implemented? It seems to be a massive mess currently. Should we just keep reporting bug after bug or will it actually be taken seriously and fixed?...

Netlify deployer error

Hello, I am trying MastraAI out for an internal mcp server project I am building. My team already has a netlify account so I am trying to deploy a standalone mastra app to netlify using the netlify deployer as outlined in the docs. The deploy is successful on Netlify but I then I get the following error on the function call to the api endpoint. The error can also be viewed here -> https://checkr-mastra-storyblok.netlify.app/ ```js...

client side tools memory

I was wondering, are client side tool calls suppose to land in memory? Reason I ask is they work great in getting things to happen client side, but on a page reload taht information/view is not rendered again. It appears to me that's because it's not in memory from the assistant. If this is expected, any suggestions on how to handle this type of reload situation?...

Error workflow playwright mcp

Hi i am experiencing an error trying to connect a playwright mcp server to operate with tools. While inspecting docs, i got in trouble somewhere and i am getting an error: ``` Error: Cannot read properties of undefined (reading 'def') at handleError (file:///path-to-my-desktop/Desktop/prova-playwright-blocking/.mastra/output/index.mjs:31250:9) at getWorkflowsHandler (file:///path-to-my-desktop/Desktop/prova-playwright-blocking/.mastra/output/index.mjs:39815:12)...

For transport layer, can we upgrade it to http2 via mastra configuration?

Is there a proper way to implement http2 in mastra? like for example: 1. from Mastra's MCP Client to MCP server 2. from Mastra's Agent to LLM Provider ( eg. openai ) - I know here, there's a fetch property that we can use, but is it safe to change something here related to upgrading the transport layer?...

Stopping an agent stream part finished and ensuring that part response is persisted to conversation?

Is there a recommended way to do this? For example, I have a step that repeats until the agent produces valid output. I can tell that the agent is producing invalid output part way through the stream. If I 'return' the step part way through the stream, then the agent appears to have no record of what it had previously part generated, so it can't fix it on iteration i.e. returning the error message from step and iterating results in a confused agent. My current workaround is to only return the error back into the step once the agent stream is complete. I'd like to be able to return early, and persist the state of the stream at that point, as it will save many seconds from a UX perspective....

konva issue with mastra

I'm using konva in one of my workflows, and it has stopped working now. not sure when since mastra has been broken in dev for ages for me, but it was definitely working at some point to reproduce you can do the following ```ts...

experimental_auth user identity

How do you get the user identity (like user ID) using experimental_auth? Like to use it within agents etc

organization_not_enabled_in_instance using Clerk experimental auth

Hello, I am using the experimental auth thing with Clerk. It works, except that unless I enable the organizations feature I get this error: ```json ClerkAPIError { code: 'organization_not_enabled_in_instance',...

build hanging in monorepo

dev server issue got fixed with the latest release (https://discord.com/channels/1309558646228779139/1420847587052752896/1420847587052752896), but now the build just hangs same reproduction as usual: https://github.com/amosbastian/mastra-reproduction...

Latest masta/core npm release broken

[Error: Cannot find module '/home/ferreo/raven/raven/node_modules/@mastra/core/dist/ai-tracing/exporters/index.js' imported from /home/ferreo/raven/raven/node_modules/@mastra/langfuse/dist/index.js] { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///home/ferreo/raven/raven/node_modules/@mastra/core/dist/ai-tracing/exporters/index.js' } [Error: Cannot find module '/home/ferreo/raven/raven/node_modules/@mastra/core/dist/ai-tracing/exporters/index.js' imported from /home/ferreo/raven/raven/node_modules/@mastra/langfuse/dist/index.js] {...

Studio crashes retrieving thread ran in network mode with non JSON text output of tool call

I have tools that return string content which is not JSON. It is working well with direct agent execution, but fails when this same agent were called from another using Agent.network(). problematic message: ``` [{"type":"tool-result","toolCallId":"tooluse_qUaoIDGzSZSEf9aKUiGT8w","toolName":"gitlabRestTool","result":"id: 130801... some text"}]...
No description

(Suspend/Resume support for runtime workflows) No snapshot found for this workflow run: runtime-***

I have a registered workflow-runner that has a first step execute-child-workflow that generates and runs a dynamic runtime workflow like @rase- mentioned here: https://discord.com/channels/1309558646228779139/1375392490521231431/1377257555956465714 Like this, ```ts const executeChildWorkflow = createStep({...

Support for after or before tool callbacks?

Hello, is there support in Mastra agents for executing callbacks before or after a tool call is made? I’m looking for a way to intercept or hook into the tool execution flow — for example, to log, modify inputs/outputs, or trigger additional actions around tool invocations....

MastraBase uses a hardcoded ConsoleLogger instead of the configured logger(s)

In the file: packages/core/src/base.ts, I see a hard-coded use of this.logger = new ConsoleLogger(...). Is this intended? This has as an effect that uncaught errors are not sent to my PinoLogger that I configured. My question is: is this intentional? Am I supposed to also have a Sentry/AppSignal wrapper in my node environment for the error monitoring separately?...

using `writer.custom()` for UI framework integration

Hey team! 👋 I'm trying to implement tool streaming with custom events following the docs here: https://mastra.ai/en/docs/streaming/tool-streaming#using-the-writer-argument ...

How do I properly set up the latest version of the Mastra/AG UI/AI SDK for realtime

How do I properly set up the latest version of the Mastra/AG UI/AI SDK to create a real-time interface? It should be a proper Mastra agent network with multiple agents that all stream tool outputs to a chat interface, update the database, and stream live UI updates.
For example, imagine a sports team researcher agent that uses custom UI components to display real-time updates as it continues actively researching. As it finds a new score, it should add that data to a CSS-based score grid in real time while persisting the data.
I had no luck with Supabase Realtime (it doesn’t work well for me), and also CopilotKit (it’s unreliable). Instead, I want a proper agentic UI update approaches within the frameworks I mentioned—or adjacent frameworks....

Mastra loggers do not log errors?

For context, I followed https://mastra.ai/en/reference/observability/logging/pino-logger and I have noticed unexpected errors do not make their way into the log file (using Mastra's FileTransport). Is this intentional?
Next