Skip to main content

Mastra Tutorials

Common problems with Mastra, what causes them, and the exact steps that fix them.

Function Calling With a Response Mime Type: Mastra Structured Output

Gemini 2.5 rejects a JSON response format with tools in Mastra. Use jsonPromptInjection, a separate structuring model, or prepareStep to split the steps.

November 25, 2026

Mastra Agent Forgets the Conversation: Fix Thread and Resource IDs

Mastra agents forget earlier turns when storage is missing, thread or resource IDs change per call, or lastMessages defaults to 10. Fix all three.

November 25, 2026

Mastra Semantic Recall Error: Missing Embedder or resourceId

Mastra semantic recall throws when no embedder is attached or resource-scoped recall has no resourceId. Wire the vector store, embedder and scope correctly.

November 25, 2026

We use cookies for ads and analytics.