MastraAI

M

MastraAI

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

Join

Error write EPIPE on brand new repo

hey @Ward, I'm trying to start a brand new repo with today's release of mastra 0.19.1 (clean postgres, no tools, no workflow, 1 example agent only) and this error is showing before the local server starts: ```◇ Starting Mastra dev server... node:events:496 throw er; // Unhandled 'error' event ^...
No description

Duplicate Requests from Mastra Agent Causing Gateway Timeout

Hi everyone, I’m encountering an issue with the Mastra agent where it seems to attempt regenerating messages multiple times, resulting in 2–3 identical requests for the same output. This is causing a Gateway Timeout error (504) in my application. Here’s a snippet of the error:...
No description

Agent Unknown Error

Hey team, any tips for finding the root cause of errors like this? Using ai-sdk v5, with agent streamVNext

Error in LLM Execution Step TypeError: terminated

After upgrading to the Mastra versions and AI SDK v5 : "@mastra/core": "^0.17.1", "@mastra/langfuse": "^0.0.9", "@mastra/libsql": "^0.14.2",...

ERR_MODULE_NOT_FOUND when running `mastra dev`

Hey folks, Have recently started getting the above when running mastra dev. We didn't get it before, and we think it's because the @cubejs-client/core package doesn't have file extensions on its imports. We run Mastra in Next with mastra dev --dir src/mastra. Any way around this one? It worked previously, so not sure if you've made any bundler changes....

Mastra Cloud deploy stuck at builder.deployKnative

I removed the Port from my env but it's still stuck on this step.

zod 4 support

i recently upgraded to zod 4 and upgraded all mastra packages as a i saw zod 4 is supported now. i am now running in this issue when running mastra dev ```...

How to transform MastraMessageV1 or MastraMessageV2 to aisdk format

Do we have any example of such conversion? or how do we use MastraMessage type in frontend?

mastra cloud deployment fail npm install

npm error ERESOLVE could not resolve npm error npm error While resolving: server@1.0.0 npm error Found: @mastra/core@0.13.2 npm error node_modules/@mastra/core...

Working memory with structured outputs does not seem to work.

Not sure if I am missing something here, but I cannot get the agent.generate to trigger the working memory tool. The tool is being called from in a workflow. The closest I have gotten is a bug where the workflow crashes because the agent returns the schema of the working memory instead of the one it is supposed to return as part of the normal message response....

Display versions in playground

It would be handy if the installed packages and their versions would be displayed in the dev playground.

turborepo local package dependencies cascading?

after upgrading some mastra packages I now started getting this error: ``` ◐ Preparing development environment... ✓ Initial bundle complete ◇ Starting Mastra dev server......

Cannot use networks in playground due to resourceId missing

I have a simple network and I'm not able to use it in the playground due to this error: Unknown Error: TypeError: Cannot read properties of undefined (reading 'resourceId') The docs say mastra will pass resourceId automatically but I am stuck...

AI tracing instance already registered

Using Mastra with Next and getting the above issue whenever I hot reload in a development environment. Super annoying as I have to restart the server every time I make any changes. Is these any way to disable this behaviour? Ideally don't want to resort to patching the package.

Distinguish Step Level Retries / Workflow Level Retries

iam trying to find a way when inside a step iam using retries how to distinguish the - workflow level retries - step level retries ...

Disable thinking/reasoning with Ollama provider (+ Ollama cloud)

Hey, I want to disable thinking/reasoning using ollama-ai-provider-v2 for an agent (new Agent(... I am using Ollama cloud + gpt-oss:20b-cloud I tried the Multiple CoreSystemMessages thing but it's not working https://mastra.ai/en/reference/agents/agent#multiple-coresystemmessages...

type annotation error and property 'suspend' missing

upgraded from mastra "@mastra/core": "0.17.1", to "@mastra/core": "0.18.0", and getting the errors ``` Property 'suspend' is missing in type '{ context: { industry: s tring; }; runtimeContext: RuntimeContext<unknown>; }' but require d in type 'ToolExecutionContext<ZodObject<{ industry: ZodString; ...

Has anyone had success setting up Sessions & Users in Langfuse using Mastra

I'm trying to create observability with Sessions (i.e. Mastra threads) and Users (i.e Mastra Resources). Has anyone had success with this so far? I was able to configure it properly to get basic LLM traces, but ideally I'd like to view these as threads so its easier to track my user's conversations (internal company use case). I've found a bunch of different packages/frameworks for doing this (ie langfuse-vercel, vs mastra/langfuse vs opentelemetry) and it's difficult to reconcile the documentation together If any one else is also trying to solve for this, let's collab...

How is writer.write supposed to be used?

Hey, I am trying to stream more progress data with Mastra using writer.write, but facing these issues: https://github.com/mastra-ai/mastra/issues/7782 Are there some streaming best practices or example repo I could follow?...

Can't configure model settings when using GPT-5

Hi everyone, I have a question. Previously, when I was using GPT-4.1, I was able to configure Agent Settings in the Mastra playground. However, after switching to GPT-5, the option to configure agent settings is no longer available (I can only see the regular model settings like temperature, top-p, etc.). ...
No description