dotsagent.io
Language:English
Framework · Mastra

Mastra at a glance

A TypeScript framework that bundles agents, workflows with suspend and resume, memory, evals and the Studio UI in one package. It drops into Next.js, Express or Hono apps; the core is Apache-2.0, while ee/ directories use an enterprise licence.

Best for: TypeScript teams that want a single stack for agents, workflows, memory and evals.

Key facts

Maintainer
Mastra
Languages
TypeScript
Licence
Apache-2.0 (core)
Latest version
@mastra/core 1.73.0 · October 1, 2026
Repository
mastra-ai/mastra · 28,467 stars
Hosted option
Mastra Cloud / Mastra Platform
mastra deploy builds and deploys a Docker image.

Quickstart

Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.

Install
npm install @mastra/core@latest zod@latest typescript@latest @types/node@latest mastra@latest  (or scaffold: npm create mastra@latest)

Needs OPENAI_API_KEY

TypeScript
// src/mastra/agents/weather-agent.ts
import { Agent } from '@mastra/core/agent'
import { weatherTool } from '../tools/weather-tool.ts'

export const weatherAgent = new Agent({
  id: 'weather-agent',
  name: 'Weather Agent',
  instructions: `
      You are a helpful weather assistant that provides accurate weather information.

      Your primary function is to help users get weather details for specific locations. When responding:
      - Include relevant details like humidity, wind conditions, and precipitation
      - Keep responses concise but informative

      Use the weatherTool to fetch current weather data.
`,
  // Use a string in provider/model format, not provider:model or a provider object.
  model: 'openai/gpt-5.6-sol',
  tools: { weatherTool },
})

// run.mjs (after registering the agent in src/mastra/index.ts)
import { mastra } from './src/mastra/index.ts'

const agent = mastra.getAgentById('weather-agent')
const response = await agent.generate('Weather in SF')
console.log(response.text)

Quickstart source

Features

Any modelYesModel router strings in provider/model form
MCP clientYes
MCP serverYesMCPServer exposes agents, tools, workflows, prompts and resources
Multi-agentYesAgents can act as tools for other agents
Durable runsYesSuspend and resume with snapshots in libSQL, Postgres and others
Human approvalYessuspend() and resume() collect human input
TracingYesOTel exporters to Langfuse, Braintrust, Datadog and LangSmith
EvalsYesScorers run live with sampling, or offline in CI

Recent changes

  • npm create mastra now scaffolds a general-purpose harness with workspace, shell tools, memory and schedules.
  • Mastra Factory targets software factories built from coding agents.

Alternatives in the same language

Sources

  1. mastra.ai/docs
  2. mastra.ai/docs/connections/mcp
  3. mastra.ai/reference/tools/mcp-server
  4. mastra.ai/docs/workflows/suspend-and-resume
  5. mastra.ai/docs/workflows/snapshots
  6. mastra.ai/ai-agent-observability
  7. github.com/mastra-ai/mastra/blob/main/LICENSE.md
  8. registry.npmjs.org/@mastra%2fcore

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026