github mastra-ai/mastra @mastra/core@1.0.0-beta.9
December 8, 2025

Changelog

Summary

  • Total packages with changes: 22
  • Packages with major changes: 0
  • Packages with minor changes: 4
  • Packages with patch changes: 12

@mastra/ai-sdk@1.0.0-beta.7

Patch Changes

  • Return NetworkDataPart on each agent-execution-event and workflow-execution-event in network streams (#10982)

  • Fixed tool-call-suspended chunks being dropped in workflow-step-output when using AI SDK. Previously, when an agent inside a workflow step called a tool that got suspended, the tool-call-suspended chunk was not received on the frontend even though tool-input-available chunks were correctly received. (#10987)

    The issue occurred because tool-call-suspended was not included in the isMastraTextStreamChunk list, causing it to be filtered out in transformWorkflow. Now tool-call-suspended, tool-call-approval, object, and tripwire chunks are properly included in the text stream chunk list and will be transformed and passed through correctly.

    Fixes #10978

  • Adds withMastra() for wrapping AI SDK models with Mastra processors and memory. (#10911)

    import { openai } from '@ai-sdk/openai';
    import { generateText } from 'ai';
    import { withMastra } from '@mastra/ai-sdk';
    
    const model = withMastra(openai('gpt-4o'), {
      inputProcessors: [myGuardProcessor],
      outputProcessors: [myLoggingProcessor],
      memory: {
        storage,
        threadId: 'thread-123',
        resourceId: 'user-123',
        lastMessages: 10,
      },
    });
    
    const { text } = await generateText({ model, prompt: 'Hello!' });

    Works with generateText, streamText, generateObject, and streamObject.

Dependency Updates

  • @mastra/core@1.0.0-beta.9

@mastra/arize@1.0.0-beta.4

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/otel-exporter@1.0.0-beta.4

@mastra/client-js@1.0.0-beta.9

Patch Changes

  • Fix saveMessageToMemory return type to match API response. The method now correctly returns { messages: (MastraMessageV1 | MastraDBMessage)[] } instead of (MastraMessageV1 | MastraDBMessage)[] to align with the server endpoint response schema. (#10996)

Dependency Updates

  • @mastra/core@1.0.0-beta.9

@mastra/codemod@0.1.0-beta.4

Patch Changes

  • Fixed a bug where [native code] was incorrectly added to the output (#10971)

@mastra/core@1.0.0-beta.9

Minor Changes

  • Add stored agents support (#10953)

    Agents can now be stored in the database and loaded at runtime. This lets you persist agent configurations and dynamically create executable Agent instances from storage.

    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';
    
    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });
    
    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
        scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });
    
    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });
    
    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });

    Also adds a memory registry to Mastra so stored agents can reference memory instances by key.

Patch Changes

  • Add agentId and agentName attributes to MODEL_GENERATION spans. This allows users to correlate gen_ai.usage metrics with specific agents when analyzing LLM operation spans. The attributes are exported as gen_ai.agent.id and gen_ai.agent.name in the OtelExporter. (#10984)

  • Fix JSON parsing errors when LLMs output unescaped newlines in structured output strings (#10965)

    Some LLMs (particularly when not using native JSON mode) output actual newline characters inside JSON string values instead of properly escaped \n sequences. This breaks JSON parsing and causes structured output to fail.

    This change adds preprocessing to escape unescaped control characters (\n, \r, \t) within JSON string values before parsing, making structured output more robust across different LLM providers.

  • Fix toolCallId propagation in agent network tool execution. The toolCallId property was undefined at runtime despite being required by TypeScript type definitions in AgentToolExecutionContext. Now properly passes the toolCallId through to the tool's context during network tool execution. (#10951)

  • Exports convertFullStreamChunkToMastra from the stream module for AI SDK stream chunk transformations. (#10911)


@mastra/dane@1.0.0-beta.9

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/libsql@1.0.0-beta.6
  • @mastra/mcp@1.0.0-beta.6

@mastra/deployer@1.0.0-beta.9

Patch Changes

  • Fixed Docker build failure with Bun due to invalid file:// URLs (#10960)

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/server@1.0.0-beta.9

@mastra/deployer-cloud@1.0.0-beta.9

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/deployer@1.0.0-beta.9

@mastra/express@0.0.2-beta.4

Patch Changes

  • Add HonoApp interface to eliminate as any cast when passing Hono app to MastraServer. Users can now pass typed Hono apps directly without casting. (#10846)

    Fix example type issues in server-adapters

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/server@1.0.0-beta.9

@mastra/hono@0.0.2-beta.4

Patch Changes

  • Add HonoApp interface to eliminate as any cast when passing Hono app to MastraServer. Users can now pass typed Hono apps directly without casting. (#10846)

    Fix example type issues in server-adapters

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/server@1.0.0-beta.9

@mastra/libsql@1.0.0-beta.6

Minor Changes

  • Add stored agents support (#10953)

    Agents can now be stored in the database and loaded at runtime. This lets you persist agent configurations and dynamically create executable Agent instances from storage.

    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';
    
    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });
    
    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
        scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });
    
    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });
    
    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });

    Also adds a memory registry to Mastra so stored agents can reference memory instances by key.

