@mastra/mcp-docs-server 1.2.11 → 1.2.12-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agent-builder/access-control.md +3 -3
- package/.docs/docs/agent-builder/browser.md +1 -1
- package/.docs/docs/agent-builder/channels.md +1 -1
- package/.docs/docs/agent-builder/configuration.md +3 -3
- package/.docs/docs/agent-builder/deploying.md +2 -2
- package/.docs/docs/agent-builder/integrations.md +8 -8
- package/.docs/docs/agent-builder/memory.md +2 -2
- package/.docs/docs/agent-builder/overview.md +1 -1
- package/.docs/docs/agent-controller/channels.md +8 -6
- package/.docs/docs/agent-controller/modes.md +6 -6
- package/.docs/docs/agent-controller/overview.md +13 -9
- package/.docs/docs/agent-controller/session.md +27 -9
- package/.docs/docs/agent-controller/subagents.md +9 -6
- package/.docs/docs/agent-controller/threads-and-state.md +12 -8
- package/.docs/docs/agent-controller/tool-approvals.md +7 -3
- package/.docs/docs/agents/a2a.md +4 -2
- package/.docs/docs/agents/acp.md +5 -5
- package/.docs/docs/agents/agent-approval.md +13 -11
- package/.docs/docs/agents/code-mode.md +29 -6
- package/.docs/docs/agents/guardrails.md +8 -8
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +9 -7
- package/.docs/docs/agents/processors.md +15 -15
- package/.docs/docs/agents/skills.md +6 -6
- package/.docs/docs/agents/structured-output.md +6 -6
- package/.docs/docs/agents/supervisor-agents.md +19 -13
- package/.docs/docs/agents/using-tools.md +48 -21
- package/.docs/docs/browser/agent-browser.md +4 -4
- package/.docs/docs/browser/browser-viewer.md +2 -2
- package/.docs/docs/browser/firecrawl.md +1 -1
- package/.docs/docs/browser/overview.md +2 -2
- package/.docs/docs/browser/recording.md +1 -1
- package/.docs/docs/browser/stagehand.md +7 -7
- package/.docs/docs/capabilities/channels/discord.md +1 -1
- package/.docs/docs/capabilities/channels/other-adapters.md +1 -1
- package/.docs/docs/capabilities/channels/overview.md +9 -5
- package/.docs/docs/capabilities/channels/slack.md +2 -2
- package/.docs/docs/capabilities/channels/teams.md +1 -1
- package/.docs/docs/capabilities/channels/telegram.md +1 -1
- package/.docs/docs/capabilities/channels/whatsapp.md +1 -1
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/overview.md +6 -2
- package/.docs/docs/deployment/sandbox.md +3 -1
- package/.docs/docs/deployment/workers.md +137 -0
- package/.docs/docs/editor/overview.md +37 -31
- package/.docs/docs/editor/prompts.md +8 -4
- package/.docs/docs/editor/tools.md +3 -3
- package/.docs/docs/evals/built-in-scorers.md +4 -4
- package/.docs/docs/evals/custom-scorers.md +5 -5
- package/.docs/docs/evals/datasets/running-experiments.md +7 -7
- package/.docs/docs/evals/evals-with-memory.md +4 -4
- package/.docs/docs/evals/gates-and-verdicts.md +4 -4
- package/.docs/docs/evals/multi-turn.md +12 -12
- package/.docs/docs/evals/overview.md +6 -4
- package/.docs/docs/evals/quick-checks.md +2 -2
- package/.docs/docs/getting-started/build-with-ai.md +6 -4
- package/.docs/docs/getting-started/file-based-agents.md +6 -4
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/index.md +9 -90
- package/.docs/docs/long-running-agents/background-tasks.md +10 -10
- package/.docs/docs/long-running-agents/durable-agents.md +46 -5
- package/.docs/docs/long-running-agents/goals.md +15 -11
- package/.docs/docs/long-running-agents/schedules.md +3 -3
- package/.docs/docs/long-running-agents/signal-providers.md +8 -6
- package/.docs/docs/long-running-agents/signals.md +9 -5
- package/.docs/docs/mastra-platform/configuration.md +3 -3
- package/.docs/docs/mastra-platform/database.md +8 -8
- package/.docs/docs/mastra-platform/deploy.md +8 -4
- package/.docs/docs/mastra-platform/environments.md +8 -4
- package/.docs/docs/mastra-platform/github.md +3 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/studio.md +2 -2
- package/.docs/docs/mastra-platform/workspace.md +6 -6
- package/.docs/docs/mcp/mcp-apps.md +1 -1
- package/.docs/docs/mcp/overview.md +9 -9
- package/.docs/docs/memory/memory-processors.md +10 -10
- package/.docs/docs/memory/message-history.md +11 -5
- package/.docs/docs/memory/multi-user-threads.md +6 -6
- package/.docs/docs/memory/observational-memory.md +27 -25
- package/.docs/docs/memory/overview.md +10 -10
- package/.docs/docs/memory/semantic-recall.md +3 -3
- package/.docs/docs/memory/working-memory.md +8 -8
- package/.docs/docs/observability/integrations/bridges/datadog.md +6 -6
- package/.docs/docs/observability/integrations/bridges/otel.md +5 -5
- package/.docs/docs/observability/integrations/exporters/datadog.md +1 -1
- package/.docs/docs/observability/integrations/exporters/laminar.md +1 -1
- package/.docs/docs/observability/integrations/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/integrations/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
- package/.docs/docs/observability/integrations/exporters/otel.md +26 -4
- package/.docs/docs/observability/integrations/exporters/sentry.md +1 -1
- package/.docs/docs/observability/integrations/overview.md +1 -1
- package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/observability/metrics/querying.md +8 -8
- package/.docs/docs/observability/overview.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +18 -12
- package/.docs/docs/rag/chunking-and-embedding.md +1 -1
- package/.docs/docs/rag/graph-rag.md +7 -7
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +18 -18
- package/.docs/docs/rag/vector-databases.md +2 -2
- package/.docs/docs/server/auth/composite-auth.md +2 -2
- package/.docs/docs/server/auth/fga.md +6 -6
- package/.docs/docs/server/auth/firebase.md +2 -2
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +133 -0
- package/.docs/docs/server/custom-adapters.md +4 -4
- package/.docs/docs/server/mastra-client.md +3 -3
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/pubsub.md +7 -4
- package/.docs/docs/server/request-context.md +11 -11
- package/.docs/docs/server/server-adapters.md +2 -2
- package/.docs/docs/storage/overview.md +2 -2
- package/.docs/docs/studio/auth.md +5 -5
- package/.docs/docs/studio/deployment.md +1 -1
- package/.docs/docs/studio/observability.md +2 -2
- package/.docs/docs/studio/overview.md +11 -9
- package/.docs/docs/voice/overview.md +26 -26
- package/.docs/docs/voice/realtime-voice.md +8 -8
- package/.docs/docs/voice/speech-to-speech.md +9 -9
- package/.docs/docs/voice/speech-to-text.md +3 -3
- package/.docs/docs/voice/text-to-speech.md +6 -6
- package/.docs/docs/what-is-mastra.md +161 -0
- package/.docs/docs/workflows/agents-and-tools.md +3 -3
- package/.docs/docs/workflows/control-flow.md +10 -8
- package/.docs/docs/workflows/error-handling.md +2 -2
- package/.docs/docs/workflows/overview.md +7 -6
- package/.docs/docs/workflows/scheduled-workflows.md +12 -12
- package/.docs/docs/workflows/snapshots.md +3 -3
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +3 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +10 -10
- package/.docs/docs/workspace/lsp.md +1 -1
- package/.docs/docs/workspace/overview.md +12 -12
- package/.docs/docs/workspace/sandbox.md +9 -7
- package/.docs/docs/workspace/search.md +3 -3
- package/.docs/docs/workspace/skills.md +7 -7
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +6 -6
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +9 -9
- package/.docs/guides/build-your-ui/copilotkit/overview.md +2 -2
- package/.docs/guides/build-your-ui/openui.md +2 -2
- package/.docs/guides/concepts/multi-agent-systems.md +5 -5
- package/.docs/guides/concepts/streaming.md +10 -10
- package/.docs/guides/deployment/amazon-ec2.md +1 -1
- package/.docs/guides/deployment/aws-lambda.md +1 -1
- package/.docs/guides/deployment/azure-app-services.md +1 -1
- package/.docs/guides/deployment/cloudflare.md +1 -1
- package/.docs/guides/deployment/inngest.md +6 -6
- package/.docs/guides/deployment/kubernetes.md +1 -1
- package/.docs/guides/deployment/mastra-workers.md +232 -0
- package/.docs/guides/deployment/temporal.md +1 -1
- package/.docs/guides/deployment/vercel.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/nestjs.md +5 -5
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +1 -1
- package/.docs/guides/guide/chef-michel.md +2 -2
- package/.docs/guides/guide/code-review-bot.md +2 -2
- package/.docs/guides/guide/coding-agent.md +5 -5
- package/.docs/guides/guide/dev-assistant.md +2 -2
- package/.docs/guides/guide/docs-manager.md +4 -4
- package/.docs/guides/guide/firecrawl.md +1 -1
- package/.docs/guides/guide/github-actions-pr-description.md +5 -5
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +5 -5
- package/.docs/guides/guide/signal-provider.md +1 -1
- package/.docs/guides/guide/slack-assistant.md +1 -1
- package/.docs/guides/guide/stock-agent.md +3 -3
- package/.docs/guides/guide/web-search.md +4 -4
- package/.docs/guides/guide/whatsapp-chat-bot.md +2 -2
- package/.docs/guides/index.md +1 -1
- package/.docs/guides/migrations/agentnetwork.md +4 -4
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/guides/migrations/mastra-cloud.md +6 -6
- package/.docs/guides/migrations/network-to-supervisor.md +9 -9
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +6 -6
- package/.docs/guides/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/client.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/processors.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +11 -11
- package/.docs/guides/migrations/upgrade-to-v1/tools.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- 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 +2 -2
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +3 -3
- package/.docs/models/gateways/openrouter.md +1 -3
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/index.md +6 -6
- package/.docs/models/providers/baseten.md +1 -1
- package/.docs/models/providers/chutes.md +2 -1
- package/.docs/models/providers/crossmodel.md +2 -2
- package/.docs/models/providers/deepinfra.md +1 -1
- package/.docs/models/providers/hyper.md +3 -3
- package/.docs/models/providers/llmgateway.md +4 -3
- package/.docs/models/providers/modal.md +73 -0
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/acp/acp-agent.md +4 -4
- package/.docs/reference/acp/create-acp-tool.md +3 -3
- package/.docs/reference/agent-controller/agent-controller-class.md +36 -36
- package/.docs/reference/agent-controller/session.md +6 -6
- package/.docs/reference/agents/agent.md +14 -14
- package/.docs/reference/agents/channels.md +29 -13
- package/.docs/reference/agents/durable-agent.md +54 -5
- package/.docs/reference/agents/generate.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getLLM.md +2 -2
- package/.docs/reference/agents/getMetadata.md +2 -2
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/listScorers.md +1 -1
- package/.docs/reference/agents/listSkills.md +1 -1
- package/.docs/reference/agents/listSuspendedRuns.md +2 -2
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/chat-route.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
- package/.docs/reference/ai-sdk/workflow-route.md +1 -1
- package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +2 -2
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/fga.md +2 -2
- package/.docs/reference/auth/google.md +2 -2
- package/.docs/reference/auth/okta.md +1 -1
- package/.docs/reference/auth/workos.md +2 -2
- package/.docs/reference/browser/agent-browser.md +3 -3
- package/.docs/reference/browser/browser-viewer.md +4 -4
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +4 -4
- package/.docs/reference/browser/stagehand-browser.md +8 -8
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/create-mastra.md +1 -1
- package/.docs/reference/cli/mastra.md +155 -24
- package/.docs/reference/client-js/agents.md +26 -9
- package/.docs/reference/client-js/memory.md +2 -2
- package/.docs/reference/client-js/workflows.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +2 -2
- package/.docs/reference/coding-agent/create-coding-agent.md +2 -2
- package/.docs/reference/configuration.md +7 -7
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/getMCPServer.md +1 -1
- package/.docs/reference/core/getScorer.md +1 -1
- package/.docs/reference/core/mastra-class.md +48 -1
- package/.docs/reference/core/mastra-model-gateway.md +1 -1
- package/.docs/reference/datasets/addItem.md +1 -1
- package/.docs/reference/datasets/listItems.md +1 -1
- package/.docs/reference/deployer/netlify.md +4 -4
- package/.docs/reference/deployer/vercel.md +7 -7
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +6 -6
- package/.docs/reference/editor/agent-builder/builder-models.md +3 -3
- package/.docs/reference/editor/blob-store-provider.md +1 -1
- package/.docs/reference/editor/browser-provider.md +3 -3
- package/.docs/reference/editor/filesystem-provider.md +4 -4
- package/.docs/reference/editor/mastra-editor.md +5 -5
- package/.docs/reference/editor/processor-provider.md +3 -3
- package/.docs/reference/editor/sandbox-provider.md +4 -4
- package/.docs/reference/editor/storage-browser-ref.md +6 -6
- package/.docs/reference/editor/storage-workspace-ref.md +4 -4
- package/.docs/reference/editor/tool-provider.md +1 -1
- package/.docs/reference/evals/answer-relevancy.md +5 -5
- package/.docs/reference/evals/answer-similarity.md +1 -1
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/checks.md +3 -3
- package/.docs/reference/evals/completeness.md +5 -5
- package/.docs/reference/evals/content-similarity.md +5 -5
- package/.docs/reference/evals/context-precision.md +5 -5
- package/.docs/reference/evals/context-recall.md +11 -11
- package/.docs/reference/evals/context-relevance.md +15 -15
- package/.docs/reference/evals/create-scorer.md +1 -1
- package/.docs/reference/evals/faithfulness.md +4 -4
- package/.docs/reference/evals/filter-run.md +2 -2
- package/.docs/reference/evals/hallucination.md +11 -11
- package/.docs/reference/evals/keyword-coverage.md +6 -6
- package/.docs/reference/evals/mastra-scorer.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +15 -15
- package/.docs/reference/evals/prompt-alignment.md +20 -20
- package/.docs/reference/evals/rubric.md +2 -2
- package/.docs/reference/evals/run-evals.md +3 -3
- package/.docs/reference/evals/scorer-utils.md +4 -4
- package/.docs/reference/evals/textual-difference.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +4 -4
- package/.docs/reference/evals/toxicity.md +5 -5
- package/.docs/reference/evals/trajectory-accuracy.md +10 -10
- package/.docs/reference/file-based-agents/config.md +3 -3
- package/.docs/reference/file-based-agents/instructions.md +3 -3
- package/.docs/reference/file-based-agents/logger.md +1 -1
- package/.docs/reference/file-based-agents/observability.md +1 -1
- package/.docs/reference/file-based-agents/processors.md +1 -1
- package/.docs/reference/file-based-agents/skills.md +1 -1
- package/.docs/reference/file-based-agents/storage.md +1 -1
- package/.docs/reference/file-based-agents/studio.md +1 -1
- package/.docs/reference/file-based-agents/subagents.md +4 -4
- package/.docs/reference/file-based-agents/tools.md +1 -1
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/logging/pino-logger.md +3 -3
- package/.docs/reference/memory/clone-utilities.md +1 -1
- package/.docs/reference/memory/cloneThread.md +3 -3
- package/.docs/reference/memory/listThreads.md +1 -1
- package/.docs/reference/memory/memory-class.md +4 -4
- package/.docs/reference/memory/observational-memory.md +15 -15
- package/.docs/reference/memory/recall.md +2 -2
- package/.docs/reference/memory/serialized-memory-config.md +4 -4
- package/.docs/reference/memory/summarizeConversation.md +3 -3
- package/.docs/reference/memory/summarizeThread.md +3 -3
- package/.docs/reference/observability/feedback.md +1 -1
- package/.docs/reference/observability/metrics/automatic-metrics.md +7 -7
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +1 -1
- package/.docs/reference/observability/tracing/interfaces.md +1 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -1
- package/.docs/reference/observability/tracing/span-filtering.md +1 -1
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/cost-guard-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -1
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/moderation-processor.md +2 -2
- package/.docs/reference/processors/pii-detector.md +3 -3
- package/.docs/reference/processors/processor-interface.md +13 -13
- package/.docs/reference/processors/prompt-injection-detector.md +2 -2
- package/.docs/reference/processors/provider-history-compat.md +1 -1
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/response-cache.md +8 -8
- package/.docs/reference/processors/semantic-recall-processor.md +1 -1
- package/.docs/reference/processors/skill-search-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +2 -2
- package/.docs/reference/processors/token-limiter-processor.md +4 -4
- package/.docs/reference/processors/tool-call-filter.md +2 -2
- package/.docs/reference/processors/tool-search-processor.md +9 -9
- package/.docs/reference/processors/unicode-normalizer.md +2 -2
- package/.docs/reference/processors/working-memory-processor.md +1 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/pubsub/base.md +4 -4
- package/.docs/reference/pubsub/google-cloud-pubsub.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +4 -4
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunk.md +5 -5
- package/.docs/reference/rag/database-config.md +2 -2
- package/.docs/reference/rag/metadata-filters.md +2 -2
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/schedules/overview.md +1 -1
- package/.docs/reference/server/register-api-route.md +1 -1
- package/.docs/reference/server/routes.md +7 -7
- package/.docs/reference/signals/create-notification-inbox-tool.md +1 -1
- package/.docs/reference/signals/signal-provider.md +8 -8
- package/.docs/reference/storage/clickhouse.md +4 -4
- package/.docs/reference/storage/cloudflare-d1.md +4 -4
- package/.docs/reference/storage/convex.md +4 -4
- package/.docs/reference/storage/dsql.md +3 -3
- package/.docs/reference/storage/dynamodb.md +7 -7
- package/.docs/reference/storage/lance.md +1 -1
- package/.docs/reference/storage/mongodb.md +2 -2
- package/.docs/reference/storage/mssql.md +1 -1
- package/.docs/reference/storage/postgresql.md +2 -2
- package/.docs/reference/storage/redis.md +1 -1
- package/.docs/reference/storage/retention.md +33 -33
- package/.docs/reference/storage/spanner.md +8 -8
- package/.docs/reference/storage/upstash.md +1 -1
- package/.docs/reference/streaming/ChunkType.md +2 -2
- package/.docs/reference/streaming/agents/MastraModelOutput.md +1 -1
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamUntilIdle.md +2 -2
- 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/streaming/workflows/timeTravelStream.md +2 -2
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/brightdata.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -3
- package/.docs/reference/tools/create-tool.md +1 -1
- package/.docs/reference/tools/graph-rag-tool.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +74 -0
- package/.docs/reference/tools/mcp-client.md +15 -15
- package/.docs/reference/tools/mcp-server.md +21 -21
- package/.docs/reference/tools/submit-plan-tool.md +1 -1
- package/.docs/reference/tools/tavily.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +5 -5
- package/.docs/reference/vectors/astra.md +1 -1
- package/.docs/reference/vectors/chroma.md +2 -2
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/couchbase.md +4 -4
- package/.docs/reference/vectors/libsql.md +2 -2
- package/.docs/reference/vectors/mongodb.md +3 -3
- package/.docs/reference/vectors/pg.md +5 -5
- package/.docs/reference/vectors/qdrant.md +2 -2
- package/.docs/reference/vectors/s3vectors.md +4 -4
- package/.docs/reference/vectors/turbopuffer.md +1 -1
- package/.docs/reference/vectors/upstash.md +1 -1
- package/.docs/reference/voice/aws-nova-sonic.md +1 -1
- package/.docs/reference/voice/azure.md +1 -1
- package/.docs/reference/voice/google-gemini-live.md +4 -4
- package/.docs/reference/voice/inworld-realtime.md +7 -7
- package/.docs/reference/voice/livekit.md +13 -13
- package/.docs/reference/voice/mistral.md +1 -1
- package/.docs/reference/voice/openai-realtime.md +1 -1
- package/.docs/reference/voice/sarvam.md +1 -1
- package/.docs/reference/voice/voice.addInstructions.md +1 -1
- package/.docs/reference/voice/voice.addTools.md +1 -1
- package/.docs/reference/voice/voice.events.md +1 -1
- package/.docs/reference/voice/voice.getSpeakers.md +2 -2
- package/.docs/reference/voice/voice.on.md +2 -2
- package/.docs/reference/voice/xai-realtime.md +2 -2
- package/.docs/reference/workers/overview.md +85 -0
- package/.docs/reference/workflows/run-methods/cancel.md +1 -1
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
- package/.docs/reference/workflows/workflow-methods/sleep.md +1 -1
- package/.docs/reference/workflows/workflow-state-reader.md +2 -2
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
- package/.docs/reference/workspace/apple-container-sandbox.md +2 -2
- package/.docs/reference/workspace/daytona-sandbox.md +3 -3
- package/.docs/reference/workspace/docker-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/files-sdk-filesystem.md +3 -3
- package/.docs/reference/workspace/google-drive-filesystem.md +4 -4
- package/.docs/reference/workspace/local-filesystem.md +3 -3
- package/.docs/reference/workspace/local-sandbox.md +3 -3
- package/.docs/reference/workspace/modal-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +2 -2
- package/.docs/reference/workspace/process-manager.md +1 -1
- package/.docs/reference/workspace/railway-sandbox.md +4 -4
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/.docs/reference/workspace/vercel-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +10 -10
- package/CHANGELOG.md +21 -0
- package/package.json +3 -3
|
@@ -59,9 +59,9 @@ const { messages } = await memory.recall({
|
|
|
59
59
|
})
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
All metadata entries are combined with AND semantics. A message must match every key and value with exact type equality. `null` matches metadata that
|
|
62
|
+
All metadata entries are combined with AND semantics. A message must match every key and value with exact type equality. `null` matches metadata that's explicitly set to `null`. It doesn't match a missing key.
|
|
63
63
|
|
|
64
|
-
Metadata filters only support shallow scalar values: `string`, finite `number`, `boolean`, and `null`. Nested objects, arrays, `NaN`, and infinities
|
|
64
|
+
Metadata filters only support shallow scalar values: `string`, finite `number`, `boolean`, and `null`. Nested objects, arrays, `NaN`, and infinities aren't supported. Metadata keys must start with a letter or underscore and contain only alphanumeric or underscore characters. The limit is 128 characters. Reserved prototype keys such as `__proto__`, `constructor`, and `prototype` aren't allowed. Performance depends on the storage backend. Arbitrary metadata filters may require scanning candidate messages, so narrow the query with `threadId`, `resourceId`, or `dateRange` when possible.
|
|
65
65
|
|
|
66
66
|
## Returns
|
|
67
67
|
|
|
@@ -68,7 +68,7 @@ new MastraEditor({
|
|
|
68
68
|
|
|
69
69
|
## Related
|
|
70
70
|
|
|
71
|
-
- [Memory class](https://mastra.ai/reference/memory/memory-class)
|
|
72
|
-
- [Observational memory](https://mastra.ai/reference/memory/observational-memory)
|
|
73
|
-
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults)
|
|
74
|
-
- [Agent Builder: Memory](https://mastra.ai/docs/agent-builder/memory)
|
|
71
|
+
- [Memory class](https://mastra.ai/reference/memory/memory-class): The runtime type this config hydrates into.
|
|
72
|
+
- [Observational memory](https://mastra.ai/reference/memory/observational-memory): Full observational memory reference.
|
|
73
|
+
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults): Where this type is pinned as the Builder default.
|
|
74
|
+
- [Agent Builder: Memory](https://mastra.ai/docs/agent-builder/memory): Concept and worked examples.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# summarizeConversation()
|
|
4
4
|
|
|
5
|
-
The standalone `summarizeConversation()` function summarizes a conversation in one shot. It distills the messages you pass in with the same Observer plumbing that powers [Observational Memory](https://mastra.ai/reference/memory/observational-memory)
|
|
5
|
+
The standalone `summarizeConversation()` function summarizes a conversation in one shot. It distills the messages you pass in with the same Observer plumbing that powers [Observational Memory](https://mastra.ai/reference/memory/observational-memory): without Observational Memory attached to an agent, and without reading from or writing to storage.
|
|
6
6
|
|
|
7
|
-
Nothing is written back to memory. The summary and extracted values are returned to you (and to each extractor's `onExtracted` hook), so you decide where they go
|
|
7
|
+
Nothing is written back to memory. The summary and extracted values are returned to you (and to each extractor's `onExtracted` hook), so you decide where they go: for example your own database.
|
|
8
8
|
|
|
9
|
-
Use this when you already have the messages in hand and want explicit control over what gets summarized.
|
|
9
|
+
Use this when you already have the messages in hand and want explicit control over what gets summarized. For a stored thread identified by ID, use [`Memory.summarizeThread()`](https://mastra.ai/reference/memory/summarizeThread), which loads the messages for you.
|
|
10
10
|
|
|
11
11
|
## Usage example
|
|
12
12
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Memory.summarizeThread()
|
|
4
4
|
|
|
5
|
-
The `.summarizeThread()` method summarizes a thread's conversation in one shot. It loads the thread's messages from storage and distills them with the same Observer plumbing that powers [Observational Memory](https://mastra.ai/reference/memory/observational-memory)
|
|
5
|
+
The `.summarizeThread()` method summarizes a thread's conversation in one shot. It loads the thread's messages from storage and distills them with the same Observer plumbing that powers [Observational Memory](https://mastra.ai/reference/memory/observational-memory): as a standalone call, without Observational Memory attached to an agent.
|
|
6
6
|
|
|
7
7
|
Messages load page-by-page starting from the newest, bounded by `lastMessages` and `maxInputTokens`, so summarizing a long thread doesn't read its entire history from storage.
|
|
8
8
|
|
|
9
|
-
Nothing is written back to memory. The summary and extracted values are returned to you (and to each extractor's `onExtracted` hook), so you decide where they go
|
|
9
|
+
Nothing is written back to memory. The summary and extracted values are returned to you (and to each extractor's `onExtracted` hook), so you decide where they go: for example your own database.
|
|
10
10
|
|
|
11
|
-
Use this when a session ends and you want a summary or structured extraction of the whole conversation, such as a voice call at hang-up.
|
|
11
|
+
Use this when a session ends and you want a summary or structured extraction of the whole conversation, such as a voice call at hang-up. For messages you already have in hand (without loading them from a thread), use the standalone [`summarizeConversation()`](https://mastra.ai/reference/memory/summarizeConversation) function instead. It takes the same options with `messages` in place of `threadId`.
|
|
12
12
|
|
|
13
13
|
## Usage example
|
|
14
14
|
|
|
@@ -73,7 +73,7 @@ await observability.createFeedback({
|
|
|
73
73
|
})
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
The HTTP and client SDK create route accepts `CreateFeedbackBody
|
|
76
|
+
The HTTP and client SDK create route accepts `CreateFeedbackBody` and sets `timestamp` server-side. It generates `feedbackId` when omitted:
|
|
77
77
|
|
|
78
78
|
```typescript
|
|
79
79
|
await mastraClient.createFeedback({
|
|
@@ -12,7 +12,7 @@ Metrics are extracted from spans when they end. The observability layer inspects
|
|
|
12
12
|
|
|
13
13
|
### What affects whether a metric is available
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
A metric reaches storage when:
|
|
16
16
|
|
|
17
17
|
1. `MastraStorageExporter` is configured as an exporter.
|
|
18
18
|
2. The storage backend supports metrics (ClickHouse, DuckDB, or Postgres v-next with the observability domain enabled).
|
|
@@ -33,7 +33,7 @@ Duration metrics record execution time in milliseconds, calculated from the span
|
|
|
33
33
|
|
|
34
34
|
## Token usage metrics
|
|
35
35
|
|
|
36
|
-
Token metrics are emitted only from `MODEL_GENERATION` spans that include `usage` data.
|
|
36
|
+
Token metrics are emitted only from `MODEL_GENERATION` spans that include `usage` data. Token metrics require usage data from the provider.
|
|
37
37
|
|
|
38
38
|
### Input token metrics
|
|
39
39
|
|
|
@@ -64,7 +64,7 @@ The detailed breakdown metrics (everything except `total_input` and `total_outpu
|
|
|
64
64
|
|
|
65
65
|
### When cost context is attached
|
|
66
66
|
|
|
67
|
-
Cost context is attached to token metrics when the embedded pricing registry has a matching entry for the provider and model.
|
|
67
|
+
Cost context is attached to token metrics when the embedded pricing registry has a matching entry for the provider and model. Mastra includes the registry and covers common providers and models. If no match is found, token metrics are still emitted but without cost fields.
|
|
68
68
|
|
|
69
69
|
### What cost fields may be included
|
|
70
70
|
|
|
@@ -80,9 +80,9 @@ Cost context is attached to token metrics when the embedded pricing registry has
|
|
|
80
80
|
|
|
81
81
|
### How metrics relate to spans and trace context
|
|
82
82
|
|
|
83
|
-
Each metric carries a `CorrelationContext` snapshot from the span that produced it. This context is stored alongside the metric value and
|
|
83
|
+
Each metric carries a `CorrelationContext` snapshot from the span that produced it. This context is stored alongside the metric value and links a metric to the exact span and trace.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Correlation fields use these categories:
|
|
86
86
|
|
|
87
87
|
**Trace correlation**
|
|
88
88
|
|
|
@@ -110,7 +110,7 @@ The correlation fields are grouped into four categories:
|
|
|
110
110
|
|
|
111
111
|
### Why correlation helps with debugging
|
|
112
112
|
|
|
113
|
-
When you spot a spike in latency or token usage on the Metrics dashboard, correlation context lets you drill directly into the trace that produced the metric. From there you can inspect the individual span
|
|
113
|
+
When you spot a spike in latency or token usage on the Metrics dashboard, correlation context lets you drill directly into the trace that produced the metric. From there you can inspect the individual span. The root cause might be a slow tool call or a large prompt. It might also be an unexpected error.
|
|
114
114
|
|
|
115
115
|
## Troubleshooting
|
|
116
116
|
|
|
@@ -129,7 +129,7 @@ When you spot a spike in latency or token usage on the Metrics dashboard, correl
|
|
|
129
129
|
### Token metrics are missing
|
|
130
130
|
|
|
131
131
|
- **Span is a model generation**: Token metrics are only emitted from `MODEL_GENERATION` spans.
|
|
132
|
-
- **Provider reports usage**: The model provider must include `usage` data in its response.
|
|
132
|
+
- **Provider reports usage**: The model provider must include `usage` data in its response. Usage data is required to emit token metrics.
|
|
133
133
|
|
|
134
134
|
## Related
|
|
135
135
|
|
|
@@ -40,7 +40,7 @@ Extends `BaseExporterConfig`, which includes:
|
|
|
40
40
|
createSpan(options: CreateSpanOptions<SpanType>): SpanIds | undefined
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Called by the Mastra observability instance during span construction. Creates a dd-trace APM span eagerly via `tracer.startSpan()` and returns Mastra-compatible identifiers. The returned IDs are used by Mastra throughout the span's lifetime
|
|
43
|
+
Called by the Mastra observability instance during span construction. Creates a dd-trace APM span eagerly via `tracer.startSpan()` and returns Mastra-compatible identifiers. The returned IDs are used by Mastra throughout the span's lifetime. The dd-trace span object is stored internally and used for scope activation.
|
|
44
44
|
|
|
45
45
|
**Returns:** `SpanIds | undefined` - `{ spanId, traceId, parentSpanId }`, or `undefined` if the bridge is disabled.
|
|
46
46
|
|
|
@@ -151,7 +151,7 @@ const mastra = new Mastra({
|
|
|
151
151
|
})
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
> **Note:** Don't combine `DatadogBridge` with `DatadogExporter` in the same configuration
|
|
154
|
+
> **Note:** Don't combine `DatadogBridge` with `DatadogExporter` in the same configuration. Both emit to LLM Observability and would double-write the same data.
|
|
155
155
|
|
|
156
156
|
## Setup requirements
|
|
157
157
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/observability@1.8.0`. **Deprecated in `1.12.0`** in favor of [`MastraPlatformExporter`](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter).
|
|
6
6
|
|
|
7
|
-
> **Deprecated:** `CloudExporter` is retained for backward compatibility and will be removed in a future major version. Use [`MastraPlatformExporter`](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter) for new projects.
|
|
7
|
+
> **Deprecated:** `CloudExporter` is retained for backward compatibility and will be removed in a future major version. Use [`MastraPlatformExporter`](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter) for new projects. Both classes share the same constructor, environment variables, and runtime behavior; `CloudExporter` keeps its original `mastra-cloud-observability-exporter` exporter `name` and `CLOUD_EXPORTER_*` error IDs so monitoring rules built against it keep working.
|
|
8
8
|
|
|
9
9
|
Sends tracing spans, logs, metrics, scores, and feedback to the Mastra platform for online visualization and monitoring.
|
|
10
10
|
|
|
@@ -106,7 +106,7 @@ async onMetricEvent(event: MetricEvent): Promise<void>
|
|
|
106
106
|
|
|
107
107
|
Processes metric signals for Cloud export.
|
|
108
108
|
|
|
109
|
-
Every `MetricEvent` passed to this handler is buffered and exported to the Cloud metrics endpoint derived from the configured base endpoint. Additional filtering by metric subtype or status inside `CloudExporter` isn't performed
|
|
109
|
+
Every `MetricEvent` passed to this handler is buffered and exported to the Cloud metrics endpoint derived from the configured base endpoint. Additional filtering by metric subtype or status inside `CloudExporter` isn't performed. The exporter forwards every metric event it receives unless it's disabled.
|
|
110
110
|
|
|
111
111
|
**Returns:** `Promise<void>` after the metric event has been accepted for buffering.
|
|
112
112
|
|
|
@@ -130,7 +130,7 @@ async onFeedbackEvent(event: FeedbackEvent): Promise<void>
|
|
|
130
130
|
|
|
131
131
|
Processes feedback signals for Cloud export.
|
|
132
132
|
|
|
133
|
-
Every `FeedbackEvent` passed to this handler is buffered and exported to the Cloud feedback endpoint derived from the configured base endpoint. No feedback-type filtering inside `CloudExporter` is performed
|
|
133
|
+
Every `FeedbackEvent` passed to this handler is buffered and exported to the Cloud feedback endpoint derived from the configured base endpoint. No feedback-type filtering inside `CloudExporter` is performed. All feedback events received here are forwarded unless the exporter is disabled.
|
|
134
134
|
|
|
135
135
|
**Returns:** `Promise<void>` after the feedback event has been accepted for buffering.
|
|
136
136
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Deprecated in `@mastra/observability@1.12.0`** in favor of [`MastraStorageExporter`](https://mastra.ai/reference/observability/tracing/exporters/mastra-storage-exporter).
|
|
6
6
|
|
|
7
|
-
> **Deprecated:** `DefaultExporter` is retained for backward compatibility and will be removed in a future major version. Use [`MastraStorageExporter`](https://mastra.ai/reference/observability/tracing/exporters/mastra-storage-exporter) for new projects.
|
|
7
|
+
> **Deprecated:** `DefaultExporter` is retained for backward compatibility and will be removed in a future major version. Use [`MastraStorageExporter`](https://mastra.ai/reference/observability/tracing/exporters/mastra-storage-exporter) for new projects. Both classes share the same constructor, configuration, and runtime behavior. `DefaultExporter` keeps its original `mastra-default-observability-exporter` exporter `name` so monitoring rules built against it keep working.
|
|
8
8
|
|
|
9
9
|
Persists observability events to Mastra Storage with automatic batching and retry logic.
|
|
10
10
|
|
|
@@ -107,7 +107,7 @@ const agent = new Agent({
|
|
|
107
107
|
id: 'support-agent',
|
|
108
108
|
name: 'support-agent',
|
|
109
109
|
instructions: prompt.compile(),
|
|
110
|
-
model: 'openai/gpt-5.
|
|
110
|
+
model: 'openai/gpt-5.6-sol',
|
|
111
111
|
defaultGenerateOptions: {
|
|
112
112
|
tracingOptions: buildTracingOptions(
|
|
113
113
|
withLangfusePrompt({ name: prompt.name, version: prompt.version }),
|
|
@@ -108,7 +108,7 @@ async onMetricEvent(event: MetricEvent): Promise<void>
|
|
|
108
108
|
|
|
109
109
|
Processes metric signals for export.
|
|
110
110
|
|
|
111
|
-
Every `MetricEvent` passed to this handler is buffered and exported to the metrics endpoint derived from the configured base endpoint. No additional filtering by metric subtype or status inside `MastraPlatformExporter` is performed
|
|
111
|
+
Every `MetricEvent` passed to this handler is buffered and exported to the metrics endpoint derived from the configured base endpoint. No additional filtering by metric subtype or status inside `MastraPlatformExporter` is performed. The exporter forwards every metric event it receives unless it's disabled.
|
|
112
112
|
|
|
113
113
|
**Returns:** `Promise<void>` after the metric event has been accepted for buffering.
|
|
114
114
|
|
|
@@ -132,7 +132,7 @@ async onFeedbackEvent(event: FeedbackEvent): Promise<void>
|
|
|
132
132
|
|
|
133
133
|
Processes feedback signals for export.
|
|
134
134
|
|
|
135
|
-
Every `FeedbackEvent` passed to this handler is buffered and exported to the feedback endpoint derived from the configured base endpoint. No feedback-type filtering inside `MastraPlatformExporter` is performed
|
|
135
|
+
Every `FeedbackEvent` passed to this handler is buffered and exported to the feedback endpoint derived from the configured base endpoint. No feedback-type filtering inside `MastraPlatformExporter` is performed. All feedback events received here are forwarded unless the exporter is disabled.
|
|
136
136
|
|
|
137
137
|
**Returns:** `Promise<void>` after the feedback event has been accepted for buffering.
|
|
138
138
|
|
|
@@ -192,7 +192,7 @@ Errors raised by `MastraPlatformExporter` use the `MASTRA_PLATFORM_EXPORTER_*` `
|
|
|
192
192
|
|
|
193
193
|
## Span wire format
|
|
194
194
|
|
|
195
|
-
The shape of each span sent to Mastra platform is documented here for reference only
|
|
195
|
+
The shape of each span sent to Mastra platform is documented here for reference only: it's not exported from `@mastra/observability` and shouldn't be imported. The exporter spreads the original `AnyExportedSpan` (so the source field names are preserved) and layers a small set of platform-friendly aliases on top:
|
|
196
196
|
|
|
197
197
|
```typescript
|
|
198
198
|
type MastraPlatformSpanRecord = AnyExportedSpan & {
|
|
@@ -231,7 +231,7 @@ const customExporter = new MastraPlatformExporter({
|
|
|
231
231
|
|
|
232
232
|
## Migrating from `CloudExporter`
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Both classes share the same constructor signature, environment variables, and behavior. To migrate, replace the import and constructor:
|
|
235
235
|
|
|
236
236
|
```typescript
|
|
237
237
|
// Before
|
|
@@ -162,7 +162,7 @@ const customExporter = new MastraStorageExporter({
|
|
|
162
162
|
|
|
163
163
|
## Migrating from `DefaultExporter`
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Both classes share the same constructor signature and behavior. To migrate, replace the import and constructor:
|
|
166
166
|
|
|
167
167
|
```typescript
|
|
168
168
|
// Before
|
|
@@ -803,7 +803,7 @@ interface CustomSamplerOptions {
|
|
|
803
803
|
|
|
804
804
|
### `ConfigSelector`
|
|
805
805
|
|
|
806
|
-
Function to select which observability instance to use for a
|
|
806
|
+
Function to select which observability instance to use for a span.
|
|
807
807
|
|
|
808
808
|
```typescript
|
|
809
809
|
type ConfigSelector = (
|
|
@@ -22,7 +22,7 @@ new Observability({
|
|
|
22
22
|
})
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
If a config already includes a `SensitiveDataFilter` in `spanOutputProcessors`, the auto-applied filter is skipped to avoid double redaction. Pre-instantiated `ObservabilityInstance` values aren't modified
|
|
25
|
+
If a config already includes a `SensitiveDataFilter` in `spanOutputProcessors`, the auto-applied filter is skipped to avoid double redaction. Pre-instantiated `ObservabilityInstance` values aren't modified. Add a `SensitiveDataFilter` to their processors yourself if needed.
|
|
26
26
|
|
|
27
27
|
## Constructor
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Span filtering
|
|
4
4
|
|
|
5
|
-
Span filtering controls which spans are exported from an observability config. Use it to reduce noise
|
|
5
|
+
Span filtering controls which spans are exported from an observability config. Use it to reduce noise or lower per-span costs. It can also keep only the spans that matter for a specific exporter or environment.
|
|
6
6
|
|
|
7
7
|
For a shorter overview of tracing configuration, see [Tracing](https://mastra.ai/docs/observability/tracing/overview).
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ Supports three scoping modes:
|
|
|
14
14
|
- **Resource scope** (default): Tracks cumulative cost per `resourceId` across runs
|
|
15
15
|
- **Thread scope**: Tracks cumulative cost per `threadId` across runs
|
|
16
16
|
|
|
17
|
-
> **Approximate cost guard.** Cost data is persisted asynchronously via buffered exporters in the observability pipeline. Fast-running agents may exceed the configured limit before metrics are available for query. Treat `maxCost` as
|
|
17
|
+
> **Approximate cost guard.** Cost data is persisted asynchronously via buffered exporters in the observability pipeline. Fast-running agents may exceed the configured limit before metrics are available for query. Treat `maxCost` as an approximate threshold that fast-running agents may exceed.
|
|
18
18
|
|
|
19
19
|
## Usage example
|
|
20
20
|
|
|
@@ -62,7 +62,7 @@ export const agent = new Agent({
|
|
|
62
62
|
id: 'multilingual-agent',
|
|
63
63
|
name: 'multilingual-agent',
|
|
64
64
|
instructions: 'You are a helpful assistant',
|
|
65
|
-
model: 'openai/gpt-5.
|
|
65
|
+
model: 'openai/gpt-5.6-sol',
|
|
66
66
|
inputProcessors: [
|
|
67
67
|
new LanguageDetector({
|
|
68
68
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -48,7 +48,7 @@ export const agent = new Agent({
|
|
|
48
48
|
id: 'memory-agent',
|
|
49
49
|
name: 'memory-agent',
|
|
50
50
|
instructions: 'You are a helpful assistant with conversation memory',
|
|
51
|
-
model: 'openai/gpt-5.
|
|
51
|
+
model: 'openai/gpt-5.6-sol',
|
|
52
52
|
inputProcessors: [
|
|
53
53
|
new MessageHistory({
|
|
54
54
|
storage,
|
|
@@ -62,7 +62,7 @@ export const agent = new Agent({
|
|
|
62
62
|
id: 'moderated-agent',
|
|
63
63
|
name: 'moderated-agent',
|
|
64
64
|
instructions: 'You are a helpful assistant',
|
|
65
|
-
model: 'openai/gpt-5.
|
|
65
|
+
model: 'openai/gpt-5.6-sol',
|
|
66
66
|
inputProcessors: [
|
|
67
67
|
new ModerationProcessor({
|
|
68
68
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -88,7 +88,7 @@ export const agent = new Agent({
|
|
|
88
88
|
id: 'output-moderated-agent',
|
|
89
89
|
name: 'output-moderated-agent',
|
|
90
90
|
instructions: 'You are a helpful assistant',
|
|
91
|
-
model: 'openai/gpt-5.
|
|
91
|
+
model: 'openai/gpt-5.6-sol',
|
|
92
92
|
outputProcessors: [
|
|
93
93
|
// Batch stream parts first to reduce LLM calls
|
|
94
94
|
new BatchPartsProcessor({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# PIIDetector
|
|
4
4
|
|
|
5
|
-
The `PIIDetector` is a **hybrid processor** that can be used for both input and output processing to detect and redact personally identifiable information (PII) for privacy compliance. This processor helps maintain privacy by identifying
|
|
5
|
+
The `PIIDetector` is a **hybrid processor** that can be used for both input and output processing to detect and redact personally identifiable information (PII) for privacy compliance. This processor helps maintain privacy by identifying types of PII and providing flexible strategies for handling them, including multiple redaction methods to ensure compliance with GDPR, CCPA, HIPAA, and other privacy regulations.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -64,7 +64,7 @@ export const agent = new Agent({
|
|
|
64
64
|
id: 'private-agent',
|
|
65
65
|
name: 'private-agent',
|
|
66
66
|
instructions: 'You are a helpful assistant',
|
|
67
|
-
model: 'openai/gpt-5.
|
|
67
|
+
model: 'openai/gpt-5.6-sol',
|
|
68
68
|
inputProcessors: [
|
|
69
69
|
new PIIDetector({
|
|
70
70
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -93,7 +93,7 @@ export const agent = new Agent({
|
|
|
93
93
|
id: 'output-pii-agent',
|
|
94
94
|
name: 'output-pii-agent',
|
|
95
95
|
instructions: 'You are a helpful assistant',
|
|
96
|
-
model: 'openai/gpt-5.
|
|
96
|
+
model: 'openai/gpt-5.6-sol',
|
|
97
97
|
outputProcessors: [
|
|
98
98
|
// Batch stream parts first to reduce LLM calls
|
|
99
99
|
new BatchPartsProcessor({
|
|
@@ -6,7 +6,7 @@ The `Processor` interface defines the contract for all processors in Mastra. Pro
|
|
|
6
6
|
|
|
7
7
|
## When processor methods run
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Processor methods run at different points in the agent execution lifecycle:
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
12
|
┌────────────────────────────────────────────────────────────────────┐
|
|
@@ -168,16 +168,16 @@ Use `messages` when you only need to read, map over, or lightly edit fields on t
|
|
|
168
168
|
|
|
169
169
|
### Persistence
|
|
170
170
|
|
|
171
|
-
When memory is enabled, only what ends up in `messageList` after all processors finish is persisted to storage.
|
|
171
|
+
When memory is enabled, only what ends up in `messageList` after all processors finish is persisted to storage. Both return styles are equivalent for persistence:
|
|
172
172
|
|
|
173
|
-
-
|
|
174
|
-
-
|
|
173
|
+
- When you mutate `messageList` directly (or return the same `MessageList` instance), recorded mutations are applied in place, so the saved conversation reflects your changes.
|
|
174
|
+
- When you return a `MastraDBMessage[]` or `{ messages, systemMessages }`, Mastra reconciles the returned array against `messageList` for the current stage, removing missing messages and replacing system messages.
|
|
175
175
|
|
|
176
|
-
Returning a different `MessageList` instance is an error
|
|
176
|
+
Returning a different `MessageList` instance is an error. Always mutate the one passed to your processor.
|
|
177
177
|
|
|
178
178
|
### Reading text from a message
|
|
179
179
|
|
|
180
|
-
`MastraDBMessage.content`
|
|
180
|
+
`MastraDBMessage.content` uses a structured object. Strings aren't supported. The canonical way to read user or assistant text is `content.parts`:
|
|
181
181
|
|
|
182
182
|
```typescript
|
|
183
183
|
import type { MastraDBMessage } from '@mastra/core/memory'
|
|
@@ -313,10 +313,10 @@ processInputStep?<TTripwireMetadata = unknown>(
|
|
|
313
313
|
|
|
314
314
|
`processInputStep` can return several shapes:
|
|
315
315
|
|
|
316
|
-
- **`ProcessInputStepResult` object
|
|
317
|
-
- **`MessageList
|
|
318
|
-
- **`MastraDBMessage[]
|
|
319
|
-
- **`void` or `undefined
|
|
316
|
+
- **`ProcessInputStepResult` object**: Override any combination of the properties below for this step (described next).
|
|
317
|
+
- **`MessageList`**: Return the same `messageList` instance to signal you mutated messages in place.
|
|
318
|
+
- **`MastraDBMessage[]`**: Return a transformed messages array. Replaces the step's messages.
|
|
319
|
+
- **`void` or `undefined`**: Return nothing to leave the step unchanged.
|
|
320
320
|
|
|
321
321
|
The object form can return any combination of these properties:
|
|
322
322
|
|
|
@@ -480,7 +480,7 @@ Handles LLM API rejection errors before they surface as final errors. This runs
|
|
|
480
480
|
|
|
481
481
|
Add processors that implement `processAPIError` to an agent's `errorProcessors` array.
|
|
482
482
|
|
|
483
|
-
Processors can inspect the error
|
|
483
|
+
Processors can inspect the error and modify the request, for example by appending messages to the `messageList`. Return `{ retry: true }` to retry with the modified state.
|
|
484
484
|
|
|
485
485
|
```typescript
|
|
486
486
|
processAPIError?(args: ProcessAPIErrorArgs): Promise<ProcessAPIErrorResult | void> | ProcessAPIErrorResult | void;
|
|
@@ -782,7 +782,7 @@ export class DynamicModelProcessor implements Processor {
|
|
|
782
782
|
|
|
783
783
|
// Switch to powerful model after tool calls
|
|
784
784
|
if (steps.length > 0 && steps[steps.length - 1].toolCalls?.length) {
|
|
785
|
-
return { model: 'openai/gpt-5.
|
|
785
|
+
return { model: 'openai/gpt-5.6-sol' }
|
|
786
786
|
}
|
|
787
787
|
|
|
788
788
|
// Disable tools after 5 steps to force completion
|
|
@@ -896,7 +896,7 @@ export class WordCounter implements Processor {
|
|
|
896
896
|
|
|
897
897
|
Every processor receives a `state` object in `processLLMRequest`, `processLLMResponse`, `processOutputStream`, `processOutputStep`, `processOutputResult`, and `processAPIError`. State has three important properties:
|
|
898
898
|
|
|
899
|
-
- **Per-processor**: Each processor gets its own `state` object, keyed by the processor's `id`.
|
|
899
|
+
- **Per-processor**: Each processor gets its own `state` object, keyed by the processor's `id`. Processors with different ids can't read or overwrite each other's state.
|
|
900
900
|
- **Per-request**: A fresh state object is created at the start of every `agent.generate()` or `agent.stream()` call. State doesn't leak between requests or between users.
|
|
901
901
|
- **Shared across methods**: Within one request, the same `state` object is passed to `processLLMRequest` (before the provider call), `processLLMResponse` (after the step completes), `processOutputStream` (for every chunk), `processOutputStep` (after every LLM step), `processOutputResult` (once at the end), and `processAPIError` (when an LLM call fails). For example, `processLLMRequest` can stash a cache key and `processLLMResponse` can read it back to write the response.
|
|
902
902
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# PromptInjectionDetector
|
|
4
4
|
|
|
5
|
-
The `PromptInjectionDetector` is an **input processor** that detects and prevents prompt injection attacks, jailbreaks, and system manipulation attempts before messages are sent to the language model. This processor helps maintain security by identifying
|
|
5
|
+
The `PromptInjectionDetector` is an **input processor** that detects and prevents prompt injection attacks, jailbreaks, and system manipulation attempts before messages are sent to the language model. This processor helps maintain security by identifying types of injection attempts and providing flexible strategies for handling them, including content rewriting to neutralize attacks while preserving legitimate user intent.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -56,7 +56,7 @@ export const agent = new Agent({
|
|
|
56
56
|
id: 'secure-agent',
|
|
57
57
|
name: 'secure-agent',
|
|
58
58
|
instructions: 'You are a helpful assistant',
|
|
59
|
-
model: 'openai/gpt-5.
|
|
59
|
+
model: 'openai/gpt-5.6-sol',
|
|
60
60
|
inputProcessors: [
|
|
61
61
|
new PromptInjectionDetector({
|
|
62
62
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The `ProviderHistoryCompat` processor handles provider-specific history incompatibilities. It can rewrite the outbound language model prompt before a provider call, or react to API errors and retry with repaired message history.
|
|
6
6
|
|
|
7
|
-
Use it when an agent may switch between model providers
|
|
7
|
+
Use it when an agent may switch between model providers or reuse message history across providers. It also handles providers that reject fields emitted by another provider.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# RegexFilterProcessor
|
|
4
4
|
|
|
5
|
-
The `RegexFilterProcessor` applies zero-cost regex pattern matching to filter, redact, or block content in agent messages. No LLM calls are made
|
|
5
|
+
The `RegexFilterProcessor` applies zero-cost regex pattern matching to filter, redact, or block content in agent messages. No LLM calls are made. All detection is regex-based.
|
|
6
6
|
|
|
7
7
|
Supports built-in presets for common patterns (PII, secrets, URLs) and custom regex rules. Can be applied to input, output, or both phases.
|
|
8
8
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# ResponseCache
|
|
4
4
|
|
|
5
|
-
`ResponseCache` is an input processor that caches LLM responses on the request/response boundary inside the agentic loop. It hooks into `processLLMRequest`
|
|
5
|
+
`ResponseCache` is an input processor that caches LLM responses on the request/response boundary inside the agentic loop. It hooks into `processLLMRequest` for cache lookup and short-circuits on a hit. It uses `processLLMResponse` to write the completed response.
|
|
6
6
|
|
|
7
|
-
The cache key is derived from the resolved `LanguageModelV2Prompt` Mastra is about to send to the model
|
|
7
|
+
The cache key is derived from the resolved `LanguageModelV2Prompt` Mastra is about to send to the model (i.e. _after_ memory has loaded and earlier input processors have transformed the prompt) so two users with different memory contexts produce different cache keys. Each step in an agentic tool loop is independently cached.
|
|
8
8
|
|
|
9
|
-
No agent-level option for response caching exists
|
|
9
|
+
No agent-level option for response caching exists. Register `ResponseCache` explicitly on `inputProcessors`. Per-call overrides flow through `RequestContext` via [`ResponseCache.context()`](#static-helpers) and [`ResponseCache.applyContext()`](#static-helpers).
|
|
10
10
|
|
|
11
11
|
## Usage example
|
|
12
12
|
|
|
@@ -55,7 +55,7 @@ See [Response caching](https://mastra.ai/docs/agents/processors) for the concept
|
|
|
55
55
|
|
|
56
56
|
## Static helpers
|
|
57
57
|
|
|
58
|
-
`ResponseCache` exposes two static helpers for setting per-call overrides on a `RequestContext`. The helpers keep the underlying context key a private implementation detail
|
|
58
|
+
`ResponseCache` exposes two static helpers for setting per-call overrides on a `RequestContext`. The helpers keep the underlying context key a private implementation detail: prefer them over reading/writing the raw key.
|
|
59
59
|
|
|
60
60
|
### `ResponseCache.context(options)`
|
|
61
61
|
|
|
@@ -88,7 +88,7 @@ The shape passed to `ResponseCache.context()` / `ResponseCache.applyContext()`.
|
|
|
88
88
|
|
|
89
89
|
**bust** (`boolean`): Skip the cache read but still write on completion.
|
|
90
90
|
|
|
91
|
-
`cache`, `ttl`, and `agentId` are intentionally not overridable per call
|
|
91
|
+
`cache`, `ttl`, and `agentId` are intentionally not overridable per call: they're instance-level concerns that shouldn't vary per request.
|
|
92
92
|
|
|
93
93
|
## ResponseCacheKeyInputs
|
|
94
94
|
|
|
@@ -106,9 +106,9 @@ The argument passed to a `key` function (constructor or per-call). All fields co
|
|
|
106
106
|
|
|
107
107
|
## Helper exports
|
|
108
108
|
|
|
109
|
-
- `buildResponseCacheKey(inputs)
|
|
110
|
-
- `DEFAULT_RESPONSE_CACHE_TTL_SECONDS
|
|
111
|
-
- `RESPONSE_CACHE_CONTEXT_KEY
|
|
109
|
+
- `buildResponseCacheKey(inputs)`: The deterministic hash used by default. Re-export it to override individual fields while preserving the rest of the standard key shape.
|
|
110
|
+
- `DEFAULT_RESPONSE_CACHE_TTL_SECONDS`: The default `ttl` (`300`).
|
|
111
|
+
- `RESPONSE_CACHE_CONTEXT_KEY`: The `RequestContext` key the static helpers write to. Exposed for advanced cases (e.g. clearing the override mid-pipeline). Prefer the helpers.
|
|
112
112
|
|
|
113
113
|
## Related
|
|
114
114
|
|
|
@@ -85,7 +85,7 @@ export const agent = new Agent({
|
|
|
85
85
|
id: 'semantic-memory-agent',
|
|
86
86
|
name: 'semantic-memory-agent',
|
|
87
87
|
instructions: 'You are a helpful assistant with semantic memory recall',
|
|
88
|
-
model: 'openai/gpt-5.
|
|
88
|
+
model: 'openai/gpt-5.6-sol',
|
|
89
89
|
inputProcessors: [semanticRecall, new MessageHistory({ storage, lastMessages: 50 })],
|
|
90
90
|
outputProcessors: [semanticRecall, new MessageHistory({ storage })],
|
|
91
91
|
})
|
|
@@ -77,7 +77,7 @@ const agent = new Agent({
|
|
|
77
77
|
name: 'skill-agent',
|
|
78
78
|
instructions:
|
|
79
79
|
'You are a helpful assistant. Use search_skills to find relevant skills, then load_skill to load their instructions.',
|
|
80
|
-
model: 'openai/gpt-5.
|
|
80
|
+
model: 'openai/gpt-5.6-sol',
|
|
81
81
|
workspace,
|
|
82
82
|
inputProcessors: [skillSearch],
|
|
83
83
|
})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# SystemPromptScrubber
|
|
4
4
|
|
|
5
|
-
The `SystemPromptScrubber` is an **output processor** that detects and handles system prompts, instructions, and other revealing information that could introduce security vulnerabilities. This processor helps maintain security by identifying
|
|
5
|
+
The `SystemPromptScrubber` is an **output processor** that detects and handles system prompts, instructions, and other revealing information that could introduce security vulnerabilities. This processor helps maintain security by identifying types of system prompts and providing flexible strategies for handling them, including multiple redaction methods to ensure sensitive information is properly sanitized.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -60,7 +60,7 @@ export const agent = new Agent({
|
|
|
60
60
|
id: 'scrubbed-agent',
|
|
61
61
|
name: 'scrubbed-agent',
|
|
62
62
|
instructions: 'You are a helpful assistant',
|
|
63
|
-
model: 'openai/gpt-5.
|
|
63
|
+
model: 'openai/gpt-5.6-sol',
|
|
64
64
|
outputProcessors: [
|
|
65
65
|
// Batch stream parts first to reduce LLM calls
|
|
66
66
|
new BatchPartsProcessor({
|
|
@@ -84,7 +84,7 @@ export const agent = new Agent({
|
|
|
84
84
|
id: 'context-limited-agent',
|
|
85
85
|
name: 'context-limited-agent',
|
|
86
86
|
instructions: 'You are a helpful assistant',
|
|
87
|
-
model: 'openai/gpt-5.
|
|
87
|
+
model: 'openai/gpt-5.6-sol',
|
|
88
88
|
memory: new Memory({/* ... */}),
|
|
89
89
|
inputProcessors: [
|
|
90
90
|
new TokenLimiterProcessor({ limit: 4000 }), // Limits historical messages to ~4000 tokens
|
|
@@ -94,7 +94,7 @@ export const agent = new Agent({
|
|
|
94
94
|
|
|
95
95
|
### As a per-step input processor (limit multi-step token growth)
|
|
96
96
|
|
|
97
|
-
When an agent uses tools across multiple steps (e.g. `maxSteps > 1`), each step accumulates conversation history from all previous steps. Use `inputProcessors` to also limit tokens at each step of the agentic loop
|
|
97
|
+
When an agent uses tools across multiple steps (e.g. `maxSteps > 1`), each step accumulates conversation history from all previous steps. Use `inputProcessors` to also limit tokens at each step of the agentic loop. The `TokenLimiterProcessor` automatically applies to both the initial input and every subsequent step:
|
|
98
98
|
|
|
99
99
|
```typescript
|
|
100
100
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -104,7 +104,7 @@ export const agent = new Agent({
|
|
|
104
104
|
id: 'multi-step-agent',
|
|
105
105
|
name: 'multi-step-agent',
|
|
106
106
|
instructions: 'You are a helpful research assistant with access to tools',
|
|
107
|
-
model: 'openai/gpt-5.
|
|
107
|
+
model: 'openai/gpt-5.6-sol',
|
|
108
108
|
inputProcessors: [
|
|
109
109
|
new TokenLimiterProcessor({ limit: 8000 }), // Applied at every step
|
|
110
110
|
],
|
|
@@ -128,7 +128,7 @@ export const agent = new Agent({
|
|
|
128
128
|
id: 'response-limited-agent',
|
|
129
129
|
name: 'response-limited-agent',
|
|
130
130
|
instructions: 'You are a helpful assistant',
|
|
131
|
-
model: 'openai/gpt-5.
|
|
131
|
+
model: 'openai/gpt-5.6-sol',
|
|
132
132
|
outputProcessors: [
|
|
133
133
|
new TokenLimiterProcessor({
|
|
134
134
|
limit: 1000,
|