@mastra/mcp-docs-server 1.0.0-beta.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +35 -35
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +14 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +172 -172
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +34 -34
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Flance.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +48 -48
- package/.docs/organized/changelogs/%40mastra%2Frag.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Freact.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +15 -15
- package/.docs/organized/changelogs/mastra.md +37 -37
- package/.docs/organized/code-examples/ai-elements.md +1 -1
- package/.docs/organized/code-examples/ai-sdk-useChat.md +1 -1
- package/.docs/organized/code-examples/ai-sdk-v5.md +1 -1
- package/.docs/organized/code-examples/assistant-ui.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +1 -1
- package/.docs/organized/code-examples/client-side-tools.md +1 -1
- package/.docs/organized/code-examples/crypto-chatbot.md +1 -1
- package/.docs/organized/code-examples/fireworks-r1.md +1 -1
- package/.docs/organized/code-examples/heads-up-game.md +1 -1
- package/.docs/organized/code-examples/mcp-configuration.md +0 -3
- package/.docs/organized/code-examples/memory-per-resource-example.md +1 -1
- package/.docs/organized/code-examples/openapi-spec-writer.md +1 -1
- package/.docs/organized/code-examples/quick-start.md +1 -1
- package/.docs/organized/code-examples/stock-price-tool.md +1 -21
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +1 -1
- package/.docs/raw/agents/agent-memory.mdx +1 -1
- package/.docs/raw/agents/guardrails.mdx +1 -1
- package/.docs/raw/agents/human-in-the-loop-with-tools.mdx +90 -0
- package/.docs/raw/agents/networks.mdx +1 -1
- package/.docs/raw/agents/overview.mdx +8 -13
- package/.docs/raw/agents/using-tools.mdx +10 -9
- package/.docs/raw/auth/auth0.mdx +1 -1
- package/.docs/raw/auth/clerk.mdx +1 -1
- package/.docs/raw/auth/firebase.mdx +1 -1
- package/.docs/raw/auth/index.mdx +1 -1
- package/.docs/raw/auth/jwt.mdx +1 -1
- package/.docs/raw/auth/supabase.mdx +1 -1
- package/.docs/raw/auth/workos.mdx +1 -1
- package/.docs/raw/community/contributing-templates.mdx +1 -1
- package/.docs/raw/community/discord.mdx +2 -2
- package/.docs/raw/community/licensing.mdx +1 -1
- package/.docs/raw/deployment/{server-deployment.mdx → building-mastra.mdx} +4 -4
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +2 -2
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +3 -3
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +2 -2
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/cloudflare-deployer.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +2 -2
- package/.docs/raw/deployment/cloud-providers/index.mdx +8 -4
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/netlify-deployer.mdx +1 -1
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/vercel-deployer.mdx +1 -1
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/dashboard.mdx +3 -3
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/observability.mdx +2 -2
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/overview.mdx +3 -3
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/setting-up.mdx +4 -4
- package/.docs/raw/deployment/monorepo.mdx +3 -3
- package/.docs/raw/deployment/overview.mdx +5 -5
- package/.docs/raw/deployment/web-framework.mdx +1 -1
- package/.docs/raw/evals/{off-the-shelf-scorers.mdx → built-in-scorers.mdx} +17 -15
- package/.docs/raw/evals/custom-scorers.mdx +1 -1
- package/.docs/raw/evals/overview.mdx +3 -3
- package/.docs/raw/evals/running-in-ci.mdx +2 -2
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +15 -128
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +71 -19
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +8 -29
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +91 -267
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +3 -3
- package/.docs/raw/frameworks/servers/express.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +1 -1
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +1 -1
- package/.docs/raw/getting-started/mcp-docs-server.mdx +6 -6
- package/.docs/raw/getting-started/project-structure.mdx +1 -1
- package/.docs/raw/getting-started/quickstart.mdx +27 -0
- package/.docs/raw/getting-started/studio.mdx +3 -3
- package/.docs/raw/getting-started/templates.mdx +1 -1
- package/.docs/raw/guides/guide/ai-recruiter.mdx +1 -1
- package/.docs/raw/guides/guide/chef-michel.mdx +1 -1
- package/.docs/raw/{getting-started/installation.mdx → guides/guide/manual-install.mdx} +6 -80
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +2 -2
- package/.docs/raw/guides/guide/research-assistant.mdx +2 -2
- package/.docs/raw/guides/guide/stock-agent.mdx +1 -1
- package/.docs/raw/guides/guide/web-search.mdx +1 -1
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +119 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +11 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +27 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +25 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +60 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +43 -1
- package/.docs/raw/guides/quickstarts/nextjs.mdx +18 -17
- package/.docs/raw/guides/quickstarts/standalone-server.mdx +86 -0
- package/.docs/raw/index.mdx +3 -3
- package/.docs/raw/logging.mdx +7 -7
- package/.docs/raw/mcp/overview.mdx +360 -0
- package/.docs/raw/mcp/publishing-mcp-server.mdx +139 -0
- package/.docs/raw/memory/conversation-history.mdx +1 -1
- package/.docs/raw/memory/memory-processors.mdx +1 -1
- package/.docs/raw/memory/overview.mdx +2 -2
- package/.docs/raw/memory/semantic-recall.mdx +2 -2
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +1 -4
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +152 -0
- package/.docs/raw/memory/storage/memory-with-pg.mdx +1 -4
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +1 -4
- package/.docs/raw/memory/threads-and-resources.mdx +1 -1
- package/.docs/raw/memory/working-memory.mdx +1 -1
- package/.docs/raw/observability/overview.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/arize.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/default.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/otel.mdx +1 -1
- package/.docs/raw/observability/tracing/overview.mdx +2 -2
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +2 -2
- package/.docs/raw/rag/overview.mdx +1 -1
- package/.docs/raw/rag/retrieval.mdx +1 -1
- package/.docs/raw/rag/vector-databases.mdx +1 -1
- package/.docs/raw/reference/agents/agent.mdx +1 -2
- package/.docs/raw/reference/agents/generate.mdx +1 -1
- package/.docs/raw/reference/agents/generateLegacy.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDescription.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +1 -1
- package/.docs/raw/reference/agents/getLLM.mdx +1 -1
- package/.docs/raw/reference/agents/getMemory.mdx +1 -1
- package/.docs/raw/reference/agents/getModel.mdx +1 -1
- package/.docs/raw/reference/agents/getTools.mdx +69 -0
- package/.docs/raw/reference/agents/getVoice.mdx +1 -1
- package/.docs/raw/reference/agents/listAgents.mdx +1 -1
- package/.docs/raw/reference/agents/listScorers.mdx +1 -1
- package/.docs/raw/reference/agents/listTools.mdx +2 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/agents/network.mdx +1 -1
- package/.docs/raw/reference/auth/auth0.mdx +1 -1
- package/.docs/raw/reference/auth/clerk.mdx +1 -1
- package/.docs/raw/reference/auth/firebase.mdx +1 -1
- package/.docs/raw/reference/auth/jwt.mdx +1 -1
- package/.docs/raw/reference/auth/supabase.mdx +1 -1
- package/.docs/raw/reference/auth/workos.mdx +1 -1
- package/.docs/raw/reference/cli/create-mastra.mdx +1 -1
- package/.docs/raw/reference/cli/mastra.mdx +4 -4
- package/.docs/raw/reference/client-js/agents.mdx +1 -1
- package/.docs/raw/reference/client-js/error-handling.mdx +1 -1
- package/.docs/raw/reference/client-js/logs.mdx +1 -1
- package/.docs/raw/reference/client-js/mastra-client.mdx +2 -2
- package/.docs/raw/reference/client-js/memory.mdx +1 -1
- package/.docs/raw/reference/client-js/observability.mdx +1 -1
- package/.docs/raw/reference/client-js/telemetry.mdx +1 -1
- package/.docs/raw/reference/client-js/tools.mdx +1 -1
- package/.docs/raw/reference/client-js/vectors.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows.mdx +1 -1
- package/.docs/raw/reference/core/addGateway.mdx +59 -0
- package/.docs/raw/reference/core/getAgent.mdx +1 -1
- package/.docs/raw/reference/core/getAgentById.mdx +1 -1
- package/.docs/raw/reference/core/getDeployer.mdx +1 -1
- package/.docs/raw/reference/core/getGateway.mdx +59 -0
- package/.docs/raw/reference/core/getGatewayById.mdx +62 -0
- package/.docs/raw/reference/core/getLogger.mdx +1 -1
- package/.docs/raw/reference/core/getMCPServer.mdx +2 -2
- package/.docs/raw/reference/core/getMCPServerById.mdx +2 -2
- package/.docs/raw/reference/core/getScorer.mdx +1 -1
- package/.docs/raw/reference/core/getScorerById.mdx +1 -1
- package/.docs/raw/reference/core/getServer.mdx +2 -2
- package/.docs/raw/reference/core/getStorage.mdx +1 -1
- package/.docs/raw/reference/core/getTelemetry.mdx +1 -1
- package/.docs/raw/reference/core/getVector.mdx +1 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
- package/.docs/raw/reference/core/listAgents.mdx +1 -1
- package/.docs/raw/reference/core/listGateways.mdx +53 -0
- package/.docs/raw/reference/core/listLogs.mdx +1 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
- package/.docs/raw/reference/core/listMCPServers.mdx +2 -2
- package/.docs/raw/reference/core/listScorers.mdx +1 -1
- package/.docs/raw/reference/core/listVectors.mdx +1 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/core/mastra-class.mdx +9 -1
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +241 -0
- package/.docs/raw/reference/core/setLogger.mdx +1 -1
- package/.docs/raw/reference/core/setStorage.mdx +1 -1
- package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
- package/.docs/raw/reference/deployer/cloudflare.mdx +1 -1
- package/.docs/raw/reference/deployer/deployer.mdx +1 -1
- package/.docs/raw/reference/deployer/netlify.mdx +1 -1
- package/.docs/raw/reference/deployer/vercel.mdx +1 -1
- package/.docs/raw/reference/evals/answer-relevancy.mdx +1 -1
- package/.docs/raw/reference/evals/answer-similarity.mdx +1 -1
- package/.docs/raw/reference/evals/bias.mdx +1 -1
- package/.docs/raw/reference/evals/completeness.mdx +1 -1
- package/.docs/raw/reference/evals/content-similarity.mdx +1 -1
- package/.docs/raw/reference/evals/context-precision.mdx +1 -1
- package/.docs/raw/reference/evals/context-relevance.mdx +1 -1
- package/.docs/raw/reference/evals/create-scorer.mdx +1 -1
- package/.docs/raw/reference/evals/faithfulness.mdx +1 -1
- package/.docs/raw/reference/evals/hallucination.mdx +1 -1
- package/.docs/raw/reference/evals/keyword-coverage.mdx +1 -1
- package/.docs/raw/reference/evals/mastra-scorer.mdx +1 -1
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +1 -1
- package/.docs/raw/reference/evals/prompt-alignment.mdx +1 -1
- package/.docs/raw/reference/evals/run-evals.mdx +1 -1
- package/.docs/raw/reference/evals/textual-difference.mdx +1 -1
- package/.docs/raw/reference/evals/tone-consistency.mdx +1 -1
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +1 -1
- package/.docs/raw/reference/evals/toxicity.mdx +1 -1
- package/.docs/raw/reference/logging/pino-logger.mdx +2 -2
- package/.docs/raw/reference/memory/createThread.mdx +1 -1
- package/.docs/raw/reference/memory/deleteMessages.mdx +1 -1
- package/.docs/raw/reference/memory/getThreadById.mdx +1 -1
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +1 -1
- package/.docs/raw/reference/memory/memory-class.mdx +1 -1
- package/.docs/raw/reference/memory/query.mdx +1 -1
- package/.docs/raw/reference/memory/recall.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/configuration.mdx +2 -2
- package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/instances.mdx +2 -2
- package/.docs/raw/reference/observability/tracing/interfaces.mdx +2 -2
- package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/spans.mdx +2 -2
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +1 -1
- package/.docs/raw/reference/processors/language-detector.mdx +1 -1
- package/.docs/raw/reference/processors/moderation-processor.mdx +1 -1
- package/.docs/raw/reference/processors/pii-detector.mdx +1 -1
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +1 -1
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +1 -1
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +1 -1
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +1 -1
- package/.docs/raw/reference/rag/chunk.mdx +1 -1
- package/.docs/raw/reference/rag/database-config.mdx +1 -1
- package/.docs/raw/reference/rag/document.mdx +1 -1
- package/.docs/raw/reference/rag/embeddings.mdx +1 -1
- package/.docs/raw/reference/rag/extract-params.mdx +1 -1
- package/.docs/raw/reference/rag/graph-rag.mdx +1 -1
- package/.docs/raw/reference/rag/metadata-filters.mdx +1 -1
- package/.docs/raw/reference/rag/rerank.mdx +1 -1
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +1 -1
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +1 -1
- package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
- package/.docs/raw/reference/storage/dynamodb.mdx +1 -1
- package/.docs/raw/reference/storage/lance.mdx +1 -1
- package/.docs/raw/reference/storage/libsql.mdx +1 -1
- package/.docs/raw/reference/storage/mongodb.mdx +1 -1
- package/.docs/raw/reference/storage/mssql.mdx +1 -1
- package/.docs/raw/reference/storage/postgresql.mdx +1 -1
- package/.docs/raw/reference/storage/upstash.mdx +1 -1
- package/.docs/raw/reference/streaming/ChunkType.mdx +1 -1
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -1
- package/.docs/raw/reference/streaming/agents/stream.mdx +1 -1
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/stream.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +1 -1
- package/.docs/raw/reference/templates/overview.mdx +1 -1
- package/.docs/raw/reference/tools/client.mdx +1 -1
- package/.docs/raw/reference/tools/create-tool.mdx +3 -4
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +1 -1
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +2 -2
- package/.docs/raw/reference/tools/mcp-client.mdx +1 -1
- package/.docs/raw/reference/tools/mcp-server.mdx +55 -6
- package/.docs/raw/reference/tools/vector-query-tool.mdx +2 -2
- package/.docs/raw/reference/vectors/astra.mdx +1 -1
- package/.docs/raw/reference/vectors/chroma.mdx +1 -1
- package/.docs/raw/reference/vectors/couchbase.mdx +1 -1
- package/.docs/raw/reference/vectors/lance.mdx +1 -1
- package/.docs/raw/reference/vectors/libsql.mdx +1 -1
- package/.docs/raw/reference/vectors/mongodb.mdx +1 -1
- package/.docs/raw/reference/vectors/opensearch.mdx +1 -1
- package/.docs/raw/reference/vectors/pg.mdx +1 -1
- package/.docs/raw/reference/vectors/pinecone.mdx +22 -2
- package/.docs/raw/reference/vectors/qdrant.mdx +1 -1
- package/.docs/raw/reference/vectors/s3vectors.mdx +1 -1
- package/.docs/raw/reference/vectors/turbopuffer.mdx +1 -1
- package/.docs/raw/reference/vectors/upstash.mdx +1 -1
- package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
- package/.docs/raw/reference/voice/azure.mdx +96 -81
- package/.docs/raw/reference/voice/cloudflare.mdx +1 -1
- package/.docs/raw/reference/voice/composite-voice.mdx +1 -1
- package/.docs/raw/reference/voice/deepgram.mdx +1 -1
- package/.docs/raw/reference/voice/elevenlabs.mdx +1 -1
- package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
- package/.docs/raw/reference/voice/google.mdx +1 -1
- package/.docs/raw/reference/voice/mastra-voice.mdx +1 -1
- package/.docs/raw/reference/voice/murf.mdx +1 -1
- package/.docs/raw/reference/voice/openai-realtime.mdx +1 -1
- package/.docs/raw/reference/voice/openai.mdx +1 -1
- package/.docs/raw/reference/voice/playai.mdx +1 -1
- package/.docs/raw/reference/voice/sarvam.mdx +1 -1
- package/.docs/raw/reference/voice/speechify.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addTools.mdx +1 -1
- package/.docs/raw/reference/voice/voice.answer.mdx +1 -1
- package/.docs/raw/reference/voice/voice.close.mdx +1 -1
- package/.docs/raw/reference/voice/voice.connect.mdx +1 -1
- package/.docs/raw/reference/voice/voice.events.mdx +1 -1
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +1 -1
- package/.docs/raw/reference/voice/voice.listen.mdx +1 -1
- package/.docs/raw/reference/voice/voice.off.mdx +1 -1
- package/.docs/raw/reference/voice/voice.on.mdx +1 -1
- package/.docs/raw/reference/voice/voice.send.mdx +1 -1
- package/.docs/raw/reference/voice/voice.speak.mdx +1 -1
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +1 -1
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +1 -1
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +1 -1
- package/.docs/raw/reference/workflows/run-methods/start.mdx +1 -1
- package/.docs/raw/reference/workflows/run.mdx +1 -1
- package/.docs/raw/reference/workflows/step.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow.mdx +2 -2
- package/.docs/raw/server-db/custom-api-routes.mdx +1 -1
- package/.docs/raw/server-db/mastra-client.mdx +2 -2
- package/.docs/raw/server-db/{production-server.mdx → mastra-server.mdx} +2 -2
- package/.docs/raw/server-db/middleware.mdx +31 -31
- package/.docs/raw/server-db/request-context.mdx +3 -3
- package/.docs/raw/server-db/storage.mdx +1 -1
- package/.docs/raw/streaming/events.mdx +1 -1
- package/.docs/raw/streaming/overview.mdx +1 -1
- package/.docs/raw/streaming/tool-streaming.mdx +1 -1
- package/.docs/raw/streaming/workflow-streaming.mdx +1 -1
- package/.docs/raw/tools-mcp/advanced-usage.mdx +1 -1
- package/.docs/raw/tools-mcp/mcp-overview.mdx +1 -1
- package/.docs/raw/tools-mcp/overview.mdx +1 -1
- package/.docs/raw/voice/overview.mdx +1 -1
- package/.docs/raw/voice/speech-to-speech.mdx +1 -1
- package/.docs/raw/voice/speech-to-text.mdx +1 -1
- package/.docs/raw/voice/text-to-speech.mdx +1 -1
- package/.docs/raw/workflows/agents-and-tools.mdx +2 -4
- package/.docs/raw/workflows/control-flow.mdx +6 -1
- package/.docs/raw/workflows/error-handling.mdx +4 -4
- package/.docs/raw/workflows/human-in-the-loop.mdx +160 -213
- package/.docs/raw/workflows/inngest-workflow.mdx +1 -1
- package/.docs/raw/workflows/input-data-mapping.mdx +1 -1
- package/.docs/raw/workflows/overview.mdx +10 -2
- package/.docs/raw/workflows/snapshots.mdx +4 -3
- package/.docs/raw/workflows/suspend-and-resume.mdx +72 -224
- package/CHANGELOG.md +26 -0
- package/dist/stdio.js +16 -18
- package/package.json +10 -14
- package/.docs/raw/deployment/serverless-platforms/index.mdx +0 -58
|
@@ -1,94 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Install
|
|
3
|
-
description:
|
|
2
|
+
title: "Manual Install | Guides"
|
|
3
|
+
description: Set up a Mastra project manually without using the create mastra CLI.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import Tabs from "@theme/Tabs";
|
|
7
7
|
import TabItem from "@theme/TabItem";
|
|
8
8
|
import Steps from "@site/src/components/Steps";
|
|
9
9
|
import StepItem from "@site/src/components/StepItem";
|
|
10
|
-
import { VideoPlayer } from "@site/src/components/video-player";
|
|
11
10
|
|
|
12
|
-
# Install
|
|
13
|
-
|
|
14
|
-
The `create mastra` CLI command is the quickest way to start a new Mastra project. It walks you through setup and creates example agents, workflows, and tools for you to learn from or adapt.
|
|
15
|
-
|
|
16
|
-
For more control over setup, or to add Mastra to an existing project, see the [manual installation guide](#install-manually). You can also use [`mastra init`](/reference/v1/cli/mastra#mastra-init) for existing projects.
|
|
17
|
-
|
|
18
|
-
## Before you start
|
|
19
|
-
|
|
20
|
-
- You'll need an API key from a [model provider](/models/v1) to complete setup. We suggest starting with [OpenAI](https://platform.openai.com/api-keys), but if you need a provider that doesn't require a credit card, Google's [Gemini](https://aistudio.google.com/app/api-keys) is also an option.
|
|
21
|
-
- [Install](https://nodejs.org/en/download) Node.js 22.13.0 or later.
|
|
22
|
-
|
|
23
|
-
## Install with `create mastra`
|
|
24
|
-
|
|
25
|
-
You can run `create mastra` anywhere on your machine.
|
|
26
|
-
|
|
27
|
-
The wizard will guide you through setup, create a new directory for your project, and generate a weather agent with example workflows and tools to get you started.
|
|
28
|
-
|
|
29
|
-
<Tabs>
|
|
30
|
-
<TabItem value="npm" label="npm">
|
|
31
|
-
|
|
32
|
-
```bash copy
|
|
33
|
-
npm create mastra@beta
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
</TabItem>
|
|
37
|
-
<TabItem value="pnpm" label="pnpm">
|
|
38
|
-
|
|
39
|
-
```bash copy
|
|
40
|
-
pnpm create mastra@beta
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
</TabItem>
|
|
44
|
-
<TabItem value="yarn" label="yarn">
|
|
45
|
-
|
|
46
|
-
```bash copy
|
|
47
|
-
yarn create mastra@beta
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
</TabItem>
|
|
51
|
-
<TabItem value="bun" label="bun">
|
|
52
|
-
|
|
53
|
-
```bash copy
|
|
54
|
-
bun create mastra@beta
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
</TabItem>
|
|
58
|
-
</Tabs>
|
|
59
|
-
|
|
60
|
-
:::note
|
|
61
|
-
|
|
62
|
-
You can use flags with `create mastra` like `--no-example` to skip the example weather agent or `--template` to start from a specific [template](/docs/v1/getting-started/templates). Read the [CLI reference](/reference/v1/cli/create-mastra) for all options.
|
|
63
|
-
|
|
64
|
-
:::
|
|
65
|
-
|
|
66
|
-
### Test your agent
|
|
67
|
-
|
|
68
|
-
Once setup is complete, follow the instructions in your terminal to start the Mastra dev server, then open Studio at http://localhost:4111.
|
|
69
|
-
|
|
70
|
-
Try asking about the weather. If your API key is set up correctly, you'll get a response:
|
|
71
|
-
|
|
72
|
-
<VideoPlayer src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406022/local-dev-agents-playground_100_m3begx.mp4" />
|
|
73
|
-
|
|
74
|
-
:::note
|
|
75
|
-
|
|
76
|
-
If you encounter an error, your API key may not be configured correctly. Double-check your setup and try again. Need more help? [Join our Discord](https://discord.gg/BTYqqHKUrf) and talk to the team directly.
|
|
11
|
+
# Manual Install
|
|
77
12
|
|
|
13
|
+
:::info
|
|
14
|
+
Use this guide to manually build a standalone Mastra server step by step. In most cases, it's quicker to follow the [Standalone Server Quickstart](/guides/v1/quickstarts/standalone-server), which achieves the same result using the [`mastra create`](/reference/v1/cli/create-mastra) command. For existing projects, you can also use [`mastra init`](/reference/v1/cli/mastra#mastra-init).
|
|
78
15
|
:::
|
|
79
16
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### Next steps
|
|
83
|
-
|
|
84
|
-
- Read more about [Mastra's features](/docs/v1#why-mastra).
|
|
85
|
-
- Integrate Mastra with your frontend framework: [Next.js](/docs/v1/frameworks/web-frameworks/next-js), [React](/docs/v1/frameworks/web-frameworks/vite-react), or [Astro](/docs/v1/frameworks/web-frameworks/astro).
|
|
86
|
-
- Build an agent from scratch following one of our [guides](/guides/v1).
|
|
87
|
-
- Watch conceptual guides on our [YouTube channel](https://www.youtube.com/@mastra-ai) and [subscribe](https://www.youtube.com/@mastra-ai?sub_confirmation=1)!
|
|
88
|
-
|
|
89
|
-
## Install manually
|
|
90
|
-
|
|
91
|
-
If you prefer not to use our automatic `create mastra` CLI tool, you can set up your project yourself by following the guide below.
|
|
17
|
+
If you prefer not to use our automatic CLI tool, you can set up your project yourself by following the guide below.
|
|
92
18
|
|
|
93
19
|
<Steps>
|
|
94
20
|
|
|
@@ -18,7 +18,7 @@ In this guide, you'll learn how to build a complete MCP (Model Context Protocol)
|
|
|
18
18
|
|
|
19
19
|
- Node.js `v22.13.0` or later installed
|
|
20
20
|
- An API key from a supported [Model Provider](/models/v1)
|
|
21
|
-
- An existing Mastra project (Follow the [installation guide](/
|
|
21
|
+
- An existing Mastra project (Follow the [installation guide](/guides/v1/quickstarts/standalone-server) to set up a new project)
|
|
22
22
|
|
|
23
23
|
## Adding necessary dependencies & files
|
|
24
24
|
|
|
@@ -38,7 +38,7 @@ npm install @mastra/mcp@beta
|
|
|
38
38
|
|
|
39
39
|
<StepItem>
|
|
40
40
|
|
|
41
|
-
After following the default [installation guide](/
|
|
41
|
+
After following the default [installation guide](/guides/v1/quickstarts/standalone-server) your project will include files that are not relevant for this guide. You can safely remove them:
|
|
42
42
|
|
|
43
43
|
```bash copy
|
|
44
44
|
rm -rf src/mastra/agents src/mastra/workflows src/mastra/tools/weather-tool.ts
|
|
@@ -16,7 +16,7 @@ You'll use the foundational Transformer paper ["Attention Is All You Need"](http
|
|
|
16
16
|
|
|
17
17
|
- Node.js `v22.13.0` or later installed
|
|
18
18
|
- An API key from a supported [Model Provider](/models/v1)
|
|
19
|
-
- An existing Mastra project (Follow the [installation guide](/
|
|
19
|
+
- An existing Mastra project (Follow the [installation guide](/guides/v1/quickstarts/standalone-server) to set up a new project)
|
|
20
20
|
|
|
21
21
|
## How RAG works
|
|
22
22
|
|
|
@@ -57,7 +57,7 @@ Let's define the agent's behavior, connect it to your Mastra project, and create
|
|
|
57
57
|
|
|
58
58
|
Install additional dependencies
|
|
59
59
|
|
|
60
|
-
After running the [installation guide](/
|
|
60
|
+
After running the [installation guide](/guides/v1/quickstarts/standalone-server) you'll need to install additional dependencies:
|
|
61
61
|
|
|
62
62
|
```bash copy
|
|
63
63
|
npm install @mastra/rag@beta ai@^4.0.0
|
|
@@ -17,7 +17,7 @@ In this guide, you're going to create a simple agent that fetches the last day's
|
|
|
17
17
|
|
|
18
18
|
- Node.js `v22.13.0` or later installed
|
|
19
19
|
- An API key from a supported [Model Provider](/models/v1)
|
|
20
|
-
- An existing Mastra project (Follow the [installation guide](/
|
|
20
|
+
- An existing Mastra project (Follow the [installation guide](/guides/v1/quickstarts/standalone-server) to set up a new project)
|
|
21
21
|
|
|
22
22
|
## Creating the Agent
|
|
23
23
|
|
|
@@ -19,7 +19,7 @@ When building a web search agent, you have two main strategies to consider:
|
|
|
19
19
|
|
|
20
20
|
- Node.js `v22.13.0` or later installed
|
|
21
21
|
- An API key from a supported [Model Provider](/models/v1)
|
|
22
|
-
- An existing Mastra project (Follow the [installation guide](/
|
|
22
|
+
- An existing Mastra project (Follow the [installation guide](/guides/v1/quickstarts/standalone-server) to set up a new project)
|
|
23
23
|
|
|
24
24
|
## Using native search tools
|
|
25
25
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Migration: AI SDK v4 to v5 | Migration Guide"
|
|
3
|
+
description: "Mastra-specific guidance for upgrading from AI SDK v4 to v5."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Migrate from AI SDK v4 to v5
|
|
7
|
+
|
|
8
|
+
Looking for integration docs? See [Using AI SDK](/docs/v1/frameworks/agentic-uis/ai-sdk).
|
|
9
|
+
|
|
10
|
+
Follow the official [AI SDK v5 Migration Guide](https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0) for all AI SDK core breaking changes, package updates, and API changes.
|
|
11
|
+
|
|
12
|
+
This guide covers only the Mastra-specific aspects of the migration.
|
|
13
|
+
|
|
14
|
+
- **Data compatibility**: New data stored in v5 format will no longer work if you downgrade from v5 to v4
|
|
15
|
+
- **Backup recommendation**: Keep DB backups from before you upgrade to v5
|
|
16
|
+
|
|
17
|
+
### Memory and Storage
|
|
18
|
+
|
|
19
|
+
Mastra automatically handles AI SDK v4 data using its internal `MessageList` class, which manages format conversion—including v4 to v5. No database migrations are required; your existing messages are translated on the fly and continue working after you upgrade.
|
|
20
|
+
|
|
21
|
+
### Message Format Conversion
|
|
22
|
+
|
|
23
|
+
For cases where you need to manually convert messages between AI SDK and Mastra formats, use the `convertMessages()` utility:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { convertMessages } from "@mastra/core/agent";
|
|
27
|
+
|
|
28
|
+
// Convert AI SDK v4 messages to v5
|
|
29
|
+
const aiv5Messages = convertMessages(aiv4Messages).to("AIV5.UI");
|
|
30
|
+
|
|
31
|
+
// Convert Mastra messages to AI SDK v5
|
|
32
|
+
const aiv5Messages = convertMessages(mastraMessages).to("AIV5.Core");
|
|
33
|
+
|
|
34
|
+
// Supported output formats:
|
|
35
|
+
// 'Mastra.V2', 'AIV4.UI', 'AIV5.UI', 'AIV5.Core', 'AIV5.Model'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This utility is helpful when you want to fetch messages directly from your storage DB and convert them for use in AI SDK.
|
|
39
|
+
|
|
40
|
+
### Type Inference for Tools
|
|
41
|
+
|
|
42
|
+
When using tools with TypeScript in AI SDK v5, Mastra provides type inference helpers to ensure type safety for your tool inputs and outputs.
|
|
43
|
+
|
|
44
|
+
#### `InferUITool`
|
|
45
|
+
|
|
46
|
+
The `InferUITool` type helper infers the input and output types of a single Mastra tool:
|
|
47
|
+
|
|
48
|
+
```typescript title="app/types.ts" copy
|
|
49
|
+
import { InferUITool, createTool } from "@mastra/core/tools";
|
|
50
|
+
import { z } from "zod";
|
|
51
|
+
|
|
52
|
+
const weatherTool = createTool({
|
|
53
|
+
id: "get-weather",
|
|
54
|
+
description: "Get the current weather",
|
|
55
|
+
inputSchema: z.object({
|
|
56
|
+
location: z.string().describe("The city and state"),
|
|
57
|
+
}),
|
|
58
|
+
outputSchema: z.object({
|
|
59
|
+
temperature: z.number(),
|
|
60
|
+
conditions: z.string(),
|
|
61
|
+
}),
|
|
62
|
+
execute: async (inputData) => {
|
|
63
|
+
return {
|
|
64
|
+
temperature: 72,
|
|
65
|
+
conditions: "sunny",
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Infer the types from the tool
|
|
71
|
+
type WeatherUITool = InferUITool<typeof weatherTool>;
|
|
72
|
+
// This creates:
|
|
73
|
+
// {
|
|
74
|
+
// input: { location: string };
|
|
75
|
+
// output: { temperature: number; conditions: string };
|
|
76
|
+
// }
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
#### `InferUITools`
|
|
80
|
+
|
|
81
|
+
The `InferUITools` type helper infers the input and output types of multiple tools:
|
|
82
|
+
|
|
83
|
+
```typescript title="app/mastra/tools.ts" copy
|
|
84
|
+
import { InferUITools, createTool } from "@mastra/core/tools";
|
|
85
|
+
import { z } from "zod";
|
|
86
|
+
|
|
87
|
+
// Using weatherTool from the previous example
|
|
88
|
+
const tools = {
|
|
89
|
+
weather: weatherTool,
|
|
90
|
+
calculator: createTool({
|
|
91
|
+
id: "calculator",
|
|
92
|
+
description: "Perform basic arithmetic",
|
|
93
|
+
inputSchema: z.object({
|
|
94
|
+
operation: z.enum(["add", "subtract", "multiply", "divide"]),
|
|
95
|
+
a: z.number(),
|
|
96
|
+
b: z.number(),
|
|
97
|
+
}),
|
|
98
|
+
outputSchema: z.object({
|
|
99
|
+
result: z.number(),
|
|
100
|
+
}),
|
|
101
|
+
execute: async (inputData) => {
|
|
102
|
+
// implementation...
|
|
103
|
+
return { result: 0 };
|
|
104
|
+
},
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// Infer types from the tool set
|
|
109
|
+
export type MyUITools = InferUITools<typeof tools>;
|
|
110
|
+
// This creates:
|
|
111
|
+
// {
|
|
112
|
+
// weather: { input: { location: string }; output: { temperature: number; conditions: string } };
|
|
113
|
+
// calculator: { input: { operation: "add" | "subtract" | "multiply" | "divide"; a: number; b: number }; output: { result: number } };
|
|
114
|
+
// }
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
These type helpers provide full TypeScript support when using Mastra tools with AI SDK v5 UI components, ensuring type safety across your application.
|
|
118
|
+
|
|
119
|
+
|
|
@@ -25,7 +25,7 @@ To migrate, replace all calls to `mastra.getAgents()` with `mastra.listAgents()`
|
|
|
25
25
|
You can use Mastra's codemod CLI to update your code automatically:
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
npx @mastra/codemod@beta v1/
|
|
28
|
+
npx @mastra/codemod@beta v1/mastra-plural-apis .
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
:::
|
|
@@ -177,6 +177,16 @@ To migrate, move `abortSignal` from `modelSettings` to the top level.
|
|
|
177
177
|
});
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
+
:::tip[Codemod]
|
|
181
|
+
|
|
182
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
183
|
+
|
|
184
|
+
```shell
|
|
185
|
+
npx @mastra/codemod@beta v1/agent-abort-signal .
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
:::
|
|
189
|
+
|
|
180
190
|
### `output` to `structuredOutput.schema`
|
|
181
191
|
|
|
182
192
|
The deprecated `output` and `experimental_output` options have been removed. This change consolidates on a single, stable API for structured output.
|
|
@@ -28,6 +28,16 @@ To migrate, update type imports to use the new naming pattern.
|
|
|
28
28
|
+ } from '@mastra/client-js';
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
:::tip[Codemod]
|
|
32
|
+
|
|
33
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
34
|
+
|
|
35
|
+
```shell
|
|
36
|
+
npx @mastra/codemod@beta v1/client-sdk-types .
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
31
41
|
### Pagination parameters from `offset/limit` to `page/perPage`
|
|
32
42
|
|
|
33
43
|
All client SDK methods that used `offset/limit` now use `page/perPage`. This change provides a more intuitive pagination model aligned with web pagination patterns.
|
|
@@ -44,6 +54,16 @@ To migrate, update pagination parameters in all client SDK method calls. Example
|
|
|
44
54
|
});
|
|
45
55
|
```
|
|
46
56
|
|
|
57
|
+
:::tip[Codemod]
|
|
58
|
+
|
|
59
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
60
|
+
|
|
61
|
+
```shell
|
|
62
|
+
npx @mastra/codemod@beta v1/client-offset-limit .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
:::
|
|
66
|
+
|
|
47
67
|
### `getMemoryThread` parameter structure
|
|
48
68
|
|
|
49
69
|
The `getMemoryThread` method parameter structure has been updated. This change provides a more consistent API across memory methods.
|
|
@@ -51,10 +71,20 @@ The `getMemoryThread` method parameter structure has been updated. This change p
|
|
|
51
71
|
To migrate, update the method call with the new parameter structure. Check the updated API documentation for the specific changes.
|
|
52
72
|
|
|
53
73
|
```diff
|
|
54
|
-
- const thread = await client.
|
|
55
|
-
+ const thread = await client.
|
|
74
|
+
- const thread = await client.getMemoryThread(threadId, agentId);
|
|
75
|
+
+ const thread = await client.getMemoryThread({ threadId, agentId });
|
|
56
76
|
```
|
|
57
77
|
|
|
78
|
+
:::tip[Codemod]
|
|
79
|
+
|
|
80
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
81
|
+
|
|
82
|
+
```shell
|
|
83
|
+
npx @mastra/codemod@beta v1/client-get-memory-thread .
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
:::
|
|
87
|
+
|
|
58
88
|
## Removed
|
|
59
89
|
|
|
60
90
|
### `toAISdkFormat` function
|
|
@@ -70,6 +100,16 @@ To migrate, use `toAISdkStream()` instead.
|
|
|
70
100
|
+ const stream = toAISdkStream(agentStream, { from: 'agent' });
|
|
71
101
|
```
|
|
72
102
|
|
|
103
|
+
:::tip[Codemod]
|
|
104
|
+
|
|
105
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
106
|
+
|
|
107
|
+
```shell
|
|
108
|
+
npx @mastra/codemod@beta v1/client-to-ai-sdk-format .
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
:::
|
|
112
|
+
|
|
73
113
|
### Network memory methods
|
|
74
114
|
|
|
75
115
|
Network memory methods have been removed from `@mastra/client-js`. The `NetworkMemoryThread` class and all network memory-related methods are no longer available. This change simplifies the memory API by removing specialized network memory functionality.
|
|
@@ -25,7 +25,7 @@ To migrate, replace all calls to `getScorers()` with `listScorers()`.
|
|
|
25
25
|
You can use Mastra's codemod CLI to update your code automatically:
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
npx @mastra/codemod@beta v1/
|
|
28
|
+
npx @mastra/codemod@beta v1/mastra-plural-apis .
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
:::
|
|
@@ -50,6 +50,16 @@ To migrate, update function calls from `runExperiment` to `runEvals`.
|
|
|
50
50
|
+ const result = await runEvals({ target: myAgent, scorers: [scorer], data: inputs });
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
:::tip[Codemod]
|
|
54
|
+
|
|
55
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
npx @mastra/codemod@beta v1/evals-run-experiment .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
:::
|
|
62
|
+
|
|
53
63
|
### `getScorerByName` to `getScorerById`
|
|
54
64
|
|
|
55
65
|
The `getScorerByName()` method has been renamed to `getScorerById()`. Scorers now require an `id` field instead of `name`. This change aligns with the broader API pattern of using `id` for entity identification.
|
|
@@ -67,6 +77,16 @@ To migrate, update method calls and scorer configuration to use `id` instead of
|
|
|
67
77
|
+ const scorer = mastra.getScorerById('helpfulness-scorer');
|
|
68
78
|
```
|
|
69
79
|
|
|
80
|
+
:::tip[Codemod]
|
|
81
|
+
|
|
82
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
83
|
+
|
|
84
|
+
```shell
|
|
85
|
+
npx @mastra/codemod@beta v1/evals-scorer-by-name .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
:::
|
|
89
|
+
|
|
70
90
|
### Scorer configuration from `name` to `id`
|
|
71
91
|
|
|
72
92
|
Scorers now require an `id` field instead of `name`. The `name` field is now optional. This change provides consistency with other Mastra entities.
|
|
@@ -120,6 +140,16 @@ To migrate, update import statements to use the new `scorers/prebuilt` path.
|
|
|
120
140
|
+ import { createCompletenessScorer } from '@mastra/evals/scorers/prebuilt';
|
|
121
141
|
```
|
|
122
142
|
|
|
143
|
+
:::tip[Codemod]
|
|
144
|
+
|
|
145
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
146
|
+
|
|
147
|
+
```shell
|
|
148
|
+
npx @mastra/codemod@beta v1/evals-prebuilt-imports .
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
:::
|
|
152
|
+
|
|
123
153
|
### Scorer message types from `UIMessage` to `MastraDBMessage`
|
|
124
154
|
|
|
125
155
|
Scorer input and output types now use `MastraDBMessage[]` instead of `UIMessage`. This change aligns scorers with the database-persisted message format for consistency across the framework.
|
|
@@ -60,9 +60,9 @@ npx @mastra/codemod@beta v1/experimental-auth .
|
|
|
60
60
|
|
|
61
61
|
### Required `id` parameter for all mastra primitives
|
|
62
62
|
|
|
63
|
-
All
|
|
63
|
+
All storages, vector stores, agents, workflows, mcpServers, processors, scorers, and tools now require an `id` parameter during initialization. This enables the standardized Mastra API and prevents ID conflicts.
|
|
64
64
|
|
|
65
|
-
All these primitives also now have
|
|
65
|
+
All these primitives also now have `get`, `list`, and `add` functions.
|
|
66
66
|
|
|
67
67
|
To migrate, add an `id` parameter to all storage and vector store instantiations. When using the same storage/vector class multiple times, ensure each instance has a unique ID.
|
|
68
68
|
|
|
@@ -105,12 +105,36 @@ When using separate instances for different purposes, use descriptive unique IDs
|
|
|
105
105
|
|
|
106
106
|
### Primitive plural APIs changes from `get<primitives>` to `list<primitive>`
|
|
107
107
|
|
|
108
|
+
`get*` functions that returned all instances of a primitive have been renamed to `list*` to better reflect their purpose.
|
|
109
|
+
|
|
108
110
|
```diff
|
|
111
|
+
- const agents = mastra.getAgents();
|
|
112
|
+
+ const agents = mastra.listAgents();
|
|
113
|
+
- const vectors = mastra.getVectors();
|
|
114
|
+
+ const vectors = mastra.listVectors();
|
|
115
|
+
- const workflows = mastra.getWorkflows();
|
|
116
|
+
+ const workflows = mastra.listWorkflows();
|
|
117
|
+
- const scorers = mastra.getScorers();
|
|
118
|
+
+ const scorers = mastra.listScorers();
|
|
109
119
|
- const mcpServers = mastra.getMCPServers();
|
|
110
120
|
+ const mcpServers = mastra.listMCPServers();
|
|
121
|
+
- const logsByRunId = await mastra.getLogsByRunId({ runId: 'id', transportId: 'id' });
|
|
122
|
+
+ const logsByRunId = await mastra.listLogsByRunId({ runId: 'id', transportId: 'id' });
|
|
123
|
+
- const logs = await mastra.getLogs('transportId');
|
|
124
|
+
+ const logs = await mastra.listLogs('transportId');
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
:::tip[Codemod]
|
|
128
|
+
|
|
129
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
130
|
+
|
|
131
|
+
```shell
|
|
132
|
+
npx @mastra/codemod@beta v1/mastra-plural-apis .
|
|
111
133
|
```
|
|
112
134
|
|
|
113
|
-
|
|
135
|
+
:::
|
|
136
|
+
|
|
137
|
+
### Each primitive has a `getById` and a `get` function
|
|
114
138
|
|
|
115
139
|
```typescript
|
|
116
140
|
mastra.getMCPServer('myServer'); // Works (registry key)
|
|
@@ -25,7 +25,7 @@ To migrate, replace all calls to `mastra.getMCPServers()` with `mastra.listMCPSe
|
|
|
25
25
|
You can use Mastra's codemod CLI to update your code automatically:
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
npx @mastra/codemod@beta v1/
|
|
28
|
+
npx @mastra/codemod@beta v1/mastra-plural-apis .
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
:::
|
|
@@ -111,6 +111,16 @@ To migrate, rename `query()` to `recall()` and update code that expects the old
|
|
|
111
111
|
+ const messages = result.messages;
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
+
:::tip[Codemod]
|
|
115
|
+
|
|
116
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
117
|
+
|
|
118
|
+
```shell
|
|
119
|
+
npx @mastra/codemod@beta v1/memory-query-to-recall .
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
:::
|
|
123
|
+
|
|
114
124
|
### `Memory.recall()` parameter changes
|
|
115
125
|
|
|
116
126
|
The `Memory.recall()` method now uses `StorageListMessagesInput` format with pagination, and the `vectorMessageSearch` parameter has been renamed to `vectorSearchString`. These changes align the memory API with the storage pagination API and provide more consistent naming.
|
|
@@ -132,6 +142,16 @@ To migrate, update method name, query parameters, and the vector search paramete
|
|
|
132
142
|
});
|
|
133
143
|
```
|
|
134
144
|
|
|
145
|
+
:::tip[Codemod]
|
|
146
|
+
|
|
147
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
148
|
+
|
|
149
|
+
```shell
|
|
150
|
+
npx @mastra/codemod@beta v1/memory-vector-search-param .
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
:::
|
|
154
|
+
|
|
135
155
|
### `MastraMessageV2` type renamed to `MastraDBMessage`
|
|
136
156
|
|
|
137
157
|
The `MastraMessageV2` type has been renamed to `MastraDBMessage` for clarity. This change better describes the purpose of this type as the database message format.
|
|
@@ -145,7 +165,15 @@ To migrate, replace all instances of `MastraMessageV2` with `MastraDBMessage`.
|
|
|
145
165
|
+ function yourCustomFunction(input: MastraDBMessage) {}
|
|
146
166
|
```
|
|
147
167
|
|
|
168
|
+
:::tip[Codemod]
|
|
169
|
+
|
|
170
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
171
|
+
|
|
172
|
+
```shell
|
|
173
|
+
npx @mastra/codemod@beta v1/memory-message-v2-type .
|
|
174
|
+
```
|
|
148
175
|
|
|
176
|
+
:::
|
|
149
177
|
|
|
150
178
|
## Removed
|
|
151
179
|
|
|
@@ -13,13 +13,35 @@ Need help with the migration? Join our [Discord community](https://discord.gg/BT
|
|
|
13
13
|
|
|
14
14
|
## Migration Strategy
|
|
15
15
|
|
|
16
|
-
### Update all Mastra packages
|
|
16
|
+
### Update all Mastra packages to `beta` tag
|
|
17
17
|
|
|
18
18
|
Use your package manager to update your project's versions. Be sure to update **all** Mastra packages at the same time to ensure compatibility.
|
|
19
19
|
|
|
20
|
+
Here's how you update the most commonly used packages:
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
npm install @mastra/core@beta mastra@beta @mastra/loggers@beta @mastra/memory@beta
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Install any other Mastra package with the `@beta` tag and you'll get the latest beta version available. Be sure to update all Mastra packages (especially if you're in a monorepo) to avoid version mismatches.
|
|
27
|
+
|
|
20
28
|
### Update Node.js version
|
|
21
29
|
|
|
22
|
-
Mastra v1 requires Node.js 22.13.0 or higher. Update your development and production environments accordingly.
|
|
30
|
+
Mastra v1 requires Node.js **22.13.0** or higher. Update your development and production environments accordingly.
|
|
31
|
+
|
|
32
|
+
### Go through migration checklist
|
|
33
|
+
|
|
34
|
+
Work through the [migration checklist](#migration-checklist) below to update your codebase. Each item links to a detailed guide for that specific change.
|
|
35
|
+
|
|
36
|
+
:::info[Codemods]
|
|
37
|
+
|
|
38
|
+
We prepared automated [codemods](https://github.com/mastra-ai/mastra/tree/main/packages/codemod) for you. If you want, you can run all v1 codemods at once:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npx @mastra/codemod@beta v1
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
:::
|
|
23
45
|
|
|
24
46
|
## Breaking Changes by Area
|
|
25
47
|
|
|
@@ -41,7 +63,7 @@ Mastra v1 requires Node.js 22.13.0 or higher. Update your development and produc
|
|
|
41
63
|
|
|
42
64
|
Work through this checklist in order, starting with high-impact changes that affect most applications.
|
|
43
65
|
|
|
44
|
-
:::info[
|
|
66
|
+
:::info[Codemods]
|
|
45
67
|
|
|
46
68
|
We prepared automated [codemods](https://github.com/mastra-ai/mastra/tree/main/packages/codemod) for you. Throughout the migration guide you'll find instructions on how to use them for specific changes.
|
|
47
69
|
|