@mastra/mcp-docs-server 1.1.9-alpha.0 → 1.1.9-alpha.2
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/docs/agents/adding-voice.md +4 -4
- package/.docs/docs/agents/agent-approval.md +3 -3
- package/.docs/docs/agents/agent-memory.md +1 -1
- package/.docs/docs/agents/network-approval.md +1 -1
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/processors.md +8 -8
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/build-with-ai/mcp-docs-server.md +1 -1
- package/.docs/docs/build-with-ai/skills.md +1 -1
- package/.docs/docs/community/contributing-templates.md +1 -1
- package/.docs/docs/community/discord.md +2 -2
- package/.docs/docs/community/licensing.md +1 -1
- package/.docs/docs/deployment/cloud-providers.md +2 -2
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/studio.md +1 -1
- package/.docs/docs/deployment/web-framework.md +1 -1
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +6 -6
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/running-in-ci.md +6 -6
- package/.docs/docs/getting-started/build-with-ai.md +2 -2
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/getting-started/project-structure.md +1 -1
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/mcp/publishing-mcp-server.md +3 -3
- package/.docs/docs/memory/memory-processors.md +8 -8
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +5 -5
- package/.docs/docs/memory/semantic-recall.md +7 -7
- package/.docs/docs/memory/working-memory.md +14 -14
- package/.docs/docs/observability/datasets/overview.md +1 -1
- package/.docs/docs/observability/datasets/running-experiments.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/overview.md +5 -5
- package/.docs/docs/observability/tracing/bridges/otel.md +7 -7
- package/.docs/docs/observability/tracing/exporters/arize.md +3 -3
- package/.docs/docs/observability/tracing/exporters/braintrust.md +1 -1
- package/.docs/docs/observability/tracing/exporters/cloud.md +2 -2
- package/.docs/docs/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/docs/observability/tracing/exporters/default.md +7 -7
- package/.docs/docs/observability/tracing/exporters/laminar.md +1 -1
- package/.docs/docs/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/tracing/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/tracing/exporters/otel.md +8 -8
- package/.docs/docs/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/docs/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +20 -20
- package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +11 -11
- package/.docs/docs/rag/chunking-and-embedding.md +4 -4
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +4 -4
- package/.docs/docs/rag/vector-databases.md +11 -11
- package/.docs/docs/server/auth/auth0.md +1 -1
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/composite-auth.md +9 -9
- package/.docs/docs/server/auth/custom-auth-provider.md +12 -12
- package/.docs/docs/server/auth/firebase.md +2 -2
- package/.docs/docs/server/auth/jwt.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +8 -8
- package/.docs/docs/server/auth/supabase.md +1 -1
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/auth.md +1 -1
- package/.docs/docs/server/custom-adapters.md +7 -7
- package/.docs/docs/server/custom-api-routes.md +2 -2
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/request-context.md +2 -2
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/streaming/events.md +1 -1
- package/.docs/docs/streaming/overview.md +1 -1
- package/.docs/docs/streaming/tool-streaming.md +2 -2
- package/.docs/docs/voice/overview.md +3 -3
- package/.docs/docs/voice/speech-to-speech.md +1 -1
- package/.docs/docs/voice/speech-to-text.md +2 -2
- package/.docs/docs/voice/text-to-speech.md +2 -2
- package/.docs/docs/workflows/agents-and-tools.md +1 -1
- package/.docs/docs/workflows/control-flow.md +1 -1
- package/.docs/docs/workflows/error-handling.md +3 -3
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +1 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +1 -1
- package/.docs/docs/workspace/overview.md +1 -1
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +2 -2
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +2 -2
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit.md +1 -1
- package/.docs/guides/deployment/digital-ocean.md +1 -1
- package/.docs/guides/getting-started/astro.md +1 -1
- package/.docs/guides/getting-started/electron.md +1 -1
- package/.docs/guides/getting-started/next-js.md +1 -1
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +3 -3
- package/.docs/guides/guide/chef-michel.md +4 -4
- package/.docs/guides/guide/code-review-bot.md +3 -3
- package/.docs/guides/guide/dev-assistant.md +5 -5
- package/.docs/guides/guide/docs-manager.md +3 -3
- package/.docs/guides/guide/github-actions-pr-description.md +2 -2
- package/.docs/guides/guide/notes-mcp-server.md +3 -3
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +1 -1
- package/.docs/guides/guide/stock-agent.md +4 -4
- package/.docs/guides/guide/web-search.md +2 -2
- package/.docs/guides/guide/whatsapp-chat-bot.md +1 -1
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +3 -3
- package/.docs/guides/migrations/network-to-supervisor.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/deployment.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/vectors.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +1 -1
- package/.docs/models/embeddings.md +4 -4
- package/.docs/models/gateways/custom-gateways.md +4 -4
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/gateways/vercel.md +9 -2
- package/.docs/models/gateways.md +2 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/302ai.md +3 -3
- package/.docs/models/providers/abacus.md +3 -3
- package/.docs/models/providers/aihubmix.md +3 -3
- package/.docs/models/providers/alibaba-cn.md +3 -3
- package/.docs/models/providers/alibaba-coding-plan-cn.md +3 -3
- package/.docs/models/providers/alibaba-coding-plan.md +3 -3
- package/.docs/models/providers/alibaba.md +3 -3
- package/.docs/models/providers/anthropic.md +4 -4
- package/.docs/models/providers/bailing.md +3 -3
- package/.docs/models/providers/baseten.md +3 -3
- package/.docs/models/providers/berget.md +3 -3
- package/.docs/models/providers/cerebras.md +4 -4
- package/.docs/models/providers/chutes.md +6 -5
- package/.docs/models/providers/clarifai.md +3 -3
- package/.docs/models/providers/cloudferro-sherlock.md +3 -3
- package/.docs/models/providers/cloudflare-workers-ai.md +3 -3
- package/.docs/models/providers/cortecs.md +3 -3
- package/.docs/models/providers/deepinfra.md +4 -4
- package/.docs/models/providers/deepseek.md +3 -3
- package/.docs/models/providers/drun.md +3 -3
- package/.docs/models/providers/evroc.md +3 -3
- package/.docs/models/providers/fastrouter.md +3 -3
- package/.docs/models/providers/fireworks-ai.md +3 -3
- package/.docs/models/providers/firmware.md +3 -3
- package/.docs/models/providers/friendli.md +3 -3
- package/.docs/models/providers/github-models.md +3 -3
- package/.docs/models/providers/google.md +4 -4
- package/.docs/models/providers/groq.md +4 -4
- package/.docs/models/providers/helicone.md +3 -3
- package/.docs/models/providers/huggingface.md +3 -3
- package/.docs/models/providers/iflowcn.md +3 -3
- package/.docs/models/providers/inception.md +3 -3
- package/.docs/models/providers/inference.md +3 -3
- package/.docs/models/providers/io-net.md +3 -3
- package/.docs/models/providers/jiekou.md +3 -3
- package/.docs/models/providers/kilo.md +3 -3
- package/.docs/models/providers/kimi-for-coding.md +4 -4
- package/.docs/models/providers/kuae-cloud-coding-plan.md +3 -3
- package/.docs/models/providers/llama.md +3 -3
- package/.docs/models/providers/lmstudio.md +3 -3
- package/.docs/models/providers/lucidquery.md +3 -3
- package/.docs/models/providers/meganova.md +3 -3
- package/.docs/models/providers/minimax-cn-coding-plan.md +4 -4
- package/.docs/models/providers/minimax-cn.md +4 -4
- package/.docs/models/providers/minimax-coding-plan.md +4 -4
- package/.docs/models/providers/minimax.md +4 -4
- package/.docs/models/providers/mistral.md +4 -4
- package/.docs/models/providers/moark.md +3 -3
- package/.docs/models/providers/modelscope.md +3 -3
- package/.docs/models/providers/moonshotai-cn.md +3 -3
- package/.docs/models/providers/moonshotai.md +3 -3
- package/.docs/models/providers/morph.md +3 -3
- package/.docs/models/providers/nano-gpt.md +25 -23
- package/.docs/models/providers/nebius.md +3 -3
- package/.docs/models/providers/nova.md +3 -3
- package/.docs/models/providers/novita-ai.md +3 -3
- package/.docs/models/providers/nvidia.md +3 -3
- package/.docs/models/providers/ollama-cloud.md +3 -3
- package/.docs/models/providers/openai.md +4 -4
- package/.docs/models/providers/opencode-go.md +3 -3
- package/.docs/models/providers/opencode.md +3 -3
- package/.docs/models/providers/ovhcloud.md +3 -3
- package/.docs/models/providers/perplexity-agent.md +4 -4
- package/.docs/models/providers/perplexity.md +4 -4
- package/.docs/models/providers/poe.md +3 -3
- package/.docs/models/providers/privatemode-ai.md +3 -3
- package/.docs/models/providers/qihang-ai.md +3 -3
- package/.docs/models/providers/qiniu-ai.md +3 -3
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/scaleway.md +3 -3
- package/.docs/models/providers/siliconflow-cn.md +3 -3
- package/.docs/models/providers/siliconflow.md +3 -3
- package/.docs/models/providers/stackit.md +3 -3
- package/.docs/models/providers/stepfun.md +3 -3
- package/.docs/models/providers/submodel.md +3 -3
- package/.docs/models/providers/synthetic.md +3 -3
- package/.docs/models/providers/togetherai.md +4 -4
- package/.docs/models/providers/upstage.md +3 -3
- package/.docs/models/providers/vivgrid.md +4 -4
- package/.docs/models/providers/vultr.md +3 -3
- package/.docs/models/providers/wandb.md +3 -3
- package/.docs/models/providers/xai.md +4 -4
- package/.docs/models/providers/xiaomi.md +3 -3
- package/.docs/models/providers/zai-coding-plan.md +3 -3
- package/.docs/models/providers/zai.md +3 -3
- package/.docs/models/providers/zenmux.md +4 -4
- package/.docs/models/providers/zhipuai-coding-plan.md +3 -3
- package/.docs/models/providers/zhipuai.md +3 -3
- package/.docs/reference/agents/agent.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/network.md +2 -2
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/auth/auth0.md +4 -4
- package/.docs/reference/auth/better-auth.md +2 -2
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +4 -4
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +4 -4
- package/.docs/reference/cli/mastra.md +1 -1
- package/.docs/reference/client-js/agents.md +22 -22
- package/.docs/reference/client-js/error-handling.md +2 -2
- package/.docs/reference/client-js/logs.md +2 -2
- package/.docs/reference/client-js/mastra-client.md +1 -1
- package/.docs/reference/client-js/memory.md +6 -6
- package/.docs/reference/client-js/observability.md +4 -4
- package/.docs/reference/client-js/telemetry.md +1 -1
- package/.docs/reference/client-js/tools.md +3 -3
- package/.docs/reference/client-js/vectors.md +2 -2
- package/.docs/reference/client-js/workflows.md +12 -12
- package/.docs/reference/core/getGatewayById.md +1 -1
- package/.docs/reference/core/getMCPServer.md +2 -2
- package/.docs/reference/core/getMCPServerById.md +2 -2
- package/.docs/reference/core/getMemory.md +1 -1
- package/.docs/reference/core/getScorer.md +2 -2
- package/.docs/reference/core/getScorerById.md +2 -2
- package/.docs/reference/core/getStoredAgentById.md +2 -2
- package/.docs/reference/core/listMCPServers.md +2 -2
- package/.docs/reference/core/listMemory.md +1 -1
- package/.docs/reference/core/listScorers.md +1 -1
- package/.docs/reference/core/listStoredAgents.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/core/mastra-model-gateway.md +11 -11
- package/.docs/reference/datasets/dataset.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +3 -3
- package/.docs/reference/evals/answer-similarity.md +3 -3
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/completeness.md +5 -5
- package/.docs/reference/evals/content-similarity.md +3 -3
- package/.docs/reference/evals/context-precision.md +6 -6
- package/.docs/reference/evals/context-relevance.md +6 -6
- package/.docs/reference/evals/create-scorer.md +7 -7
- package/.docs/reference/evals/faithfulness.md +3 -3
- package/.docs/reference/evals/hallucination.md +5 -5
- package/.docs/reference/evals/keyword-coverage.md +3 -3
- package/.docs/reference/evals/mastra-scorer.md +6 -6
- package/.docs/reference/evals/noise-sensitivity.md +9 -9
- package/.docs/reference/evals/prompt-alignment.md +5 -5
- package/.docs/reference/evals/run-evals.md +5 -5
- package/.docs/reference/evals/scorer-utils.md +17 -17
- package/.docs/reference/evals/textual-difference.md +3 -3
- package/.docs/reference/evals/tone-consistency.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +9 -9
- package/.docs/reference/evals/toxicity.md +3 -3
- package/.docs/reference/harness/harness-class.md +1 -1
- package/.docs/reference/memory/clone-utilities.md +7 -7
- package/.docs/reference/memory/cloneThread.md +4 -4
- package/.docs/reference/memory/createThread.md +1 -1
- package/.docs/reference/memory/deleteMessages.md +1 -1
- package/.docs/reference/memory/getThreadById.md +1 -1
- package/.docs/reference/memory/listThreads.md +3 -3
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/observational-memory.md +1 -1
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +5 -5
- package/.docs/reference/observability/tracing/configuration.md +17 -17
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/braintrust.md +3 -3
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/datadog.md +4 -4
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +4 -4
- package/.docs/reference/observability/tracing/exporters/langsmith.md +6 -6
- package/.docs/reference/observability/tracing/exporters/otel.md +12 -12
- package/.docs/reference/observability/tracing/exporters/posthog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
- package/.docs/reference/observability/tracing/instances.md +9 -9
- package/.docs/reference/observability/tracing/interfaces.md +39 -39
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +5 -5
- package/.docs/reference/observability/tracing/spans.md +13 -13
- package/.docs/reference/processors/processor-interface.md +15 -15
- package/.docs/reference/rag/chunk.md +2 -2
- package/.docs/reference/rag/database-config.md +8 -8
- package/.docs/reference/rag/document.md +11 -11
- package/.docs/reference/rag/embeddings.md +5 -5
- package/.docs/reference/rag/extract-params.md +8 -8
- package/.docs/reference/rag/graph-rag.md +4 -4
- package/.docs/reference/rag/metadata-filters.md +5 -5
- package/.docs/reference/rag/rerank.md +2 -2
- package/.docs/reference/rag/rerankWithScorer.md +2 -2
- package/.docs/reference/server/express-adapter.md +1 -1
- package/.docs/reference/server/fastify-adapter.md +1 -1
- package/.docs/reference/server/hono-adapter.md +1 -1
- package/.docs/reference/server/koa-adapter.md +1 -1
- package/.docs/reference/server/mastra-server.md +16 -16
- package/.docs/reference/server/register-api-route.md +5 -5
- package/.docs/reference/server/routes.md +1 -1
- package/.docs/reference/storage/cloudflare-d1.md +2 -2
- package/.docs/reference/storage/cloudflare.md +2 -2
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/convex.md +5 -5
- package/.docs/reference/storage/dynamodb.md +5 -5
- package/.docs/reference/storage/lance.md +3 -3
- package/.docs/reference/storage/libsql.md +1 -1
- package/.docs/reference/storage/mongodb.md +5 -5
- package/.docs/reference/storage/mssql.md +3 -3
- package/.docs/reference/storage/overview.md +2 -2
- package/.docs/reference/storage/postgresql.md +5 -5
- package/.docs/reference/storage/upstash.md +3 -3
- package/.docs/reference/streaming/ChunkType.md +13 -13
- package/.docs/reference/streaming/agents/MastraModelOutput.md +6 -6
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamLegacy.md +1 -1
- package/.docs/reference/streaming/workflows/observeStream.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/templates/overview.md +3 -3
- package/.docs/reference/tools/create-tool.md +9 -9
- package/.docs/reference/tools/document-chunker-tool.md +4 -4
- package/.docs/reference/tools/graph-rag-tool.md +7 -7
- package/.docs/reference/tools/mcp-client.md +13 -13
- package/.docs/reference/tools/mcp-server.md +23 -23
- package/.docs/reference/tools/vector-query-tool.md +12 -12
- package/.docs/reference/vectors/astra.md +13 -13
- package/.docs/reference/vectors/chroma.md +16 -16
- package/.docs/reference/vectors/convex.md +15 -15
- package/.docs/reference/vectors/couchbase.md +15 -15
- package/.docs/reference/vectors/duckdb.md +17 -17
- package/.docs/reference/vectors/elasticsearch.md +14 -14
- package/.docs/reference/vectors/lance.md +22 -22
- package/.docs/reference/vectors/libsql.md +15 -15
- package/.docs/reference/vectors/mongodb.md +18 -18
- package/.docs/reference/vectors/opensearch.md +11 -11
- package/.docs/reference/vectors/pg.md +21 -21
- package/.docs/reference/vectors/pinecone.md +15 -15
- package/.docs/reference/vectors/qdrant.md +15 -15
- package/.docs/reference/vectors/s3vectors.md +17 -17
- package/.docs/reference/vectors/turbopuffer.md +14 -14
- package/.docs/reference/vectors/upstash.md +15 -15
- package/.docs/reference/vectors/vectorize.md +16 -16
- package/.docs/reference/voice/azure.md +8 -8
- package/.docs/reference/voice/cloudflare.md +5 -5
- package/.docs/reference/voice/composite-voice.md +5 -5
- package/.docs/reference/voice/deepgram.md +5 -5
- package/.docs/reference/voice/elevenlabs.md +6 -6
- package/.docs/reference/voice/google-gemini-live.md +20 -20
- package/.docs/reference/voice/google.md +9 -9
- package/.docs/reference/voice/mastra-voice.md +17 -17
- package/.docs/reference/voice/murf.md +6 -6
- package/.docs/reference/voice/openai-realtime.md +16 -16
- package/.docs/reference/voice/openai.md +5 -5
- package/.docs/reference/voice/playai.md +5 -5
- package/.docs/reference/voice/sarvam.md +5 -5
- package/.docs/reference/voice/speechify.md +5 -5
- package/.docs/reference/voice/voice.addInstructions.md +2 -2
- package/.docs/reference/voice/voice.addTools.md +2 -2
- package/.docs/reference/voice/voice.answer.md +2 -2
- package/.docs/reference/voice/voice.close.md +2 -2
- package/.docs/reference/voice/voice.connect.md +5 -5
- package/.docs/reference/voice/voice.events.md +2 -2
- package/.docs/reference/voice/voice.getSpeakers.md +3 -3
- package/.docs/reference/voice/voice.listen.md +6 -6
- package/.docs/reference/voice/voice.off.md +2 -2
- package/.docs/reference/voice/voice.on.md +3 -3
- package/.docs/reference/voice/voice.send.md +2 -2
- package/.docs/reference/voice/voice.speak.md +5 -5
- package/.docs/reference/voice/voice.updateConfig.md +3 -3
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run.md +3 -3
- package/.docs/reference/workflows/step.md +2 -2
- package/.docs/reference/workflows/workflow-methods/create-run.md +1 -1
- package/.docs/reference/workflows/workflow.md +1 -1
- package/.docs/reference/workspace/daytona-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/filesystem.md +1 -1
- package/.docs/reference/workspace/gcs-filesystem.md +1 -1
- package/.docs/reference/workspace/local-filesystem.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +4 -4
- package/.docs/reference/workspace/process-manager.md +2 -2
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +2 -2
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Workflows API provides methods to interact with and execute automated workflows in Mastra.
|
|
4
4
|
|
|
5
|
-
## Getting
|
|
5
|
+
## Getting all workflows
|
|
6
6
|
|
|
7
7
|
Retrieve a list of all available workflows:
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Retrieve a list of all available workflows:
|
|
|
10
10
|
const workflows = await mastraClient.listWorkflows()
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
## Working with a
|
|
13
|
+
## Working with a specific workflow
|
|
14
14
|
|
|
15
15
|
Get an instance of a specific workflow by its ID:
|
|
16
16
|
|
|
@@ -24,9 +24,9 @@ export const testWorkflow = createWorkflow({
|
|
|
24
24
|
const workflow = mastraClient.getWorkflow('city-workflow')
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
## Workflow
|
|
27
|
+
## Workflow methods
|
|
28
28
|
|
|
29
|
-
### details()
|
|
29
|
+
### `details()`
|
|
30
30
|
|
|
31
31
|
Retrieve detailed information about a workflow:
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ Retrieve detailed information about a workflow:
|
|
|
34
34
|
const details = await workflow.details()
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
### createRun()
|
|
37
|
+
### `createRun()`
|
|
38
38
|
|
|
39
39
|
Create a new workflow run instance:
|
|
40
40
|
|
|
@@ -53,7 +53,7 @@ const run = await workflow.createRun({
|
|
|
53
53
|
|
|
54
54
|
The `resourceId` parameter associates the workflow run with a specific resource (e.g., user ID, tenant ID). This value is persisted with the run and can be used for filtering and querying runs later.
|
|
55
55
|
|
|
56
|
-
### startAsync()
|
|
56
|
+
### `startAsync()`
|
|
57
57
|
|
|
58
58
|
Start a workflow run and await the full result:
|
|
59
59
|
|
|
@@ -95,7 +95,7 @@ const result = await run.startAsync({
|
|
|
95
95
|
})
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
### start()
|
|
98
|
+
### `start()`
|
|
99
99
|
|
|
100
100
|
Start a workflow run without waiting for completion:
|
|
101
101
|
|
|
@@ -114,7 +114,7 @@ const result = await workflow.runById(run.runId)
|
|
|
114
114
|
|
|
115
115
|
This is useful for long-running workflows where you want to start execution and check results later.
|
|
116
116
|
|
|
117
|
-
### resumeAsync()
|
|
117
|
+
### `resumeAsync()`
|
|
118
118
|
|
|
119
119
|
Resume a suspended workflow step and await the full result:
|
|
120
120
|
|
|
@@ -127,7 +127,7 @@ const result = await run.resumeAsync({
|
|
|
127
127
|
})
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
### resume()
|
|
130
|
+
### `resume()`
|
|
131
131
|
|
|
132
132
|
Resume a suspended workflow step without waiting for completion:
|
|
133
133
|
|
|
@@ -140,7 +140,7 @@ await run.resume({
|
|
|
140
140
|
})
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
### cancel()
|
|
143
|
+
### `cancel()`
|
|
144
144
|
|
|
145
145
|
Cancel a running workflow:
|
|
146
146
|
|
|
@@ -155,7 +155,7 @@ This method stops any running steps and prevents subsequent steps from executing
|
|
|
155
155
|
|
|
156
156
|
See the [Run.cancel()](https://mastra.ai/reference/workflows/run-methods/cancel) reference for detailed information about how cancellation works and how to write steps that respond to cancellation.
|
|
157
157
|
|
|
158
|
-
### stream()
|
|
158
|
+
### `stream()`
|
|
159
159
|
|
|
160
160
|
Stream workflow execution for real-time updates:
|
|
161
161
|
|
|
@@ -173,7 +173,7 @@ for await (const chunk of stream) {
|
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
### runById()
|
|
176
|
+
### `runById()`
|
|
177
177
|
|
|
178
178
|
Get the execution result for a workflow run:
|
|
179
179
|
|
|
@@ -18,7 +18,7 @@ const gateway = mastra.getGatewayById('my-custom-gateway')
|
|
|
18
18
|
console.log(gateway.name) // 'My Custom Gateway'
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
## Use
|
|
21
|
+
## Use cases
|
|
22
22
|
|
|
23
23
|
- Gateway versioning: Different versions with unique IDs (`'gateway-v1'`, `'gateway-v2'`)
|
|
24
24
|
- Finding gateways when registration keys are unknown
|
|
@@ -36,12 +36,12 @@ const serverById = mastra.getMCPServerById('my-mcp-server')
|
|
|
36
36
|
|
|
37
37
|
**server** (`MCPServerBase | undefined`): The MCP server instance with the specified registry key, or undefined if not found.
|
|
38
38
|
|
|
39
|
-
## Related
|
|
39
|
+
## Related methods
|
|
40
40
|
|
|
41
41
|
- [Mastra.getMCPServerById()](https://mastra.ai/reference/core/getMCPServerById) - Retrieve an MCP server by its intrinsic `id` property
|
|
42
42
|
- [Mastra.listMCPServers()](https://mastra.ai/reference/core/listMCPServers) - List all registered MCP servers
|
|
43
43
|
|
|
44
|
-
## See
|
|
44
|
+
## See also
|
|
45
45
|
|
|
46
46
|
- [MCP overview](https://mastra.ai/docs/mcp/overview)
|
|
47
47
|
- [MCP server reference](https://mastra.ai/reference/tools/mcp-server)
|
|
@@ -44,12 +44,12 @@ const serverByKey = mastra.getMCPServer('customKey')
|
|
|
44
44
|
- If multiple servers have the same `id` but different versions, you must provide the `version` parameter to disambiguate
|
|
45
45
|
- If no `version` is provided and multiple versions exist, the method returns the first match
|
|
46
46
|
|
|
47
|
-
## Related
|
|
47
|
+
## Related methods
|
|
48
48
|
|
|
49
49
|
- [Mastra.getMCPServer()](https://mastra.ai/reference/core/getMCPServer) - Retrieve an MCP server by its registry key
|
|
50
50
|
- [Mastra.listMCPServers()](https://mastra.ai/reference/core/listMCPServers) - List all registered MCP servers
|
|
51
51
|
|
|
52
|
-
## See
|
|
52
|
+
## See also
|
|
53
53
|
|
|
54
54
|
- [MCP overview](https://mastra.ai/docs/mcp/overview)
|
|
55
55
|
- [MCP server reference](https://mastra.ai/reference/tools/mcp-server)
|
|
@@ -22,7 +22,7 @@ const thread = await memory.createThread({
|
|
|
22
22
|
|
|
23
23
|
**memory** (`TMemory[TMemoryKey]`): The memory instance with the specified key. Throws an error if the memory is not found.
|
|
24
24
|
|
|
25
|
-
## Example: Registering and
|
|
25
|
+
## Example: Registering and retrieving memory
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
28
|
import { Mastra } from '@mastra/core'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `getScorer()` method retrieves a specific scorer that was registered with the Mastra instance using its registration key. This method provides type-safe access to scorers and throws an error if the requested scorer isn't found.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { mastra } from './mastra'
|
|
@@ -30,7 +30,7 @@ await weatherAgent.generate('What is the weather in Rome', {
|
|
|
30
30
|
|
|
31
31
|
**scorer** (`MastraScorer`): The MastraScorer instance associated with the provided key.
|
|
32
32
|
|
|
33
|
-
## Error
|
|
33
|
+
## Error handling
|
|
34
34
|
|
|
35
35
|
This method throws a `MastraError` if:
|
|
36
36
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `getScorerById()` method retrieves a scorer by searching for its `id` property (or `name` property as a fallback) rather than the registration key. This is useful when you know the scorer's id but not necessarily how it was registered in the Mastra instance.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { mastra } from './mastra'
|
|
@@ -30,7 +30,7 @@ await weatherAgent.generate('What is the weather in Rome', {
|
|
|
30
30
|
|
|
31
31
|
**scorer** (`MastraScorer`): The MastraScorer instance that has the matching id (or name) property.
|
|
32
32
|
|
|
33
|
-
## Error
|
|
33
|
+
## Error handling
|
|
34
34
|
|
|
35
35
|
This method throws a `MastraError` if:
|
|
36
36
|
|
|
@@ -36,7 +36,7 @@ if (storedConfig) {
|
|
|
36
36
|
|
|
37
37
|
**result** (`Agent | StorageAgentType | null`): Returns an \`Agent\` instance by default, or \`StorageAgentType\` when \`raw: true\`. Returns \`null\` if no agent with the given ID exists.
|
|
38
38
|
|
|
39
|
-
## Primitive
|
|
39
|
+
## Primitive resolution
|
|
40
40
|
|
|
41
41
|
When creating an `Agent` instance from stored configuration, the method resolves references to registered primitives:
|
|
42
42
|
|
|
@@ -48,7 +48,7 @@ When creating an `Agent` instance from stored configuration, the method resolves
|
|
|
48
48
|
|
|
49
49
|
If a referenced primitive isn't found in the registry, a warning is logged but the agent is still created.
|
|
50
50
|
|
|
51
|
-
## StorageAgentType
|
|
51
|
+
## `StorageAgentType`
|
|
52
52
|
|
|
53
53
|
When using `raw: true`, the returned object has the following structure:
|
|
54
54
|
|
|
@@ -44,12 +44,12 @@ This method doesn't accept any parameters.
|
|
|
44
44
|
|
|
45
45
|
**servers** (`Record<string, MCPServerBase> | undefined`): A record of all registered MCP server instances, where keys are the registry keys (from mcpServers configuration) and values are MCPServerBase instances, or undefined if no servers are registered.
|
|
46
46
|
|
|
47
|
-
## Related
|
|
47
|
+
## Related methods
|
|
48
48
|
|
|
49
49
|
- [Mastra.getMCPServer()](https://mastra.ai/reference/core/getMCPServer) - Retrieve an MCP server by its registry key
|
|
50
50
|
- [Mastra.getMCPServerById()](https://mastra.ai/reference/core/getMCPServerById) - Retrieve an MCP server by its intrinsic `id` property
|
|
51
51
|
|
|
52
|
-
## See
|
|
52
|
+
## See also
|
|
53
53
|
|
|
54
54
|
- [MCP overview](https://mastra.ai/docs/mcp/overview)
|
|
55
55
|
- [MCP server reference](https://mastra.ai/reference/tools/mcp-server)
|
|
@@ -20,7 +20,7 @@ This method takes no parameters.
|
|
|
20
20
|
|
|
21
21
|
**memory** (`Record<string, MastraMemory>`): An object containing all registered memory instances, keyed by their registry keys.
|
|
22
22
|
|
|
23
|
-
## Example: Checking
|
|
23
|
+
## Example: Checking registered memory
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
26
|
import { Mastra } from '@mastra/core'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `listScorers()` method returns all scorers that have been registered with the Mastra instance. Scorers are used for evaluating AI outputs and can override default scorers during agent generation or workflow execution.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { mastra } from './mastra'
|
|
@@ -53,7 +53,7 @@ for (const config of result.agents) {
|
|
|
53
53
|
|
|
54
54
|
**hasMore** (`boolean`): Whether there are more pages available.
|
|
55
55
|
|
|
56
|
-
## Primitive
|
|
56
|
+
## Primitive resolution
|
|
57
57
|
|
|
58
58
|
When creating `Agent` instances (default behavior), each stored agent's configuration is resolved against registered primitives:
|
|
59
59
|
|
|
@@ -65,7 +65,7 @@ When creating `Agent` instances (default behavior), each stored agent's configur
|
|
|
65
65
|
|
|
66
66
|
If a referenced primitive isn't found, a warning is logged but the agent is still created.
|
|
67
67
|
|
|
68
|
-
## Example: Iterating
|
|
68
|
+
## Example: Iterating through all stored agents
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
71
|
async function getAllStoredAgents(mastra: Mastra) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Abstract base class for implementing custom model gateways. Gateways handle provider-specific logic for accessing language models, including provider configuration, authentication, URL construction, and model instantiation.
|
|
4
4
|
|
|
5
|
-
## Class
|
|
5
|
+
## Class overview
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { MastraModelGateway, type ProviderConfig } from '@mastra/core/llm'
|
|
@@ -53,15 +53,15 @@ class MyCustomGateway extends MastraModelGateway {
|
|
|
53
53
|
}
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
## Required
|
|
56
|
+
## Required properties
|
|
57
57
|
|
|
58
58
|
**id** (`string`): Unique identifier for the gateway. This ID is used as the prefix for all providers from this gateway (e.g., "netlify/anthropic"). Exception: models.dev is a provider registry and doesn't use a prefix.
|
|
59
59
|
|
|
60
60
|
**name** (`string`): Human-readable name for the gateway.
|
|
61
61
|
|
|
62
|
-
## Required
|
|
62
|
+
## Required methods
|
|
63
63
|
|
|
64
|
-
### fetchProviders()
|
|
64
|
+
### `fetchProviders()`
|
|
65
65
|
|
|
66
66
|
Fetches provider configurations from the gateway.
|
|
67
67
|
|
|
@@ -83,7 +83,7 @@ Fetches provider configurations from the gateway.
|
|
|
83
83
|
|
|
84
84
|
**docUrl** (`string`): Optional documentation URL
|
|
85
85
|
|
|
86
|
-
### buildUrl()
|
|
86
|
+
### `buildUrl()`
|
|
87
87
|
|
|
88
88
|
Builds the API URL for a specific model/provider combination.
|
|
89
89
|
|
|
@@ -95,7 +95,7 @@ Builds the API URL for a specific model/provider combination.
|
|
|
95
95
|
|
|
96
96
|
**Returns:** `string | undefined | Promise<string | undefined>`
|
|
97
97
|
|
|
98
|
-
### getApiKey()
|
|
98
|
+
### `getApiKey()`
|
|
99
99
|
|
|
100
100
|
Retrieves the API key for authentication.
|
|
101
101
|
|
|
@@ -105,7 +105,7 @@ Retrieves the API key for authentication.
|
|
|
105
105
|
|
|
106
106
|
**Returns:** `Promise<string>`
|
|
107
107
|
|
|
108
|
-
### resolveLanguageModel()
|
|
108
|
+
### `resolveLanguageModel()`
|
|
109
109
|
|
|
110
110
|
Creates a language model instance.
|
|
111
111
|
|
|
@@ -119,15 +119,15 @@ Creates a language model instance.
|
|
|
119
119
|
|
|
120
120
|
**Returns:** `Promise<LanguageModelV2> | LanguageModelV2`
|
|
121
121
|
|
|
122
|
-
## Instance
|
|
122
|
+
## Instance methods
|
|
123
123
|
|
|
124
|
-
### getId()
|
|
124
|
+
### `getId()`
|
|
125
125
|
|
|
126
126
|
Returns the gateway's unique identifier.
|
|
127
127
|
|
|
128
128
|
**Returns:** `string` - The gateway's `id` property
|
|
129
129
|
|
|
130
|
-
## Model ID
|
|
130
|
+
## Model ID format
|
|
131
131
|
|
|
132
132
|
For true gateways, the gateway ID is used as a prefix and models are accessed using this format:
|
|
133
133
|
|
|
@@ -139,7 +139,7 @@ Examples:
|
|
|
139
139
|
|
|
140
140
|
- Gateway with `id = 'custom'`: `'custom/my-provider/model-1'`
|
|
141
141
|
|
|
142
|
-
## Built-in
|
|
142
|
+
## Built-in implementations
|
|
143
143
|
|
|
144
144
|
- **NetlifyGateway** - Netlify AI Gateway integration
|
|
145
145
|
- **ModelsDevGateway** - Registry of OpenAI-compatible providers
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Deployer handles the deployment of standalone Mastra applications by packaging code, managing environment files, and serving applications using the Hono framework. Concrete implementations must define the deploy method for specific deployment targets.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
If you want to create a custom deployer, you can extend the abstract `Deployer` class and implement the `deploy` method with your specific deployment logic. Here's an example:
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ class CustomDeployer extends Deployer {
|
|
|
28
28
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
|
-
### Constructor
|
|
31
|
+
### Constructor parameters
|
|
32
32
|
|
|
33
33
|
**args** (`object`): Configuration options for the Deployer.
|
|
34
34
|
|
|
@@ -44,7 +44,7 @@ class CustomDeployer extends Deployer {
|
|
|
44
44
|
|
|
45
45
|
**deploy** (`(outputDirectory: string) => Promise<void>`): Abstract method that must be implemented by subclasses. Handles the deployment process to the specified output directory.
|
|
46
46
|
|
|
47
|
-
## Inherited
|
|
47
|
+
## Inherited methods from bundler
|
|
48
48
|
|
|
49
49
|
The Deployer class inherits the following key methods from the Bundler class:
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ The Deployer class inherits the following key methods from the Bundler class:
|
|
|
54
54
|
|
|
55
55
|
**\_bundle** (`(serverFile: string, mastraEntryFile: string, outputDirectory: string, bundleLocation?: string) => Promise<void>`): Bundles the application using the specified server and Mastra entry files.
|
|
56
56
|
|
|
57
|
-
## Core
|
|
57
|
+
## Core concepts
|
|
58
58
|
|
|
59
59
|
### Deployment Lifecycle
|
|
60
60
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Answer
|
|
1
|
+
# Answer relevancy scorer
|
|
2
2
|
|
|
3
3
|
The `createAnswerRelevancyScorer()` function accepts a single options object with the following properties:
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ The `createAnswerRelevancyScorer()` function accepts a single options object wit
|
|
|
12
12
|
|
|
13
13
|
This function returns an instance of the MastraScorer class. The `.run()` method accepts the same input as other scorers (see the [MastraScorer reference](https://mastra.ai/reference/evals/mastra-scorer)), but the return value includes LLM-specific fields as documented below.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## `.run()` returns
|
|
16
16
|
|
|
17
17
|
**runId** (`string`): The id of the run (optional).
|
|
18
18
|
|
|
@@ -30,7 +30,7 @@ This function returns an instance of the MastraScorer class. The `.run()` method
|
|
|
30
30
|
|
|
31
31
|
**reason** (`string`): Explanation of the score.
|
|
32
32
|
|
|
33
|
-
## Scoring
|
|
33
|
+
## Scoring details
|
|
34
34
|
|
|
35
35
|
The scorer evaluates relevancy through query-answer alignment, considering completeness and detail level, but not factual correctness.
|
|
36
36
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Answer
|
|
1
|
+
# Answer similarity scorer
|
|
2
2
|
|
|
3
3
|
The `createAnswerSimilarityScorer()` function creates a scorer that evaluates how similar an agent's output is to a ground truth answer. This scorer is specifically designed for CI/CD testing scenarios where you have expected answers and want to ensure consistency over time.
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ The `createAnswerSimilarityScorer()` function creates a scorer that evaluates ho
|
|
|
24
24
|
|
|
25
25
|
This function returns an instance of the MastraScorer class. The `.run()` method accepts the same input as other scorers (see the [MastraScorer reference](https://mastra.ai/reference/evals/mastra-scorer)), but **requires ground truth** to be provided in the run object.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## `.run()` returns
|
|
28
28
|
|
|
29
29
|
**runId** (`string`): The id of the run (optional).
|
|
30
30
|
|
|
@@ -42,7 +42,7 @@ This function returns an instance of the MastraScorer class. The `.run()` method
|
|
|
42
42
|
|
|
43
43
|
**generateReasonPrompt** (`string`): The prompt used for generating the explanation.
|
|
44
44
|
|
|
45
|
-
## Scoring
|
|
45
|
+
## Scoring details
|
|
46
46
|
|
|
47
47
|
The scorer uses a multi-step process:
|
|
48
48
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Bias
|
|
1
|
+
# Bias scorer
|
|
2
2
|
|
|
3
3
|
The `createBiasScorer()` function accepts a single options object with the following properties:
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ The `createBiasScorer()` function accepts a single options object with the follo
|
|
|
10
10
|
|
|
11
11
|
This function returns an instance of the MastraScorer class. The `.run()` method accepts the same input as other scorers (see the [MastraScorer reference](https://mastra.ai/reference/evals/mastra-scorer)), but the return value includes LLM-specific fields as documented below.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## `.run()` returns
|
|
14
14
|
|
|
15
15
|
**runId** (`string`): The id of the run (optional).
|
|
16
16
|
|
|
@@ -28,7 +28,7 @@ This function returns an instance of the MastraScorer class. The `.run()` method
|
|
|
28
28
|
|
|
29
29
|
**generateReasonPrompt** (`string`): The prompt sent to the LLM for the generateReason step (optional).
|
|
30
30
|
|
|
31
|
-
## Bias
|
|
31
|
+
## Bias categories
|
|
32
32
|
|
|
33
33
|
The scorer evaluates several types of bias:
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ The scorer evaluates several types of bias:
|
|
|
37
37
|
3. **Racial/Ethnic Bias**: Discrimination based on race, ethnicity, or national origin
|
|
38
38
|
4. **Geographical Bias**: Prejudice based on location or regional stereotypes
|
|
39
39
|
|
|
40
|
-
## Scoring
|
|
40
|
+
## Scoring details
|
|
41
41
|
|
|
42
42
|
The scorer evaluates bias through opinion analysis based on:
|
|
43
43
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Completeness
|
|
1
|
+
# Completeness scorer
|
|
2
2
|
|
|
3
3
|
The `createCompletenessScorer()` function evaluates how thoroughly an LLM's output covers the key elements present in the input. It analyzes nouns, verbs, topics, and terms to determine coverage and provides a detailed completeness score.
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ The `createCompletenessScorer()` function doesn't take any options.
|
|
|
8
8
|
|
|
9
9
|
This function returns an instance of the MastraScorer class. See the [MastraScorer reference](https://mastra.ai/reference/evals/mastra-scorer) for details on the `.run()` method and its input/output.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## `.run()` returns
|
|
12
12
|
|
|
13
13
|
**runId** (`string`): The id of the run (optional).
|
|
14
14
|
|
|
@@ -31,7 +31,7 @@ The `.run()` method returns a result in the following shape:
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
## Element
|
|
34
|
+
## Element extraction details
|
|
35
35
|
|
|
36
36
|
The scorer extracts and analyzes several types of elements:
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ The extraction process includes:
|
|
|
48
48
|
- Special handling of short words (3 characters or less)
|
|
49
49
|
- Deduplication of elements
|
|
50
50
|
|
|
51
|
-
### extractStepResult
|
|
51
|
+
### `extractStepResult`
|
|
52
52
|
|
|
53
53
|
From the `.run()` method, you can get the `extractStepResult` object with the following properties:
|
|
54
54
|
|
|
@@ -57,7 +57,7 @@ From the `.run()` method, you can get the `extractStepResult` object with the fo
|
|
|
57
57
|
- **missingElements**: Input elements not found in the output.
|
|
58
58
|
- **elementCounts**: The number of elements in the input and output.
|
|
59
59
|
|
|
60
|
-
## Scoring
|
|
60
|
+
## Scoring details
|
|
61
61
|
|
|
62
62
|
The scorer evaluates completeness through linguistic element coverage analysis.
|
|
63
63
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Content
|
|
1
|
+
# Content similarity scorer
|
|
2
2
|
|
|
3
3
|
The `createContentSimilarityScorer()` function measures the textual similarity between two strings, providing a score that indicates how closely they match. It supports configurable options for case sensitivity and whitespace handling.
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ The `createContentSimilarityScorer()` function accepts a single options object w
|
|
|
12
12
|
|
|
13
13
|
This function returns an instance of the MastraScorer class. See the [MastraScorer reference](https://mastra.ai/reference/evals/mastra-scorer) for details on the `.run()` method and its input/output.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## `.run()` returns
|
|
16
16
|
|
|
17
17
|
**runId** (`string`): The id of the run (optional).
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ This function returns an instance of the MastraScorer class. See the [MastraScor
|
|
|
22
22
|
|
|
23
23
|
**score** (`number`): Similarity score (0-1) where 1 indicates perfect similarity.
|
|
24
24
|
|
|
25
|
-
## Scoring
|
|
25
|
+
## Scoring details
|
|
26
26
|
|
|
27
27
|
The scorer evaluates textual similarity through character-level matching and configurable text normalization.
|
|
28
28
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Context
|
|
1
|
+
# Context precision scorer
|
|
2
2
|
|
|
3
3
|
The `createContextPrecisionScorer()` function creates a scorer that evaluates how relevant and well-positioned retrieved context pieces are for generating expected outputs. It uses **Mean Average Precision (MAP)** to reward systems that place relevant context earlier in the sequence.
|
|
4
4
|
|
|
5
5
|
It's especially useful for these use cases:
|
|
6
6
|
|
|
7
|
-
## RAG
|
|
7
|
+
## RAG system evaluation
|
|
8
8
|
|
|
9
9
|
Ideal for evaluating retrieved context in RAG pipelines where:
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Ideal for evaluating retrieved context in RAG pipelines where:
|
|
|
12
12
|
- You need to measure retrieval quality beyond basic relevance
|
|
13
13
|
- Early relevant context is more valuable than later relevant context
|
|
14
14
|
|
|
15
|
-
## Context
|
|
15
|
+
## Context window optimization
|
|
16
16
|
|
|
17
17
|
Use when optimizing context selection for:
|
|
18
18
|
|
|
@@ -28,13 +28,13 @@ Use when optimizing context selection for:
|
|
|
28
28
|
|
|
29
29
|
**Note**: Either `context` or `contextExtractor` must be provided. If both are provided, `contextExtractor` takes precedence.
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## `.run()` returns
|
|
32
32
|
|
|
33
33
|
**score** (`number`): Mean Average Precision score between 0 and scale (default 0-1)
|
|
34
34
|
|
|
35
35
|
**reason** (`string`): Human-readable explanation of the context precision evaluation
|
|
36
36
|
|
|
37
|
-
## Scoring
|
|
37
|
+
## Scoring details
|
|
38
38
|
|
|
39
39
|
### Mean Average Precision (MAP)
|
|
40
40
|
|
|
@@ -177,7 +177,7 @@ For more details on `runEvals`, see the [runEvals reference](https://mastra.ai/r
|
|
|
177
177
|
|
|
178
178
|
To add this scorer to an agent, see the [Scorers overview](https://mastra.ai/docs/evals/overview) guide.
|
|
179
179
|
|
|
180
|
-
## Comparison with
|
|
180
|
+
## Comparison with context relevance
|
|
181
181
|
|
|
182
182
|
Choose the right scorer for your needs:
|
|
183
183
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Context
|
|
1
|
+
# Context relevance scorer
|
|
2
2
|
|
|
3
3
|
The `createContextRelevanceScorerLLM()` function creates a scorer that evaluates how relevant and useful provided context was for generating agent responses. It uses weighted relevance levels and applies penalties for unused high-relevance context and missing information.
|
|
4
4
|
|
|
5
5
|
It's especially useful for these use cases:
|
|
6
6
|
|
|
7
|
-
## Content
|
|
7
|
+
## Content generation evaluation
|
|
8
8
|
|
|
9
9
|
Best for evaluating context quality in:
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Best for evaluating context quality in:
|
|
|
12
12
|
- RAG pipelines needing nuanced relevance assessment
|
|
13
13
|
- Systems where missing context affects quality
|
|
14
14
|
|
|
15
|
-
## Context
|
|
15
|
+
## Context selection optimization
|
|
16
16
|
|
|
17
17
|
Use when optimizing for:
|
|
18
18
|
|
|
@@ -28,13 +28,13 @@ Use when optimizing for:
|
|
|
28
28
|
|
|
29
29
|
Note: Either `context` or `contextExtractor` must be provided. If both are provided, `contextExtractor` takes precedence.
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## `.run()` returns
|
|
32
32
|
|
|
33
33
|
**score** (`number`): Weighted relevance score between 0 and scale (default 0-1)
|
|
34
34
|
|
|
35
35
|
**reason** (`string`): Human-readable explanation of the context relevance evaluation
|
|
36
36
|
|
|
37
|
-
## Scoring
|
|
37
|
+
## Scoring details
|
|
38
38
|
|
|
39
39
|
### Weighted Relevance Scoring
|
|
40
40
|
|
|
@@ -512,7 +512,7 @@ const evaluateRAG = async testCases => {
|
|
|
512
512
|
}
|
|
513
513
|
```
|
|
514
514
|
|
|
515
|
-
## Comparison with
|
|
515
|
+
## Comparison with context precision
|
|
516
516
|
|
|
517
517
|
Choose the right scorer for your needs:
|
|
518
518
|
|