Dependency Updates

  • @mastra/core@1.0.0-beta.9

@mastra/longmemeval@1.0.0-beta.9

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/libsql@1.0.0-beta.6

@mastra/mcp@1.0.0-beta.6

Patch Changes

  • Add "Not connected" error detection to MCP auto-reconnection (#10994)

    Enhanced the MCPClient auto-reconnection feature to also detect and handle "Not connected" protocol errors. When the MCP SDK's transport layer throws this error (typically when the connection is in a disconnected state), the client will now automatically reconnect and retry the operation.

Dependency Updates

  • @mastra/core@1.0.0-beta.9

@mastra/mcp-docs-server@1.0.0-beta.9

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/mcp@1.0.0-beta.6

@mastra/otel-bridge@1.0.0-beta.3

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/otel-exporter@1.0.0-beta.4

@mastra/otel-exporter@1.0.0-beta.4

Patch Changes

  • Add agentId and agentName attributes to MODEL_GENERATION spans. This allows users to correlate gen_ai.usage metrics with specific agents when analyzing LLM operation spans. The attributes are exported as gen_ai.agent.id and gen_ai.agent.name in the OtelExporter. (#10984)

Dependency Updates

  • @mastra/core@1.0.0-beta.9

@mastra/pg@1.0.0-beta.6

Minor Changes

  • Add stored agents support (#10953)

    Agents can now be stored in the database and loaded at runtime. This lets you persist agent configurations and dynamically create executable Agent instances from storage.

    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';
    
    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });
    
    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
        scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });
    
    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });
    
    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });

    Also adds a memory registry to Mastra so stored agents can reference memory instances by key.

Dependency Updates

  • @mastra/core@1.0.0-beta.9

@mastra/playground-ui@7.0.0-beta.9

Patch Changes

  • Fix default value showing on workflow form after user submits (#10983)

  • Move useScorers down to trace page to trigger it once for all trace spans (#10985)

  • Update Observability Trace Spans list UI, so a user can expand/collapse span children/descendants and can filter the list by span type or name (#10378)

  • Add UI to match with the mastra studio command (#10283)

  • Fix workflow trigger form overflow (#10986)

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/ai-sdk@1.0.0-beta.7
  • @mastra/client-js@1.0.0-beta.9
  • @mastra/react@0.1.0-beta.9

@mastra/react-hooks@0.1.0-beta.9

Dependency Updates

  • @mastra/client-js@1.0.0-beta.9

@mastra/server@1.0.0-beta.9

Minor Changes

  • Add stored agents support (#10953)

    Agents can now be stored in the database and loaded at runtime. This lets you persist agent configurations and dynamically create executable Agent instances from storage.

    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';
    
    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });
    
    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
        scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });
    
    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });
    
    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });

    Also adds a memory registry to Mastra so stored agents can reference memory instances by key.

Dependency Updates

  • @mastra/core@1.0.0-beta.9

create-mastra@1.0.0-beta.7

Patch Changes

  • Fix default value showing on workflow form after user submits (#10983)

  • Move useScorers down to trace page to trigger it once for all trace spans (#10985)

  • Update Observability Trace Spans list UI, so a user can expand/collapse span children/descendants and can filter the list by span type or name (#10378)

  • Fix workflow trigger form overflow (#10986)


mastra@1.0.0-beta.7

Patch Changes

  • Add mastra studio CLI command to serve the built playground as a static server (#10283)

  • Fix default value showing on workflow form after user submits (#10983)

  • Move to @posthog/react which is the actual way to use posthog in React. It also fixes (#10967)

  • Move useScorers down to trace page to trigger it once for all trace spans (#10985)

  • Update Observability Trace Spans list UI, so a user can expand/collapse span children/descendants and can filter the list by span type or name (#10378)

  • Fix workflow trigger form overflow (#10986)

Dependency Updates

  • @mastra/core@1.0.0-beta.9
  • @mastra/deployer@1.0.0-beta.9

Don't miss a new mastra release

NewReleases is sending notifications on new releases.