@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: "
|
|
2
|
+
title: "Project Structure | Getting Started | Mastra Docs"
|
|
3
3
|
description: Guide on organizing folders and files in Mastra, including best practices and recommended structures.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { FileTree, Callout } from "nextra/components";
|
|
7
|
-
|
|
8
6
|
# Project Structure
|
|
9
7
|
|
|
10
8
|
Your new Mastra project, created with the `create mastra` command, comes with a predefined set of files and folders to help you get started.
|
|
@@ -15,61 +13,55 @@ Mastra is a framework, but it's **unopinionated** about how you organize or colo
|
|
|
15
13
|
|
|
16
14
|
A project created with the `create mastra` command looks like this:
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<FileTree.File name=".env.example" />
|
|
37
|
-
<FileTree.File name="package.json" />
|
|
38
|
-
<FileTree.File name="tsconfig.json" />
|
|
39
|
-
</FileTree>
|
|
40
|
-
|
|
41
|
-
<Callout type="info">
|
|
16
|
+
```
|
|
17
|
+
src/
|
|
18
|
+
├── mastra/
|
|
19
|
+
│ ├── agents/
|
|
20
|
+
│ │ └── weather-agent.ts
|
|
21
|
+
│ ├── tools/
|
|
22
|
+
│ │ └── weather-tool.ts
|
|
23
|
+
│ ├── workflows/
|
|
24
|
+
│ │ └── weather-workflow.ts
|
|
25
|
+
│ ├── scorers/
|
|
26
|
+
│ │ └── weather-scorer.ts
|
|
27
|
+
│ └── index.ts
|
|
28
|
+
├── .env.example
|
|
29
|
+
├── package.json
|
|
30
|
+
└── tsconfig.json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
:::info
|
|
42
34
|
Tip - Use the predefined files as templates. Duplicate and adapt them to quickly create your own agents, tools, workflows, etc.
|
|
43
|
-
|
|
35
|
+
:::
|
|
44
36
|
|
|
45
37
|
### Folders
|
|
46
38
|
|
|
47
39
|
Folders organize your agent's resources, like agents, tools, and workflows.
|
|
48
40
|
|
|
49
|
-
| Folder | Description
|
|
50
|
-
| ---------------------- |
|
|
51
|
-
| `src/mastra` | Entry point for all Mastra-related code and configuration
|
|
52
|
-
| `src/mastra/agents` | Define and configure your agents - their behavior, goals, and tools.
|
|
53
|
-
| `src/mastra/workflows` | Define multi-step workflows that orchestrate agents and tools together.
|
|
54
|
-
| `src/mastra/tools` | Create reusable tools that your agents can call
|
|
55
|
-
| `src/mastra/mcp` | (Optional) Implement custom MCP servers to share your tools with external agents
|
|
56
|
-
| `src/mastra/scorers` | (Optional) Define scorers for evaluating agent performance over time
|
|
41
|
+
| Folder | Description |
|
|
42
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `src/mastra` | Entry point for all Mastra-related code and configuration. |
|
|
44
|
+
| `src/mastra/agents` | Define and configure your agents - their behavior, goals, and tools. |
|
|
45
|
+
| `src/mastra/workflows` | Define multi-step workflows that orchestrate agents and tools together. |
|
|
46
|
+
| `src/mastra/tools` | Create reusable tools that your agents can call |
|
|
47
|
+
| `src/mastra/mcp` | (Optional) Implement custom MCP servers to share your tools with external agents |
|
|
48
|
+
| `src/mastra/scorers` | (Optional) Define scorers for evaluating agent performance over time |
|
|
57
49
|
| `src/mastra/public` | (Optional) Contents are copied into the `.build/output` directory during the build process, making them available for serving at runtime |
|
|
58
50
|
|
|
59
51
|
### Top-level files
|
|
60
52
|
|
|
61
53
|
Top-level files define how your Mastra project is configured, built, and connected to its environment.
|
|
62
54
|
|
|
63
|
-
| File | Description
|
|
64
|
-
| --------------------- |
|
|
65
|
-
| `src/mastra/index.ts` | Central entry point where you configure and initialize Mastra.
|
|
55
|
+
| File | Description |
|
|
56
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `src/mastra/index.ts` | Central entry point where you configure and initialize Mastra. |
|
|
66
58
|
| `.env.example` | Template for environment variables - copy and rename to `.env` to add your secret [model provider](/models) keys. |
|
|
67
|
-
| `package.json` | Defines project metadata, dependencies, and available npm scripts.
|
|
68
|
-
| `tsconfig.json` | Configures TypeScript options such as path aliases, compiler settings, and build output.
|
|
59
|
+
| `package.json` | Defines project metadata, dependencies, and available npm scripts. |
|
|
60
|
+
| `tsconfig.json` | Configures TypeScript options such as path aliases, compiler settings, and build output. |
|
|
69
61
|
|
|
70
62
|
## Next steps
|
|
71
63
|
|
|
72
64
|
- Read more about [Mastra's features](/docs#why-mastra).
|
|
73
65
|
- Integrate Mastra with your frontend framework: [Next.js](/docs/frameworks/web-frameworks/next-js), [React](/docs/frameworks/web-frameworks/vite-react), or [Astro](/docs/frameworks/web-frameworks/astro).
|
|
74
66
|
- Build an agent from scratch following one of our [guides](/guides).
|
|
75
|
-
- Watch conceptual guides on our [YouTube channel](https://www.youtube.com/@mastra-ai) and [subscribe](https://www.youtube.com/@mastra-ai?sub_confirmation=1)!
|
|
67
|
+
- Watch conceptual guides on our [YouTube channel](https://www.youtube.com/@mastra-ai) and [subscribe](https://www.youtube.com/@mastra-ai?sub_confirmation=1)!
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Playground"
|
|
2
|
+
title: "Playground | Getting Started | Mastra Docs"
|
|
3
3
|
description: Guide on installing Mastra and setting up the necessary prerequisites for running it with various LLM providers.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
6
|
+
import Youtube from "@site/src/components/YouTube-player";
|
|
7
|
+
import Tabs from "@theme/Tabs";
|
|
8
|
+
import TabItem from "@theme/TabItem";
|
|
9
|
+
import { VideoPlayer } from "@site/src/components/video-player";
|
|
10
10
|
|
|
11
11
|
# Playground
|
|
12
12
|
|
|
@@ -16,57 +16,44 @@ As your project evolves, Playground's development environment helps you iterate
|
|
|
16
16
|
|
|
17
17
|
To get started, run Playground locally using the instructions below, or [deploy to Mastra Cloud](https://mastra.ai/docs/mastra-cloud/setting-up) to collaborate with your team.
|
|
18
18
|
|
|
19
|
-
<YouTube id="spGlcTEjuXY" startTime={126}/>
|
|
19
|
+
<YouTube id="spGlcTEjuXY" startTime={126} />
|
|
20
20
|
|
|
21
21
|
## Start Playground
|
|
22
22
|
|
|
23
23
|
If you created your application with `create mastra`, start the local development server using the `dev` script. You can also run it directly with `mastra dev`.
|
|
24
24
|
|
|
25
|
-
<Tabs
|
|
26
|
-
<
|
|
27
|
-
```bash copy
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
</
|
|
41
|
-
<Tab>
|
|
42
|
-
```bash copy
|
|
43
|
-
bun run dev
|
|
44
|
-
```
|
|
45
|
-
</Tab>
|
|
46
|
-
<Tab>
|
|
47
|
-
```bash copy
|
|
48
|
-
mastra dev
|
|
49
|
-
```
|
|
50
|
-
</Tab>
|
|
25
|
+
<Tabs>
|
|
26
|
+
<TabItem value="npm" label="npm">
|
|
27
|
+
```bash copy npm run dev ```
|
|
28
|
+
</TabItem>
|
|
29
|
+
<TabItem value="pnpm" label="pnpm">
|
|
30
|
+
```bash copy pnpm run dev ```
|
|
31
|
+
</TabItem>
|
|
32
|
+
<TabItem value="yarn" label="yarn">
|
|
33
|
+
```bash copy yarn run dev ```
|
|
34
|
+
</TabItem>
|
|
35
|
+
<TabItem value="bun" label="bun">
|
|
36
|
+
```bash copy bun run dev ```
|
|
37
|
+
</TabItem>
|
|
38
|
+
<TabItem value="mastra" label="mastra">
|
|
39
|
+
```bash copy mastra dev ```
|
|
40
|
+
</TabItem>
|
|
51
41
|
</Tabs>
|
|
52
42
|
|
|
53
43
|
Once the server's running, you can:
|
|
54
44
|
|
|
55
45
|
- Open the Playground UI at http://localhost:4111/ to test your agent interactively.
|
|
56
|
-
- Visit
|
|
46
|
+
- Visit http://localhost:4111/swagger-ui to discover and interact with the underlying REST API.
|
|
57
47
|
|
|
58
48
|
## Playground UI
|
|
59
49
|
|
|
60
|
-
The Playground UI provides an interactive development environment for you to test your agents, workflows, and tools, observe exactly what happens under the hood with each interaction, and tweak things as you go.
|
|
50
|
+
The Playground UI provides an interactive development environment for you to test your agents, workflows, and tools, observe exactly what happens under the hood with each interaction, and tweak things as you go.
|
|
61
51
|
|
|
62
52
|
### Agents
|
|
63
53
|
|
|
64
|
-
|
|
65
54
|
Chat with your agent directly, dynamically switch [models](/models), and tweak settings like temperature and top-p to understand how they affect the output.
|
|
66
55
|
|
|
67
|
-
<VideoPlayer
|
|
68
|
-
src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406022/local-dev-agents-playground_100_m3begx.mp4"
|
|
69
|
-
/>
|
|
56
|
+
<VideoPlayer src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406022/local-dev-agents-playground_100_m3begx.mp4" />
|
|
70
57
|
|
|
71
58
|
When you interact with your agent, you can follow each step of its reasoning, view tool call outputs, and [observe](#observability) traces and logs to see how responses are generated. You can also attach [scorers](#scorers) to measure and compare response quality over time.
|
|
72
59
|
|
|
@@ -74,9 +61,7 @@ When you interact with your agent, you can follow each step of its reasoning, vi
|
|
|
74
61
|
|
|
75
62
|
Visualize your workflow as a graph and run it step by step with a custom input. During execution, the interface updates in real time to show the active step and the path taken.
|
|
76
63
|
|
|
77
|
-
<VideoPlayer
|
|
78
|
-
src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406027/local-dev-workflows-playground_100_rbc466.mp4"
|
|
79
|
-
/>
|
|
64
|
+
<VideoPlayer src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406027/local-dev-workflows-playground_100_rbc466.mp4" />
|
|
80
65
|
|
|
81
66
|
When running a workflow, you can also view detailed traces showing tool calls, raw JSON outputs, and any errors that might have occured along the way.
|
|
82
67
|
|
|
@@ -84,24 +69,20 @@ When running a workflow, you can also view detailed traces showing tool calls, r
|
|
|
84
69
|
|
|
85
70
|
Run tools in isolation to observe their behavior. Test them before assigning them to your agent, or isolate them to debug issues should something go wrong.
|
|
86
71
|
|
|
87
|
-
<VideoPlayer
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### MCP
|
|
91
|
-
List the MCP servers attached to your Mastra instance and explore their available tools.
|
|
72
|
+
<VideoPlayer src="https://res.cloudinary.com/mastra-assets/video/upload/v1751406316/local-dev-agents-tools_100_fe1jdt.mp4" />
|
|
73
|
+
### MCP List the MCP servers attached to your Mastra instance and explore their
|
|
74
|
+
available tools.
|
|
92
75
|
|
|
93
|
-

|
|
94
77
|
|
|
95
78
|
### Observability
|
|
96
79
|
|
|
97
|
-
|
|
98
|
-
When you run an agent or workflow, the Observability tab displays traces that highlight the key AI operations such as model calls, tool executions, and workflow steps. Follow these traces to see how data moves, where time is spent, and what's happening under the hood.
|
|
80
|
+
When you run an agent or workflow, the Observability tab displays traces that highlight the key AI operations such as model calls, tool executions, and workflow steps. Follow these traces to see how data moves, where time is spent, and what's happening under the hood.
|
|
99
81
|
|
|
100
82
|

|
|
101
83
|
|
|
102
84
|
AI Tracing filters out low-level framework details so your traces stay focused and readable.
|
|
103
85
|
|
|
104
|
-
|
|
105
86
|
### Scorers
|
|
106
87
|
|
|
107
88
|
The Scorers tab displays the results of your agent's scorers as they run. When messages pass through your agent, the defined scorers evaluate each output asynchronously and render their results here. This allows you to understand how your scorers respond to different interactions, compare performance across test cases, and identify areas for improvement.
|
|
@@ -110,13 +91,13 @@ The Scorers tab displays the results of your agent's scorers as they run. When m
|
|
|
110
91
|
|
|
111
92
|
The local development server exposes a complete set of REST API routes, allowing you to programmatically interact with your agents, workflows, and tools during development. This is particularly helpful if you plan to deploy the Mastra server, since the local development server uses the exact same API routes as the [production server](/docs/server-db/production-server), allowing you to develop and test against it with full parity.
|
|
112
93
|
|
|
113
|
-
You can explore all available endpoints in the OpenAPI specification at http://localhost:4111/openapi.json, which details every endpoint and its request and response schemas.
|
|
94
|
+
You can explore all available endpoints in the OpenAPI specification at http://localhost:4111/openapi.json, which details every endpoint and its request and response schemas.
|
|
114
95
|
|
|
115
96
|
To explore the API interactively, visit the Swagger UI at http://localhost:4111/swagger-ui. Here, you can discover endpoints and test them directly from your browser.
|
|
116
97
|
|
|
117
|
-
|
|
98
|
+
:::info
|
|
118
99
|
The OpenAPI and Swagger endpoints are disabled in production by default. To enable them, set `server.build.openAPIDocs` and `server.build.swaggerUI` to `true` respectively.
|
|
119
|
-
|
|
100
|
+
:::
|
|
120
101
|
|
|
121
102
|
## Configuration
|
|
122
103
|
|
|
@@ -141,18 +122,19 @@ Mastra supports local HTTPS development through the [`--https`](/reference/cli/m
|
|
|
141
122
|
|
|
142
123
|
```typescript
|
|
143
124
|
import { Mastra } from "@mastra/core/mastra";
|
|
144
|
-
import fs from
|
|
125
|
+
import fs from "node:fs";
|
|
145
126
|
|
|
146
127
|
export const mastra = new Mastra({
|
|
147
128
|
server: {
|
|
148
129
|
https: {
|
|
149
|
-
key: fs.readFileSync(
|
|
150
|
-
cert: fs.readFileSync(
|
|
151
|
-
}
|
|
130
|
+
key: fs.readFileSync("path/to/key.pem"),
|
|
131
|
+
cert: fs.readFileSync("path/to/cert.pem"),
|
|
132
|
+
},
|
|
152
133
|
},
|
|
153
134
|
});
|
|
154
135
|
```
|
|
136
|
+
|
|
155
137
|
## Next steps
|
|
156
138
|
|
|
157
139
|
- Learn more about Mastra's suggested [project structure](/docs/getting-started/project-structure).
|
|
158
|
-
- Integrate Mastra with your frontend framework of choice - [Next.js](/docs/frameworks/web-frameworks/next-js), [React](/docs/frameworks/web-frameworks/vite-react), or [Astro](/docs/frameworks/web-frameworks/astro).
|
|
140
|
+
- Integrate Mastra with your frontend framework of choice - [Next.js](/docs/frameworks/web-frameworks/next-js), [React](/docs/frameworks/web-frameworks/vite-react), or [Astro](/docs/frameworks/web-frameworks/astro).
|
|
@@ -3,8 +3,8 @@ title: "Templates | Getting Started | Mastra Docs"
|
|
|
3
3
|
description: Pre-built project structures that demonstrate common Mastra use cases and patterns
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import Tabs from "@theme/Tabs";
|
|
7
|
+
import TabItem from "@theme/TabItem";
|
|
8
8
|
|
|
9
9
|
# Templates
|
|
10
10
|
|
|
@@ -14,27 +14,19 @@ Templates are pre-built Mastra projects that demonstrate specific use cases and
|
|
|
14
14
|
|
|
15
15
|
Install a template using the `create-mastra` command:
|
|
16
16
|
|
|
17
|
-
<Tabs
|
|
18
|
-
<
|
|
19
|
-
```bash copy
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
pnpm create mastra@latest --template template-name
|
|
31
|
-
```
|
|
32
|
-
</Tab>
|
|
33
|
-
<Tab>
|
|
34
|
-
```bash copy
|
|
35
|
-
bun create mastra@latest --template template-name
|
|
36
|
-
```
|
|
37
|
-
</Tab>
|
|
17
|
+
<Tabs>
|
|
18
|
+
<TabItem value="npm" label="npm">
|
|
19
|
+
```bash copy npx create-mastra@latest --template template-name ```
|
|
20
|
+
</TabItem>
|
|
21
|
+
<TabItem value="yarn" label="yarn">
|
|
22
|
+
```bash copy yarn dlx create-mastra@latest --template template-name ```
|
|
23
|
+
</TabItem>
|
|
24
|
+
<TabItem value="pnpm" label="pnpm">
|
|
25
|
+
```bash copy pnpm create mastra@latest --template template-name ```
|
|
26
|
+
</TabItem>
|
|
27
|
+
<TabItem value="bun" label="bun">
|
|
28
|
+
```bash copy bun create mastra@latest --template template-name ```
|
|
29
|
+
</TabItem>
|
|
38
30
|
</Tabs>
|
|
39
31
|
|
|
40
32
|
For example, to create a text-to-SQL application:
|
|
@@ -48,14 +40,17 @@ npx create-mastra@latest --template text-to-sql
|
|
|
48
40
|
After installation:
|
|
49
41
|
|
|
50
42
|
1. **Navigate to your project**:
|
|
43
|
+
|
|
51
44
|
```bash copy
|
|
52
45
|
cd your-project-name
|
|
53
46
|
```
|
|
54
47
|
|
|
55
48
|
2. **Configure environment variables**:
|
|
49
|
+
|
|
56
50
|
```bash copy
|
|
57
51
|
cp .env.example .env
|
|
58
52
|
```
|
|
53
|
+
|
|
59
54
|
Edit `.env` with your API keys as specified in the template's README.
|
|
60
55
|
|
|
61
56
|
3. **Start development**:
|
|
@@ -63,8 +58,8 @@ After installation:
|
|
|
63
58
|
npm run dev
|
|
64
59
|
```
|
|
65
60
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
:::info
|
|
62
|
+
Each template includes a comprehensive README with specific setup instructions and usage examples.
|
|
63
|
+
:::
|
|
69
64
|
|
|
70
|
-
For detailed information on creating templates, see the [Templates Reference](/reference/templates).
|
|
65
|
+
For detailed information on creating templates, see the [Templates Reference](/reference/templates/overview).
|
package/.docs/raw/index.mdx
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "About Mastra | Mastra Docs"
|
|
3
|
+
sidebar_position: 2
|
|
4
|
+
sidebar_label: "Introduction"
|
|
3
5
|
description: "Mastra is an all-in-one framework for building AI-powered applications and agents with a modern TypeScript stack."
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
import
|
|
8
|
+
import Youtube from "@site/src/components/YouTube-player";
|
|
7
9
|
|
|
8
10
|
# About Mastra
|
|
9
11
|
|
|
@@ -21,18 +23,17 @@ Some highlights include:
|
|
|
21
23
|
|
|
22
24
|
- [**Model routing**](/models) - Connect to 40+ providers through one standard interface. Use models from OpenAI, Anthropic, Gemini, and more.
|
|
23
25
|
|
|
24
|
-
- [**Agents**](/docs/agents/overview) - Build autonomous agents that use LLMs and tools to solve open-ended tasks. Agents reason about goals, decide which tools to use,
|
|
26
|
+
- [**Agents**](/docs/agents/overview) - Build autonomous agents that use LLMs and tools to solve open-ended tasks. Agents reason about goals, decide which tools to use, and iterate internally until the model emits a final answer or an optional stopping condition is met.
|
|
25
27
|
|
|
26
28
|
- [**Workflows**](/docs/workflows/overview) - When you need explicit control over execution, use Mastra's graph-based workflow engine to orchestrate complex multi-step processes. Mastra workflows use an intuitive syntax for control flow (`.then()`, `.branch()`, `.parallel()`).
|
|
27
29
|
|
|
28
30
|
- [**Human-in-the-loop**](/docs/workflows/suspend-and-resume) - Suspend an agent or workflow and await user input or approval before resuming. Mastra uses [storage](/docs/server-db/storage) to remember execution state, so you can pause indefinitely and resume where you left off.
|
|
29
31
|
|
|
30
|
-
- **Context management** - Give your agents the right context at the right time. Provide [conversation history](/docs/memory/conversation-history), [retrieve](/docs/rag/overview) data from your sources (APIs, databases, files), and add human-like [working](/docs/memory/working-memory) and [semantic](/docs/memory/semantic-recall) memory so your agents behave coherently.
|
|
32
|
+
- **Context management** - Give your agents the right context at the right time. Provide [conversation history](/docs/memory/conversation-history), [retrieve](/docs/rag/overview) data from your sources (APIs, databases, files), and add human-like [working](/docs/memory/working-memory) and [semantic](/docs/memory/semantic-recall) memory so your agents behave coherently.
|
|
31
33
|
|
|
32
34
|
- **Integrations** - Bundle agents and workflows into existing React, Next.js, or Node.js apps, or ship them as standalone endpoints. When building UIs, integrate with agentic libraries like Vercel's AI SDK UI and CopilotKit to bring your AI assistant to life on the web.
|
|
33
35
|
|
|
34
|
-
- **Production essentials** - Shipping reliable agents takes ongoing insight, evaluation, and iteration. With built-in [
|
|
35
|
-
|
|
36
|
+
- **Production essentials** - Shipping reliable agents takes ongoing insight, evaluation, and iteration. With built-in [scorers](/docs/scorers/overview) and [observability](/docs/observability/overview), Mastra gives you the tools to observe, measure, and refine continuously.
|
|
36
37
|
|
|
37
38
|
## What can you build?
|
|
38
39
|
|
|
@@ -46,13 +47,12 @@ Some highlights include:
|
|
|
46
47
|
|
|
47
48
|
- Decision-support tools that analyse data and provide actionable recommendations.
|
|
48
49
|
|
|
49
|
-
Explore real-world examples in our [
|
|
50
|
-
|
|
50
|
+
Explore real-world examples in our [community showcase](/showcase).
|
|
51
51
|
|
|
52
52
|
## Get started
|
|
53
53
|
|
|
54
54
|
Follow the [Installation guide](/docs/getting-started/installation) for step-by-step setup with the CLI or a manual install.
|
|
55
55
|
|
|
56
|
-
If you're new to AI agents, check out our [templates](/docs/getting-started/templates), [course](/
|
|
56
|
+
If you're new to AI agents, check out our [templates](/docs/getting-started/templates), [course](https://mastra.ai/book), and [YouTube videos](https://youtube.com/@mastra-ai) to start building with Mastra today.
|
|
57
57
|
|
|
58
|
-
We can't wait to see what you build ✌️
|
|
58
|
+
We can't wait to see what you build ✌️
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: "Navigating the Dashboard | Mastra Cloud | Mastra Docs"
|
|
3
3
|
description: Details of each feature available in Mastra Cloud
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { MastraCloudCallout } from
|
|
6
|
+
import { MastraCloudCallout } from "@site/src/components/MastraCloudCallout";
|
|
7
7
|
|
|
8
8
|
# Navigating the Dashboard
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ This page explains how to navigate the Mastra Cloud dashboard, where you can con
|
|
|
15
15
|
|
|
16
16
|
The **Overview** page provides details about your application, including its domain URL, status, latest deployment, and connected agents and workflows.
|
|
17
17
|
|
|
18
|
-

|
|
19
19
|
|
|
20
20
|
Key features:
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@ Each project shows its current deployment status, active domains, and environmen
|
|
|
25
25
|
|
|
26
26
|
The **Deployments** page shows recent builds and gives you quick access to detailed build logs. Click any row to view more information about a specific deployment.
|
|
27
27
|
|
|
28
|
-

|
|
29
29
|
|
|
30
30
|
Key features:
|
|
31
31
|
|
|
@@ -35,7 +35,7 @@ Each deployment includes its current status, the Git branch it was deployed from
|
|
|
35
35
|
|
|
36
36
|
The **Logs** page is where you'll find detailed information to help debug and monitor your application's behavior in the production environment.
|
|
37
37
|
|
|
38
|
-

|
|
39
39
|
|
|
40
40
|
Key features:
|
|
41
41
|
|
|
@@ -45,7 +45,7 @@ Each log includes a severity level and detailed messages showing agent, workflow
|
|
|
45
45
|
|
|
46
46
|
On the **Settings** page you can modify the configuration of your application.
|
|
47
47
|
|
|
48
|
-

|
|
49
49
|
|
|
50
50
|
Key features:
|
|
51
51
|
|
|
@@ -59,7 +59,7 @@ You can manage environment variables, edit key project settings like the name an
|
|
|
59
59
|
|
|
60
60
|
On the **Agents** page you'll see all agents used in your application. Click any agent to interact using the chat interface.
|
|
61
61
|
|
|
62
|
-

|
|
63
63
|
|
|
64
64
|
Key features:
|
|
65
65
|
|
|
@@ -69,7 +69,7 @@ Test your agents in real time using the chat interface, review traces of each in
|
|
|
69
69
|
|
|
70
70
|
On the **Workflows** page you'll see all workflows used in your application. Click any workflow to interact using the runner interface.
|
|
71
71
|
|
|
72
|
-

|
|
73
73
|
|
|
74
74
|
Key features:
|
|
75
75
|
|
|
@@ -79,7 +79,7 @@ Visualize your workflow with a step-by-step graph, view execution traces, and ru
|
|
|
79
79
|
|
|
80
80
|
On the **Tools** page you'll see all tools used by your agents. Click any tool to interact using the input interface.
|
|
81
81
|
|
|
82
|
-

|
|
83
83
|
|
|
84
84
|
Key features:
|
|
85
85
|
|
|
@@ -89,7 +89,7 @@ Test your tools by providing an input that matches the schema and viewing the st
|
|
|
89
89
|
|
|
90
90
|
The **MCP Servers** page lists all MCP Servers included in your application. Click any MCP Server for more information.
|
|
91
91
|
|
|
92
|
-

|
|
93
93
|
|
|
94
94
|
Key features:
|
|
95
95
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: "Understanding Tracing and Logs | Mastra Cloud | Mastra Docs"
|
|
3
3
|
description: Monitoring and debugging tools for Mastra Cloud deployments
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { MastraCloudCallout } from
|
|
6
|
+
import { MastraCloudCallout } from "@site/src/components/MastraCloudCallout";
|
|
7
7
|
|
|
8
8
|
# Understanding Tracing and Logs
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ Mastra Cloud captures execution data to help you monitor your application's beha
|
|
|
15
15
|
|
|
16
16
|
You can view detailed logs for debugging and monitoring your application's behavior on the [Logs](/docs/mastra-cloud/dashboard#logs) page of the Dashboard.
|
|
17
17
|
|
|
18
|
-

|
|
19
19
|
|
|
20
20
|
Key features:
|
|
21
21
|
|
|
@@ -23,24 +23,23 @@ Each log entry includes its severity level and a detailed message showing agent,
|
|
|
23
23
|
|
|
24
24
|
## Traces
|
|
25
25
|
|
|
26
|
-
More detailed traces are available for both agents and workflows by using a [logger](/docs/observability/logging) or enabling [telemetry](/docs/observability/tracing) using one of our [supported providers](/reference/observability/providers).
|
|
26
|
+
More detailed traces are available for both agents and workflows by using a [logger](/docs/observability/logging) or enabling [telemetry](/docs/observability/ai-tracing/overview) using one of our [supported providers](/reference/observability/otel-tracing/providers/).
|
|
27
27
|
|
|
28
28
|
### Agents
|
|
29
29
|
|
|
30
30
|
With a [logger](/docs/observability/logging) enabled, you can view detailed outputs from your agents in the **Traces** section of the Agents Playground.
|
|
31
31
|
|
|
32
|
-

|
|
33
33
|
|
|
34
34
|
Key features:
|
|
35
35
|
|
|
36
36
|
Tools passed to the agent during generation are standardized using `convertTools`. This includes retrieving client-side tools, memory tools, and tools exposed from workflows.
|
|
37
37
|
|
|
38
|
-
|
|
39
38
|
### Workflows
|
|
40
39
|
|
|
41
40
|
With a [logger](/docs/observability/logging) enabled, you can view detailed outputs from your workflows in the **Traces** section of the Workflows Playground.
|
|
42
41
|
|
|
43
|
-

|
|
44
43
|
|
|
45
44
|
Key features:
|
|
46
45
|
|
|
@@ -49,4 +48,4 @@ Workflows are created using `createWorkflow`, which sets up steps, metadata, and
|
|
|
49
48
|
## Next steps
|
|
50
49
|
|
|
51
50
|
- [Logging](/docs/observability/logging)
|
|
52
|
-
- [Tracing](/docs/observability/tracing)
|
|
51
|
+
- [Tracing](/docs/observability/ai-tracing/overview)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Mastra Cloud
|
|
2
|
+
title: "Mastra Cloud | Mastra Cloud | Mastra Docs"
|
|
3
3
|
description: Deployment and monitoring service for Mastra applications
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { MastraCloudCallout } from
|
|
7
|
-
import { FileTree } from "nextra/components";
|
|
6
|
+
import { MastraCloudCallout } from "@site/src/components/MastraCloudCallout";
|
|
8
7
|
|
|
9
8
|
# Mastra Cloud
|
|
10
9
|
|
|
@@ -16,7 +15,7 @@ import { FileTree } from "nextra/components";
|
|
|
16
15
|
|
|
17
16
|
Deploy and manage your applications with automated builds, organized projects, and no additional configuration.
|
|
18
17
|
|
|
19
|
-

|
|
20
19
|
|
|
21
20
|
Key features:
|
|
22
21
|
|
|
@@ -26,7 +25,7 @@ Mastra Cloud supports zero-config deployment, continuous integration with GitHub
|
|
|
26
25
|
|
|
27
26
|
Monitor and debug your applications with detailed output logs, deployment state, and interactive tools.
|
|
28
27
|
|
|
29
|
-

|
|
30
29
|
|
|
31
30
|
Key features:
|
|
32
31
|
|
|
@@ -36,23 +35,18 @@ The Project Dashboard gives you an overview of your application's status and dep
|
|
|
36
35
|
|
|
37
36
|
Use a standard Mastra project structure for proper detection and deployment.
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<FileTree.File name="index.ts" />
|
|
52
|
-
</FileTree.Folder>
|
|
53
|
-
</FileTree.Folder>
|
|
54
|
-
<FileTree.File name="package.json" />
|
|
55
|
-
</FileTree>
|
|
38
|
+
```shell
|
|
39
|
+
src
|
|
40
|
+
└── mastra
|
|
41
|
+
├── agents
|
|
42
|
+
│ └── agent-name.ts
|
|
43
|
+
├── tools
|
|
44
|
+
│ └── tool-name.ts
|
|
45
|
+
├── workflows
|
|
46
|
+
│ └── workflow-name.ts
|
|
47
|
+
└── index.ts
|
|
48
|
+
package.json
|
|
49
|
+
```
|
|
56
50
|
|
|
57
51
|
Mastra Cloud scans your repository for:
|
|
58
52
|
|