MastraAI

M

MastraAI

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

Join

Network streaming

https://mastra.ai/en/docs/streaming/overview doesn't mention streaming from Networks -- is this supported?

How to get detailed error with http status code and header?

Currently when I uses aisdkv5 with mastra and do
const result = agent.stream(...)
const result = agent.stream(...)
When a error happens with the provider API, for example 503 or 429, it seems there no way for me to get the response status code or headers to understand what is going on, for example for 429 I would want to read the header to know when I can retry. I have tried to use the onError callback and reading the stream and reading result.error all of them give me a stripped error that doesn't include http status code or response. These detailed field should exist in the underlying aisdk error like AI_APICallError and it is even logged out by mastra, but it seems mastra doesn't return or throw the detailed error for consumer to use it only give consumer a stripped down version of the error? is there a way I can get the full error?...

READINESS_PROBE_ATTEMPTS_EXCEEDED Unknown Error on Mastra Cloud

[ERROR]
[10/10/2025, 07:49:30 PM] - Build process failed for build d8582adc-83d6-468d-907a-c50255bb0bc9 and project 98f828f3-6977-4762-b990-1abf5ab9dab8: {"message":"Unknown error","details":{"message":"Unknown error","domain":"BUILDER","category":"SYSTEM","details":{}},"code":"READINESS_PROBE_ATTEMPTS_EXCEEDED"}
[ERROR]
[10/10/2025, 07:49:30 PM] - Build process failed for build d8582adc-83d6-468d-907a-c50255bb0bc9 and project 98f828f3-6977-4762-b990-1abf5ab9dab8: {"message":"Unknown error","details":{"message":"Unknown error","domain":"BUILDER","category":"SYSTEM","details":{}},"code":"READINESS_PROBE_ATTEMPTS_EXCEEDED"}
...

A subsequent call generates an error about reasoning being omitted from `function_call`

I do a agent.stream, get the results.. all works great, the very next message the user creates, this error is logged. ```Error creating stream [Error [AI_APICallError]: Item 'fc_0a038568becf80fb0068e9630e5fd081978df905e0edaed49a' of type 'function_call' was provided without its required 'reasoning' item: 'rs_0a038568becf80fb0068e9630ad5248197a0938f405d5fad2e'.] { cause: undefined, url: 'https://api.openai.com/v1/responses',...

Fresh install chat response not working

Problem: I've created a fresh install using npx create-mastra@latest --default -m vscode Added my OPENAI_API_KEY...

Mastra Workflow Streaming Issue Vercel AI SDK v5 - Need Help!

Following the workflow streaming docs but can't get it working with Vercel AI SDK's useChat hook. My code (from docs): // Workflow step - pipe agent to writer const stream = await agent?.stream(messages, { format: 'aisdk' }); await stream.textStream.pipeTo(writer);...

Monorepo transpile packages does not appear to be working.

I have an npm monorepo that uses a shared DAO package to facilitate data connections to the db. Importing the package into the mastra server 'app' causes the build job to fail to import. The dev server works fine. Here is the error message: ``` Mastra Build failed...

Mastra Playground broken with `@mastra/core` v0.20.1?

I'm getting a TypeError: agent.getInputProcessors is not a function error when running the Mastra Playground with the latest @mastra/core. Setup: - @mastra/core: v0.20.1 (installed) - mastra CLI: v0.15.1 (via npx mastra@latest dev)...

Weird behaviour depending on the agent property named in mastra instance

I have no idea what is happening. Just 2 minimal example. This works: ``` import { Mastra } from "@mastra/core/mastra";...

Unable to get to projects in mastra cloud with latest release

build failed on mastra cloud, local UI does not work \ mastra cloud error \ [INFO] [10/09/2025, 09:40:15 AM] - Using dynamic deployer 0.20.2 for core version 0.20.2...

mastra traces

I've been playing around with mastra locally and my postgres app was saying reindexing was required. so I checked my tables and saw that the mastra_traces table was already 64 GB when I'm the only one doing anything 🫨 ``` relname | size
-----------------------------+------------ mastra_traces | 64 GB...

Agent screen stuck on loading on Mastra Cloud Playground

I have my team leveraging Mastra Cloud while we have released our agent in Beta. We frequently run in to this bug where the agent screen is stuck on the loading screen. Not sure how to debug and it appears this is just an issue with Mastra cloud. Anyone else running into this issue?
No description

Client does not support MCP Roots, using allowed directories set from server args:

Hi folks, I get this error when starting a filesystem MCP server like so: ``` filesystem: { // Le client va déclencher lui-même le programme qui agit comme serveur MCP // (en cas d'erreur, testez la commande à la main)...

allow simple mapping functions to be passed in workflow branch handler

``` // Instead of creating 3+ steps for simple value returns: .branch([ [condition1, createStep({ /* just returns a string / })], [condition2, createStep({ / just returns another string */ })],...

Input Processor rewrites original messages

When inputProcessor amends user message it doesn't reflected in UI during current run. But once thread reloaded we see altered message as like it was written by user in this way. I am truly believe it is not kind of expected experience. We might need to track separately the message user entered initially and message actually used as model input. Do you think it is responsibility of mastra or developer using mastra?...

playground renders reasoning blocks only after I reload page with thread

During agent execution I have no reasoning blocks rendered. They only appear after page reload.

Input processor can't add non user role message

I have tried to add system role message in my input processor and it led to the error: ``` Error executing step prepare-memory-step: Error: [Agent:gitlab-agent] - Input processor error at Agent.__runInputProcessors (file:///Users/[REDACTED]/node_modules/@mastra/core/dist/chunk-DQISKQDE.js:672:2179)...

Dependecy update inconsistency

We are using Mastra since versio 15 core or something and basically ever time there is a update we run into issues doing npm install .. always leads to depency confilcts with core and libsql as soon as a new version is out...

Playground throws use of streamVNext.

I am not using streamVNext for stream with my packages updated in my codebase, but playground throws the error
ERROR [2025-10-08 11:49:24.392 +0530] (Mastra): Error in streamVNext generate: streamVNext has been renamed to stream. Please use stream instead.
ERROR [2025-10-08 11:49:24.392 +0530] (Mastra): Error in streamVNext generate: streamVNext has been renamed to stream. Please use stream instead.
It's an bug in playgound tool calling and agent calling import...

@mastra/ai-sdk chatRoute with middleware context

Hey all, I'm trying to use the chatRoute from the mastra ai-sdk and I have middleware configured that is grabbing some additional metadata my backend sends and adding it to the runtime context. When the agent is called up with a users chat my middleware sees and sets the runtimeContext successfully but the agent runtimeContext is empty. Is this a known issue or perhaps something I'm missing with this setup? This is from the docs here https://mastra.ai/en/docs/frameworks/agentic-uis/ai-sdk ```...