---
title: "Mastra: funzionalità, versione e guida rapida · DotsAgent"
description: "Mastra di Mastra: licenza, ultima versione, supporto MCP, esecuzioni durevoli, approvazione umana, tracing e valutazioni, oltre a una guida rapida da copiare."
url: https://dotsagent.io/it/frameworks/mastra
---

Framework · Mastra

# Mastra in breve

Un framework TypeScript che riunisce agenti, workflow con sospensione e ripresa, memoria, eval e interfaccia Studio in un unico pacchetto. Si integra con le app Next.js, Express o Hono; il core è distribuito con licenza Apache-2.0, mentre le directory ee/ usano una licenza enterprise.

**Ideale per:**  Team TypeScript che vogliono un unico stack per agenti, workflow, memoria ed eval.

## Informazioni principali

- **Responsabile**: Mastra
- **Linguaggi**: TypeScript
- **Licenza**: Apache-2.0 (core)
- **Ultima versione**: `@mastra/core 1.73.0` · 1 ottobre 2026
- **Repository**: [mastra-ai/mastra](https://github.com/mastra-ai/mastra) · 28.467 stelle
- **Opzione hosted**: [Mastra Cloud / Mastra Platform](https://mastra.ai/docs)mastra deploy crea e distribuisce un’immagine Docker.

## Guida rapida

Installa il pacchetto, configura le credenziali, quindi esegui l'agente più semplice indicato nella documentazione ufficiale. Gli ID dei modelli sono quelli usati nella documentazione e potrebbero non essere abilitati per il tuo account.

`Installa`

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

Richiede 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)
```

[Fonte della guida rapida](https://mastra.ai/docs)

## Funzionalità

| Qualsiasi modello | — | Stringhe del router dei modelli nel formato provider/model |
| --- | --- | --- |
| Client MCP | — | — |
| Server MCP | — | MCPServer espone agenti, strumenti, workflow, prompt e risorse |
| Multi-agent | — | Gli agenti possono fungere da strumenti per altri agenti |
| Esecuzioni durevoli | — | Sospensione e ripresa con snapshot in libSQL, Postgres e altri database |
| Approvazione umana | — | suspend() e resume() raccolgono input da una persona |
| Tracing | — | Exporter OTel per Langfuse, Braintrust, Datadog e LangSmith |
| Valutazioni | — | Gli scorer vengono eseguiti in tempo reale con campionamento o offline in CI |

## Modifiche recenti

- npm create mastra crea ora lo scheletro di un harness generico con workspace, strumenti shell, memoria e pianificazioni.
- Mastra Factory è pensato per le software factory basate su agenti di coding.

## Alternative nello stesso linguaggio

- [OpenAI Agents SDK (JS)](https://dotsagent.io/it/frameworks/openai-agents-js)

- [Claude Agent SDK](https://dotsagent.io/it/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/it/frameworks/google-adk)

- [LangGraph](https://dotsagent.io/it/frameworks/langgraph)

- [LlamaIndex](https://dotsagent.io/it/frameworks/llamaindex)

- [Vercel AI SDK](https://dotsagent.io/it/frameworks/vercel-ai-sdk)

## Fonti

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

Riferimento indipendente per chi sviluppa agenti IA. Non siamo affiliati a nessun fornitore citato qui.

© 2026 DotsAgent · Dati verificati il 1 ottobre 2026
