MastraM
Mastra2mo ago
Noel

Mastra Cloud: Deployment doesn't work

I've set up a new Mastra repo - it works locally, but deployment only shows the following error message.

1:{"error":{"message":"Deployer API failed:","status":500},"ok":false}

The code in index.ts is pretty much identical to the examples, except I've added 1-2 custom agents and tools.

import { Mastra } from '@mastra/core/mastra';
import { PinoLogger } from '@mastra/loggers';
import { LibSQLStore } from '@mastra/libsql';
import { weatherWorkflow } from './workflows/weather-workflow';
import { weatherAgent } from './agents/weather-agent';
import { qaAgent } from './agents/qa-agent';
import { quizQAAgent } from './agents/quiz-qa-agent';
import { toolCallAppropriatenessScorer, completenessScorer, translationScorer } from './scorers/weather-scorer';

export const mastra = new Mastra({
  workflows: { weatherWorkflow },
  agents: { weatherAgent, qaAgent, quizQAAgent },
  scorers: { toolCallAppropriatenessScorer, completenessScorer, translationScorer },
  storage: new LibSQLStore({
    // stores observability, scores, ... into memory storage, if it needs to persist, change to file:../mastra.db
    url: ":memory:",
  }),
  logger: new PinoLogger({
    name: 'Mastra',
    level: 'info',
  }),
  telemetry: {
    // Telemetry is deprecated and will be removed in the Nov 4th release
    enabled: false, 
  },
  observability: {
    // Enables DefaultExporter and CloudExporter for AI tracing
    default: { enabled: true }, 
  },
});

// Export tools for standalone usage
export { notionWriteTool } from './tools/notion-tool';
export { lessonBlocksTool } from './tools/lesson-blocks-tool';
export { lessonTool } from './tools/lesson-tool';
export { moduleTool } from './tools/module-tool';
export { perplexityTool } from './tools/perplexity-tool';
image.png
Was this page helpful?