@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,21 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "AWS Lambda"
|
|
2
|
+
title: "AWS Lambda | Deployment | Mastra Docs"
|
|
3
3
|
description: "Deploy your Mastra applications to AWS Lambda using Docker containers and the AWS Lambda Web Adapter."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import Steps from "@site/src/components/Steps";
|
|
7
|
+
import StepItem from "@site/src/components/StepItem";
|
|
7
8
|
|
|
8
9
|
# AWS Lambda
|
|
9
10
|
|
|
10
11
|
Deploy your Mastra applications to AWS Lambda using Docker containers and the AWS Lambda Web Adapter.
|
|
11
12
|
This approach allows you to run your Mastra server as a containerized Lambda function with automatic scaling.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
:::note
|
|
15
|
+
This guide assumes your Mastra application has been created using the default
|
|
16
|
+
`npx create-mastra@latest` command.
|
|
17
|
+
For more information on how to create a new Mastra application,
|
|
18
|
+
refer to our [getting started guide](/docs/getting-started/installation)
|
|
19
|
+
:::
|
|
19
20
|
|
|
20
21
|
## Prerequisites
|
|
21
22
|
|
|
@@ -28,18 +29,18 @@ Before deploying to AWS Lambda, ensure you have:
|
|
|
28
29
|
|
|
29
30
|
## Memory Configuration
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
:::note
|
|
33
|
+
AWS Lambda uses an ephemeral file system,
|
|
34
|
+
meaning that any files written to the file system are short-lived and may be lost.
|
|
35
|
+
Avoid using a Mastra storage provider that uses the file system,
|
|
36
|
+
such as `LibSQLStore` with a file URL.
|
|
37
|
+
:::
|
|
37
38
|
|
|
38
39
|
Lambda functions have limitations with file system storage. Configure your Mastra application to use either in-memory or external storage providers:
|
|
39
40
|
|
|
40
41
|
### Option 1: In-Memory (Simplest)
|
|
41
42
|
|
|
42
|
-
```typescript
|
|
43
|
+
```typescript title="src/mastra/index.ts" copy showLineNumbers
|
|
43
44
|
import { LibSQLStore } from "@mastra/libsql";
|
|
44
45
|
|
|
45
46
|
const storage = new LibSQLStore({
|
|
@@ -51,7 +52,7 @@ const storage = new LibSQLStore({
|
|
|
51
52
|
|
|
52
53
|
For persistent memory across Lambda invocations, use external storage providers like `LibSQLStore` with Turso or other storage providers like `PostgreStore`:
|
|
53
54
|
|
|
54
|
-
```typescript
|
|
55
|
+
```typescript title="src/mastra/index.ts" copy showLineNumbers
|
|
55
56
|
import { LibSQLStore } from "@mastra/libsql";
|
|
56
57
|
|
|
57
58
|
const storage = new LibSQLStore({
|
|
@@ -66,7 +67,7 @@ For more memory configuration options, see the [Memory documentation](/docs/memo
|
|
|
66
67
|
|
|
67
68
|
Create a `Dockerfile` in your Mastra project root directory:
|
|
68
69
|
|
|
69
|
-
```dockerfile
|
|
70
|
+
```dockerfile title="Dockerfile" copy showLineNumbers
|
|
70
71
|
FROM node:22-alpine
|
|
71
72
|
|
|
72
73
|
WORKDIR /app
|
|
@@ -96,7 +97,7 @@ CMD ["node", "--import=./.mastra/output/instrumentation.mjs", ".mastra/output/in
|
|
|
96
97
|
|
|
97
98
|
<Steps>
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
<StepItem>
|
|
100
101
|
|
|
101
102
|
Set up your environment variables for the deployment process:
|
|
102
103
|
|
|
@@ -106,7 +107,9 @@ export AWS_REGION="us-east-1"
|
|
|
106
107
|
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
|
|
107
108
|
```
|
|
108
109
|
|
|
109
|
-
|
|
110
|
+
</StepItem>
|
|
111
|
+
|
|
112
|
+
<StepItem>
|
|
110
113
|
|
|
111
114
|
Build your Docker image locally:
|
|
112
115
|
|
|
@@ -114,7 +117,9 @@ Build your Docker image locally:
|
|
|
114
117
|
docker build -t "$PROJECT_NAME" .
|
|
115
118
|
```
|
|
116
119
|
|
|
117
|
-
|
|
120
|
+
</StepItem>
|
|
121
|
+
|
|
122
|
+
<StepItem>
|
|
118
123
|
|
|
119
124
|
Create an Amazon ECR repository to store your Docker image:
|
|
120
125
|
|
|
@@ -122,7 +127,9 @@ Create an Amazon ECR repository to store your Docker image:
|
|
|
122
127
|
aws ecr create-repository --repository-name "$PROJECT_NAME" --region "$AWS_REGION"
|
|
123
128
|
```
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
</StepItem>
|
|
131
|
+
|
|
132
|
+
<StepItem>
|
|
126
133
|
|
|
127
134
|
Log in to Amazon ECR:
|
|
128
135
|
|
|
@@ -130,7 +137,9 @@ Log in to Amazon ECR:
|
|
|
130
137
|
aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS --password-stdin "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com"
|
|
131
138
|
```
|
|
132
139
|
|
|
133
|
-
|
|
140
|
+
</StepItem>
|
|
141
|
+
|
|
142
|
+
<StepItem>
|
|
134
143
|
|
|
135
144
|
Tag your image with the ECR repository URI and push it:
|
|
136
145
|
|
|
@@ -139,7 +148,9 @@ docker tag "$PROJECT_NAME":latest "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws
|
|
|
139
148
|
docker push "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$PROJECT_NAME":latest
|
|
140
149
|
```
|
|
141
150
|
|
|
142
|
-
|
|
151
|
+
</StepItem>
|
|
152
|
+
|
|
153
|
+
<StepItem>
|
|
143
154
|
|
|
144
155
|
Create a Lambda function using the AWS Console:
|
|
145
156
|
|
|
@@ -151,7 +162,9 @@ Create a Lambda function using the AWS Console:
|
|
|
151
162
|
- **Container image URI**: Click **Browse images** and select your ECR repository, then choose the `latest` tag
|
|
152
163
|
- **Architecture**: Select the architecture that matches your Docker build (typically `x86_64`)
|
|
153
164
|
|
|
154
|
-
|
|
165
|
+
</StepItem>
|
|
166
|
+
|
|
167
|
+
<StepItem>
|
|
155
168
|
|
|
156
169
|
Enable Function URL for external access:
|
|
157
170
|
|
|
@@ -164,7 +177,9 @@ Enable Function URL for external access:
|
|
|
164
177
|
- **Allow-Methods**: `*` (audit and restrict in production)
|
|
165
178
|
5. Click **Save**
|
|
166
179
|
|
|
167
|
-
|
|
180
|
+
</StepItem>
|
|
181
|
+
|
|
182
|
+
<StepItem>
|
|
168
183
|
|
|
169
184
|
Add your environment variables in the Lambda function configuration:
|
|
170
185
|
|
|
@@ -175,7 +190,9 @@ Add your environment variables in the Lambda function configuration:
|
|
|
175
190
|
- `TURSO_AUTH_TOKEN`: Your Turso auth token (if using LibSQL with Turso)
|
|
176
191
|
- Other provider-specific API keys as needed
|
|
177
192
|
|
|
178
|
-
|
|
193
|
+
</StepItem>
|
|
194
|
+
|
|
195
|
+
<StepItem>
|
|
179
196
|
|
|
180
197
|
Configure the function's memory and timeout settings:
|
|
181
198
|
|
|
@@ -185,6 +202,8 @@ Configure the function's memory and timeout settings:
|
|
|
185
202
|
- **Timeout**: 30 seconds (adjust based on your application needs)
|
|
186
203
|
- **Ephemeral storage**: 512 MB (optional, for temporary files)
|
|
187
204
|
|
|
205
|
+
</StepItem>
|
|
206
|
+
|
|
188
207
|
</Steps>
|
|
189
208
|
|
|
190
209
|
## Testing your deployment
|
|
@@ -195,13 +214,13 @@ Once deployed, test your Lambda function:
|
|
|
195
214
|
2. Visit the URL in your browser to see your Mastra's server home screen
|
|
196
215
|
3. Test your agents and workflows using the generated API endpoints
|
|
197
216
|
|
|
198
|
-
For more information about available API endpoints, see the [Server documentation](/docs/deployment/server).
|
|
217
|
+
For more information about available API endpoints, see the [Server documentation](/docs/deployment/server-deployment).
|
|
199
218
|
|
|
200
219
|
## Connecting your client
|
|
201
220
|
|
|
202
221
|
Update your client application to use the Lambda function URL:
|
|
203
222
|
|
|
204
|
-
```typescript
|
|
223
|
+
```typescript title="src/client.ts" copy showLineNumbers
|
|
205
224
|
import { MastraClient } from "@mastra/client-js";
|
|
206
225
|
|
|
207
226
|
const mastraClient = new MastraClient({
|
|
@@ -268,6 +287,6 @@ For production deployments:
|
|
|
268
287
|
|
|
269
288
|
## Next steps
|
|
270
289
|
|
|
271
|
-
- [Mastra Client SDK](/
|
|
290
|
+
- [Mastra Client SDK](/reference/client-js/mastra-client)
|
|
272
291
|
- [AWS Lambda documentation](https://docs.aws.amazon.com/lambda/)
|
|
273
292
|
- [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter)
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Azure App Services"
|
|
2
|
+
title: "Azure App Services | Deployment | Mastra Docs"
|
|
3
3
|
description: "Deploy your Mastra applications to Azure App Services."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import Steps from "@site/src/components/Steps";
|
|
7
|
+
import StepItem from "@site/src/components/StepItem";
|
|
7
8
|
|
|
8
9
|
# Azure App Services
|
|
9
10
|
|
|
10
11
|
Deploy your Mastra applications to Azure App Services.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
:::note
|
|
14
|
+
This guide assumes your Mastra application has been created using the default
|
|
15
|
+
`npx create-mastra@latest` command.
|
|
16
|
+
For more information on how to create a new Mastra application,
|
|
17
|
+
refer to our [getting started guide](/docs/getting-started/installation)
|
|
18
|
+
:::
|
|
18
19
|
|
|
19
20
|
## Prerequisites
|
|
20
21
|
|
|
@@ -26,14 +27,20 @@ Deploy your Mastra applications to Azure App Services.
|
|
|
26
27
|
|
|
27
28
|
<Steps>
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
<StepItem>
|
|
31
|
+
|
|
32
|
+
Create a new App service:
|
|
30
33
|
|
|
31
34
|
- Log in to the [Azure Portal](https://portal.azure.com)
|
|
32
35
|
- Navigate to **[App Services](https://docs.microsoft.com/en-us/azure/app-service/)** or search for it in the top search bar
|
|
33
36
|
- Click **Create** to create a new App Service
|
|
34
37
|
- In the drop-down, select **Web App**
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
</StepItem>
|
|
40
|
+
|
|
41
|
+
<StepItem>
|
|
42
|
+
|
|
43
|
+
Configure app service settings:
|
|
37
44
|
|
|
38
45
|
- **Subscription**: Select your Azure subscription
|
|
39
46
|
- **Resource Group**: Create a new resource group or select an existing one
|
|
@@ -46,12 +53,18 @@ Deploy your Mastra applications to Azure App Services.
|
|
|
46
53
|
- Click **Review + Create**
|
|
47
54
|
- Wait for validation to complete, then click **Create**
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
</StepItem>
|
|
57
|
+
|
|
58
|
+
<StepItem>
|
|
59
|
+
|
|
60
|
+
Wait for deployment:
|
|
50
61
|
|
|
51
62
|
- Wait for the deployment to complete
|
|
52
63
|
- Once finished, click **Go to resource** under the next steps section
|
|
53
64
|
|
|
54
|
-
|
|
65
|
+
</StepItem>
|
|
66
|
+
|
|
67
|
+
<StepItem>
|
|
55
68
|
|
|
56
69
|
Before setting up deployment, configure your environment variables:
|
|
57
70
|
|
|
@@ -62,7 +75,11 @@ Before setting up deployment, configure your environment variables:
|
|
|
62
75
|
- Any other configuration values your Mastra application requires
|
|
63
76
|
- Click **Apply** to save the changes
|
|
64
77
|
|
|
65
|
-
|
|
78
|
+
</StepItem>
|
|
79
|
+
|
|
80
|
+
<StepItem>
|
|
81
|
+
|
|
82
|
+
Setup GitHub deployment:
|
|
66
83
|
|
|
67
84
|
- Navigate to **Deployment Center** in the left sidebar
|
|
68
85
|
- Select **GitHub** as your source
|
|
@@ -72,14 +89,16 @@ Before setting up deployment, configure your environment variables:
|
|
|
72
89
|
- Azure will generate a GitHub workflow file and you can preview it before proceeding
|
|
73
90
|
- Click **Save** (the save button is located at the top of the page)
|
|
74
91
|
|
|
75
|
-
|
|
92
|
+
</StepItem>
|
|
76
93
|
|
|
77
|
-
<
|
|
78
|
-
The default workflow generated by Azure will fail for Mastra applications and needs to be modified.
|
|
79
|
-
</Callout>
|
|
94
|
+
<StepItem>
|
|
80
95
|
|
|
81
96
|
After Azure creates the workflow, it will trigger a GitHub Actions run and merge the workflow file into your branch. **Cancel this initial run** as it will fail without the necessary modifications.
|
|
82
97
|
|
|
98
|
+
:::warning
|
|
99
|
+
The default workflow generated by Azure will fail for Mastra applications and needs to be modified.
|
|
100
|
+
:::
|
|
101
|
+
|
|
83
102
|
Pull the latest changes to your local repository and modify the generated workflow file (`.github/workflows/main_<your-app-name>.yml`):
|
|
84
103
|
|
|
85
104
|
1. **Update the build step**: Find the step named "npm install, build, and test" and:
|
|
@@ -94,25 +113,35 @@ Pull the latest changes to your local repository and modify the generated workfl
|
|
|
94
113
|
|
|
95
114
|
This ensures only the build outputs from `.mastra/output` are included in the deployment package.
|
|
96
115
|
|
|
97
|
-
|
|
116
|
+
</StepItem>
|
|
117
|
+
|
|
118
|
+
<StepItem>
|
|
119
|
+
|
|
120
|
+
Deploy your changes:
|
|
98
121
|
|
|
99
122
|
- Commit and push your workflow modifications
|
|
100
123
|
- The build will be automatically triggered in the **Deployment Center** in your Azure dashboard
|
|
101
124
|
- Monitor the deployment progress until it completes successfully
|
|
102
125
|
|
|
103
|
-
|
|
126
|
+
</StepItem>
|
|
127
|
+
|
|
128
|
+
<StepItem>
|
|
129
|
+
|
|
130
|
+
Access your deployed application:
|
|
104
131
|
|
|
105
132
|
- Once the build is successful, wait a few moments for the application to start
|
|
106
133
|
- Access your deployed application using the default URL provided in the **Overview** tab in the Azure portal
|
|
107
134
|
- Your application will be available at `https://<your-app-name>.azurewebsites.net`
|
|
108
135
|
|
|
136
|
+
</StepItem>
|
|
137
|
+
|
|
109
138
|
</Steps>
|
|
110
139
|
|
|
111
140
|
## Connect to your Mastra server
|
|
112
141
|
|
|
113
142
|
You can now connect to your Mastra server from your client application using a `MastraClient` from the `@mastra/client-js` package.
|
|
114
143
|
|
|
115
|
-
Refer to the [`MastraClient` documentation](/
|
|
144
|
+
Refer to the [`MastraClient` documentation](/reference/client-js/mastra-client) for more information.
|
|
116
145
|
|
|
117
146
|
```typescript copy showLineNumbers
|
|
118
147
|
import { MastraClient } from "@mastra/client-js";
|
|
@@ -122,16 +151,15 @@ const mastraClient = new MastraClient({
|
|
|
122
151
|
});
|
|
123
152
|
```
|
|
124
153
|
|
|
125
|
-
|
|
154
|
+
:::note
|
|
126
155
|
Azure App Services uses an ephemeral file system for some pricing tiers.
|
|
127
156
|
For production applications, avoid using Mastra storage providers that rely on the local file system,
|
|
128
157
|
such as `LibSQLStore` with a file URL. Consider using cloud-based storage solutions instead.
|
|
129
|
-
|
|
158
|
+
:::
|
|
130
159
|
|
|
131
160
|
## Next steps
|
|
132
161
|
|
|
133
|
-
- [Mastra Client SDK](/
|
|
162
|
+
- [Mastra Client SDK](/reference/client-js/mastra-client)
|
|
134
163
|
- [Configure custom domains](https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain)
|
|
135
164
|
- [Enable HTTPS](https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-bindings)
|
|
136
165
|
- [Azure App Service documentation](https://docs.microsoft.com/en-us/azure/app-service/)
|
|
137
|
-
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Digital Ocean"
|
|
2
|
+
title: "Digital Ocean | Deployment | Mastra Docs"
|
|
3
3
|
description: "Deploy your Mastra applications to Digital Ocean."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import Steps from "@site/src/components/Steps";
|
|
7
|
+
import StepItem from "@site/src/components/StepItem";
|
|
8
|
+
import Tabs from "@theme/Tabs";
|
|
9
|
+
import TabItem from "@theme/TabItem";
|
|
7
10
|
|
|
8
11
|
# Digital Ocean
|
|
9
12
|
|
|
10
13
|
Deploy your Mastra applications to Digital Ocean's App Platform and Droplets.
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
:::note
|
|
16
|
+
This guide assumes your Mastra application has been created using the default
|
|
17
|
+
`npx create-mastra@latest` command.
|
|
18
|
+
For more information on how to create a new Mastra application,
|
|
19
|
+
refer to our [getting started guide](./../../getting-started/installation)
|
|
20
|
+
:::
|
|
18
21
|
|
|
19
|
-
<Tabs
|
|
22
|
+
<Tabs>
|
|
20
23
|
|
|
21
|
-
<
|
|
24
|
+
<TabItem value="app-platform" label="App Platform">
|
|
22
25
|
|
|
23
26
|
## App Platform
|
|
24
27
|
|
|
25
|
-
### Prerequisites
|
|
28
|
+
### Prerequisites
|
|
26
29
|
|
|
27
30
|
- A Git repository containing your Mastra application. This can be a [GitHub](https://github.com/) repository, [GitLab](https://gitlab.com/) repository, or any other compatible source provider.
|
|
28
31
|
- A [Digital Ocean account](https://www.digitalocean.com/)
|
|
@@ -31,45 +34,47 @@ Deploy your Mastra applications to Digital Ocean's App Platform and Droplets.
|
|
|
31
34
|
|
|
32
35
|
<Steps>
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
<StepItem>
|
|
38
|
+
|
|
39
|
+
Create a new App
|
|
35
40
|
|
|
36
41
|
- Log in to your [Digital Ocean dashboard](https://cloud.digitalocean.com/).
|
|
37
42
|
- Navigate to the [App Platform](https://docs.digitalocean.com/products/app-platform/) service.
|
|
38
43
|
- Select your source provider and create a new app.
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
</StepItem>
|
|
46
|
+
|
|
47
|
+
<StepItem>
|
|
48
|
+
|
|
49
|
+
Configure Deployment Source
|
|
41
50
|
|
|
42
51
|
- Connect and select your repository. You may also choose a container image or a sample app.
|
|
43
52
|
- Select the branch you want to deploy from.
|
|
44
53
|
- Configure the source directory if necessary. If your Mastra application uses the default directory structure, no action is required here.
|
|
45
54
|
- Head to the next step.
|
|
46
55
|
|
|
47
|
-
|
|
56
|
+
</StepItem>
|
|
57
|
+
|
|
58
|
+
<StepItem>
|
|
59
|
+
|
|
60
|
+
Configure Resource Settings and Environment Variables
|
|
48
61
|
|
|
49
62
|
- A Node.js build should be detected automatically.
|
|
50
63
|
- **Configure Build Command**: You need to add a custom build command for the app platform to build your Mastra project successfully. Set the build command based on your package manager:
|
|
51
64
|
|
|
52
|
-
<Tabs
|
|
53
|
-
<
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
yarn build
|
|
66
|
-
```
|
|
67
|
-
</Tabs.Tab>
|
|
68
|
-
<Tabs.Tab>
|
|
69
|
-
```
|
|
70
|
-
bun run build
|
|
71
|
-
```
|
|
72
|
-
</Tabs.Tab>
|
|
65
|
+
<Tabs>
|
|
66
|
+
<TabItem value="npm" label="npm">
|
|
67
|
+
``` npm run build ```
|
|
68
|
+
</TabItem>
|
|
69
|
+
<TabItem value="pnpm" label="pnpm">
|
|
70
|
+
``` pnpm build ```
|
|
71
|
+
</TabItem>
|
|
72
|
+
<TabItem value="yarn" label="yarn">
|
|
73
|
+
``` yarn build ```
|
|
74
|
+
</TabItem>
|
|
75
|
+
<TabItem value="bun" label="bun">
|
|
76
|
+
``` bun run build ```
|
|
77
|
+
</TabItem>
|
|
73
78
|
</Tabs>
|
|
74
79
|
|
|
75
80
|
- Add any required environment variables for your Mastra application. This includes API keys, database URLs, and other configuration values.
|
|
@@ -77,31 +82,37 @@ Deploy your Mastra applications to Digital Ocean's App Platform and Droplets.
|
|
|
77
82
|
- Other things you may optionally configure include, the region of your resource, the unique app name, and what project the resource belongs to.
|
|
78
83
|
- Once you're done, you may create the app after reviewing your configuration and pricing estimates.
|
|
79
84
|
|
|
80
|
-
|
|
85
|
+
</StepItem>
|
|
86
|
+
|
|
87
|
+
<StepItem>
|
|
88
|
+
|
|
89
|
+
Deployment
|
|
81
90
|
|
|
82
91
|
- Your app will be built and deployed automatically.
|
|
83
92
|
- Digital Ocean will provide you with a URL to access your deployed application.
|
|
84
93
|
|
|
94
|
+
</StepItem>
|
|
95
|
+
|
|
85
96
|
</Steps>
|
|
86
97
|
|
|
87
98
|
You can now access your deployed application at the URL provided by Digital Ocean.
|
|
88
99
|
|
|
89
|
-
|
|
100
|
+
:::note
|
|
90
101
|
The Digital Ocean App Platform uses an ephemeral file system,
|
|
91
102
|
meaning that any files written to the file system are short-lived and may be lost.
|
|
92
103
|
Avoid using a Mastra storage provider that uses the file system,
|
|
93
104
|
such as `LibSQLStore` with a file URL.
|
|
94
|
-
|
|
105
|
+
:::
|
|
95
106
|
|
|
96
|
-
</
|
|
107
|
+
</TabItem>
|
|
97
108
|
|
|
98
|
-
<
|
|
109
|
+
<TabItem value="droplets" label="Droplets">
|
|
99
110
|
|
|
100
111
|
## Droplets
|
|
101
112
|
|
|
102
113
|
Deploy your Mastra application to Digital Ocean's Droplets.
|
|
103
114
|
|
|
104
|
-
### Prerequisites
|
|
115
|
+
### Prerequisites
|
|
105
116
|
|
|
106
117
|
- A [Digital Ocean account](https://www.digitalocean.com/)
|
|
107
118
|
- A [Droplet](https://docs.digitalocean.com/products/droplets/) running Ubuntu 24+
|
|
@@ -114,26 +125,28 @@ Deploy your Mastra application to Digital Ocean's Droplets.
|
|
|
114
125
|
|
|
115
126
|
<Steps>
|
|
116
127
|
|
|
117
|
-
|
|
128
|
+
<StepItem>
|
|
129
|
+
|
|
130
|
+
Clone your Mastra application
|
|
118
131
|
|
|
119
132
|
Connect to your Droplet and clone your repository:
|
|
120
133
|
|
|
121
|
-
<Tabs
|
|
122
|
-
<
|
|
134
|
+
<Tabs>
|
|
135
|
+
<TabItem value="public" label="Public Repository">
|
|
123
136
|
|
|
124
137
|
```bash copy
|
|
125
138
|
git clone https://github.com/<your-username>/<your-repository>.git
|
|
126
139
|
```
|
|
127
140
|
|
|
128
|
-
</
|
|
141
|
+
</TabItem>
|
|
129
142
|
|
|
130
|
-
<
|
|
143
|
+
<TabItem value="private" label="Private Repository">
|
|
131
144
|
|
|
132
145
|
```bash copy
|
|
133
146
|
git clone https://<your-username>:<your-personal-access-token>@github.com/<your-username>/<your-repository>.git
|
|
134
147
|
```
|
|
135
148
|
|
|
136
|
-
</
|
|
149
|
+
</TabItem>
|
|
137
150
|
</Tabs>
|
|
138
151
|
|
|
139
152
|
Navigate to the repository directory:
|
|
@@ -142,13 +155,21 @@ Navigate to the repository directory:
|
|
|
142
155
|
cd "<your-repository>"
|
|
143
156
|
```
|
|
144
157
|
|
|
145
|
-
|
|
158
|
+
</StepItem>
|
|
159
|
+
|
|
160
|
+
<StepItem>
|
|
161
|
+
|
|
162
|
+
Install dependencies
|
|
146
163
|
|
|
147
164
|
```bash copy
|
|
148
165
|
npm install
|
|
149
166
|
```
|
|
150
167
|
|
|
151
|
-
|
|
168
|
+
</StepItem>
|
|
169
|
+
|
|
170
|
+
<StepItem>
|
|
171
|
+
|
|
172
|
+
Set up environment variables
|
|
152
173
|
|
|
153
174
|
Create a `.env` file and add your environment variables:
|
|
154
175
|
|
|
@@ -163,25 +184,35 @@ OPENAI_API_KEY=<your-openai-api-key>
|
|
|
163
184
|
# Add other required environment variables
|
|
164
185
|
```
|
|
165
186
|
|
|
166
|
-
|
|
187
|
+
</StepItem>
|
|
188
|
+
|
|
189
|
+
<StepItem>
|
|
190
|
+
|
|
191
|
+
Build the application
|
|
167
192
|
|
|
168
193
|
```bash copy
|
|
169
194
|
npm run build
|
|
170
195
|
```
|
|
171
196
|
|
|
172
|
-
|
|
197
|
+
</StepItem>
|
|
198
|
+
|
|
199
|
+
<StepItem>
|
|
200
|
+
|
|
201
|
+
Run the application
|
|
173
202
|
|
|
174
203
|
```bash copy
|
|
175
204
|
node --import=./.mastra/output/instrumentation.mjs --env-file=".env" .mastra/output/index.mjs
|
|
176
205
|
```
|
|
177
206
|
|
|
178
|
-
|
|
207
|
+
:::note
|
|
179
208
|
Your Mastra application will run on port 4111 by default. Ensure your reverse proxy is configured to forward requests to this port.
|
|
180
|
-
|
|
209
|
+
:::
|
|
210
|
+
|
|
211
|
+
</StepItem>
|
|
181
212
|
|
|
182
213
|
</Steps>
|
|
183
214
|
|
|
184
|
-
</
|
|
215
|
+
</TabItem>
|
|
185
216
|
|
|
186
217
|
</Tabs>
|
|
187
218
|
|
|
@@ -201,6 +232,6 @@ const mastraClient = new MastraClient({
|
|
|
201
232
|
|
|
202
233
|
## Next steps
|
|
203
234
|
|
|
204
|
-
- [Mastra Client SDK](/
|
|
235
|
+
- [Mastra Client SDK](/reference/client-js/mastra-client)
|
|
205
236
|
- [Digital Ocean App Platform documentation](https://docs.digitalocean.com/products/app-platform/)
|
|
206
237
|
- [Digital Ocean Droplets documentation](https://docs.digitalocean.com/products/droplets/)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Cloud Providers"
|
|
2
|
+
title: "Cloud Providers | Deployment | Mastra Docs"
|
|
3
3
|
description: "Deploy your Mastra applications to popular cloud providers."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# Cloud Providers
|
|
7
7
|
|
|
8
8
|
Standalone Mastra applications can be deployed to popular cloud providers, see one of the following guides for more information:
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ Standalone Mastra applications can be deployed to popular cloud providers, see o
|
|
|
12
12
|
- [Digital Ocean](/docs/deployment/cloud-providers/digital-ocean)
|
|
13
13
|
- [Azure App Services](/docs/deployment/cloud-providers/azure-app-services)
|
|
14
14
|
|
|
15
|
-
For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/deployment/server) guide.
|
|
15
|
+
For self-hosted Node.js server deployment, see the [Creating A Mastra Server](/docs/deployment/server-deployment) guide.
|
|
16
16
|
|
|
17
17
|
## Prerequisites
|
|
18
18
|
|
|
@@ -30,23 +30,26 @@ Before deploying to a cloud provider, 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
|
```
|