@mastra/mcp-docs-server 1.2.15-alpha.7 → 1.2.15
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/agent-approval.md +14 -0
- package/.docs/docs/agents/code-mode.md +17 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +8 -8
- package/.docs/docs/browser/recording.md +4 -4
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +70 -7
- package/.docs/docs/capabilities/subagents.md +6 -3
- package/.docs/docs/datasets/running-experiments.md +49 -0
- package/.docs/docs/deployment/cloud-providers.md +9 -9
- package/.docs/docs/deployment/overview.md +9 -9
- package/.docs/docs/deployment/sandbox.md +3 -3
- package/.docs/docs/deployment/web-framework.md +6 -6
- package/.docs/docs/deployment/workers.md +1 -1
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +45 -4
- package/.docs/docs/harness/overview.md +2 -4
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +3 -3
- package/.docs/docs/long-running-agents/goals.md +1 -1
- package/.docs/docs/long-running-agents/schedules.md +1 -1
- package/.docs/docs/long-running-agents/signal-providers.md +3 -16
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +27 -0
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/mcp/overview.md +42 -0
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +3 -3
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +2 -2
- package/.docs/docs/memory/semantic-recall.md +2 -1
- package/.docs/docs/memory/working-memory.md +1 -0
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +16 -15
- package/.docs/docs/observability/integrations/overview.md +3 -3
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +2 -0
- package/.docs/docs/server/auth.md +10 -8
- package/.docs/docs/server/custom-adapters.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/server/mastra-client.md +13 -13
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/storage/overview.md +14 -12
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/agents-and-tools.md +2 -2
- package/.docs/docs/workflows/{stored-workflows.md → dynamic-workflows.md} +24 -24
- package/.docs/docs/workflows/overview.md +2 -2
- package/.docs/docs/workflows/snapshots.md +12 -10
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +17 -17
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/agent-frameworks/ai-sdk.md +2 -2
- package/.docs/guides/deployment/mastra-workers.md +4 -2
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/guides/guide/signal-provider.md +1 -1
- package/.docs/guides/index.md +8 -8
- package/.docs/guides/voice/overview.md +55 -106
- package/.docs/guides/voice/speech-to-text.md +7 -7
- package/.docs/guides/voice/text-to-speech.md +9 -10
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +5 -5
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +1 -1
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +257 -4
- package/.docs/{docs/server → integrations}/auth/auth0.md +1 -1
- package/.docs/{docs/server → integrations}/auth/clerk.md +2 -2
- package/.docs/{docs/server → integrations}/auth/firebase.md +1 -1
- package/.docs/{docs/server → integrations}/auth/okta.md +24 -4
- package/.docs/{docs/server → integrations}/auth/supabase.md +2 -2
- package/.docs/{docs/server → integrations}/auth/workos.md +1 -1
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +12 -4
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/integrations/databases/oracledb.md +239 -0
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +3 -3
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +5 -5
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +3 -3
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +2 -2
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +5 -5
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +2 -2
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +5 -5
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +3 -3
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +278 -46
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +23 -2
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +1 -1
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +3 -3
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +2 -2
- package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +8 -0
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +141 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +437 -34
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +4 -0
- package/.docs/models/gateways/neon.md +1 -1
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +9 -3
- package/.docs/models/gateways/vercel.md +7 -4
- package/.docs/models/index.md +3 -3
- package/.docs/models/providers/302ai.md +1 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteration-ai.md +1 -1
- package/.docs/models/providers/agentrouter.md +1 -1
- package/.docs/models/providers/ai-router.md +1 -1
- package/.docs/models/providers/aiand.md +1 -1
- package/.docs/models/providers/aki-io.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-token-plan.md +1 -1
- package/.docs/models/providers/alibaba.md +7 -5
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/anyapi.md +1 -1
- package/.docs/models/providers/atomic-chat.md +1 -1
- package/.docs/models/providers/auriko.md +1 -1
- package/.docs/models/providers/bailing.md +1 -1
- package/.docs/models/providers/baseten.md +2 -2
- package/.docs/models/providers/berget.md +1 -1
- package/.docs/models/providers/blueclaw.md +1 -1
- package/.docs/models/providers/chutes.md +1 -1
- package/.docs/models/providers/clarifai.md +1 -1
- package/.docs/models/providers/claudinio.md +1 -1
- package/.docs/models/providers/cline-pass.md +1 -1
- package/.docs/models/providers/cloudferro-sherlock.md +1 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/cortecs.md +3 -5
- package/.docs/models/providers/crof.md +1 -1
- package/.docs/models/providers/crossmodel.md +2 -3
- package/.docs/models/providers/daoxe.md +1 -1
- package/.docs/models/providers/databricks.md +1 -1
- package/.docs/models/providers/deepinfra.md +6 -5
- package/.docs/models/providers/digitalocean.md +5 -5
- package/.docs/models/providers/dinference.md +1 -1
- package/.docs/models/providers/drun.md +1 -1
- package/.docs/models/providers/ebcloud.md +1 -1
- package/.docs/models/providers/empiriolabs.md +3 -2
- package/.docs/models/providers/evroc.md +3 -4
- package/.docs/models/providers/fastrouter.md +1 -1
- package/.docs/models/providers/firepass.md +1 -1
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/firmware.md +1 -1
- package/.docs/models/providers/freemodel.md +1 -1
- package/.docs/models/providers/friendli.md +1 -1
- package/.docs/models/providers/frogbot.md +1 -1
- package/.docs/models/providers/github-models.md +1 -1
- package/.docs/models/providers/gmicloud.md +1 -1
- package/.docs/models/providers/google.md +1 -1
- package/.docs/models/providers/greenpt.md +1 -1
- package/.docs/models/providers/helicone.md +1 -1
- package/.docs/models/providers/hetzner.md +8 -5
- package/.docs/models/providers/hpc-ai.md +1 -1
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/hyper.md +7 -7
- package/.docs/models/providers/iflowcn.md +1 -1
- package/.docs/models/providers/impossibl.md +1 -1
- package/.docs/models/providers/inception.md +1 -1
- package/.docs/models/providers/inceptron.md +1 -1
- package/.docs/models/providers/inference.md +1 -1
- package/.docs/models/providers/inferx.md +1 -1
- package/.docs/models/providers/infomaniak.md +1 -1
- package/.docs/models/providers/io-intelligence.md +1 -1
- package/.docs/models/providers/io-net.md +1 -1
- package/.docs/models/providers/jiekou.md +1 -1
- package/.docs/models/providers/kenari.md +1 -1
- package/.docs/models/providers/kilo.md +16 -11
- package/.docs/models/providers/kimi-for-coding.md +1 -1
- package/.docs/models/providers/kiro.md +1 -1
- package/.docs/models/providers/kuae-cloud-coding-plan.md +1 -1
- package/.docs/models/providers/lilac.md +1 -1
- package/.docs/models/providers/llama.md +1 -1
- package/.docs/models/providers/llmgateway.md +2 -7
- package/.docs/models/providers/llmtr.md +1 -1
- package/.docs/models/providers/lmstudio.md +1 -1
- package/.docs/models/providers/longcat.md +1 -1
- package/.docs/models/providers/lucidquery.md +1 -1
- package/.docs/models/providers/lynkr.md +1 -1
- package/.docs/models/providers/meganova.md +1 -1
- package/.docs/models/providers/meta.md +1 -1
- package/.docs/models/providers/minimax-cn-coding-plan.md +1 -1
- package/.docs/models/providers/minimax-cn.md +1 -1
- package/.docs/models/providers/minimax-coding-plan.md +1 -1
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mixlayer.md +1 -1
- package/.docs/models/providers/moark.md +1 -1
- package/.docs/models/providers/modal.md +1 -1
- package/.docs/models/providers/model-oracle-ai.md +1 -1
- package/.docs/models/providers/modelis.md +1 -1
- package/.docs/models/providers/modelscope.md +1 -1
- package/.docs/models/providers/moonshotai-cn.md +1 -1
- package/.docs/models/providers/moonshotai.md +1 -1
- package/.docs/models/providers/morph.md +1 -1
- package/.docs/models/providers/nano-gpt.md +8 -4
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -2
- package/.docs/models/providers/neuralwatt.md +1 -1
- package/.docs/models/providers/nova.md +1 -1
- package/.docs/models/providers/novita-ai.md +1 -1
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ofox.md +4 -3
- package/.docs/models/providers/ollama-cloud.md +1 -1
- package/.docs/models/providers/opencode-go.md +1 -1
- package/.docs/models/providers/opencode.md +65 -64
- package/.docs/models/providers/orcarouter.md +1 -1
- package/.docs/models/providers/ovhcloud.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +1 -1
- package/.docs/models/providers/pioneer.md +1 -1
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/poolside.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +12 -10
- package/.docs/models/providers/qihang-ai.md +1 -1
- package/.docs/models/providers/qiniu-ai.md +1 -1
- package/.docs/models/providers/regolo-ai.md +26 -21
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/routing-run.md +1 -1
- package/.docs/models/providers/sakana.md +1 -1
- package/.docs/models/providers/sarvam.md +1 -1
- package/.docs/models/providers/scaleway.md +1 -1
- package/.docs/models/providers/scx.md +1 -1
- package/.docs/models/providers/siliconflow-cn.md +1 -1
- package/.docs/models/providers/siliconflow.md +1 -1
- package/.docs/models/providers/snowflake-cortex.md +6 -2
- package/.docs/models/providers/stackit.md +1 -1
- package/.docs/models/providers/stepfun-ai-step-plan.md +1 -1
- package/.docs/models/providers/stepfun-ai.md +1 -1
- package/.docs/models/providers/stepfun-step-plan.md +1 -1
- package/.docs/models/providers/stepfun.md +1 -1
- package/.docs/models/providers/subconscious.md +1 -1
- package/.docs/models/providers/submodel.md +1 -1
- package/.docs/models/providers/synthetic.md +1 -1
- package/.docs/models/providers/tencent-coding-plan.md +1 -1
- package/.docs/models/providers/tencent-token-plan.md +1 -1
- package/.docs/models/providers/tencent-tokenhub.md +1 -1
- package/.docs/models/providers/tensorx.md +1 -1
- package/.docs/models/providers/the-grid-ai.md +1 -1
- package/.docs/models/providers/thinkingmachines.md +1 -1
- package/.docs/models/providers/tinfoil.md +2 -2
- package/.docs/models/providers/togetherai.md +1 -1
- package/.docs/models/providers/trustedrouter.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +1 -1
- package/.docs/models/providers/umans-ai.md +1 -1
- package/.docs/models/providers/unorouter.md +1 -1
- package/.docs/models/providers/upstage.md +1 -1
- package/.docs/models/providers/venice.md +1 -1
- package/.docs/models/providers/vivgrid.md +1 -1
- package/.docs/models/providers/vultr.md +1 -1
- package/.docs/models/providers/wafer.ai.md +1 -1
- package/.docs/models/providers/wandb.md +3 -2
- package/.docs/models/providers/xiaomi-token-plan-ams.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-cn.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +1 -1
- package/.docs/models/providers/xiaomi.md +1 -1
- package/.docs/models/providers/xpersona.md +1 -1
- package/.docs/models/providers/zai-coding-plan.md +1 -1
- package/.docs/models/providers/zai.md +1 -1
- package/.docs/models/providers/zeldoc.md +8 -8
- package/.docs/models/providers/zenifra.md +1 -1
- package/.docs/models/providers/zenmux.md +1 -16
- package/.docs/models/providers/zhipuai-coding-plan.md +1 -1
- package/.docs/models/providers/zhipuai.md +1 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +35 -4
- package/.docs/reference/agent-controller/session.md +5 -3
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/durable-agent.md +2 -0
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +3 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/okta.md +5 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +6 -6
- package/.docs/reference/client-js/agents.md +2 -1
- package/.docs/reference/client-js/workflows.md +21 -21
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/configuration.md +21 -27
- package/.docs/reference/core/{addStoredWorkflow.md → addDynamicWorkflow.md} +10 -10
- package/.docs/reference/core/{addStoredWorkflows.md → addDynamicWorkflows.md} +9 -9
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +8 -0
- package/.docs/reference/editor/tool-provider.md +26 -1
- package/.docs/reference/file-based-agents/config.md +2 -0
- package/.docs/reference/file-based-agents/instructions.md +2 -0
- package/.docs/reference/file-based-agents/logger.md +2 -0
- package/.docs/reference/file-based-agents/memory.md +2 -0
- package/.docs/reference/file-based-agents/observability.md +2 -0
- package/.docs/reference/file-based-agents/processors.md +2 -0
- package/.docs/reference/file-based-agents/schedules.md +2 -0
- package/.docs/reference/file-based-agents/scorers.md +2 -0
- package/.docs/reference/file-based-agents/server.md +2 -0
- package/.docs/reference/file-based-agents/skills.md +2 -0
- package/.docs/reference/file-based-agents/storage.md +3 -1
- package/.docs/reference/file-based-agents/studio.md +3 -1
- package/.docs/reference/file-based-agents/subagents.md +2 -0
- package/.docs/reference/file-based-agents/tools.md +2 -0
- package/.docs/reference/file-based-agents/workflows.md +2 -0
- package/.docs/reference/file-based-agents/workspace.md +2 -0
- package/.docs/reference/index.md +32 -57
- package/.docs/{guides/getting-started → reference}/manual-install.md +2 -2
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +2 -2
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +10 -10
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/processors/pii-detector.md +2 -0
- package/.docs/reference/processors/prompt-injection-detector.md +2 -0
- package/.docs/reference/processors/regex-filter-processor.md +20 -0
- package/.docs/reference/processors/response-cache.md +2 -0
- package/.docs/reference/processors/tool-search-processor.md +33 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/reference/rag/metadata-filters.md +13 -4
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +18 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +42 -1
- package/.docs/reference/schedules/overview.md +2 -0
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/server/register-api-route.md +2 -0
- package/.docs/reference/server/routes.md +9 -9
- package/.docs/reference/signals/create-notification-inbox-tool.md +2 -0
- package/.docs/reference/signals/signal-provider.md +2 -0
- package/.docs/reference/signals/task-signal-provider.md +2 -0
- package/.docs/reference/signals/webhook-signal-provider.md +2 -0
- package/.docs/reference/storage/composite.md +4 -4
- package/.docs/reference/storage/overview.md +9 -9
- package/.docs/reference/storage/retention.md +5 -5
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/tools/mcp-client.md +51 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/tools/quickjs-transport.md +92 -0
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +347 -0
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workflows/{stored-workflow-definition.md → dynamic-workflow-definition.md} +9 -7
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workflows/workflow-methods/agent.md +3 -3
- package/.docs/reference/workflows/workflow-methods/tool.md +3 -3
- package/.docs/reference/workflows/workflow.md +18 -0
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +11 -3
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +97 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +6 -6
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +0 -0
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/inngest.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/temporal.md +0 -0
- /package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +0 -0
- /package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/express.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +0 -0
- /package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +0 -0
- /package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +0 -0
- /package/.docs/{guides/guide → integrations/tools}/firecrawl.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/network-to-supervisor.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
|
@@ -6,7 +6,7 @@ The observability system has been restructured in v1 with a dedicated `@mastra/o
|
|
|
6
6
|
|
|
7
7
|
> **Observability data stops flowing on upgrade:** If you upgrade Mastra packages to v1 without migrating your `telemetry:` config to `observability:`, the old config is ignored at runtime. Your service will start cleanly with no error, but **no traces, logs, or metrics will be sent anywhere**. If you were sending data to Mastra Cloud, the dashboard will go empty.
|
|
8
8
|
>
|
|
9
|
-
> Complete this migration in the same change that bumps your Mastra packages, and verify traces appear in [Mastra Studio](https://mastra.ai/docs/studio/observability) before considering the upgrade complete. If you previously hosted on Mastra Cloud, also follow the [Mastra Cloud migration guide](https://mastra.ai/
|
|
9
|
+
> Complete this migration in the same change that bumps your Mastra packages, and verify traces appear in [Mastra Studio](https://mastra.ai/docs/studio/observability) before considering the upgrade complete. If you previously hosted on Mastra Cloud, also follow the [Mastra Cloud migration guide](https://mastra.ai/reference/migrations/mastra-cloud). The new platform requires a new access token and a Studio project before `MastraPlatformExporter` can route data to it.
|
|
10
10
|
|
|
11
11
|
> **Exporter rename:** `MastraPlatformExporter` (sends data to Mastra platform) replaces the previous `CloudExporter`, and `MastraStorageExporter` (persists data to Mastra Storage) replaces the previous `DefaultExporter`. The original classes remain available from `@mastra/observability` and behave identically, but they're deprecated. New code should use `MastraPlatformExporter` and `MastraStorageExporter`. Existing imports of `CloudExporter` or `DefaultExporter` continue to work until they're removed in a future major version.
|
|
12
12
|
|
|
@@ -354,14 +354,14 @@ No separate instrumentation files or special startup flags required.
|
|
|
354
354
|
|
|
355
355
|
If you were using OTEL-based telemetry with specific providers in 0.x, here's how to configure them in v1:
|
|
356
356
|
|
|
357
|
-
| Provider | Exporter | Guide
|
|
358
|
-
| --------------------------------------------------------- | ----------------- |
|
|
359
|
-
| Arize AX, Arize Phoenix | **Arize** | [Guide](https://mastra.ai/
|
|
360
|
-
| Braintrust | **Braintrust** | [Guide](https://mastra.ai/
|
|
361
|
-
| Langfuse | **Langfuse** | [Guide](https://mastra.ai/
|
|
362
|
-
| LangSmith | **LangSmith** | [Guide](https://mastra.ai/
|
|
363
|
-
| Dash0, Laminar, New Relic, SigNoz, Traceloop, Custom OTEL | **OpenTelemetry** | [Guide](https://mastra.ai/
|
|
364
|
-
| LangWatch | \<coming soon> | -
|
|
357
|
+
| Provider | Exporter | Guide | Reference |
|
|
358
|
+
| --------------------------------------------------------- | ----------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
359
|
+
| Arize AX, Arize Phoenix | **Arize** | [Guide](https://mastra.ai/integrations/observability/arize) | [Reference](https://mastra.ai/reference/observability/tracing/exporters/arize) |
|
|
360
|
+
| Braintrust | **Braintrust** | [Guide](https://mastra.ai/integrations/observability/braintrust) | [Reference](https://mastra.ai/reference/observability/tracing/exporters/braintrust) |
|
|
361
|
+
| Langfuse | **Langfuse** | [Guide](https://mastra.ai/integrations/observability/langfuse) | [Reference](https://mastra.ai/reference/observability/tracing/exporters/langfuse) |
|
|
362
|
+
| LangSmith | **LangSmith** | [Guide](https://mastra.ai/integrations/observability/langsmith) | [Reference](https://mastra.ai/reference/observability/tracing/exporters/langsmith) |
|
|
363
|
+
| Dash0, Laminar, New Relic, SigNoz, Traceloop, Custom OTEL | **OpenTelemetry** | [Guide](https://mastra.ai/integrations/observability/opentelemetry) | [Reference](https://mastra.ai/reference/observability/tracing/exporters/otel) |
|
|
364
|
+
| LangWatch | \<coming soon> | - | - |
|
|
365
365
|
|
|
366
366
|
### Installation
|
|
367
367
|
|
|
@@ -417,4 +417,4 @@ yarn add @mastra/otel-exporter@latest
|
|
|
417
417
|
bun add @mastra/otel-exporter@latest
|
|
418
418
|
```
|
|
419
419
|
|
|
420
|
-
Plus the required protocol package for your provider (see [OTEL guide](https://mastra.ai/
|
|
420
|
+
Plus the required protocol package for your provider (see [OTEL guide](https://mastra.ai/integrations/observability/opentelemetry)).
|
|
@@ -157,7 +157,7 @@ const mastra = new Mastra({
|
|
|
157
157
|
|
|
158
158
|
The DatadogBridge requires `dd-trace` to be initialized before any other imports so its auto-instrumentation can patch HTTP, database, and framework libraries at load time.
|
|
159
159
|
|
|
160
|
-
See the [DatadogBridge Guide](https://mastra.ai/
|
|
160
|
+
See the [DatadogBridge Guide](https://mastra.ai/integrations/observability/datadog) for complete setup instructions, including dd-trace initialization, bundler externals, and agent configuration.
|
|
161
161
|
|
|
162
162
|
## Span mapping
|
|
163
163
|
|
|
@@ -208,6 +208,6 @@ The bridge reads configuration from these environment variables:
|
|
|
208
208
|
|
|
209
209
|
## Related
|
|
210
210
|
|
|
211
|
-
- [DatadogBridge Guide](https://mastra.ai/
|
|
211
|
+
- [DatadogBridge Guide](https://mastra.ai/integrations/observability/datadog) - Setup guide with examples
|
|
212
212
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview) - General tracing concepts
|
|
213
213
|
- [DatadogExporter Reference](https://mastra.ai/reference/observability/tracing/exporters/datadog) - LLM Observability only, no `dd-trace` APM
|
|
@@ -120,7 +120,7 @@ const mastra = new Mastra({
|
|
|
120
120
|
|
|
121
121
|
The OtelBridge requires an active OpenTelemetry SDK to function. The bridge reads from OTEL's ambient context.
|
|
122
122
|
|
|
123
|
-
See the [OtelBridge Guide](https://mastra.ai/
|
|
123
|
+
See the [OtelBridge Guide](https://mastra.ai/integrations/observability/opentelemetry) for complete setup instructions, including how to configure OTEL instrumentation and run your application.
|
|
124
124
|
|
|
125
125
|
## Tags support
|
|
126
126
|
|
|
@@ -150,6 +150,6 @@ This format ensures compatibility with all OTEL-compatible backends and collecto
|
|
|
150
150
|
|
|
151
151
|
## Related
|
|
152
152
|
|
|
153
|
-
- [OtelBridge Guide](https://mastra.ai/
|
|
153
|
+
- [OtelBridge Guide](https://mastra.ai/integrations/observability/opentelemetry): Setup guide with examples
|
|
154
154
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): General tracing concepts
|
|
155
155
|
- [OtelExporter Reference](https://mastra.ai/reference/observability/tracing/exporters/otel): OTEL exporter for sending traces
|
|
@@ -138,6 +138,6 @@ Tags are stored using the OpenInference `tag.tags` attribute:
|
|
|
138
138
|
|
|
139
139
|
## Related
|
|
140
140
|
|
|
141
|
-
- [ArizeExporter Documentation](https://mastra.ai/
|
|
141
|
+
- [ArizeExporter Documentation](https://mastra.ai/integrations/observability/arize)
|
|
142
142
|
- [Phoenix Documentation](https://docs.arize.com/phoenix)
|
|
143
143
|
- [Arize AX Documentation](https://docs.arize.com/)
|
|
@@ -119,6 +119,6 @@ Tags are stored using the OpenInference `tag.tags` attribute:
|
|
|
119
119
|
|
|
120
120
|
## Related
|
|
121
121
|
|
|
122
|
-
- [ArthurExporter Documentation](https://mastra.ai/
|
|
122
|
+
- [ArthurExporter Documentation](https://mastra.ai/integrations/observability/arthur)
|
|
123
123
|
- [Arthur Engine documentation](https://docs.arthur.ai/)
|
|
124
124
|
- [Arthur Engine repository](https://github.com/arthur-ai/arthur-engine)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Sends Tracing data to [Confident AI](https://www.confident-ai.com/) for evaluation and observability. Exported by `@mastra/deepeval`, which builds on the DeepEval SDK.
|
|
6
6
|
|
|
7
|
-
See [Confident AI exporter](https://mastra.ai/
|
|
7
|
+
See [Confident AI exporter](https://mastra.ai/integrations/observability/confident-ai) for setup and usage.
|
|
8
8
|
|
|
9
9
|
## Constructor
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Sends Tracing data to Datadog's LLM Observability product for monitoring and analytics.
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Note:** If you also use `dd-trace` APM auto-instrumentation and need it correctly parented under Mastra spans, use the [DatadogBridge](https://mastra.ai/reference/observability/tracing/bridges/datadog) instead. The exporter sends LLM Observability data after execution completes, so it doesn't participate in `dd-trace`'s live scope.
|
|
8
8
|
|
|
9
9
|
## Constructor
|
|
10
10
|
|
|
@@ -177,6 +177,18 @@ The exporter batches tracing spans, logs, metrics, scores, and feedback for effi
|
|
|
177
177
|
|
|
178
178
|
Errors raised by `MastraPlatformExporter` use the `MASTRA_PLATFORM_EXPORTER_*` `id` prefix. The deprecated `CloudExporter` continues to emit `CLOUD_EXPORTER_*` `id`s.
|
|
179
179
|
|
|
180
|
+
### Quota pause
|
|
181
|
+
|
|
182
|
+
When an organization has exhausted its observability quota, the Mastra platform rejects publish requests with `402 Payment Required` plus the `x-mastra-observability: disabled` header. When the exporter sees a `402` (or the header) on any publish route, it:
|
|
183
|
+
|
|
184
|
+
- Drops the rejected batch without retrying it
|
|
185
|
+
- Pauses all five signal types (traces, logs, metrics, scores, feedback) and drops buffered and new events instead of sending them
|
|
186
|
+
- Logs a warning that telemetry is paused
|
|
187
|
+
- Probes the platform periodically with an empty batch, using the interval from the `x-mastra-observability-retry-after` header (seconds), or every 5 minutes if the header is absent
|
|
188
|
+
- Resumes exporting automatically and logs a warning once the platform stops rejecting with `402`
|
|
189
|
+
|
|
190
|
+
The probe timer doesn't keep the Node.js process alive, so short-lived and serverless processes exit normally while paused.
|
|
191
|
+
|
|
180
192
|
### Endpoint routing
|
|
181
193
|
|
|
182
194
|
- Base origins derive signal endpoints automatically
|
|
@@ -200,6 +200,6 @@ Tags are stored as a JSON-stringified array in the `mastra.tags` span attribute
|
|
|
200
200
|
|
|
201
201
|
## Related
|
|
202
202
|
|
|
203
|
-
- [OtelExporter Guide](https://mastra.ai/
|
|
204
|
-
- [OtelBridge](https://mastra.ai/
|
|
203
|
+
- [OtelExporter Guide](https://mastra.ai/integrations/observability/opentelemetry): Setup guide with provider configurations
|
|
204
|
+
- [OtelBridge](https://mastra.ai/integrations/observability/opentelemetry): For bidirectional OTEL context integration
|
|
205
205
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): General tracing concepts
|
|
@@ -42,6 +42,8 @@ const processor = new PIIDetector({
|
|
|
42
42
|
|
|
43
43
|
**options.providerOptions** (`ProviderOptions`): Provider-specific options passed to the internal detection agent. Use this to control model behavior like reasoning effort for thinking models (e.g., { openai: { reasoningEffort: 'low' } })
|
|
44
44
|
|
|
45
|
+
**options.onDetection** (`(event: PIIDetectionEvent) => void | Promise<void>`): Called whenever a detection result is produced, with detectionResult, the analyzed input, whether it was flagged, and the strategyApplied (the configured strategy when flagged, otherwise none). Fires for every analyzed message in processInput and processOutputResult, and for every LLM buffer flush during streaming; the streaming regex pass only reports when PII is found. Errors thrown by the callback are logged and ignored
|
|
46
|
+
|
|
45
47
|
## Returns
|
|
46
48
|
|
|
47
49
|
**id** (`string`): Processor identifier set to 'pii-detector'
|
|
@@ -38,6 +38,8 @@ const processor = new PromptInjectionDetector({
|
|
|
38
38
|
|
|
39
39
|
**options.providerOptions** (`ProviderOptions`): Provider-specific options passed to the internal detection agent. Use this to control model behavior like reasoning effort for thinking models (e.g., { openai: { reasoningEffort: 'low' } })
|
|
40
40
|
|
|
41
|
+
**options.onDetection** (`(event: PromptInjectionDetectionEvent) => void | Promise<void>`): Called for every analyzed message with detectionResult, the analyzed input, whether it was flagged, and the strategyApplied (the configured strategy when flagged, otherwise none). Use it to emit custom metrics. Errors thrown by the callback are logged and ignored
|
|
42
|
+
|
|
41
43
|
## Returns
|
|
42
44
|
|
|
43
45
|
**id** (`string`): Processor identifier set to 'prompt-injection-detector'
|
|
@@ -43,6 +43,24 @@ const filter = new RegexFilterProcessor({
|
|
|
43
43
|
})
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
Raise the streaming carryover window for long custom matches (e.g. a fixed-length secret or a value that only matches once its closing delimiter arrives):
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { RegexFilterProcessor } from '@mastra/core/processors'
|
|
50
|
+
|
|
51
|
+
const filter = new RegexFilterProcessor({
|
|
52
|
+
rules: [
|
|
53
|
+
{
|
|
54
|
+
name: 'armored-key',
|
|
55
|
+
pattern: /-----BEGIN KEY-----[A-Z]+-----END KEY-----/g,
|
|
56
|
+
replacement: '[KEY]',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
strategy: 'redact',
|
|
60
|
+
streamCarryoverSize: 256,
|
|
61
|
+
})
|
|
62
|
+
```
|
|
63
|
+
|
|
46
64
|
Attach to an agent:
|
|
47
65
|
|
|
48
66
|
```typescript
|
|
@@ -80,6 +98,8 @@ const agent = new Agent({
|
|
|
80
98
|
|
|
81
99
|
**includeRedactedValues** (`boolean`): Include the text that was redacted in each report entry. Off by default, because the values are the data the processor removes. (Default: `false`)
|
|
82
100
|
|
|
101
|
+
**streamCarryoverSize** (`number`): Trailing characters the streaming redact path holds back between chunks, so a match split across a chunk boundary is redacted whole. The default covers every built-in preset with a wide margin. Raise it for custom rules whose matches stay invisible to the rule until they complete, such as a fixed-length secret or a value with a closing delimiter, when such a match can be longer than the window. (Default: `128`)
|
|
102
|
+
|
|
83
103
|
## Returns
|
|
84
104
|
|
|
85
105
|
**id** (`'regex-filter'`): Processor identifier.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# ResponseCache
|
|
4
4
|
|
|
5
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
6
|
+
|
|
5
7
|
`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
8
|
|
|
7
9
|
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.
|
|
@@ -29,6 +29,8 @@ const toolSearch = new ToolSearchProcessor({
|
|
|
29
29
|
|
|
30
30
|
**options.tools** (`Record<string, Tool>`): All tools that can be searched and loaded dynamically. These tools are not immediately available to the agent — they must be discovered via search and loaded on demand.
|
|
31
31
|
|
|
32
|
+
**options.includeResolvedTools** (`boolean`): Also make the tools the agent resolved for this request (MCP tools requiring the caller's credentials, or anything returned by a dynamic tools function) searchable, and withhold them from the prompt until the agent loads them. The meta-tools are never withheld. Request-resolved tools are indexed per request, so each request searches and loads its own tool instances.
|
|
33
|
+
|
|
32
34
|
**options.search** (`{ topK?: number; minScore?: number; autoLoad?: boolean }`): Configuration for the search behavior.
|
|
33
35
|
|
|
34
36
|
**options.search.topK** (`number`): Maximum number of tools to return in search results.
|
|
@@ -120,7 +122,37 @@ The `phase` value describes where the filter is being applied:
|
|
|
120
122
|
- `load`: Blocks `load_tool` from loading disallowed tools.
|
|
121
123
|
- `active`: Hides already-loaded tools from the current request if they're no longer allowed.
|
|
122
124
|
|
|
123
|
-
If the hook throws or rejects, `ToolSearchProcessor` treats the tool as disallowed for that request. The hook may run for every matching search candidate, so keep async policy checks cheap or cached. The `search_tools` meta-tool is always available. `load_tool` is available unless `search.autoLoad` is enabled. Tools passed directly through the agent or `processInputStep` remain available unless you filter them outside `ToolSearchProcessor`.
|
|
125
|
+
If the hook throws or rejects, `ToolSearchProcessor` treats the tool as disallowed for that request. The hook may run for every matching search candidate, so keep async policy checks cheap or cached. The `search_tools` meta-tool is always available. `load_tool` is available unless `search.autoLoad` is enabled. Tools passed directly through the agent or `processInputStep` remain available unless you filter them outside `ToolSearchProcessor`, or enable `includeResolvedTools`.
|
|
126
|
+
|
|
127
|
+
## Searching request-resolved tools
|
|
128
|
+
|
|
129
|
+
The `tools` option is fixed at construction, so you can't list tools that only exist per request (MCP tools that need the caller's credentials, or anything returned by a dynamic `tools` function). By default those tools bypass search and occupy prompt space on every turn.
|
|
130
|
+
|
|
131
|
+
Set `includeResolvedTools: true` to index them for the request and withhold them from the prompt until the agent loads them:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { Agent } from '@mastra/core/agent'
|
|
135
|
+
import { ToolSearchProcessor } from '@mastra/core/processors'
|
|
136
|
+
|
|
137
|
+
const toolSearch = new ToolSearchProcessor({
|
|
138
|
+
tools: staticTools,
|
|
139
|
+
includeResolvedTools: true,
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
const agent = new Agent({
|
|
143
|
+
id: 'mcp-agent',
|
|
144
|
+
name: 'mcp-agent',
|
|
145
|
+
instructions: 'Search for a tool when you need a capability you do not have.',
|
|
146
|
+
model: 'openai/gpt-5.6-sol',
|
|
147
|
+
// Resolved per request, then searchable alongside staticTools
|
|
148
|
+
tools: async ({ requestContext }) => mcpClient.getTools(requestContext.get('userToken')),
|
|
149
|
+
inputProcessors: [toolSearch],
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Each request is indexed on its own, so a tool loaded by one caller never resolves to another caller's instance of the same tool name.
|
|
154
|
+
|
|
155
|
+
This option applies to every tool resolved for the request, including memory, workspace, skill, and browser tools. Only the `search_tools` and `load_tool` meta-tools stay in the prompt, so any tool the agent relies on implicitly must be found through search before it can be called.
|
|
124
156
|
|
|
125
157
|
## Extended usage example
|
|
126
158
|
|
|
@@ -130,4 +130,4 @@ When the configured pub/sub backend doesn't implement `LeaseProvider`, the runti
|
|
|
130
130
|
- [PubSub](https://mastra.ai/reference/pubsub/base): The event delivery contract, separate from leasing
|
|
131
131
|
- [RedisStreamsPubSub](https://mastra.ai/reference/pubsub/redis-streams): The built-in backend that implements `LeaseProvider`
|
|
132
132
|
- [Signals](https://mastra.ai/docs/long-running-agents/signals): The runtime that uses leasing to coordinate thread execution across processes
|
|
133
|
-
- [Channels](https://mastra.ai/docs/capabilities/channels
|
|
133
|
+
- [Channels](https://mastra.ai/docs/capabilities/channels): Uses leasing to coordinate agent runs in serverless and multi-instance deployments
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
Before processing, create a MDocument instance from your content. You can initialize it from different formats:
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
|
-
|
|
8
|
+
import { MDocument } from '@mastra/rag'
|
|
9
|
+
|
|
10
|
+
const doc = MDocument.fromText('Your plain text content...')
|
|
9
11
|
const docFromHTML = MDocument.fromHTML('<html>Your HTML content...</html>')
|
|
10
12
|
const docFromMarkdown = MDocument.fromMarkdown('# Your Markdown content...')
|
|
11
13
|
const docFromJSON = MDocument.fromJSON(`{ "key": "value" }`)
|
|
@@ -59,7 +61,7 @@ For markdown documents where preserving the semantic relationships between secti
|
|
|
59
61
|
const chunks = await doc.chunk({
|
|
60
62
|
strategy: 'semantic-markdown',
|
|
61
63
|
joinThreshold: 500,
|
|
62
|
-
modelName: 'gpt-
|
|
64
|
+
modelName: 'gpt-5',
|
|
63
65
|
})
|
|
64
66
|
```
|
|
65
67
|
|
|
@@ -129,51 +131,46 @@ const { embeddings } = await embedMany({
|
|
|
129
131
|
|
|
130
132
|
## Example: Complete pipeline
|
|
131
133
|
|
|
132
|
-
Here's an example showing document processing
|
|
134
|
+
Here's an example showing document processing, embedding generation, and vector storage:
|
|
133
135
|
|
|
134
136
|
```ts
|
|
135
|
-
import {
|
|
136
|
-
|
|
137
|
+
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
|
|
138
|
+
import { PgVector } from '@mastra/pg'
|
|
137
139
|
import { MDocument } from '@mastra/rag'
|
|
140
|
+
import { embedMany } from 'ai'
|
|
138
141
|
|
|
139
|
-
// Initialize document
|
|
140
142
|
const doc = MDocument.fromText(`
|
|
141
143
|
Climate change poses significant challenges to global agriculture.
|
|
142
144
|
Rising temperatures and changing precipitation patterns affect crop yields.
|
|
143
145
|
`)
|
|
144
146
|
|
|
145
|
-
// Create chunks
|
|
146
147
|
const chunks = await doc.chunk({
|
|
147
148
|
strategy: 'recursive',
|
|
148
149
|
maxSize: 256,
|
|
149
150
|
overlap: 50,
|
|
150
151
|
})
|
|
151
152
|
|
|
152
|
-
// Generate embeddings with OpenAI
|
|
153
|
-
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
|
|
154
|
-
|
|
155
153
|
const { embeddings } = await embedMany({
|
|
156
154
|
model: new ModelRouterEmbeddingModel('openai/text-embedding-3-small'),
|
|
157
155
|
values: chunks.map(chunk => chunk.text),
|
|
158
156
|
})
|
|
159
157
|
|
|
160
|
-
|
|
158
|
+
const vectorStore = new PgVector({
|
|
159
|
+
id: 'pg-vector',
|
|
160
|
+
connectionString: process.env.POSTGRES_CONNECTION_STRING,
|
|
161
|
+
})
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
values: chunks.map(chunk => chunk.text),
|
|
163
|
+
await vectorStore.createIndex({
|
|
164
|
+
indexName: 'embeddings',
|
|
165
|
+
dimension: 1536,
|
|
166
166
|
})
|
|
167
167
|
|
|
168
|
-
// Store embeddings in your vector database
|
|
169
168
|
await vectorStore.upsert({
|
|
170
169
|
indexName: 'embeddings',
|
|
171
170
|
vectors: embeddings,
|
|
172
171
|
})
|
|
173
172
|
```
|
|
174
173
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
174
|
For more examples of different chunking strategies and embedding configurations, see:
|
|
178
175
|
|
|
179
176
|
- [Chunk Reference](https://mastra.ai/reference/rag/chunk)
|
|
@@ -181,5 +178,5 @@ For more examples of different chunking strategies and embedding configurations,
|
|
|
181
178
|
|
|
182
179
|
For more details on vector databases and embeddings, see:
|
|
183
180
|
|
|
184
|
-
- [Vector Databases](https://mastra.ai/
|
|
181
|
+
- [Vector Databases](https://mastra.ai/reference/rag/vector-databases)
|
|
185
182
|
- [Embedding API Reference](https://mastra.ai/reference/rag/embeddings)
|
|
@@ -275,5 +275,5 @@ const vectorTool = createVectorQueryTool({
|
|
|
275
275
|
## Related
|
|
276
276
|
|
|
277
277
|
- [createVectorQueryTool()](https://mastra.ai/reference/tools/vector-query-tool)
|
|
278
|
-
- [Hybrid Vector Search](https://mastra.ai/
|
|
278
|
+
- [Hybrid Vector Search](https://mastra.ai/reference/rag/retrieval)
|
|
279
279
|
- [Metadata Filters](https://mastra.ai/reference/rag/metadata-filters)
|
|
@@ -14,7 +14,7 @@ GraphRAG is particularly effective when:
|
|
|
14
14
|
- Understanding connections between concepts is important
|
|
15
15
|
- Simple vector similarity misses important contextual relationships
|
|
16
16
|
|
|
17
|
-
For straightforward semantic search without relationship traversal, use [standard retrieval methods](https://mastra.ai/
|
|
17
|
+
For straightforward semantic search without relationship traversal, use [standard retrieval methods](https://mastra.ai/reference/rag/retrieval).
|
|
18
18
|
|
|
19
19
|
## How GraphRAG works
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Metadata filters
|
|
4
4
|
|
|
5
|
-
Mastra provides a unified metadata filtering syntax across all vector stores, based on MongoDB/Sift query syntax. Each vector store translates these filters into
|
|
5
|
+
Mastra provides a unified metadata filtering syntax across all vector stores, based on MongoDB/Sift query syntax. Each vector store translates these filters into its native query format. For example, PgVector uses PostgreSQL JSONB predicates, while OracleDB stores metadata as Oracle JSON and compiles filters to `JSON_VALUE`, `JSON_EXISTS`, `REGEXP_LIKE`, and `LIKE` predicates with bound values.
|
|
6
6
|
|
|
7
7
|
## Basic example
|
|
8
8
|
|
|
@@ -34,11 +34,11 @@ const results = await store.query({
|
|
|
34
34
|
|
|
35
35
|
### Array Operators
|
|
36
36
|
|
|
37
|
-
`$in`Matches any value in array{ category: { $in: \["A", "B"] } }Supported by: All except Couchbase`$nin`Matches none of the values{ status: { $nin: \["deleted", "archived"] } }Supported by: All except Couchbase`$all`Matches arrays containing all elements{ tags: { $all: \["urgent", "high"] } }Supported by: Astra, Pinecone, Upstash, MongoDB`$elemMatch`Matches array elements meeting criteria{ scores: { $elemMatch: { $gt: 80 } } }Supported by: libSQL, PgVector, MongoDB
|
|
37
|
+
`$in`Matches any value in array{ category: { $in: \["A", "B"] } }Supported by: All except Couchbase`$nin`Matches none of the values{ status: { $nin: \["deleted", "archived"] } }Supported by: All except Couchbase`$all`Matches arrays containing all elements{ tags: { $all: \["urgent", "high"] } }Supported by: Astra, Pinecone, Upstash, MongoDB, OracleDB`$elemMatch`Matches array elements meeting criteria{ scores: { $elemMatch: { $gt: 80 } } }Supported by: libSQL, PgVector, MongoDB, OracleDB
|
|
38
38
|
|
|
39
39
|
### Logical Operators
|
|
40
40
|
|
|
41
|
-
`$and`Logical AND{ $and: \[{ price: { $gt: 100 } }, { stock: { $gt: 0 } }] }Supported by: All except Vectorize, Couchbase`$or`Logical OR{ $or: \[{ status: "active" }, { priority: "high" }] }Supported by: All except Vectorize, Couchbase`$not`Logical NOT{ price: { $not: { $lt: 100 } } }Supported by: Astra, Qdrant, Upstash, PgVector, libSQL, MongoDB`$nor`Logical NOR{ $nor: \[{ status: "deleted" }, { archived: true }] }Supported by: Qdrant, Upstash, PgVector, libSQL, MongoDB
|
|
41
|
+
`$and`Logical AND{ $and: \[{ price: { $gt: 100 } }, { stock: { $gt: 0 } }] }Supported by: All except Vectorize, Couchbase`$or`Logical OR{ $or: \[{ status: "active" }, { priority: "high" }] }Supported by: All except Vectorize, Couchbase`$not`Logical NOT{ price: { $not: { $lt: 100 } } }Supported by: Astra, Qdrant, Upstash, PgVector, libSQL, MongoDB, OracleDB`$nor`Logical NOR{ $nor: \[{ status: "deleted" }, { archived: true }] }Supported by: Qdrant, Upstash, PgVector, libSQL, MongoDB, OracleDB
|
|
42
42
|
|
|
43
43
|
### Element Operators
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ const results = await store.query({
|
|
|
46
46
|
|
|
47
47
|
### Custom Operators
|
|
48
48
|
|
|
49
|
-
`$contains`Text contains substring{ description: { $contains: "sale" } }Supported by: Upstash, libSQL, PgVector`$regex`Regular expression match{ name: { $regex: "^test" } }Supported by: Qdrant, PgVector, Upstash, MongoDB`$size`Array length check{ tags: { $size:
|
|
49
|
+
`$contains`Text contains substring{ description: { $contains: "sale" } }Supported by: Upstash, libSQL, PgVector, OracleDB`$regex`Regular expression match{ name: { $regex: "^test" } }Supported by: Qdrant, PgVector, Upstash, MongoDB, OracleDB`$size`Array length check{ tags: { $size: 3 } }Supported by: Astra, libSQL, PgVector, MongoDB, OracleDB`$geo`Geospatial query{ location: { $geo: { type: "radius", ... } } }Supported by: Qdrant`$datetime`Datetime range query{ created: { $datetime: { range: { gt: "2024-01-01" } } } }Supported by: Qdrant`$hasId`Vector ID existence check{ $hasId: \["id1", "id2"] }Supported by: Qdrant`$hasVector`Vector existence check{ $hasVector: true }Supported by: Qdrant
|
|
50
50
|
|
|
51
51
|
## Common rules and restrictions
|
|
52
52
|
|
|
@@ -124,6 +124,14 @@ const results = await store.query({
|
|
|
124
124
|
- Empty arrays in conditions are handled gracefully
|
|
125
125
|
- Metadata is stored in a JSONB column for efficient querying
|
|
126
126
|
|
|
127
|
+
### OracleDB
|
|
128
|
+
|
|
129
|
+
- Metadata is stored as Oracle JSON alongside each `VECTOR` row
|
|
130
|
+
- Scalar comparisons use `JSON_VALUE`, while array, existence, and element-match checks use `JSON_EXISTS`
|
|
131
|
+
- `$regex` uses Oracle `REGEXP_LIKE`; string `$contains` uses case-insensitive `LIKE`
|
|
132
|
+
- Nested fields are supported with dot notation and are converted to quoted Oracle JSON paths
|
|
133
|
+
- User-provided metadata values are bound as parameters instead of interpolated into SQL
|
|
134
|
+
|
|
127
135
|
### PgVector
|
|
128
136
|
|
|
129
137
|
- Full support for PostgreSQL's native JSON querying capabilities
|
|
@@ -211,6 +219,7 @@ const results = await store.query({
|
|
|
211
219
|
- [Cloudflare Vectorize](https://mastra.ai/reference/vectors/vectorize)
|
|
212
220
|
- [libSQL](https://mastra.ai/reference/vectors/libsql)
|
|
213
221
|
- [MongoDB](https://mastra.ai/reference/vectors/mongodb)
|
|
222
|
+
- [OracleDB](https://mastra.ai/reference/vectors/oracledb)
|
|
214
223
|
- [PgStore](https://mastra.ai/reference/vectors/pg)
|
|
215
224
|
- [Pinecone](https://mastra.ai/reference/vectors/pinecone)
|
|
216
225
|
- [Qdrant](https://mastra.ai/reference/vectors/qdrant)
|
|
@@ -63,11 +63,11 @@ This example shows the essentials. Initialize a document and create chunks, then
|
|
|
63
63
|
|
|
64
64
|
## Document processing
|
|
65
65
|
|
|
66
|
-
The basic building block of RAG is document processing. Documents can be chunked using strategies (recursive, sliding window, etc.) and enriched with metadata. See the [chunking and embedding doc](https://mastra.ai/
|
|
66
|
+
The basic building block of RAG is document processing. Documents can be chunked using strategies (recursive, sliding window, etc.) and enriched with metadata. See the [chunking and embedding doc](https://mastra.ai/reference/rag/chunking-and-embedding).
|
|
67
67
|
|
|
68
68
|
## Vector storage
|
|
69
69
|
|
|
70
|
-
Mastra supports multiple vector stores for embedding persistence and similarity search, including pgvector, Pinecone, Qdrant, and MongoDB. See the [vector database doc](https://mastra.ai/
|
|
70
|
+
Mastra supports multiple vector stores for embedding persistence and similarity search, including pgvector, OracleDB, Pinecone, Qdrant, and MongoDB. See the [vector database doc](https://mastra.ai/reference/rag/vector-databases).
|
|
71
71
|
|
|
72
72
|
## More resources
|
|
73
73
|
|
|
@@ -436,6 +436,23 @@ export const ragAgent = new Agent({
|
|
|
436
436
|
})
|
|
437
437
|
```
|
|
438
438
|
|
|
439
|
+
**OracleDB**:
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
import { ORACLEDB_PROMPT } from '@mastra/oracledb'
|
|
443
|
+
|
|
444
|
+
export const ragAgent = new Agent({
|
|
445
|
+
id: 'rag-agent',
|
|
446
|
+
name: 'RAG Agent',
|
|
447
|
+
model: 'openai/gpt-5.6-sol',
|
|
448
|
+
instructions: `
|
|
449
|
+
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
450
|
+
${ORACLEDB_PROMPT}
|
|
451
|
+
`,
|
|
452
|
+
tools: { vectorQueryTool },
|
|
453
|
+
})
|
|
454
|
+
```
|
|
455
|
+
|
|
439
456
|
**S3Vectors**:
|
|
440
457
|
|
|
441
458
|
```ts
|
|
@@ -517,4 +534,4 @@ The re-ranked results combine vector similarity with semantic understanding to i
|
|
|
517
534
|
|
|
518
535
|
For more details about re-ranking, see the [rerank()](https://mastra.ai/reference/rag/rerankWithScorer) method.
|
|
519
536
|
|
|
520
|
-
For graph-based retrieval that follows connections between chunks, see the [GraphRAG](https://mastra.ai/
|
|
537
|
+
For graph-based retrieval that follows connections between chunks, see the [GraphRAG](https://mastra.ai/reference/rag/graph-rag-guide) documentation.
|
|
@@ -78,6 +78,35 @@ await store.upsert({
|
|
|
78
78
|
|
|
79
79
|
PostgreSQL with the pgvector extension is a good solution for teams already using PostgreSQL who want to minimize infrastructure complexity. For detailed setup instructions and best practices, see the [official pgvector repository](https://github.com/pgvector/pgvector).
|
|
80
80
|
|
|
81
|
+
**OracleDB**:
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { OracleVector } from '@mastra/oracledb'
|
|
85
|
+
|
|
86
|
+
const store = new OracleVector({
|
|
87
|
+
id: 'oracle-vector',
|
|
88
|
+
user: process.env.ORACLE_DATABASE_USER,
|
|
89
|
+
password: process.env.ORACLE_DATABASE_PASSWORD,
|
|
90
|
+
connectString: process.env.ORACLE_DATABASE_CONNECT_STRING,
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
await store.createIndex({
|
|
94
|
+
indexName: 'myCollection',
|
|
95
|
+
dimension: 1536,
|
|
96
|
+
indexConfig: { type: 'none' },
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
await store.upsert({
|
|
100
|
+
indexName: 'myCollection',
|
|
101
|
+
vectors: embeddings,
|
|
102
|
+
metadata: chunks.map(chunk => ({ text: chunk.text })),
|
|
103
|
+
})
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Using Oracle Database Vector Search
|
|
107
|
+
|
|
108
|
+
OracleDB stores embeddings in native `VECTOR` columns and metadata in Oracle JSON. Exact search is the default; HNSW and IVF indexes can be configured for tuned deployments.
|
|
109
|
+
|
|
81
110
|
**Pinecone**:
|
|
82
111
|
|
|
83
112
|
```ts
|
|
@@ -378,7 +407,7 @@ await store.createIndex({
|
|
|
378
407
|
|
|
379
408
|
The dimension size must match the output dimension of your chosen embedding model. Common dimension sizes are:
|
|
380
409
|
|
|
381
|
-
-
|
|
410
|
+
- OpenAI `text-embedding-3-small`: 1536 dimensions (or custom, e.g., 256)
|
|
382
411
|
- `Cohere embed-multilingual-v3`: 1024 dimensions
|
|
383
412
|
- `VoyageAI voyage-3.5`: 1024 dimensions (or custom: 256, 512, 1024, 2048)
|
|
384
413
|
- `Google gemini-embedding-001`: 768 dimensions (or custom)
|
|
@@ -410,6 +439,18 @@ Index names must:
|
|
|
410
439
|
- Example: `my_index_123` is valid
|
|
411
440
|
- Example: `my-index` is not valid (contains hyphen)
|
|
412
441
|
|
|
442
|
+
**OracleDB**:
|
|
443
|
+
|
|
444
|
+
Index names are logical Mastra names. OracleDB maps each logical index to a physical Oracle table internally.
|
|
445
|
+
|
|
446
|
+
Logical index names must:
|
|
447
|
+
|
|
448
|
+
- Be non-empty
|
|
449
|
+
- Be 512 characters or fewer
|
|
450
|
+
- Be stable for the lifetime of the vector index
|
|
451
|
+
- Example: `my_collection_123` is valid
|
|
452
|
+
- Example: `customer-support/docs:v1` is valid and is mapped to a safe Oracle table name
|
|
453
|
+
|
|
413
454
|
**Pinecone**:
|
|
414
455
|
|
|
415
456
|
Index names must:
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.50.0`
|
|
6
6
|
|
|
7
|
+
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
8
|
+
|
|
7
9
|
`mastra.schedules` is the CRUD service for persisted cron schedules. Use it to create, list, update, pause, resume, manually run, and delete schedules for agents or workflows.
|
|
8
10
|
|
|
9
11
|
For usage patterns and concepts, see [Schedules](https://mastra.ai/docs/long-running-agents/schedules).
|
|
@@ -72,10 +72,36 @@ handler: async params => {
|
|
|
72
72
|
|
|
73
73
|
## Return value
|
|
74
74
|
|
|
75
|
-
Returns a `ServerRoute` object that can be registered with an adapter.
|
|
75
|
+
Returns a `ServerRoute` object that can be registered with an adapter or passed to `server.apiRoutes` on the `Mastra` instance.
|
|
76
76
|
|
|
77
77
|
## Examples
|
|
78
78
|
|
|
79
|
+
### Register through `server.apiRoutes`
|
|
80
|
+
|
|
81
|
+
Routes created with `createRoute()` can be passed to `server.apiRoutes`. The adapter registers them with runtime validation, typed handler parameters, and generated OpenAPI metadata. See [Custom API routes](https://mastra.ai/docs/server/custom-api-routes) for details.
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import { Mastra } from '@mastra/core'
|
|
85
|
+
import { createRoute } from '@mastra/server/server-adapter'
|
|
86
|
+
import { z } from 'zod'
|
|
87
|
+
|
|
88
|
+
const createItemRoute = createRoute({
|
|
89
|
+
method: 'POST',
|
|
90
|
+
path: '/items',
|
|
91
|
+
responseType: 'json',
|
|
92
|
+
bodySchema: z.object({
|
|
93
|
+
name: z.string(),
|
|
94
|
+
}),
|
|
95
|
+
handler: async ({ name }) => ({ id: 'new-id', name }),
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
export const mastra = new Mastra({
|
|
99
|
+
server: {
|
|
100
|
+
apiRoutes: [createItemRoute],
|
|
101
|
+
},
|
|
102
|
+
})
|
|
103
|
+
```
|
|
104
|
+
|
|
79
105
|
### GET route with path params
|
|
80
106
|
|
|
81
107
|
```typescript
|
|
@@ -22,6 +22,8 @@ registerApiRoute("/items/:itemId", { ... })
|
|
|
22
22
|
|
|
23
23
|
Custom route paths can't start with the server's configured `apiPrefix` (default: `/api`), as that prefix is reserved for built-in Mastra routes. If you set a custom `apiPrefix`, only that prefix is reserved. For example, with `apiPrefix: '/mastra/api'`, paths like `/api/my-endpoint` are allowed.
|
|
24
24
|
|
|
25
|
+
> **Warning:** The default auth configuration protects `/api/*` and treats `/api`, `/api/auth/*` as public. When you change `apiPrefix`, those defaults no longer match and built-in routes fall outside the protected pattern. Update `server.auth.protected` and `server.auth.public` to reference the new prefix, and update any client code (including `MastraClient` `apiPrefix`) that hits `/api/*`.
|
|
26
|
+
|
|
25
27
|
### options
|
|
26
28
|
|
|
27
29
|
**method** (`'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'ALL'`): HTTP method for the route
|