@mastra/mcp-docs-server 0.13.37 → 0.13.38
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/%40internal%2Fchangeset-cli.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +69 -69
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Freact.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +23 -23
- package/.docs/organized/changelogs/create-mastra.md +5 -5
- package/.docs/organized/changelogs/mastra.md +17 -17
- package/.docs/raw/agents/adding-voice.mdx +20 -9
- package/.docs/raw/agents/agent-memory.mdx +55 -39
- package/.docs/raw/agents/guardrails.mdx +68 -61
- package/.docs/raw/agents/networks.mdx +50 -46
- package/.docs/raw/agents/overview.mdx +125 -88
- package/.docs/raw/agents/using-tools.mdx +14 -15
- package/.docs/raw/auth/auth0.mdx +28 -27
- package/.docs/raw/auth/clerk.mdx +22 -20
- package/.docs/raw/auth/firebase.mdx +42 -39
- package/.docs/raw/auth/index.mdx +1 -1
- package/.docs/raw/auth/jwt.mdx +18 -16
- package/.docs/raw/auth/supabase.mdx +20 -18
- package/.docs/raw/auth/workos.mdx +32 -26
- package/.docs/raw/community/contributing-templates.mdx +7 -7
- package/.docs/raw/community/discord.mdx +2 -2
- package/.docs/raw/community/licensing.mdx +1 -1
- package/.docs/raw/course/03-agent-memory/26-updating-mastra-export-comprehensive.md +0 -32
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +41 -22
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +48 -29
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +52 -24
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +86 -55
- package/.docs/raw/deployment/cloud-providers/index.mdx +16 -13
- package/.docs/raw/deployment/monorepo.mdx +32 -42
- package/.docs/raw/deployment/overview.mdx +15 -15
- package/.docs/raw/deployment/server-deployment.mdx +18 -23
- package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +16 -17
- package/.docs/raw/deployment/serverless-platforms/index.mdx +15 -12
- package/.docs/raw/deployment/serverless-platforms/netlify-deployer.mdx +14 -23
- package/.docs/raw/deployment/serverless-platforms/vercel-deployer.mdx +16 -23
- package/.docs/raw/deployment/web-framework.mdx +14 -14
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +138 -145
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +54 -43
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +51 -36
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +161 -120
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +59 -48
- package/.docs/raw/frameworks/servers/express.mdx +45 -44
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +245 -162
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +112 -69
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +189 -164
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +94 -81
- package/.docs/raw/getting-started/installation.mdx +164 -133
- package/.docs/raw/getting-started/mcp-docs-server.mdx +36 -39
- package/.docs/raw/getting-started/project-structure.mdx +34 -42
- package/.docs/raw/getting-started/studio.mdx +40 -58
- package/.docs/raw/getting-started/templates.mdx +22 -27
- package/.docs/raw/index.mdx +9 -9
- package/.docs/raw/mastra-cloud/dashboard.mdx +10 -10
- package/.docs/raw/mastra-cloud/observability.mdx +7 -8
- package/.docs/raw/mastra-cloud/overview.mdx +16 -22
- package/.docs/raw/mastra-cloud/setting-up.mdx +33 -20
- package/.docs/raw/memory/conversation-history.mdx +2 -2
- package/.docs/raw/memory/overview.mdx +21 -23
- package/.docs/raw/memory/semantic-recall.mdx +14 -13
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +27 -28
- package/.docs/raw/memory/storage/memory-with-pg.mdx +26 -26
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +26 -27
- package/.docs/raw/memory/threads-and-resources.mdx +23 -20
- package/.docs/raw/memory/working-memory.mdx +27 -38
- package/.docs/raw/observability/ai-tracing/exporters/arize.mdx +30 -29
- package/.docs/raw/observability/ai-tracing/exporters/braintrust.mdx +8 -9
- package/.docs/raw/observability/ai-tracing/exporters/cloud.mdx +17 -16
- package/.docs/raw/observability/ai-tracing/exporters/default.mdx +31 -32
- package/.docs/raw/observability/ai-tracing/exporters/langfuse.mdx +18 -17
- package/.docs/raw/observability/ai-tracing/exporters/langsmith.mdx +14 -14
- package/.docs/raw/observability/ai-tracing/exporters/otel.mdx +56 -46
- package/.docs/raw/observability/ai-tracing/overview.mdx +145 -122
- package/.docs/raw/observability/ai-tracing/processors/sensitive-data-filter.mdx +57 -36
- package/.docs/raw/observability/logging.mdx +14 -17
- package/.docs/raw/observability/nextjs-tracing.mdx +5 -5
- package/.docs/raw/observability/otel-tracing.mdx +17 -18
- package/.docs/raw/observability/overview.mdx +14 -10
- package/.docs/raw/rag/chunking-and-embedding.mdx +10 -8
- package/.docs/raw/rag/overview.mdx +5 -5
- package/.docs/raw/rag/retrieval.mdx +125 -107
- package/.docs/raw/rag/vector-databases.mdx +232 -223
- package/.docs/raw/reference/agents/agent.mdx +54 -41
- package/.docs/raw/reference/agents/generate.mdx +367 -261
- package/.docs/raw/reference/agents/generateLegacy.mdx +260 -178
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +7 -5
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +7 -5
- package/.docs/raw/reference/agents/getDescription.mdx +3 -2
- package/.docs/raw/reference/agents/getInstructions.mdx +7 -5
- package/.docs/raw/reference/agents/getLLM.mdx +11 -7
- package/.docs/raw/reference/agents/getMemory.mdx +7 -5
- package/.docs/raw/reference/agents/getModel.mdx +7 -5
- package/.docs/raw/reference/agents/getScorers.mdx +7 -5
- package/.docs/raw/reference/agents/getTools.mdx +7 -5
- package/.docs/raw/reference/agents/getVoice.mdx +7 -5
- package/.docs/raw/reference/agents/getWorkflows.mdx +7 -5
- package/.docs/raw/reference/agents/listAgents.mdx +6 -4
- package/.docs/raw/reference/agents/network.mdx +171 -116
- package/.docs/raw/reference/auth/auth0.mdx +18 -14
- package/.docs/raw/reference/auth/clerk.mdx +15 -12
- package/.docs/raw/reference/auth/firebase.mdx +23 -16
- package/.docs/raw/reference/auth/jwt.mdx +7 -6
- package/.docs/raw/reference/auth/supabase.mdx +13 -10
- package/.docs/raw/reference/auth/workos.mdx +17 -13
- package/.docs/raw/reference/cli/create-mastra.mdx +61 -44
- package/.docs/raw/reference/cli/mastra.mdx +11 -11
- package/.docs/raw/reference/client-js/agents.mdx +40 -43
- 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 +21 -13
- package/.docs/raw/reference/client-js/memory.mdx +6 -2
- package/.docs/raw/reference/client-js/observability.mdx +10 -9
- 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-legacy.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows.mdx +7 -7
- package/.docs/raw/reference/core/getAgent.mdx +6 -5
- package/.docs/raw/reference/core/getAgentById.mdx +5 -4
- package/.docs/raw/reference/core/getAgents.mdx +3 -3
- package/.docs/raw/reference/core/getDeployer.mdx +4 -3
- package/.docs/raw/reference/core/getLogger.mdx +4 -3
- package/.docs/raw/reference/core/getLogs.mdx +10 -6
- package/.docs/raw/reference/core/getLogsByRunId.mdx +8 -5
- package/.docs/raw/reference/core/getMCPServer.mdx +8 -5
- package/.docs/raw/reference/core/getMCPServers.mdx +4 -3
- package/.docs/raw/reference/core/getMemory.mdx +4 -3
- package/.docs/raw/reference/core/getScorer.mdx +15 -12
- package/.docs/raw/reference/core/getScorerByName.mdx +12 -9
- package/.docs/raw/reference/core/getScorers.mdx +3 -2
- package/.docs/raw/reference/core/getServer.mdx +4 -3
- package/.docs/raw/reference/core/getStorage.mdx +4 -3
- package/.docs/raw/reference/core/getTelemetry.mdx +4 -3
- package/.docs/raw/reference/core/getVector.mdx +6 -4
- package/.docs/raw/reference/core/getVectors.mdx +4 -3
- package/.docs/raw/reference/core/getWorkflow.mdx +7 -4
- package/.docs/raw/reference/core/getWorkflows.mdx +5 -3
- package/.docs/raw/reference/core/mastra-class.mdx +16 -16
- package/.docs/raw/reference/core/setLogger.mdx +6 -4
- package/.docs/raw/reference/core/setStorage.mdx +4 -4
- package/.docs/raw/reference/core/setTelemetry.mdx +4 -3
- package/.docs/raw/reference/deployer/cloudflare.mdx +11 -7
- package/.docs/raw/reference/deployer/deployer.mdx +2 -1
- package/.docs/raw/reference/deployer/netlify.mdx +4 -4
- package/.docs/raw/reference/deployer/vercel.mdx +6 -6
- package/.docs/raw/reference/evals/answer-relevancy.mdx +4 -5
- package/.docs/raw/reference/evals/bias.mdx +4 -5
- package/.docs/raw/reference/evals/completeness.mdx +4 -5
- package/.docs/raw/reference/evals/content-similarity.mdx +4 -5
- package/.docs/raw/reference/evals/context-position.mdx +4 -5
- package/.docs/raw/reference/evals/context-precision.mdx +4 -5
- package/.docs/raw/reference/evals/context-relevancy.mdx +4 -5
- package/.docs/raw/reference/evals/contextual-recall.mdx +4 -5
- package/.docs/raw/reference/evals/faithfulness.mdx +4 -5
- package/.docs/raw/reference/evals/hallucination.mdx +4 -6
- package/.docs/raw/reference/evals/keyword-coverage.mdx +4 -5
- package/.docs/raw/reference/evals/prompt-alignment.mdx +4 -6
- package/.docs/raw/reference/evals/summarization.mdx +4 -6
- package/.docs/raw/reference/evals/textual-difference.mdx +4 -5
- package/.docs/raw/reference/evals/tone-consistency.mdx +4 -7
- package/.docs/raw/reference/evals/toxicity.mdx +4 -5
- package/.docs/raw/reference/index.mdx +3 -3
- package/.docs/raw/reference/legacyWorkflows/after.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/afterEvent.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/commit.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/createRun.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/else.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/events.mdx +7 -7
- package/.docs/raw/reference/legacyWorkflows/execute.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/if.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/resume.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/resumeWithEvent.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/snapshots.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/start.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/step-class.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/step-condition.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/step-function.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/step-options.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/step-retries.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/suspend.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/then.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/until.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/watch.mdx +3 -3
- package/.docs/raw/reference/legacyWorkflows/while.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/workflow.mdx +7 -7
- package/.docs/raw/reference/memory/createThread.mdx +10 -10
- package/.docs/raw/reference/memory/deleteMessages.mdx +7 -5
- package/.docs/raw/reference/memory/getThreadById.mdx +6 -5
- package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +11 -10
- package/.docs/raw/reference/memory/getThreadsByResourceIdPaginated.mdx +10 -9
- package/.docs/raw/reference/memory/{Memory.mdx → memory-class.mdx} +53 -46
- package/.docs/raw/reference/memory/query.mdx +39 -25
- package/.docs/raw/reference/observability/ai-tracing/ai-tracing.mdx +9 -5
- package/.docs/raw/reference/observability/ai-tracing/configuration.mdx +26 -22
- package/.docs/raw/reference/observability/ai-tracing/exporters/arize.mdx +16 -12
- package/.docs/raw/reference/observability/ai-tracing/exporters/braintrust.mdx +14 -14
- package/.docs/raw/reference/observability/ai-tracing/exporters/cloud-exporter.mdx +16 -11
- package/.docs/raw/reference/observability/ai-tracing/exporters/console-exporter.mdx +10 -6
- package/.docs/raw/reference/observability/ai-tracing/exporters/default-exporter.mdx +23 -15
- package/.docs/raw/reference/observability/ai-tracing/exporters/langfuse.mdx +6 -6
- package/.docs/raw/reference/observability/ai-tracing/exporters/langsmith.mdx +13 -13
- package/.docs/raw/reference/observability/ai-tracing/exporters/otel.mdx +44 -36
- package/.docs/raw/reference/observability/ai-tracing/interfaces.mdx +115 -106
- package/.docs/raw/reference/observability/ai-tracing/processors/sensitive-data-filter.mdx +37 -32
- package/.docs/raw/reference/observability/ai-tracing/span.mdx +29 -26
- package/.docs/raw/reference/observability/logging/pino-logger.mdx +13 -15
- package/.docs/raw/reference/observability/otel-tracing/otel-config.mdx +2 -2
- package/.docs/raw/reference/observability/otel-tracing/providers/arize-ax.mdx +3 -3
- package/.docs/raw/reference/observability/otel-tracing/providers/arize-phoenix.mdx +2 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/dash0.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/index.mdx +12 -14
- package/.docs/raw/reference/observability/otel-tracing/providers/keywordsai.mdx +3 -3
- package/.docs/raw/reference/observability/otel-tracing/providers/laminar.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/langfuse.mdx +4 -4
- package/.docs/raw/reference/observability/otel-tracing/providers/langsmith.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/langwatch.mdx +2 -2
- package/.docs/raw/reference/observability/otel-tracing/providers/new-relic.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/signoz.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/traceloop.mdx +1 -1
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +13 -10
- package/.docs/raw/reference/processors/language-detector.mdx +27 -17
- package/.docs/raw/reference/processors/moderation-processor.mdx +26 -17
- package/.docs/raw/reference/processors/pii-detector.mdx +28 -18
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +25 -17
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +26 -17
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +22 -15
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +13 -12
- package/.docs/raw/reference/rag/chunk.mdx +41 -23
- package/.docs/raw/reference/rag/database-config.mdx +56 -38
- 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 +23 -26
- package/.docs/raw/reference/rag/rerank.mdx +1 -1
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +2 -2
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +35 -17
- package/.docs/raw/reference/scorers/answer-similarity.mdx +84 -68
- package/.docs/raw/reference/scorers/bias.mdx +22 -19
- package/.docs/raw/reference/scorers/completeness.mdx +21 -16
- package/.docs/raw/reference/scorers/content-similarity.mdx +12 -10
- package/.docs/raw/reference/scorers/context-precision.mdx +73 -64
- package/.docs/raw/reference/scorers/context-relevance.mdx +142 -126
- package/.docs/raw/reference/scorers/create-scorer.mdx +93 -61
- package/.docs/raw/reference/scorers/faithfulness.mdx +21 -13
- package/.docs/raw/reference/scorers/hallucination.mdx +17 -12
- package/.docs/raw/reference/scorers/keyword-coverage.mdx +32 -27
- package/.docs/raw/reference/scorers/mastra-scorer.mdx +39 -33
- package/.docs/raw/reference/scorers/noise-sensitivity.mdx +203 -152
- package/.docs/raw/reference/scorers/prompt-alignment.mdx +186 -132
- package/.docs/raw/reference/scorers/run-experiment.mdx +40 -31
- package/.docs/raw/reference/scorers/textual-difference.mdx +25 -26
- package/.docs/raw/reference/scorers/tone-consistency.mdx +29 -26
- package/.docs/raw/reference/scorers/tool-call-accuracy.mdx +180 -176
- package/.docs/raw/reference/scorers/toxicity.mdx +35 -31
- 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 +2 -2
- package/.docs/raw/reference/storage/mongodb.mdx +4 -5
- package/.docs/raw/reference/storage/mssql.mdx +5 -4
- package/.docs/raw/reference/storage/postgresql.mdx +35 -33
- package/.docs/raw/reference/storage/upstash.mdx +6 -5
- package/.docs/raw/reference/streaming/ChunkType.mdx +788 -314
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +265 -109
- package/.docs/raw/reference/streaming/agents/stream.mdx +375 -266
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +233 -162
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +4 -4
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +5 -5
- package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +24 -20
- package/.docs/raw/reference/streaming/workflows/stream.mdx +35 -26
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +36 -27
- package/.docs/raw/reference/templates/overview.mdx +16 -39
- package/.docs/raw/reference/tools/client.mdx +1 -1
- package/.docs/raw/reference/tools/create-tool.mdx +45 -35
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +2 -2
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +12 -12
- package/.docs/raw/reference/tools/mcp-client.mdx +70 -64
- package/.docs/raw/reference/tools/mcp-server.mdx +91 -78
- package/.docs/raw/reference/tools/vector-query-tool.mdx +48 -38
- package/.docs/raw/reference/vectors/astra.mdx +1 -1
- package/.docs/raw/reference/vectors/chroma.mdx +25 -19
- package/.docs/raw/reference/vectors/couchbase.mdx +4 -4
- package/.docs/raw/reference/vectors/lance.mdx +5 -6
- 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 +8 -4
- package/.docs/raw/reference/vectors/pinecone.mdx +1 -1
- package/.docs/raw/reference/vectors/qdrant.mdx +1 -1
- package/.docs/raw/reference/vectors/s3vectors.mdx +35 -27
- package/.docs/raw/reference/vectors/turbopuffer.mdx +1 -1
- package/.docs/raw/reference/vectors/upstash.mdx +33 -25
- package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
- package/.docs/raw/reference/voice/azure.mdx +1 -1
- 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 +6 -4
- 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 +23 -30
- 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 +4 -3
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +49 -34
- package/.docs/raw/reference/workflows/run-methods/start.mdx +43 -31
- package/.docs/raw/reference/workflows/run-methods/watch.mdx +7 -8
- package/.docs/raw/reference/workflows/run.mdx +7 -10
- package/.docs/raw/reference/workflows/step.mdx +15 -12
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +7 -7
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +3 -2
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +5 -5
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +3 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +3 -2
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +3 -3
- package/.docs/raw/reference/workflows/workflow.mdx +13 -10
- package/.docs/raw/scorers/custom-scorers.mdx +58 -48
- package/.docs/raw/scorers/evals-old-api/custom-eval.mdx +6 -8
- package/.docs/raw/scorers/evals-old-api/overview.mdx +8 -8
- package/.docs/raw/scorers/evals-old-api/running-in-ci.mdx +9 -9
- package/.docs/raw/scorers/evals-old-api/textual-evals.mdx +5 -5
- package/.docs/raw/scorers/off-the-shelf-scorers.mdx +3 -1
- package/.docs/raw/scorers/overview.mdx +20 -19
- package/.docs/raw/server-db/custom-api-routes.mdx +8 -8
- package/.docs/raw/server-db/mastra-client.mdx +56 -54
- package/.docs/raw/server-db/middleware.mdx +11 -7
- package/.docs/raw/server-db/production-server.mdx +5 -7
- package/.docs/raw/server-db/runtime-context.mdx +41 -38
- package/.docs/raw/server-db/storage.mdx +82 -87
- package/.docs/raw/streaming/events.mdx +24 -16
- package/.docs/raw/streaming/overview.mdx +17 -18
- package/.docs/raw/streaming/tool-streaming.mdx +9 -10
- package/.docs/raw/streaming/workflow-streaming.mdx +14 -12
- package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +92 -102
- package/.docs/raw/tools-mcp/overview.mdx +9 -14
- package/.docs/raw/voice/overview.mdx +273 -250
- package/.docs/raw/voice/speech-to-speech.mdx +14 -12
- package/.docs/raw/voice/speech-to-text.mdx +2 -2
- package/.docs/raw/voice/text-to-speech.mdx +2 -2
- package/.docs/raw/workflows/agents-and-tools.mdx +29 -28
- package/.docs/raw/workflows/control-flow.mdx +24 -24
- package/.docs/raw/workflows/error-handling.mdx +15 -17
- package/.docs/raw/workflows/human-in-the-loop.mdx +39 -39
- package/.docs/raw/workflows/inngest-workflow.mdx +33 -29
- package/.docs/raw/workflows/input-data-mapping.mdx +9 -9
- package/.docs/raw/workflows/overview.mdx +60 -60
- package/.docs/raw/workflows/snapshots.mdx +54 -36
- package/.docs/raw/workflows/suspend-and-resume.mdx +52 -57
- package/.docs/raw/workflows-legacy/control-flow.mdx +15 -17
- package/.docs/raw/workflows-legacy/dynamic-workflows.mdx +3 -1
- package/.docs/raw/workflows-legacy/error-handling.mdx +8 -6
- package/.docs/raw/workflows-legacy/nested-workflows.mdx +6 -0
- package/.docs/raw/workflows-legacy/overview.mdx +28 -26
- package/.docs/raw/workflows-legacy/runtime-variables.mdx +4 -2
- package/.docs/raw/workflows-legacy/steps.mdx +5 -3
- package/.docs/raw/workflows-legacy/suspend-and-resume.mdx +10 -8
- package/.docs/raw/workflows-legacy/variables.mdx +10 -8
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -148
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Monorepo Deployment
|
|
2
|
+
title: "Monorepo Deployment | Deployment | Mastra Docs"
|
|
3
3
|
description: Learn how to deploy Mastra applications that are part of a monorepo setup
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { FileTree } from "nextra/components";
|
|
7
|
-
|
|
8
6
|
# Monorepo Deployment
|
|
9
7
|
|
|
10
8
|
Deploying Mastra in a monorepo follows the same approach as deploying a standalone application. While some [Cloud](./cloud-providers/) or [Serverless Platform](./serverless-platforms/) providers may introduce extra requirements, the core setup is the same.
|
|
@@ -13,50 +11,42 @@ Deploying Mastra in a monorepo follows the same approach as deploying a standalo
|
|
|
13
11
|
|
|
14
12
|
In this example, the Mastra application is located at `apps/api`.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<FileTree.Folder name="ui" />
|
|
34
|
-
<FileTree.Folder name="utils" />
|
|
35
|
-
</FileTree.Folder>
|
|
36
|
-
<FileTree.File name="package.json" />
|
|
37
|
-
</FileTree>
|
|
14
|
+
```
|
|
15
|
+
apps/
|
|
16
|
+
├── api/
|
|
17
|
+
│ ├── src/
|
|
18
|
+
│ │ └── mastra/
|
|
19
|
+
│ │ ├── agents/
|
|
20
|
+
│ │ ├── tools/
|
|
21
|
+
│ │ ├── workflows/
|
|
22
|
+
│ │ └── index.ts
|
|
23
|
+
│ ├── package.json
|
|
24
|
+
│ └── tsconfig.json
|
|
25
|
+
└── web/
|
|
26
|
+
packages/
|
|
27
|
+
├── ui/
|
|
28
|
+
└── utils/
|
|
29
|
+
package.json
|
|
30
|
+
```
|
|
38
31
|
|
|
39
32
|
## Environment variables
|
|
40
33
|
|
|
41
34
|
Environment variables like `OPENAI_API_KEY` should be stored in an `.env` file at the root of the Mastra application `(apps/api)`, for example:
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</FileTree.Folder>
|
|
52
|
-
</FileTree>
|
|
53
|
-
|
|
36
|
+
```
|
|
37
|
+
api/
|
|
38
|
+
├── src/
|
|
39
|
+
│ └── mastra/
|
|
40
|
+
├── .env
|
|
41
|
+
├── package.json
|
|
42
|
+
└── tsconfig.json
|
|
43
|
+
```
|
|
54
44
|
|
|
55
45
|
## Deployment configuration
|
|
56
46
|
|
|
57
|
-
The image below shows how to select `apps/api` as the project root when deploying to [Mastra Cloud](../mastra-cloud/overview
|
|
47
|
+
The image below shows how to select `apps/api` as the project root when deploying to [Mastra Cloud](../mastra-cloud/overview). While the interface may differ between providers, the configuration remains the same.
|
|
58
48
|
|
|
59
|
-

|
|
60
50
|
|
|
61
51
|
## Dependency management
|
|
62
52
|
|
|
@@ -75,7 +65,7 @@ Common issues to watch for when deploying Mastra in a monorepo:
|
|
|
75
65
|
|
|
76
66
|
Use `transpilePackages` to compile TypeScript workspace packages or libraries. List package names exactly as they appear in each `package.json`. Use `externals` to exclude dependencies resolved at runtime, and `sourcemap` to emit readable stack traces.
|
|
77
67
|
|
|
78
|
-
```typescript
|
|
68
|
+
```typescript title="src/mastra/index.ts" showLineNumbers copy
|
|
79
69
|
import { Mastra } from "@mastra/core/mastra";
|
|
80
70
|
|
|
81
71
|
export const mastra = new Mastra({
|
|
@@ -83,12 +73,12 @@ export const mastra = new Mastra({
|
|
|
83
73
|
bundler: {
|
|
84
74
|
transpilePackages: ["utils"],
|
|
85
75
|
externals: ["ui"],
|
|
86
|
-
sourcemap: true
|
|
87
|
-
}
|
|
76
|
+
sourcemap: true,
|
|
77
|
+
},
|
|
88
78
|
});
|
|
89
79
|
```
|
|
90
80
|
|
|
91
|
-
> See [Mastra Class](
|
|
81
|
+
> See [Mastra Class](/reference/core/mastra-class) for more configuration options.
|
|
92
82
|
|
|
93
83
|
## Supported monorepos
|
|
94
84
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Deployment Overview
|
|
2
|
+
title: "Deployment Overview | Deployment | Mastra Docs"
|
|
3
3
|
description: Learn about different deployment options for your Mastra applications
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,12 +9,12 @@ Mastra offers multiple deployment options to suit your application's needs, from
|
|
|
9
9
|
|
|
10
10
|
## Choosing a Deployment Option
|
|
11
11
|
|
|
12
|
-
| Option | Best For | Key Benefits
|
|
13
|
-
| ------------------------ | ------------------------------------------------------------- |
|
|
14
|
-
| **Mastra Cloud** | Teams wanting to ship quickly without infrastructure concerns | Fully-managed, automatic scaling, built-in observability
|
|
15
|
-
| **Framework Deployment** | Teams already using Next.js, Astro etc
|
|
16
|
-
| **Server Deployment** | Teams needing maximum control and customization | Full control, custom middleware, integrate with existing apps
|
|
17
|
-
| **Serverless Platforms** | Teams already using Vercel, Netlify, or Cloudflare
|
|
12
|
+
| Option | Best For | Key Benefits |
|
|
13
|
+
| ------------------------ | ------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
14
|
+
| **Mastra Cloud** | Teams wanting to ship quickly without infrastructure concerns | Fully-managed, automatic scaling, built-in observability |
|
|
15
|
+
| **Framework Deployment** | Teams already using Next.js, Astro etc | Simplify deployment with a unified codebase for frontend and backend |
|
|
16
|
+
| **Server Deployment** | Teams needing maximum control and customization | Full control, custom middleware, integrate with existing apps |
|
|
17
|
+
| **Serverless Platforms** | Teams already using Vercel, Netlify, or Cloudflare | Platform integration, simplified deployment, automatic scaling |
|
|
18
18
|
|
|
19
19
|
## Deployment Options
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ Mastra offers multiple deployment options to suit your application's needs, from
|
|
|
23
23
|
- Node.js `v20.0` or higher
|
|
24
24
|
- Bun
|
|
25
25
|
- Deno
|
|
26
|
-
- [Cloudflare](../deployment/serverless-platforms/cloudflare-deployer
|
|
26
|
+
- [Cloudflare](../deployment/serverless-platforms/cloudflare-deployer)
|
|
27
27
|
|
|
28
28
|
### Mastra Cloud
|
|
29
29
|
|
|
@@ -35,18 +35,18 @@ Mastra Cloud is a deployment platform that connects to your GitHub repository, a
|
|
|
35
35
|
- Comprehensive logs and traces
|
|
36
36
|
- Custom domains for each project
|
|
37
37
|
|
|
38
|
-
[View Mastra Cloud documentation →](../mastra-cloud/overview
|
|
38
|
+
[View Mastra Cloud documentation →](../mastra-cloud/overview)
|
|
39
39
|
|
|
40
40
|
### With a Web Framework
|
|
41
41
|
|
|
42
42
|
Mastra can be integrated with a variety of web frameworks. For example, see one of the following for a detailed guide.
|
|
43
43
|
|
|
44
|
-
- [With Next.js](../frameworks/web-frameworks/next-js
|
|
45
|
-
- [With Astro](../frameworks/web-frameworks/astro
|
|
44
|
+
- [With Next.js](../frameworks/web-frameworks/next-js)
|
|
45
|
+
- [With Astro](../frameworks/web-frameworks/astro)
|
|
46
46
|
|
|
47
47
|
When integrated with a framework, Mastra typically requires no additional configuration for deployment.
|
|
48
48
|
|
|
49
|
-
[View Web Framework Integration →](./web-framework
|
|
49
|
+
[View Web Framework Integration →](./web-framework)
|
|
50
50
|
|
|
51
51
|
### With a Server
|
|
52
52
|
|
|
@@ -57,7 +57,7 @@ You can deploy Mastra as a standard Node.js HTTP server, which gives you full co
|
|
|
57
57
|
- Deploy to VMs, containers, or PaaS platforms
|
|
58
58
|
- Ideal for integrating with existing Node.js applications
|
|
59
59
|
|
|
60
|
-
[Server deployment guide →](./server-deployment
|
|
60
|
+
[Server deployment guide →](./server-deployment)
|
|
61
61
|
|
|
62
62
|
### Serverless Platforms
|
|
63
63
|
|
|
@@ -68,7 +68,7 @@ Mastra provides platform-specific deployers for popular serverless platforms, en
|
|
|
68
68
|
- Simplified deployment process
|
|
69
69
|
- Automatic scaling through the platform
|
|
70
70
|
|
|
71
|
-
[Serverless deployment guide →](./server-deployment
|
|
71
|
+
[Serverless deployment guide →](./server-deployment)
|
|
72
72
|
|
|
73
73
|
## Client Configuration
|
|
74
74
|
|
|
@@ -79,4 +79,4 @@ Once your Mastra application is deployed, you'll need to configure your client t
|
|
|
79
79
|
- Retries and error handling
|
|
80
80
|
- Support for streaming responses
|
|
81
81
|
|
|
82
|
-
[Client configuration guide →](
|
|
82
|
+
[Client configuration guide →](/docs/server-db/mastra-client)
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Deploy a Mastra Server"
|
|
2
|
+
title: "Deploy a Mastra Server | Deployment | Mastra Docs"
|
|
3
3
|
description: "Learn how to deploy a Mastra server with build settings and deployment options."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { FileTree } from "nextra/components";
|
|
7
|
-
|
|
8
6
|
# Deploy a Mastra Server
|
|
9
7
|
|
|
10
8
|
Mastra runs as a standard Node.js server and can be deployed across a wide range of environments.
|
|
@@ -13,18 +11,16 @@ Mastra runs as a standard Node.js server and can be deployed across a wide range
|
|
|
13
11
|
|
|
14
12
|
The [getting started guide](/docs/getting-started/installation) scaffolds a project with sensible defaults to help you begin quickly. By default, the CLI organizes application files under the `src/mastra/` directory, resulting in a structure similar to the following:
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<FileTree.File name="tsconfig.json" />
|
|
27
|
-
</FileTree>
|
|
14
|
+
```
|
|
15
|
+
src/
|
|
16
|
+
└── mastra/
|
|
17
|
+
├── agents/
|
|
18
|
+
├── tools/
|
|
19
|
+
├── workflows/
|
|
20
|
+
└── index.ts
|
|
21
|
+
package.json
|
|
22
|
+
tsconfig.json
|
|
23
|
+
```
|
|
28
24
|
|
|
29
25
|
## Building
|
|
30
26
|
|
|
@@ -48,8 +44,8 @@ The build process follows these steps:
|
|
|
48
44
|
|
|
49
45
|
1. **Locates entry file**: Finds `index.ts` or `index.js` in your specified directory (default: `src/mastra/`).
|
|
50
46
|
2. **Creates build directory**: Generates a `.mastra/` directory containing:
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
- **`.build`**: Contains dependency analysis, bundled dependencies, and build configuration files.
|
|
48
|
+
- **`output`**: Contains the production-ready application bundle with `index.mjs`, `instrumentation.mjs`, and project-specific files.
|
|
53
49
|
3. **Copies static assets**: Copies the `public/` folder contents to the `output` directory for serving static files.
|
|
54
50
|
4. **Bundles code**: Uses Rollup with tree shaking and source maps for optimization.
|
|
55
51
|
5. **Generates server**: Creates a [Hono](https://hono.dev) HTTP server ready for deployment.
|
|
@@ -58,12 +54,11 @@ The build process follows these steps:
|
|
|
58
54
|
|
|
59
55
|
After building, Mastra creates a `.mastra/` directory with the following structure:
|
|
60
56
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</FileTree>
|
|
57
|
+
```
|
|
58
|
+
.mastra/
|
|
59
|
+
├── .build/
|
|
60
|
+
└── output/
|
|
61
|
+
```
|
|
67
62
|
|
|
68
63
|
### `public` folder
|
|
69
64
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
2
|
+
title: "CloudflareDeployer | Deployment | Mastra Docs"
|
|
3
3
|
description: "Learn how to deploy a Mastra application to Cloudflare using the Mastra CloudflareDeployer"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { FileTree } from "nextra/components";
|
|
7
|
-
|
|
8
6
|
# CloudflareDeployer
|
|
9
7
|
|
|
10
|
-
The `CloudflareDeployer` class handles deployment of standalone Mastra applications to Cloudflare Workers. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/
|
|
8
|
+
The `CloudflareDeployer` class handles deployment of standalone Mastra applications to Cloudflare Workers. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/) class with Cloudflare specific functionality.
|
|
11
9
|
|
|
12
10
|
## Installation
|
|
13
11
|
|
|
@@ -17,7 +15,7 @@ npm install @mastra/deployer-cloudflare@latest
|
|
|
17
15
|
|
|
18
16
|
## Usage example
|
|
19
17
|
|
|
20
|
-
```typescript
|
|
18
|
+
```typescript title="src/mastra/index.ts" showLineNumbers copy
|
|
21
19
|
import { Mastra } from "@mastra/core/mastra";
|
|
22
20
|
import { CloudflareDeployer } from "@mastra/deployer-cloudflare";
|
|
23
21
|
|
|
@@ -56,15 +54,13 @@ npm run build && wrangler deploy --config .mastra/output/wrangler.json
|
|
|
56
54
|
|
|
57
55
|
The build output for Mastra applications using the `CloudflareDeployer` includes all agents, tools, and workflows in your project, along with Mastra specific files required to run your application on Cloudflare.
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<FileTree.File name="package.json" />
|
|
67
|
-
</FileTree>
|
|
57
|
+
```
|
|
58
|
+
.mastra/
|
|
59
|
+
└── output/
|
|
60
|
+
├── index.mjs
|
|
61
|
+
└── wrangler.json
|
|
62
|
+
package.json
|
|
63
|
+
```
|
|
68
64
|
|
|
69
65
|
The `CloudflareDeployer` automatically generates a `wrangler.json` configuration file in `.mastra/output` with the following settings:
|
|
70
66
|
|
|
@@ -73,15 +69,18 @@ The `CloudflareDeployer` automatically generates a `wrangler.json` configuration
|
|
|
73
69
|
"name": "hello-mastra",
|
|
74
70
|
"main": "./index.mjs",
|
|
75
71
|
"compatibility_date": "2025-04-01",
|
|
76
|
-
"compatibility_flags": [
|
|
72
|
+
"compatibility_flags": [
|
|
73
|
+
"nodejs_compat",
|
|
74
|
+
"nodejs_compat_populate_process_env"
|
|
75
|
+
],
|
|
77
76
|
"observability": { "logs": { "enabled": true } },
|
|
78
77
|
"vars": {
|
|
79
78
|
"OPENAI_API_KEY": "...",
|
|
80
79
|
"CLOUDFLARE_API_TOKEN": "..."
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
|
-
|
|
84
82
|
```
|
|
83
|
+
|
|
85
84
|
## Next steps
|
|
86
85
|
|
|
87
|
-
- [Mastra Client SDK](/
|
|
86
|
+
- [Mastra Client SDK](/reference/client-js/mastra-client)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Serverless Deployment"
|
|
2
|
+
title: "Serverless Deployment | Deployment | Mastra Docs"
|
|
3
3
|
description: "Build and deploy Mastra applications using platform-specific deployers or standard HTTP servers"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ Standalone Mastra applications can be deployed to popular serverless platforms u
|
|
|
13
13
|
|
|
14
14
|
Deployers **aren't** required when integrating Mastra with a framework. See [Web Framework Integration](/docs/deployment/web-framework) for more information.
|
|
15
15
|
|
|
16
|
-
For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/deployment/server) guide.
|
|
16
|
+
For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/deployment/server-deployment) guide.
|
|
17
17
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
@@ -30,23 +30,26 @@ Before you begin, ensure you have:
|
|
|
30
30
|
|
|
31
31
|
Specifically, ensure you've removed it from both `src/mastra/index.ts` and `src/mastra/agents/weather-agent.ts`:
|
|
32
32
|
|
|
33
|
-
```typescript
|
|
33
|
+
```typescript title="src/mastra/index.ts" showLineNumbers
|
|
34
34
|
export const mastra = new Mastra({
|
|
35
35
|
// ...
|
|
36
|
-
storage: new LibSQLStore({
|
|
36
|
+
storage: new LibSQLStore({
|
|
37
|
+
// [!code --]
|
|
37
38
|
// stores telemetry, evals, ... into memory storage, if it needs to persist, change to file:../mastra.db // [!code --]
|
|
38
39
|
url: ":memory:", // [!code --]
|
|
39
|
-
})//[!code --]
|
|
40
|
+
}), //[!code --]
|
|
40
41
|
});
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
```typescript
|
|
44
|
+
```typescript title="src/mastra/agents/weather-agent.ts" showLineNumbers
|
|
44
45
|
export const weatherAgent = new Agent({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
// ..
|
|
47
|
+
memory: new Memory({
|
|
48
|
+
// [!code --]
|
|
49
|
+
storage: new LibSQLStore({
|
|
50
|
+
// [!code --]
|
|
51
|
+
url: "file:../mastra.db", // path is relative to the .mastra/output directory // [!code --]
|
|
52
|
+
}), // [!code --]
|
|
53
|
+
}), // [!code --]
|
|
51
54
|
});
|
|
52
55
|
```
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
2
|
+
title: "NetlifyDeployer | Deployment | Mastra Docs"
|
|
3
3
|
description: "Learn how to deploy a Mastra application to Netlify using the Mastra NetlifyDeployer"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { FileTree } from "nextra/components";
|
|
7
|
-
|
|
8
6
|
# NetlifyDeployer
|
|
9
7
|
|
|
10
|
-
The `NetlifyDeployer` class handles deployment of standalone Mastra applications to Netlify. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/
|
|
8
|
+
The `NetlifyDeployer` class handles deployment of standalone Mastra applications to Netlify. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/) class with Netlify specific functionality.
|
|
11
9
|
|
|
12
10
|
## Installation
|
|
13
11
|
|
|
@@ -17,13 +15,13 @@ npm install @mastra/deployer-netlify@latest
|
|
|
17
15
|
|
|
18
16
|
## Usage example
|
|
19
17
|
|
|
20
|
-
```typescript
|
|
18
|
+
```typescript title="src/mastra/index.ts" showLineNumbers copy
|
|
21
19
|
import { Mastra } from "@mastra/core/mastra";
|
|
22
20
|
import { NetlifyDeployer } from "@mastra/deployer-netlify";
|
|
23
21
|
|
|
24
22
|
export const mastra = new Mastra({
|
|
25
23
|
// ...
|
|
26
|
-
deployer: new NetlifyDeployer()
|
|
24
|
+
deployer: new NetlifyDeployer(),
|
|
27
25
|
});
|
|
28
26
|
```
|
|
29
27
|
|
|
@@ -41,10 +39,8 @@ Before your first deployment, make sure to add any environment variables used by
|
|
|
41
39
|
|
|
42
40
|
> See [Environment variables overview](https://docs.netlify.com/environment-variables/overview/) for more details.
|
|
43
41
|
|
|
44
|
-
|
|
45
42
|
Your project is now configured with automatic deployments which occur whenever you push to the configured branch of your GitHub repository.
|
|
46
43
|
|
|
47
|
-
|
|
48
44
|
## Manual deployment
|
|
49
45
|
|
|
50
46
|
Manual deployments are also possible using the [Netlify CLI](https://docs.netlify.com/cli/get-started/). With the Netlify CLI installed run the following from your project root to deploy your application.
|
|
@@ -59,20 +55,15 @@ netlify deploy --prod
|
|
|
59
55
|
|
|
60
56
|
The build output for Mastra applications using the `NetlifyDeployer` includes all agents, tools, and workflows in your project, along with Mastra specific files required to run your application on Netlify.
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
</FileTree.Folder>
|
|
72
|
-
</FileTree.Folder>
|
|
73
|
-
<FileTree.File name="package.json" />
|
|
74
|
-
</FileTree>
|
|
75
|
-
|
|
58
|
+
```
|
|
59
|
+
.netlify/
|
|
60
|
+
└── v1/
|
|
61
|
+
├── functions/
|
|
62
|
+
│ └── api/
|
|
63
|
+
│ └── index.mjs
|
|
64
|
+
└── config.json
|
|
65
|
+
package.json
|
|
66
|
+
```
|
|
76
67
|
|
|
77
68
|
The `NetlifyDeployer` automatically generates a `config.json` configuration file in `.netlify/v1` with the following settings:
|
|
78
69
|
|
|
@@ -91,4 +82,4 @@ The `NetlifyDeployer` automatically generates a `config.json` configuration file
|
|
|
91
82
|
|
|
92
83
|
## Next steps
|
|
93
84
|
|
|
94
|
-
- [Mastra Client SDK](/
|
|
85
|
+
- [Mastra Client SDK](/reference/client-js/mastra-client)
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
2
|
+
title: "VercelDeployer | Deployment | Mastra Docs"
|
|
3
3
|
description: "Learn how to deploy a Mastra application to Vercel using the Mastra VercelDeployer"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { FileTree } from "nextra/components";
|
|
7
|
-
|
|
8
6
|
# VercelDeployer
|
|
9
7
|
|
|
10
|
-
The `VercelDeployer` class handles deployment of standalone Mastra applications to Vercel. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/
|
|
8
|
+
The `VercelDeployer` class handles deployment of standalone Mastra applications to Vercel. It manages configuration, deployment, and extends the base [Deployer](/reference/deployer/) class with Vercel specific functionality.
|
|
11
9
|
|
|
12
10
|
## Installation
|
|
13
11
|
|
|
@@ -17,13 +15,13 @@ npm install @mastra/deployer-vercel@latest
|
|
|
17
15
|
|
|
18
16
|
## Usage example
|
|
19
17
|
|
|
20
|
-
```typescript
|
|
18
|
+
```typescript title="src/mastra/index.ts" showLineNumbers copy
|
|
21
19
|
import { Mastra } from "@mastra/core/mastra";
|
|
22
20
|
import { VercelDeployer } from "@mastra/deployer-vercel";
|
|
23
21
|
|
|
24
22
|
export const mastra = new Mastra({
|
|
25
23
|
// ...
|
|
26
|
-
deployer: new VercelDeployer()
|
|
24
|
+
deployer: new VercelDeployer(),
|
|
27
25
|
});
|
|
28
26
|
```
|
|
29
27
|
|
|
@@ -39,12 +37,12 @@ The Vercel deployer can write a few high‑value settings into the Vercel Output
|
|
|
39
37
|
|
|
40
38
|
Example:
|
|
41
39
|
|
|
42
|
-
```ts
|
|
40
|
+
```ts title="src/mastra/index.ts" showLineNumbers copy
|
|
43
41
|
deployer: new VercelDeployer({
|
|
44
42
|
maxDuration: 600,
|
|
45
43
|
memory: 1536,
|
|
46
44
|
regions: ["sfo1", "iad1"],
|
|
47
|
-
})
|
|
45
|
+
});
|
|
48
46
|
```
|
|
49
47
|
|
|
50
48
|
## Continuous integration
|
|
@@ -75,20 +73,15 @@ npm run build && vercel --prod --prebuilt --archive=tgz
|
|
|
75
73
|
|
|
76
74
|
The build output for Mastra applications using the `VercelDeployer` includes all agents, tools, and workflows in your project, along with Mastra specific files required to run your application on Vercel.
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</FileTree.Folder>
|
|
88
|
-
</FileTree.Folder>
|
|
89
|
-
<FileTree.File name="package.json" />
|
|
90
|
-
</FileTree>
|
|
91
|
-
|
|
76
|
+
```
|
|
77
|
+
.vercel/
|
|
78
|
+
├── output/
|
|
79
|
+
│ ├── functions/
|
|
80
|
+
│ │ └── index.func/
|
|
81
|
+
│ │ └── index.mjs
|
|
82
|
+
│ └── config.json
|
|
83
|
+
└── package.json
|
|
84
|
+
```
|
|
92
85
|
|
|
93
86
|
The `VercelDeployer` automatically generates a `config.json` configuration file in `.vercel/output` with the following settings:
|
|
94
87
|
|
|
@@ -106,4 +99,4 @@ The `VercelDeployer` automatically generates a `config.json` configuration file
|
|
|
106
99
|
|
|
107
100
|
## Next steps
|
|
108
101
|
|
|
109
|
-
- [Mastra Client SDK](/
|
|
102
|
+
- [Mastra Client SDK](/reference/client-js/mastra-client)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
2
|
+
title: "Web Framework Integration | Deployment | Mastra Docs"
|
|
3
3
|
description: "Learn how Mastra can be deployed when integrated with a Web Framework"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -16,9 +16,9 @@ When integrated with a framework, Mastra typically requires no additional config
|
|
|
16
16
|
|
|
17
17
|
If you've integrated Mastra with Next.js [by following our guide](/docs/frameworks/web-frameworks/next-js) and plan to deploy to Vercel, no additional setup is required.
|
|
18
18
|
|
|
19
|
-
The only thing to verify is that you've added the following to your `next.config.ts` and removed any usage of [LibSQLStore](/docs/deployment/
|
|
19
|
+
The only thing to verify is that you've added the following to your `next.config.ts` and removed any usage of [LibSQLStore](/docs/deployment/overview), which is not supported in serverless environments:
|
|
20
20
|
|
|
21
|
-
```typescript {4}
|
|
21
|
+
```typescript {4} title="next.config.ts" showLineNumbers copy
|
|
22
22
|
import type { NextConfig } from "next";
|
|
23
23
|
|
|
24
24
|
const nextConfig: NextConfig = {
|
|
@@ -32,32 +32,32 @@ export default nextConfig;
|
|
|
32
32
|
|
|
33
33
|
If you've integrated Mastra with Astro [by following our guide](/docs/frameworks/web-frameworks/astro) and plan to deploy to Vercel, no additional setup is required.
|
|
34
34
|
|
|
35
|
-
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/deployment/
|
|
35
|
+
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/deployment/overview), which is not supported in serverless environments:
|
|
36
36
|
|
|
37
|
-
```javascript {2,6,7}
|
|
38
|
-
import { defineConfig } from
|
|
39
|
-
import vercel from
|
|
37
|
+
```javascript {2,6,7} title="astro.config.mjs" showLineNumbers copy
|
|
38
|
+
import { defineConfig } from "astro/config";
|
|
39
|
+
import vercel from "@astrojs/vercel";
|
|
40
40
|
|
|
41
41
|
export default defineConfig({
|
|
42
42
|
// ...
|
|
43
43
|
adapter: vercel(),
|
|
44
|
-
output: "server"
|
|
44
|
+
output: "server",
|
|
45
45
|
});
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
## With Astro on Netlify
|
|
49
49
|
|
|
50
|
-
If you've integrated Mastra with Astro [by following our guide](/docs/frameworks/web-frameworks/astro) and plan to deploy to
|
|
50
|
+
If you've integrated Mastra with Astro [by following our guide](/docs/frameworks/web-frameworks/astro) and plan to deploy to Netlify, no additional setup is required.
|
|
51
51
|
|
|
52
|
-
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/deployment/
|
|
52
|
+
The only thing to verify is that you've added the following to your `astro.config.mjs` and removed any usage of [LibSQLStore](/docs/deployment/overview), which is not supported in serverless environments:
|
|
53
53
|
|
|
54
|
-
```javascript {2,6,7}
|
|
55
|
-
import { defineConfig } from
|
|
56
|
-
import
|
|
54
|
+
```javascript {2,6,7} title="astro.config.mjs" showLineNumbers copy
|
|
55
|
+
import { defineConfig } from "astro/config";
|
|
56
|
+
import netlify from "@astrojs/netlify";
|
|
57
57
|
|
|
58
58
|
export default defineConfig({
|
|
59
59
|
// ...
|
|
60
60
|
adapter: netlify(),
|
|
61
|
-
output: "server"
|
|
61
|
+
output: "server",
|
|
62
62
|
});
|
|
63
63
|
```
|