This week we launched Mastra Cloud Beta: a serverless agent environment with atomic deployments. Mastra Cloud lets you access your agents and workflows from anywhere and monitor their performance.
We also added comprehensive voice capabilities to Agents, introduced tool-call based working memory, added CommonJS support, and made vector store improvements.
Mastra Cloud
We are excited to introduce Mastra Cloud—a platform for instantly deploying your Mastra application and monitoring its performance.
You’ll also be able to chat directly with your agents, see which models and tools they reference, and view detailed traces. We’ve found this to be particularly helpful in debugging allowing you to see every step of every interaction.
Mastra Cloud is currently in beta. You can request access here.
Mastra Voice
With Mastra Voice, you can make your agents speak
and listen
. Whether you want to use a single provider for both speech-to-text and text-to-speech, or combine multiple providers for different operations, the implementation remains simple.
For reference, this is how to build a helpful voice assistant that asks you how you’re doing:
import { Agent } from "@mastra/core/agent";
import { OpenAIVoice } from "@mastra/voice-openai";
const agent = new Agent({
name: "Agent",
instructions: `You are a helpful assistant with voice capabilities.`,
model: openai("gpt-4o"),
voice: new OpenAIVoice(),
});
const audioStream = await agent.speak("How are you today?");
A list of supported providers and implementation details can be found here.
Memory enhancements
Previously, Mastra only supported one way of handling working memory updates — through text stream tags where the LLM would include XML-like tags in its response.
This worked well for text streaming but had limitations when using toDataStream
(since parsing and masking XML tags from a data stream is complex.)
The new update adds an alternative approach using tool calls instead of text tags:
const memory = new Memory({
options: {
workingMemory: {
enabled: true,
use: "tool-call", // Use the new tool-based approach
},
},
});
CommonJS support
The codebase was previously ESM-only, which caused compatibility issues for users working with CommonJS projects. We listened to user feedback and added dual module support across all Mastra packages by:
- Adding CommonJS builds alongside existing ESM output
- Updating build configurations to generate both .cjs and .js formats with proper type definitions
- Ensuring all packages maintain full TypeScript support for both module systems
Vector store improvements
The vector store APIs were modernized across all database implementations (PostgreSQL, Chroma, Astra) to use a more intuitive object-based parameter approach:
await vectorDB.query({
indexName: "my_index",
queryVector: [0.1, 0.2],
topK: 10,
});
This change improves type safety and developer experience while maintaining backward compatibility. The update also added support for multiple index types in PostgreSQL (HNSW, IVFFlat) and enhanced document storage capabilities in Chroma, allowing full-text documents to be stored alongside vectors.