@mastra/mcp-docs-server 1.3.15-alpha.2 → 1.3.15-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/agents/guardrails.md +1 -1
- package/.docs/docs/agents/human-in-the-loop.md +2 -2
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +2 -2
- package/.docs/docs/agents/tools.md +3 -3
- package/.docs/docs/auth/composite-auth.md +1 -1
- package/.docs/docs/auth/custom-auth-provider.md +5 -5
- package/.docs/docs/auth/fga.md +1 -1
- package/.docs/docs/auth/jwt.md +2 -2
- package/.docs/docs/auth/simple-auth.md +1 -1
- package/.docs/docs/browser.md +1 -1
- package/.docs/docs/channels.md +2 -2
- package/.docs/docs/connections/sdk-agents.md +1 -1
- package/.docs/docs/deployment/overview.md +2 -2
- package/.docs/docs/deployment/web-framework.md +3 -3
- package/.docs/docs/develop.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +8 -8
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/guides/authentication-identity.md +1 -1
- package/.docs/docs/guides/context-engineering.md +1 -1
- package/.docs/docs/guides/multi-agent-systems.md +2 -2
- package/.docs/docs/harness/agent-controller.md +3 -3
- package/.docs/docs/harness/background-tasks.md +1 -1
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/index.md +2 -2
- package/.docs/docs/license.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +3 -3
- package/.docs/docs/mastra-platform/workspaces.md +1 -1
- package/.docs/docs/memory/memory-processors.md +2 -2
- package/.docs/docs/memory/message-history.md +1 -1
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +3 -3
- package/.docs/docs/memory/semantic-recall.md +4 -4
- package/.docs/docs/memory/working-memory.md +16 -16
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +12 -12
- package/.docs/docs/observability/tracing/overview.md +4 -2
- package/.docs/docs/sandbox/filesystem.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +1 -1
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/request-context.md +1 -1
- package/.docs/docs/signals/overview.md +1 -1
- package/.docs/docs/signals/sending-signals.md +1 -1
- package/.docs/docs/studio/deployment.md +2 -2
- package/.docs/docs/studio/editor.md +2 -2
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/control-flow.md +4 -4
- package/.docs/docs/workflows/overview.md +3 -3
- package/.docs/docs/workflows/snapshots.md +2 -2
- package/.docs/integrations/agentic-ui/ai-sdk-ui.md +3 -3
- package/.docs/integrations/agentic-ui/assistant-ui.md +5 -5
- package/.docs/integrations/agentic-ui/copilotkit.md +4 -4
- package/.docs/integrations/agentic-ui/openui.md +2 -2
- package/.docs/integrations/auth/auth0.md +3 -3
- package/.docs/integrations/auth/better-auth.md +1 -1
- package/.docs/integrations/auth/clerk.md +1 -1
- package/.docs/integrations/auth/firebase.md +3 -3
- package/.docs/integrations/auth/google.md +2 -2
- package/.docs/integrations/auth/okta.md +3 -3
- package/.docs/integrations/auth/supabase.md +1 -1
- package/.docs/integrations/auth/workos.md +1 -1
- package/.docs/integrations/browsers/stagehand.md +1 -1
- package/.docs/integrations/channels/imessage.md +1 -1
- package/.docs/integrations/channels/ring.md +6 -6
- package/.docs/integrations/channels/slack.md +1 -1
- package/.docs/integrations/channels/whatsapp.md +1 -1
- package/.docs/integrations/databases/aurora-dsql.md +13 -13
- package/.docs/integrations/databases/clickhouse.md +2 -2
- package/.docs/integrations/databases/cloudflare-d1.md +4 -4
- package/.docs/integrations/databases/cloudflare-kv.md +10 -10
- package/.docs/integrations/databases/convex.md +6 -6
- package/.docs/integrations/databases/dynamodb.md +8 -8
- package/.docs/integrations/databases/elasticsearch.md +6 -6
- package/.docs/integrations/databases/lancedb.md +4 -4
- package/.docs/integrations/databases/mongodb.md +2 -2
- package/.docs/integrations/databases/mssql.md +2 -2
- package/.docs/integrations/databases/oracledb.md +2 -2
- package/.docs/integrations/databases/postgresql.md +14 -14
- package/.docs/integrations/databases/redis.md +7 -7
- package/.docs/integrations/databases/spanner.md +2 -2
- package/.docs/integrations/databases/upstash.md +5 -5
- package/.docs/integrations/databases/valkey.md +1 -1
- package/.docs/integrations/deploy/amazon-ec2.md +1 -1
- package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -1
- package/.docs/integrations/deploy/aws-lambda.md +12 -12
- package/.docs/integrations/deploy/azure-app-services.md +2 -2
- package/.docs/integrations/deploy/cloudflare.md +2 -2
- package/.docs/integrations/deploy/digital-ocean.md +2 -2
- package/.docs/integrations/deploy/inngest.md +5 -5
- package/.docs/integrations/deploy/kubernetes-helm.md +20 -20
- package/.docs/integrations/deploy/neon.md +1 -1
- package/.docs/integrations/deploy/netlify.md +1 -1
- package/.docs/integrations/deploy/render.md +1 -1
- package/.docs/integrations/deploy/temporal.md +1 -1
- package/.docs/integrations/deploy/vercel.md +4 -4
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/frameworks/angular.md +1 -1
- package/.docs/integrations/frameworks/astro.md +3 -3
- package/.docs/integrations/frameworks/electron.md +1 -1
- package/.docs/integrations/frameworks/express.md +1 -1
- package/.docs/integrations/frameworks/hono.md +1 -1
- package/.docs/integrations/frameworks/nestjs.md +2 -2
- package/.docs/integrations/frameworks/next-js.md +3 -3
- package/.docs/integrations/frameworks/nuxt.md +1 -1
- package/.docs/integrations/frameworks/sveltekit.md +1 -1
- package/.docs/integrations/frameworks/tanstack-start.md +3 -3
- package/.docs/integrations/frameworks/vite-react.md +3 -3
- package/.docs/integrations/observability/arize.md +9 -9
- package/.docs/integrations/observability/arthur.md +3 -3
- package/.docs/integrations/observability/braintrust.md +3 -3
- package/.docs/integrations/observability/confident-ai.md +5 -5
- package/.docs/integrations/observability/datadog.md +9 -9
- package/.docs/integrations/observability/laminar.md +2 -2
- package/.docs/integrations/observability/langfuse.md +13 -13
- package/.docs/integrations/observability/langsmith.md +9 -9
- package/.docs/integrations/observability/opentelemetry.md +23 -23
- package/.docs/integrations/observability/sentry.md +4 -4
- package/.docs/integrations/sandboxes/agentcore.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +2 -2
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +6 -6
- package/.docs/integrations/sandboxes/daytona.md +5 -5
- package/.docs/integrations/sandboxes/docker.md +6 -6
- package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +14 -14
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/sprites.md +2 -2
- package/.docs/integrations/sandboxes/vercel.md +4 -4
- package/.docs/integrations/vectors/couchbase.md +1 -1
- package/.docs/integrations/vectors/duckdb.md +5 -5
- package/.docs/integrations/vectors/lance.md +3 -3
- package/.docs/integrations/vectors/mongodb.md +5 -5
- package/.docs/integrations/vectors/pg.md +11 -11
- package/.docs/integrations/vectors/qdrant.md +2 -2
- package/.docs/integrations/vectors/upstash.md +4 -4
- package/.docs/integrations/voice/azure.md +1 -1
- package/.docs/integrations/voice/cloudflare.md +1 -1
- package/.docs/integrations/voice/google.md +12 -12
- package/.docs/integrations/voice/inworld.md +2 -2
- package/.docs/integrations/voice/livekit.md +25 -25
- package/.docs/integrations/voice/openai.md +4 -4
- package/.docs/integrations/voice/sarvam.md +1 -1
- package/.docs/integrations/voice/speechify.md +1 -1
- package/.docs/integrations/voice/xai.md +1 -1
- package/.docs/models/environment-variables.md +92 -3
- package/.docs/models/gateways/merge-gateway.md +4 -1
- package/.docs/models/gateways/neon.md +1 -2
- package/.docs/models/gateways/netlify.md +7 -6
- package/.docs/models/gateways/openrouter.md +16 -11
- package/.docs/models/gateways/requesty.md +7 -17
- package/.docs/models/gateways/vercel.md +12 -16
- package/.docs/models/index.md +93 -30
- package/.docs/models/providers/302ai.md +2 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteratedllm.md +95 -0
- package/.docs/models/providers/abliteration-ai.md +7 -6
- package/.docs/models/providers/adaption.md +87 -0
- package/.docs/models/providers/adzuki.md +92 -0
- package/.docs/models/providers/aigrow.md +89 -0
- package/.docs/models/providers/aimlapi.md +1 -7
- package/.docs/models/providers/aipg.md +82 -0
- package/.docs/models/providers/aistupidlevel.md +90 -0
- package/.docs/models/providers/aki-io.md +15 -13
- package/.docs/models/providers/ambient.md +13 -12
- package/.docs/models/providers/anonrouter.md +83 -0
- package/.docs/models/providers/anthropic.md +18 -20
- package/.docs/models/providers/apiko.md +83 -0
- package/.docs/models/providers/augure.md +86 -0
- package/.docs/models/providers/autarcho.md +81 -0
- package/.docs/models/providers/bailing.md +15 -12
- package/.docs/models/providers/bumo.md +100 -0
- package/.docs/models/providers/byteplus.md +94 -0
- package/.docs/models/providers/cedarllm.md +81 -0
- package/.docs/models/providers/cheapaimodel.md +85 -0
- package/.docs/models/providers/cheapest-token.md +99 -0
- package/.docs/models/providers/cheapllm.md +81 -0
- package/.docs/models/providers/chutes.md +8 -8
- package/.docs/models/providers/cline-pass.md +4 -3
- package/.docs/models/providers/cloudcode.md +86 -0
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/commandcode.md +22 -1
- package/.docs/models/providers/confidential-ai.md +81 -0
- package/.docs/models/providers/cortecs.md +14 -14
- package/.docs/models/providers/crossmodel.md +7 -2
- package/.docs/models/providers/deepinfra.md +3 -1
- package/.docs/models/providers/digitalocean.md +5 -4
- package/.docs/models/providers/dothoosh.md +96 -0
- package/.docs/models/providers/doubleword.md +98 -0
- package/.docs/models/providers/edenai.md +52 -44
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/engy.md +2 -1
- package/.docs/models/providers/entrim.md +84 -0
- package/.docs/models/providers/ezkielyna.md +85 -0
- package/.docs/models/providers/fastrouter.md +21 -5
- package/.docs/models/providers/fiftyx.md +81 -0
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/fortytwo.md +81 -0
- package/.docs/models/providers/frequency.md +81 -0
- package/.docs/models/providers/frogbot.md +30 -5
- package/.docs/models/providers/gisoo.md +96 -0
- package/.docs/models/providers/google.md +5 -4
- package/.docs/models/providers/graphn.md +87 -0
- package/.docs/models/providers/hetzner.md +1 -1
- package/.docs/models/providers/hostinger-router.md +88 -0
- package/.docs/models/providers/huawei-maas.md +88 -0
- package/.docs/models/providers/hubris.md +96 -0
- package/.docs/models/providers/huggingface.md +5 -1
- package/.docs/models/providers/humain.md +82 -0
- package/.docs/models/providers/hyper.md +24 -22
- package/.docs/models/providers/inceptron.md +4 -4
- package/.docs/models/providers/infer.md +17 -9
- package/.docs/models/providers/inferall.md +86 -0
- package/.docs/models/providers/inference-coop.md +88 -0
- package/.docs/models/providers/inferenceapis.md +91 -0
- package/.docs/models/providers/inferris.md +84 -0
- package/.docs/models/providers/infersia.md +86 -0
- package/.docs/models/providers/isoquant.md +82 -0
- package/.docs/models/providers/iteracompute.md +33 -16
- package/.docs/models/providers/jad-ai.md +83 -0
- package/.docs/models/providers/joingonka.md +83 -0
- package/.docs/models/providers/jzstoken.md +102 -0
- package/.docs/models/providers/keln.md +94 -0
- package/.docs/models/providers/kenari.md +47 -12
- package/.docs/models/providers/kilo.md +191 -100
- package/.docs/models/providers/kitani.md +89 -0
- package/.docs/models/providers/klavo.md +90 -0
- package/.docs/models/providers/korouter.md +99 -0
- package/.docs/models/providers/kunavo.md +96 -0
- package/.docs/models/providers/liquid.md +15 -8
- package/.docs/models/providers/lithosai.md +83 -0
- package/.docs/models/providers/llmgateway-providers.md +96 -43
- package/.docs/models/providers/llmgateway.md +33 -21
- package/.docs/models/providers/logits.md +82 -0
- package/.docs/models/providers/lowrouter.md +17 -4
- package/.docs/models/providers/lyceum.md +88 -0
- package/.docs/models/providers/mallard.md +81 -0
- package/.docs/models/providers/meragpt.md +81 -0
- package/.docs/models/providers/mistral.md +1 -1
- package/.docs/models/providers/moneo.md +92 -0
- package/.docs/models/providers/nan.md +11 -8
- package/.docs/models/providers/nano-gpt.md +77 -73
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -6
- package/.docs/models/providers/neuralwatt.md +28 -25
- package/.docs/models/providers/nodecode.md +81 -0
- package/.docs/models/providers/nokeep.md +83 -0
- package/.docs/models/providers/novita-ai.md +4 -1
- package/.docs/models/providers/oathbreaker.md +82 -0
- package/.docs/models/providers/obscurify.md +95 -0
- package/.docs/models/providers/ofox.md +7 -3
- package/.docs/models/providers/ollama-cloud.md +2 -1
- package/.docs/models/providers/openai.md +4 -2
- package/.docs/models/providers/opencode-go.md +3 -1
- package/.docs/models/providers/opencode.md +5 -3
- package/.docs/models/providers/opper.md +2 -1
- package/.docs/models/providers/outerlabs.md +98 -0
- package/.docs/models/providers/paraloncloud.md +81 -0
- package/.docs/models/providers/pareto.md +9 -7
- package/.docs/models/providers/phala.md +99 -0
- package/.docs/models/providers/phase.md +82 -0
- package/.docs/models/providers/powerspring.md +87 -0
- package/.docs/models/providers/prime.md +5 -5
- package/.docs/models/providers/proxystacks.md +84 -0
- package/.docs/models/providers/rayline.md +82 -0
- package/.docs/models/providers/refuseless.md +86 -0
- package/.docs/models/providers/ruapi.md +89 -0
- package/.docs/models/providers/runcrate.md +91 -0
- package/.docs/models/providers/runinfra.md +2 -1
- package/.docs/models/providers/sagg.md +81 -0
- package/.docs/models/providers/sambanova.md +10 -12
- package/.docs/models/providers/sandbase.md +90 -0
- package/.docs/models/providers/scx-ai.md +20 -10
- package/.docs/models/providers/sensenova.md +4 -4
- package/.docs/models/providers/siliconflow-cn.md +2 -1
- package/.docs/models/providers/sokkan.md +85 -0
- package/.docs/models/providers/sparrowcodes.md +99 -0
- package/.docs/models/providers/steadyrouter.md +101 -0
- package/.docs/models/providers/stepping-stone.md +95 -0
- package/.docs/models/providers/superbot-gg.md +82 -0
- package/.docs/models/providers/synthetic.md +14 -14
- package/.docs/models/providers/synthorai.md +92 -0
- package/.docs/models/providers/teamorouter.md +90 -0
- package/.docs/models/providers/teapot-router.md +87 -0
- package/.docs/models/providers/tencent-token-plan.md +23 -11
- package/.docs/models/providers/tenstorrent.md +84 -0
- package/.docs/models/providers/therouter.md +81 -0
- package/.docs/models/providers/tinfoil.md +1 -1
- package/.docs/models/providers/toapis.md +83 -0
- package/.docs/models/providers/tokenify.md +85 -0
- package/.docs/models/providers/tokenlab.md +81 -0
- package/.docs/models/providers/tokenwatt.md +81 -0
- package/.docs/models/providers/trustedtokens.md +90 -0
- package/.docs/models/providers/umans-ai-coding-plan.md +2 -5
- package/.docs/models/providers/umans-ai.md +5 -7
- package/.docs/models/providers/unbiased.md +81 -0
- package/.docs/models/providers/uncensuredai.md +83 -0
- package/.docs/models/providers/unrestricted.md +84 -0
- package/.docs/models/providers/uplinkswitch.md +92 -0
- package/.docs/models/providers/verda.md +81 -0
- package/.docs/models/providers/volcengine-coding-plan.md +16 -9
- package/.docs/models/providers/volcengine.md +2 -2
- package/.docs/models/providers/wafer.ai.md +20 -10
- package/.docs/models/providers/wallaby.md +7 -5
- package/.docs/models/providers/wally.md +9 -8
- package/.docs/models/providers/watt.md +98 -0
- package/.docs/models/providers/xxapi.md +96 -0
- package/.docs/models/providers/zenifra.md +22 -10
- package/.docs/models/providers/zerogpu.md +89 -0
- package/.docs/models/providers/zro.md +85 -0
- package/.docs/models/providers.md +92 -3
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/durable-agent.md +2 -2
- package/.docs/reference/agents/generateLegacy.md +4 -4
- package/.docs/reference/agents/network.md +2 -2
- package/.docs/reference/ai-sdk/overview.md +2 -2
- package/.docs/reference/build-with-ai.md +3 -3
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/classifier/classifier.md +1 -1
- package/.docs/reference/cli/mastra.md +2 -2
- package/.docs/reference/client-js/agent-controller.md +1 -1
- package/.docs/reference/client-js/memory.md +10 -10
- package/.docs/reference/client-js/observability.md +1 -1
- package/.docs/reference/client-js/responses.md +1 -1
- package/.docs/reference/client-js/tools.md +2 -2
- package/.docs/reference/client-js/vectors.md +6 -6
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/connect/tools.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +2 -2
- package/.docs/reference/evals/bias.md +2 -2
- package/.docs/reference/evals/checks.md +1 -1
- package/.docs/reference/evals/completeness.md +4 -4
- package/.docs/reference/evals/content-similarity.md +4 -4
- package/.docs/reference/evals/context-precision.md +6 -6
- package/.docs/reference/evals/context-recall.md +1 -1
- package/.docs/reference/evals/context-relevance.md +9 -9
- package/.docs/reference/evals/create-scorer.md +3 -3
- package/.docs/reference/evals/faithfulness.md +1 -1
- package/.docs/reference/evals/hallucination.md +6 -6
- package/.docs/reference/evals/keyword-coverage.md +2 -2
- package/.docs/reference/evals/multi-turn-judge.md +1 -1
- package/.docs/reference/evals/noise-sensitivity.md +16 -16
- package/.docs/reference/evals/prompt-alignment.md +25 -25
- package/.docs/reference/evals/run-evals.md +2 -2
- package/.docs/reference/evals/summarization.md +1 -1
- package/.docs/reference/evals/textual-difference.md +2 -2
- package/.docs/reference/evals/tone-consistency.md +2 -2
- package/.docs/reference/evals/tool-call-accuracy.md +10 -10
- package/.docs/reference/evals/toxicity.md +2 -2
- package/.docs/reference/evals/trajectory-accuracy.md +2 -2
- package/.docs/reference/manual-install.md +2 -2
- package/.docs/reference/memory/listThreads.md +1 -1
- package/.docs/reference/migrations/agentnetwork.md +1 -1
- package/.docs/reference/migrations/mastra-cloud.md +4 -4
- package/.docs/reference/migrations/mcp-v2.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/deployment.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +8 -8
- package/.docs/reference/migrations/upgrade-to-v1/tracing.md +3 -3
- package/.docs/reference/observability/tracing/bridges/datadog.md +4 -4
- package/.docs/reference/observability/tracing/bridges/otel.md +4 -4
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/arthur.md +3 -3
- package/.docs/reference/observability/tracing/exporters/braintrust.md +2 -2
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +2 -2
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +5 -5
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -5
- package/.docs/reference/observability/tracing/exporters/otel.md +4 -4
- package/.docs/reference/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/reference/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/reference/observability/tracing/instances.md +1 -1
- package/.docs/reference/processors/model-selection-processor.md +2 -2
- package/.docs/reference/processors/processor-interface.md +3 -3
- package/.docs/reference/processors/stream-error-retry-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +1 -1
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/project-structure.md +2 -2
- package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- 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 +1 -1
- package/.docs/reference/rag/chunking-and-embedding.md +4 -4
- package/.docs/reference/rag/database-config.md +4 -4
- package/.docs/reference/rag/graph-rag-guide.md +3 -3
- package/.docs/reference/rag/metadata-filters.md +4 -4
- package/.docs/reference/rag/overview.md +4 -0
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/rag/rerankWithScorer.md +1 -1
- package/.docs/reference/rag/retrieval.md +8 -6
- package/.docs/reference/rag/vector-databases.md +7 -7
- package/.docs/reference/server/nestjs-adapter.md +1 -1
- package/.docs/reference/server/register-api-route.md +5 -5
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/storage/retention.md +2 -2
- package/.docs/reference/storage/turso.md +1 -1
- package/.docs/reference/streaming/agents/MastraModelOutput.md +5 -5
- package/.docs/reference/streaming/agents/stream.md +5 -5
- package/.docs/reference/streaming/agents/streamLegacy.md +4 -4
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +8 -8
- package/.docs/reference/tools/mcp-client.md +9 -9
- package/.docs/reference/tools/mcp-server.md +17 -17
- package/.docs/reference/tools/vector-query-tool.md +6 -6
- package/.docs/reference/voice/composite-voice.md +3 -3
- package/.docs/reference/voice/overview.md +5 -5
- package/.docs/reference/voice/speech-to-speech.md +2 -2
- package/.docs/reference/voice/voice.close.md +1 -1
- package/.docs/reference/voice/voice.connect.md +1 -1
- package/.docs/reference/voice/voice.listen.md +1 -1
- package/.docs/reference/voice/voice.speak.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/package.json +2 -2
|
@@ -49,7 +49,7 @@ LANGCHAIN_PROJECT=my-project # Default project for traces
|
|
|
49
49
|
LANGSMITH_BASE_URL=https://api.smith.langchain.com # For self-hosted
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
### Zero-
|
|
52
|
+
### Zero-config setup
|
|
53
53
|
|
|
54
54
|
With environment variables set, use the exporter with no configuration:
|
|
55
55
|
|
|
@@ -70,7 +70,7 @@ export const mastra = new Mastra({
|
|
|
70
70
|
})
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
### Explicit
|
|
73
|
+
### Explicit configuration
|
|
74
74
|
|
|
75
75
|
You can also pass credentials directly (takes precedence over environment variables):
|
|
76
76
|
|
|
@@ -97,7 +97,7 @@ export const mastra = new Mastra({
|
|
|
97
97
|
|
|
98
98
|
## Configuration options
|
|
99
99
|
|
|
100
|
-
### Complete
|
|
100
|
+
### Complete configuration
|
|
101
101
|
|
|
102
102
|
```typescript
|
|
103
103
|
new LangSmithExporter({
|
|
@@ -134,7 +134,7 @@ The `projectName` config option takes precedence over the `LANGCHAIN_PROJECT` en
|
|
|
134
134
|
|
|
135
135
|
You can override at runtime LangSmith settings per-span using `withLangsmithMetadata`. This is useful for routing traces to different projects based on runtime conditions (e.g., customer, environment, or feature).
|
|
136
136
|
|
|
137
|
-
### Using the
|
|
137
|
+
### Using the helper
|
|
138
138
|
|
|
139
139
|
Use `withLangsmithMetadata` with `buildTracingOptions` to set LangSmith-specific options:
|
|
140
140
|
|
|
@@ -154,7 +154,7 @@ export const supportAgent = new Agent({
|
|
|
154
154
|
})
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
### Dynamic
|
|
157
|
+
### Dynamic project routing
|
|
158
158
|
|
|
159
159
|
Use `requestContext` to route traces to different projects based on runtime conditions.
|
|
160
160
|
|
|
@@ -184,7 +184,7 @@ export const supportAgent = new Agent({
|
|
|
184
184
|
})
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
### Available
|
|
187
|
+
### Available fields
|
|
188
188
|
|
|
189
189
|
The `withLangsmithMetadata` helper accepts these fields:
|
|
190
190
|
|
|
@@ -198,7 +198,7 @@ All fields are optional. The helper merges with any existing metadata, so you ca
|
|
|
198
198
|
|
|
199
199
|
## Conversation threads
|
|
200
200
|
|
|
201
|
-
LangSmith groups runs into a [Thread](https://docs.langchain.com/langsmith/threads) using the `session_id` metadata key. The exporter sets it on every run of a trace. The root run takes the first value it finds: an explicit `withLangsmithMetadata({ sessionId })`, then `sessionId` in span metadata, then the Mastra memory `threadId`.
|
|
201
|
+
LangSmith groups runs into a [Thread](https://docs.langchain.com/langsmith/threads) using the `session_id` metadata key. The exporter sets it on every run of a trace. The root run takes the first value it finds: an explicit `withLangsmithMetadata({ sessionId })`, then `sessionId` in span metadata, then the Mastra memory `threadId`. Because child runs take the session of their parent run, a delegated sub-agent stays in the conversation's Thread even though it runs on its own derived thread.
|
|
202
202
|
|
|
203
203
|
Agents with memory set `threadId` on each run, so turns on the same memory thread appear as one Thread in LangSmith without extra configuration:
|
|
204
204
|
|
|
@@ -211,7 +211,7 @@ await agent.generate('and again', { memory })
|
|
|
211
211
|
|
|
212
212
|
## Scores and feedback
|
|
213
213
|
|
|
214
|
-
Scores sent through `mastra.observability.addScore()` show up in LangSmith as feedback on the matching run. A score with only a `traceId` is attached to the trace's root run
|
|
214
|
+
Scores sent through `mastra.observability.addScore()` show up in LangSmith as feedback on the matching run. A score with only a `traceId` is attached to the trace's root run. A score with a `spanId` is attached to that span's run.
|
|
215
215
|
|
|
216
216
|
```typescript
|
|
217
217
|
await mastra.observability.addScore({
|
|
@@ -221,7 +221,7 @@ await mastra.observability.addScore({
|
|
|
221
221
|
})
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
Each LangSmith run id is derived from its Mastra span id,
|
|
224
|
+
Each LangSmith run id is derived from its Mastra span id, which means a span-level score works from any process, after a restart, and long after the trace was exported. A trace-level score finds the root run in the exporter's project through the `mastra_trace_id` metadata the exporter stores on every run. Runs exported by earlier versions of `@mastra/langsmith` keep their original ids and can only be scored from the process that exported them. The same derivation is exported as `langsmithRunIdFor()` if you need to link to a run from your own UI:
|
|
225
225
|
|
|
226
226
|
```typescript
|
|
227
227
|
import { langsmithRunIdFor } from '@mastra/langsmith'
|
|
@@ -8,7 +8,7 @@ Mastra supports OpenTelemetry (OTEL) through an exporter for sending traces and
|
|
|
8
8
|
|
|
9
9
|
## Exporter
|
|
10
10
|
|
|
11
|
-
The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/).
|
|
11
|
+
The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). Traces stay compatible with platforms such as Agnost AI, Dash0, Datadog, Laminar, Latitude, MLflow, New Relic, Sazabi, Sentry, SigNoz, telemetry.dev, and Traceloop.
|
|
12
12
|
|
|
13
13
|
### Installation
|
|
14
14
|
|
|
@@ -135,7 +135,7 @@ Agnost AI reads `userId` and `conversationId` (or `threadId`) from `tracingOptio
|
|
|
135
135
|
|
|
136
136
|
[Dash0](https://www.dash0.com/) provides real-time observability with automatic insights.
|
|
137
137
|
|
|
138
|
-
##### Zero-
|
|
138
|
+
##### Zero-config setup
|
|
139
139
|
|
|
140
140
|
Set environment variables and use the exporter with an empty config:
|
|
141
141
|
|
|
@@ -165,7 +165,7 @@ export const mastra = new Mastra({
|
|
|
165
165
|
})
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
##### Explicit
|
|
168
|
+
##### Explicit configuration
|
|
169
169
|
|
|
170
170
|
```typescript
|
|
171
171
|
import { Mastra } from '@mastra/core'
|
|
@@ -260,7 +260,7 @@ export const mastra = new Mastra({
|
|
|
260
260
|
|
|
261
261
|
[Laminar](https://laminar.sh/) provides specialized LLM observability and analytics.
|
|
262
262
|
|
|
263
|
-
##### Zero-
|
|
263
|
+
##### Zero-config setup
|
|
264
264
|
|
|
265
265
|
```bash
|
|
266
266
|
# Required
|
|
@@ -274,7 +274,7 @@ LAMINAR_ENDPOINT=https://api.lmnr.ai/v1/traces
|
|
|
274
274
|
new OtelExporter({ provider: { laminar: {} } })
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
##### Explicit
|
|
277
|
+
##### Explicit configuration
|
|
278
278
|
|
|
279
279
|
```typescript
|
|
280
280
|
new OtelExporter({
|
|
@@ -331,7 +331,7 @@ new OtelExporter({
|
|
|
331
331
|
|
|
332
332
|
[New Relic](https://newrelic.com/) provides complete observability with AI monitoring capabilities.
|
|
333
333
|
|
|
334
|
-
##### Zero-
|
|
334
|
+
##### Zero-config setup
|
|
335
335
|
|
|
336
336
|
```bash
|
|
337
337
|
# Required
|
|
@@ -345,7 +345,7 @@ NEW_RELIC_ENDPOINT=https://otlp.eu01.nr-data.net # For EU region
|
|
|
345
345
|
new OtelExporter({ provider: { newrelic: {} } })
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
##### Explicit
|
|
348
|
+
##### Explicit configuration
|
|
349
349
|
|
|
350
350
|
```typescript
|
|
351
351
|
new OtelExporter({
|
|
@@ -417,7 +417,7 @@ Choose an exporter based on your setup:
|
|
|
417
417
|
|
|
418
418
|
[SigNoz](https://signoz.io/) is an open-source APM alternative with built-in Tracing support.
|
|
419
419
|
|
|
420
|
-
##### Zero-
|
|
420
|
+
##### Zero-config setup
|
|
421
421
|
|
|
422
422
|
```bash
|
|
423
423
|
# Required
|
|
@@ -432,7 +432,7 @@ SIGNOZ_ENDPOINT=https://my-signoz.example.com # For self-hosted
|
|
|
432
432
|
new OtelExporter({ provider: { signoz: {} } })
|
|
433
433
|
```
|
|
434
434
|
|
|
435
|
-
##### Explicit
|
|
435
|
+
##### Explicit configuration
|
|
436
436
|
|
|
437
437
|
```typescript
|
|
438
438
|
new OtelExporter({
|
|
@@ -472,7 +472,7 @@ new OtelExporter({
|
|
|
472
472
|
|
|
473
473
|
[Traceloop](https://www.traceloop.com/) specializes in LLM observability with automatic prompt tracking.
|
|
474
474
|
|
|
475
|
-
##### Zero-
|
|
475
|
+
##### Zero-config setup
|
|
476
476
|
|
|
477
477
|
```bash
|
|
478
478
|
# Required
|
|
@@ -487,7 +487,7 @@ TRACELOOP_ENDPOINT=https://custom.traceloop.com
|
|
|
487
487
|
new OtelExporter({ provider: { traceloop: {} } })
|
|
488
488
|
```
|
|
489
489
|
|
|
490
|
-
##### Explicit
|
|
490
|
+
##### Explicit configuration
|
|
491
491
|
|
|
492
492
|
```typescript
|
|
493
493
|
new OtelExporter({
|
|
@@ -500,7 +500,7 @@ new OtelExporter({
|
|
|
500
500
|
})
|
|
501
501
|
```
|
|
502
502
|
|
|
503
|
-
#### Custom
|
|
503
|
+
#### Custom or generic OTEL endpoints
|
|
504
504
|
|
|
505
505
|
For other OTEL-compatible platforms or custom collectors:
|
|
506
506
|
|
|
@@ -589,7 +589,7 @@ If the matching log exporter package isn't installed, log export is silently dis
|
|
|
589
589
|
|
|
590
590
|
### Configuration options
|
|
591
591
|
|
|
592
|
-
#### Complete
|
|
592
|
+
#### Complete configuration
|
|
593
593
|
|
|
594
594
|
```typescript
|
|
595
595
|
new OtelExporter({
|
|
@@ -619,7 +619,7 @@ The exporter follows [OpenTelemetry Semantic Conventions for GenAI v1.41.0](http
|
|
|
619
619
|
|
|
620
620
|
The conventions cover the following span names and attributes:
|
|
621
621
|
|
|
622
|
-
#### Span
|
|
622
|
+
#### Span naming
|
|
623
623
|
|
|
624
624
|
- **Model calls**: `chat {model}`
|
|
625
625
|
- **Generation loop**: `model_generation {model}`, with one `agent_step {agent_id}` per turn
|
|
@@ -627,9 +627,9 @@ The conventions cover the following span names and attributes:
|
|
|
627
627
|
- **Agent Runs**: `invoke_agent {agent_id}`
|
|
628
628
|
- **Workflow Runs**: `invoke_workflow {workflow_id}`
|
|
629
629
|
|
|
630
|
-
Each agent turn calls the model once. The `chat` span is that call and is the only span that carries `gen_ai.request.model`, the messages, and `gen_ai.usage.*`, so backends that sum usage across spans count each call once. The `model_generation` span wraps the whole loop and `agent_step` wraps one turn (model call plus tool execution)
|
|
630
|
+
Each agent turn calls the model once. The `chat` span is that call and is the only span that carries `gen_ai.request.model`, the messages, and `gen_ai.usage.*`, so backends that sum usage across spans count each call once. The `model_generation` span wraps the whole loop and `agent_step` wraps one turn (model call plus tool execution). Neither carries usage.
|
|
631
631
|
|
|
632
|
-
#### Key
|
|
632
|
+
#### Key attributes
|
|
633
633
|
|
|
634
634
|
- `gen_ai.operation.name` - Operation type (chat, tool.execute, etc.)
|
|
635
635
|
- `gen_ai.provider.name` - AI provider (openai, anthropic, etc.)
|
|
@@ -655,11 +655,11 @@ Choose the right protocol package based on your provider:
|
|
|
655
655
|
| Traceloop | HTTP/JSON | `@opentelemetry/exporter-trace-otlp-http` |
|
|
656
656
|
| Custom | Varies | Depends on your collector |
|
|
657
657
|
|
|
658
|
-
> **Warning:**
|
|
658
|
+
> **Warning:** Ensure you install the correct protocol package for your provider. The exporter will provide a helpful error message if the wrong package is installed.
|
|
659
659
|
|
|
660
660
|
### Troubleshooting
|
|
661
661
|
|
|
662
|
-
#### Missing
|
|
662
|
+
#### Missing dependency error
|
|
663
663
|
|
|
664
664
|
If you see an error like:
|
|
665
665
|
|
|
@@ -671,7 +671,7 @@ To use HTTP/Protobuf export, install the required package:
|
|
|
671
671
|
|
|
672
672
|
Install the suggested package for your provider.
|
|
673
673
|
|
|
674
|
-
#### Common
|
|
674
|
+
#### Common issues
|
|
675
675
|
|
|
676
676
|
1. **Wrong protocol package**: Verify you installed the correct exporter for your provider
|
|
677
677
|
2. **Invalid endpoint**: Check endpoint format matches provider requirements
|
|
@@ -761,7 +761,7 @@ Using the `OtelBridge` requires two steps:
|
|
|
761
761
|
1. Configure OpenTelemetry instrumentation in your application
|
|
762
762
|
2. Add the `OtelBridge` to your Mastra observability config
|
|
763
763
|
|
|
764
|
-
#### Step 1: OpenTelemetry
|
|
764
|
+
#### Step 1: OpenTelemetry instrumentation
|
|
765
765
|
|
|
766
766
|
Create an instrumentation file that initializes OTEL. This must run before your application code:
|
|
767
767
|
|
|
@@ -790,7 +790,7 @@ sdk.start()
|
|
|
790
790
|
export { sdk }
|
|
791
791
|
```
|
|
792
792
|
|
|
793
|
-
#### Step 2: Mastra
|
|
793
|
+
#### Step 2: Mastra configuration
|
|
794
794
|
|
|
795
795
|
Add the `OtelBridge` to your Mastra observability config:
|
|
796
796
|
|
|
@@ -839,7 +839,7 @@ Logs that originate inside a Mastra span are emitted under that span's OTEL cont
|
|
|
839
839
|
|
|
840
840
|
If you don't register a `LoggerProvider`, log emission is a silent no-op. Traces continue to work as configured.
|
|
841
841
|
|
|
842
|
-
#### Running
|
|
842
|
+
#### Running your application
|
|
843
843
|
|
|
844
844
|
Use the `--import` flag to ensure instrumentation loads before your application:
|
|
845
845
|
|
|
@@ -849,7 +849,7 @@ tsx --import ./instrumentation.ts ./src/index.ts
|
|
|
849
849
|
|
|
850
850
|
#### Flushing before exit
|
|
851
851
|
|
|
852
|
-
Mastra's `flush()` and `shutdown()` ask the registered OTEL providers to flush, but a `BatchSpanProcessor` can still hold a batch it has already started exporting. In serverless or short-lived processes, also `await sdk.shutdown()` after Mastra's flush, so no spans are left in your OTEL SDK when the process exits. The provider's own `forceFlush()`
|
|
852
|
+
Mastra's `flush()` and `shutdown()` ask the registered OTEL providers to flush, but a `BatchSpanProcessor` can still hold a batch it has already started exporting. In serverless or short-lived processes, also `await sdk.shutdown()` after Mastra's flush, so no spans are left in your OTEL SDK when the process exits. The provider's own `forceFlush()` isn't enough: it doesn't wait for a batch the exporter is already sending.
|
|
853
853
|
|
|
854
854
|
### Semantic conventions
|
|
855
855
|
|
|
@@ -48,7 +48,7 @@ SENTRY_ENVIRONMENT=production
|
|
|
48
48
|
SENTRY_RELEASE=1.0.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
### Zero-
|
|
51
|
+
### Zero-config setup
|
|
52
52
|
|
|
53
53
|
With environment variables set, use the exporter with no configuration:
|
|
54
54
|
|
|
@@ -69,7 +69,7 @@ export const mastra = new Mastra({
|
|
|
69
69
|
})
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
### Explicit
|
|
72
|
+
### Explicit configuration
|
|
73
73
|
|
|
74
74
|
You can also pass credentials directly (takes precedence over environment variables):
|
|
75
75
|
|
|
@@ -98,7 +98,7 @@ export const mastra = new Mastra({
|
|
|
98
98
|
|
|
99
99
|
## Configuration options
|
|
100
100
|
|
|
101
|
-
### Complete
|
|
101
|
+
### Complete configuration
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
104
|
new SentryExporter({
|
|
@@ -123,7 +123,7 @@ new SentryExporter({
|
|
|
123
123
|
})
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
### Sampling
|
|
126
|
+
### Sampling configuration
|
|
127
127
|
|
|
128
128
|
Control the percentage of transactions sent to Sentry. This is useful for high-volume applications:
|
|
129
129
|
|
|
@@ -144,7 +144,7 @@ Returns: `Promise<CommandResult>`.
|
|
|
144
144
|
|
|
145
145
|
#### `start()`
|
|
146
146
|
|
|
147
|
-
Runs the sandbox lifecycle start hook
|
|
147
|
+
Runs the sandbox lifecycle start hook, and this provider doesn't create an AgentCore Runtime session during `start()`.
|
|
148
148
|
|
|
149
149
|
```typescript
|
|
150
150
|
await sandbox.start()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
4
4
|
|
|
5
|
-
# Apple
|
|
5
|
+
# Apple container
|
|
6
6
|
|
|
7
7
|
Executes commands inside local OCI Linux containers through Apple's [`container`](https://github.com/apple/container) CLI. The provider starts a long-lived container and uses `container exec` for workspace commands. For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
8
8
|
|
|
@@ -200,7 +200,7 @@ const sandbox = new AppleContainerSandbox({
|
|
|
200
200
|
})
|
|
201
201
|
```
|
|
202
202
|
|
|
203
|
-
These options are only applied when a new container is created. If the sandbox reconnects to an existing container with the same name, destroy and recreate the sandbox to apply changed runtime options. Apple `--tmpfs` accepts container paths only, such as `/tmp
|
|
203
|
+
These options are only applied when a new container is created. If the sandbox reconnects to an existing container with the same name, destroy and recreate the sandbox to apply changed runtime options. Apple `--tmpfs` accepts container paths only, such as `/tmp`. It doesn't accept Docker-style option specs like `/tmp:rw,size=256m`. When `readonlyRootfs` is enabled, ensure `workingDirectory` points to a path supplied by the image or a bind mount. A writable tmpfs is also supported.
|
|
204
204
|
|
|
205
205
|
## Security model
|
|
206
206
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
4
4
|
|
|
5
|
-
# Cloudflare
|
|
5
|
+
# Cloudflare sandbox
|
|
6
6
|
|
|
7
7
|
`CloudflareSandbox` executes commands and manages files in a remote [Cloudflare Sandbox](https://developers.cloudflare.com/sandbox/) through the [Sandbox Bridge HTTP API](https://developers.cloudflare.com/sandbox/bridge/http-api/).
|
|
8
8
|
|
|
@@ -65,7 +65,7 @@ The provider creates a remote sandbox when the workspace starts. Pass `sandboxId
|
|
|
65
65
|
|
|
66
66
|
## Execute commands
|
|
67
67
|
|
|
68
|
-
Pass command arguments, environment variables, a working directory, and streaming callbacks through `executeCommand()`.
|
|
68
|
+
Pass command arguments, environment variables, a working directory, and streaming callbacks through `executeCommand()`. Because the provider sends the command as an `argv` array, the bridge handles shell escaping:
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
71
|
const result = await workspace.sandbox?.executeCommand?.('npm', ['test'], {
|
|
@@ -82,7 +82,7 @@ const result = await workspace.sandbox?.executeCommand?.('npm', ['test'], {
|
|
|
82
82
|
|
|
83
83
|
Relative paths are resolved under `/workspace`. Absolute paths must also resolve within `/workspace`. Each file is sent as its own bridge request, and the bridge caps a single file at 32 MiB.
|
|
84
84
|
|
|
85
|
-
The Cloudflare sandbox
|
|
85
|
+
The Cloudflare sandbox can't set per-file permissions, so a `writeFiles` call that includes a `mode` is rejected rather than silently ignored.
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
88
|
await workspace.sandbox?.writeFiles?.([
|
|
@@ -130,11 +130,11 @@ const workspace = new Workspace({
|
|
|
130
130
|
|
|
131
131
|
The bridge mounts buckets with s3fs, so only `type: 's3'` mount configs are accepted. GCS and Azure filesystems, and S3 credentials that include a `sessionToken`, return a failed `MountResult` without contacting the bridge.
|
|
132
132
|
|
|
133
|
-
The default `getInstructions()` text tells the model that `/workspace`
|
|
133
|
+
The default `getInstructions()` text tells the model that `/workspace` doesn't survive between commands and lists the mounted paths to write to instead.
|
|
134
134
|
|
|
135
135
|
## Persist and restore the workspace
|
|
136
136
|
|
|
137
|
-
`persistWorkspace()` archives `/workspace` and returns the raw tar bytes
|
|
137
|
+
`persistWorkspace()` archives `/workspace` and returns the raw tar bytes. `hydrateWorkspace()` restores it from those bytes. Use this for one-off backups. It's not a substitute for mounts: restoring must happen before the first command after a wake, and a persist taken from a freshly woken container overwrites the archive with an empty workspace.
|
|
138
138
|
|
|
139
139
|
```typescript
|
|
140
140
|
// Back up before the container can sleep
|
|
@@ -176,4 +176,4 @@ For execution sessions, use the `CloudflareSandboxBridgeClient` methods (`create
|
|
|
176
176
|
|
|
177
177
|
## Limitations
|
|
178
178
|
|
|
179
|
-
The provider surfaces command execution, streamed output, file reads and writes, S3-compatible bucket mounts, and workspace persistence directly on the sandbox. Sessions are available on the bridge client (`CloudflareSandboxBridgeClient`) but not on the `CloudflareSandbox` surface. PTY terminals
|
|
179
|
+
The provider surfaces command execution, streamed output, file reads and writes, S3-compatible bucket mounts, and workspace persistence directly on the sandbox. Sessions are available on the bridge client (`CloudflareSandboxBridgeClient`) but not on the `CloudflareSandbox` surface. PTY terminals aren't exposed, and the provider doesn't support background process management, stdin, snapshots, or port URLs.
|
|
@@ -225,13 +225,13 @@ const workspace = new Workspace({
|
|
|
225
225
|
})
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
Before starting the workspace, obtain credentials from your storage provider that authorize only the intended prefix. Credential issuance is provider-specific
|
|
228
|
+
Before starting the workspace, obtain credentials from your storage provider that authorize only the intended prefix. Credential issuance is provider-specific. Mastra doesn't create or restrict credentials. A `prefix` selects a directory but doesn't enforce authorization. Authenticate each request, authorize its resource and thread, and use separate sandboxes for separate security scopes.
|
|
229
229
|
|
|
230
|
-
Temporary credentials are loaded when the mount starts and aren't automatically refreshed. Host-side credential provider functions don't refresh the mount. Keep runs within the credential lifetime and create a new sandbox with fresh credentials for later runs
|
|
230
|
+
Temporary credentials are loaded when the mount starts and aren't automatically refreshed. Host-side credential provider functions don't refresh the mount. Keep runs within the credential lifetime, and create a new sandbox with fresh credentials for later runs, because reconnecting to a sandbox doesn't renew its credentials.
|
|
231
231
|
|
|
232
|
-
Credentials are uploaded into owner-only files inside private directories. After launching s3fs, Daytona removes the temporary-credential staging file and directory. The daemon retains the credentials in its environment, which sandbox code running as the same user or root can still read. Never supply broader credentials than the sandbox needs. Mounts using long-lived credentials retain their password files while s3fs needs them. Unmount and reconnect cleanup remove those files after verifying that the daemon has exited. If a daemon is still active, including after a mount is moved aside, or its status can't be checked, the files are retained and a warning is logged. Cleanup on a later unmount of the same path retries removal
|
|
232
|
+
Credentials are uploaded into owner-only files inside private directories. After launching s3fs, Daytona removes the temporary-credential staging file and directory. The daemon retains the credentials in its environment, which sandbox code running as the same user or root can still read. Never supply broader credentials than the sandbox needs. Mounts using long-lived credentials retain their password files while s3fs needs them. Unmount and reconnect cleanup remove those files after verifying that the daemon has exited. If a daemon is still active, including after a mount is moved aside, or its status can't be checked, the files are retained and a warning is logged. Cleanup on a later unmount of the same path retries removal. Deleting the sandbox removes any remaining files.
|
|
233
233
|
|
|
234
|
-
Prefixed filesystems require permission to list their prefix during initialization. With s3fs, a prefixed mount may also require a zero-byte object at the exact `<prefix>/` key. Provision that directory marker before mounting. After launching s3fs, Daytona checks the mounted directory's metadata without listing its contents, with a 15-second timeout and forced termination after another 5 seconds. A failed check reports a mount failure. Cleanup attempts to unmount the failed mount, moving a stuck mount aside if necessary to free the original path for retry. Moved stale mounts may remain until sandbox deletion
|
|
234
|
+
Prefixed filesystems require permission to list their prefix during initialization. With s3fs, a prefixed mount may also require a zero-byte object at the exact `<prefix>/` key. Provision that directory marker before mounting. After launching s3fs, Daytona checks the mounted directory's metadata without listing its contents, with a 15-second timeout and forced termination after another 5 seconds. A failed check reports a mount failure. Cleanup attempts to unmount the failed mount, moving a stuck mount aside if necessary to free the original path for retry. Moved stale mounts may remain until sandbox deletion, and this startup check doesn't guarantee read or write access to individual files or ongoing daemon health. Verify a read and write through the mounted path.
|
|
235
235
|
|
|
236
236
|
#### Via `sandbox.mount()`
|
|
237
237
|
|
|
@@ -331,7 +331,7 @@ const workspace = new Workspace({
|
|
|
331
331
|
})
|
|
332
332
|
```
|
|
333
333
|
|
|
334
|
-
Inside the sandbox, the environment variable holds an opaque placeholder. Daytona's egress proxy substitutes the
|
|
334
|
+
Inside the sandbox, the environment variable holds an opaque placeholder. Daytona's egress proxy substitutes the actual value into HTTPS request headers toward the Secret's allowed hosts, so the raw credential never enters the sandbox. Secrets are applied at sandbox creation and are preserved by `clone()`.
|
|
335
335
|
|
|
336
336
|
### Computer use (desktop)
|
|
337
337
|
|
|
@@ -59,7 +59,7 @@ const agent = new Agent({
|
|
|
59
59
|
|
|
60
60
|
### Repository templates
|
|
61
61
|
|
|
62
|
-
`createDockerRepoTemplate` builds an image that already holds a checkout of a repository and the output of its setup command
|
|
62
|
+
`createDockerRepoTemplate` builds an image that already holds a checkout of a repository and the output of its setup command. A session starts from installed dependencies instead of a cold clone:
|
|
63
63
|
|
|
64
64
|
```typescript
|
|
65
65
|
import { DockerSandbox, createDockerRepoTemplate } from '@mastra/docker'
|
|
@@ -79,7 +79,7 @@ const sandbox = new DockerSandbox({
|
|
|
79
79
|
|
|
80
80
|
The repository is cloned to `<workingDirectory>/<repo>` (default `/workspace`), which becomes the working directory of the sandbox. Pass `ref` to prepare a branch, tag or commit other than the default branch. Right before the build the resolver runs `git ls-remote` to pin the ref to a commit, which is part of the image identity: a moved branch yields a fresh image on the next new sandbox and an unmoved one reuses the cached image. If the head can't be resolved the resolver rejects rather than caching an unpinned clone.
|
|
81
81
|
|
|
82
|
-
`setupCommand` also accepts an array. Each entry runs as its own cached build step. A command
|
|
82
|
+
`setupCommand` also accepts an array. Each entry runs as its own cached build step. A command can't contain a bare newline, which would start a new Dockerfile instruction. End the line with `\` or pass separate commands instead.
|
|
83
83
|
|
|
84
84
|
#### Several repositories in one image
|
|
85
85
|
|
|
@@ -264,7 +264,7 @@ const sandbox = new DockerSandbox({
|
|
|
264
264
|
|
|
265
265
|
## Write files
|
|
266
266
|
|
|
267
|
-
Upload multiple files in one call with `writeFiles`. Relative paths resolve under the working directory. Set an optional per-file `mode` to control POSIX permissions
|
|
267
|
+
Upload multiple files in one call with `writeFiles`. Relative paths resolve under the working directory. Set an optional per-file `mode` to control POSIX permissions. It must be an integer between `0o001` and `0o777`. When `mode` is omitted, new files are created with `0644`.
|
|
268
268
|
|
|
269
269
|
```typescript
|
|
270
270
|
await sandbox.writeFiles([
|
|
@@ -273,7 +273,7 @@ await sandbox.writeFiles([
|
|
|
273
273
|
])
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
-
Docker is the only built-in sandbox that applies an explicit `mode`. Providers that
|
|
276
|
+
Docker is the only built-in sandbox that applies an explicit `mode`. Providers that can't honor per-file permissions (Vercel, E2B, Daytona, Cloudflare) reject a `writeFiles` call that includes a `mode` instead of silently dropping it.
|
|
277
277
|
|
|
278
278
|
## Bind mounts
|
|
279
279
|
|
|
@@ -321,8 +321,8 @@ Review these trade-offs before enabling hardening:
|
|
|
321
321
|
- `readonlyRootfs`: In-container package installs and tools that write outside mounted paths can fail. Add `tmpfs` entries for writable scratch paths such as `/tmp`, and mount tmpfs or volumes for package-manager caches such as `~/.npm` when needed.
|
|
322
322
|
- `capDrop`: Dropping all capabilities disables commands that need Linux capabilities, including `ping` and mount operations. FUSE-backed tools are also disabled. Add back only the capabilities your workload needs.
|
|
323
323
|
- `memory`: Docker treats `0` as unlimited. Omit `memory` or pass `0` only when you don't want a memory cap.
|
|
324
|
-
- `memorySwap`: Docker memory and swap behavior depends on the host and Docker daemon configuration. When you set `memory` without `memorySwap`, Docker allows swap up to twice the memory limit by default. Set `memorySwap` equal to `memory` when you want to disable swap for the container
|
|
325
|
-
- `pidsLimit`:
|
|
324
|
+
- `memorySwap`: Docker memory and swap behavior depends on the host and Docker daemon configuration. When you set `memory` without `memorySwap`, Docker allows swap up to twice the memory limit by default. Set `memorySwap` equal to `memory` when you want to disable swap for the container. Docker also accepts `-1` for unlimited swap.
|
|
325
|
+
- `pidsLimit`: Low values can break `docker exec` workloads because each command starts additional processes inside the long-lived container.
|
|
326
326
|
- `privileged`: Privileged containers bypass capability and security-option controls. Don't combine `privileged: true` with capability or security options unless the workload requires it.
|
|
327
327
|
- Reconnection: `DockerSandbox` reuses an existing container when the sandbox ID matches and warns if inspected `HostConfig` hardening values differ. Destroy and recreate the sandbox to apply changed hardening options. Docker can normalize inspected values, and changing `memorySwap` on reconnect can trigger a warning if the original container used Docker's default swap behavior.
|
|
328
328
|
- Docker Desktop: Resource limits apply inside the Docker Desktop virtual machine on macOS and Windows, so the VM's allocated resources can cap what containers receive.
|
|
@@ -62,7 +62,7 @@ const response = await agent.generate(
|
|
|
62
62
|
)
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
The agent can mix desktop actions (
|
|
65
|
+
The agent can mix desktop actions (pointer input, typing, and screenshots) with shell commands. Both surfaces operate on the same machine.
|
|
66
66
|
|
|
67
67
|
### Direct desktop control
|
|
68
68
|
|
|
@@ -218,13 +218,13 @@ const workspace = new Workspace({
|
|
|
218
218
|
})
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
`owner` sets the uid and gid of the files inside the mount, so the `user` running commands can read and write them. Without it, the mount is owned by the user that mounted it. Create the user in the template first
|
|
221
|
+
`owner` sets the uid and gid of the files inside the mount, so the `user` running commands can read and write them. Without it, the mount is owned by the user that mounted it. Create the user in the template first. E2B runs a command as that user but doesn't create it.
|
|
222
222
|
|
|
223
223
|
## Custom templates
|
|
224
224
|
|
|
225
225
|
By default, when no template is specified, E2BSandbox automatically builds a template with `s3fs` installed for S3 mounting support, a current Node.js LTS installed over the base image's older runtime, and corepack enabled so `pnpm` and `yarn` resolve to whatever a repository's `packageManager` field pins. This template is cached and reused across sandbox instances.
|
|
226
226
|
|
|
227
|
-
The Node.js version is pinned exactly and is part of the template's identity. Pass `nodeVersion` to `createDefaultMountableTemplate()` to select a different release
|
|
227
|
+
The Node.js version is pinned exactly and is part of the template's identity. Pass `nodeVersion` to `createDefaultMountableTemplate()` to select a different release. Changing it builds a new template.
|
|
228
228
|
|
|
229
229
|
For GCS mounting, `gcsfuse` is automatically installed at mount time if not already present. For additional tools or faster cold starts, use custom templates.
|
|
230
230
|
|
|
@@ -320,11 +320,11 @@ const sandbox = new E2BSandbox({
|
|
|
320
320
|
})
|
|
321
321
|
```
|
|
322
322
|
|
|
323
|
-
`getRepositoryAccess` supplies the clone URL and, for private repositories, a credential. It's the only source of the clone URL, so what gets cloned and what the template is identified by can't drift apart. When it's `undefined`, `createRepoTemplate` returns `undefined
|
|
323
|
+
`getRepositoryAccess` supplies the clone URL and, for private repositories, a credential. It's the only source of the clone URL, so what gets cloned and what the template is identified by can't drift apart. When it's `undefined`, `createRepoTemplate` returns `undefined`, which is how a session with no repository asks for the provider's default template without a conditional at the call site.
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
Exactly one template exists per repository and setup command: the template name carries the repo slug plus a short hash of the inputs, and the commit sha rides as a tag on that name (`mastra-repo-<owner>-<repo>-<hash>:sha-<sha>`). The spec pins itself to the repository's current default-branch head at resolution time: right before the template lookup it runs `git ls-remote` (no clone, \~100ms) and keys the tag on that sha. When the default branch moves, the next new sandbox rebuilds the same template in place under a new tag, and old sha tags remain as prunable build history instead of piling up as stale templates. If the head can't be resolved, the ref degrades to the stable `current` tag and the build clones whatever the default branch is at build time.
|
|
326
326
|
|
|
327
|
-
Resolution is lazy and only
|
|
327
|
+
Resolution is lazy and blocks only on a template's first build. Every successful build also moves a stable `current` tag, so when the head moves, the next sandbox boots immediately from the previous build while the fresh sha ref builds in the background on E2B's side (its runtime setup `git fetch` fast-forwards the slightly stale checkout, so freshness never depends on the template). A changed setup command hashes to a new template name.
|
|
328
328
|
|
|
329
329
|
`setupCommand` also accepts an array. Each entry runs as its own cached build step. `workingDirectory` sets the cwd for the build and the sandbox, and the repository is cloned to `<workingDirectory>/<repo>`.
|
|
330
330
|
|
|
@@ -381,9 +381,9 @@ const sandbox = new E2BSandbox({
|
|
|
381
381
|
})
|
|
382
382
|
```
|
|
383
383
|
|
|
384
|
-
Resources are part of the template's identity: they hash into the template name alongside the repository and setup command, so resizing builds a new template instead of silently reusing one built at the old size. When a repo template's build fails and the sandbox falls back to the default mountable template, the fallback builds at the requested size too, so setup never
|
|
384
|
+
Resources are part of the template's identity: they hash into the template name alongside the repository and setup command, so resizing builds a new template instead of silently reusing one built at the old size. When a repo template's build fails and the sandbox falls back to the default mountable template, the fallback builds at the requested size too, so setup never runs in a smaller machine than it asked for. Account tier limits apply to the values E2B accepts.
|
|
385
385
|
|
|
386
|
-
To warm templates
|
|
386
|
+
To warm templates ahead of time instead of waiting for the first session after a merge, call `refreshRepoTemplate` with the same options from a scheduled job or a merge-to-main event handler. It performs the same resolution as sandbox start. It resolves the current head, reuses the build when it already exists, and otherwise builds it (moving `current`), then reports `{ ref, action, sha }`:
|
|
387
387
|
|
|
388
388
|
```typescript
|
|
389
389
|
import { refreshRepoTemplate } from '@mastra/e2b'
|
|
@@ -397,7 +397,7 @@ const result = await refreshRepoTemplate({
|
|
|
397
397
|
// { ref: 'mastra-repo-octocat-hello-world-…:sha-…', action: 'built' | 'reused', sha: '…' }
|
|
398
398
|
```
|
|
399
399
|
|
|
400
|
-
The template layers on top of the default mountable base (E2B's `base` image, so git and common tooling are present, plus `s3fs`/FUSE for mount support). The clone
|
|
400
|
+
The template layers on top of the default mountable base (E2B's `base` image, so git and common tooling are present, plus `s3fs`/FUSE for mount support). The clone goes into the build user's home directory at `$HOME/<repo>`, derived from the clone URL. Build steps and runtime commands both run as the sandbox's non-root `user` in its home, so no directory prep is needed, runtime file ownership stays correct, and a runtime `$HOME` probe finds the checkout exactly where the template left it.
|
|
401
401
|
|
|
402
402
|
Failure handling is designed so a broken template never wedges a session:
|
|
403
403
|
|
|
@@ -419,17 +419,17 @@ const sandbox = new E2BSandbox({
|
|
|
419
419
|
})
|
|
420
420
|
```
|
|
421
421
|
|
|
422
|
-
Private repositories build warm templates when `getRepositoryAccess` returns an `authorization` alongside the clone URL
|
|
422
|
+
Private repositories build warm templates when `getRepositoryAccess` returns an `authorization` alongside the clone URL: a fresh, short-lived credential (such as a GitHub App installation token) created at each template resolution. The credential authenticates the head lookup and the build's clone through an in-shell `http.extraheader`. It enters the template definition's environment (visible to build steps but not persisted into runtime sandbox environments) and never touches the image filesystem, so no captured layer can contain it. It's set as `GH_TOKEN`, the same variable a session installs before running setup, so a command that shells out to `gh` or authenticated https behaves the same in the build as it does in a session.
|
|
423
423
|
|
|
424
|
-
Only pass short-lived credentials
|
|
424
|
+
Only pass short-lived credentials: the value stays in the template definition until the next rebuild, so its expiry is what bounds the exposure. Note that the cloned repository contents become part of a team-visible template image. When the access call returns no credential the clone is tokenless: public repositories build fine, and a private repository's build degrades to the fallback, where the session's own runtime setup (with runtime-injected auth) does the clone.
|
|
425
425
|
|
|
426
|
-
Setup commands that need their own credentials
|
|
426
|
+
Setup commands that need their own credentials, such as a registry token or a private index URL, take them through `buildEnv`, which accepts a record or an async resolver. Those values are part of the template's identity, so changing one produces a new template. To keep values out of the template name, also pass a `buildEnvRevision`. The values still reach the build steps like the clone credential, but only the revision names the template. Change the revision whenever the values change.
|
|
427
427
|
|
|
428
|
-
`repoTemplateRef` computes the tagged ref for a spec without building anything
|
|
428
|
+
`repoTemplateRef` computes the tagged ref for a spec without building anything, useful for pruning old sha tags with the E2B CLI.
|
|
429
429
|
|
|
430
430
|
### Per-session sandboxes
|
|
431
431
|
|
|
432
|
-
Hosts that construct one sandbox per session, such as Mastra Factory's `sandbox` config, use `E2BFactorySandbox`: sandbox identity is the session id (id-keyed getOrCreate
|
|
432
|
+
Hosts that construct one sandbox per session, such as Mastra Factory's `sandbox` config, use `E2BFactorySandbox`: sandbox identity is the session id (id-keyed getOrCreate: the sandbox pauses on E2B's idle timeout and resumes by id), the repo template comes from `createRepoTemplate` over the session's repositories, and the project's `cpuCount` and `memoryMb` settings flow into the template. See the [FactorySandbox reference](https://mastra.ai/reference/workspace/factory-sandbox).
|
|
433
433
|
|
|
434
434
|
```typescript
|
|
435
435
|
import { MastraFactory } from '@mastra/factory'
|
|
@@ -442,7 +442,7 @@ new MastraFactory({
|
|
|
442
442
|
|
|
443
443
|
The bare callback form, `sandbox: ctx => new E2BSandbox({ id: ctx.sessionId, template: createRepoTemplate(ctx) })`, is also supported: factory sees it as a custom provider with no settings to tune. Either way, factory attaches its own session setup to the sandbox it gets back.
|
|
444
444
|
|
|
445
|
-
## Using with Code
|
|
445
|
+
## Using with Code mode
|
|
446
446
|
|
|
447
447
|
[Code Mode](https://mastra.ai/docs/agents/code-mode) lets an agent write a single TypeScript program that orchestrates its tools. Because E2B runs that program in a remote micro-VM, it needs a transport that writes the program into the sandbox filesystem rather than the host. `@mastra/e2b` provides `E2BCodeModeTransport` for this. Pass it as the second argument to `createCodeMode`:
|
|
448
448
|
|
|
@@ -175,7 +175,7 @@ Writes made by other sandboxes to the same Volume are only visible after a reloa
|
|
|
175
175
|
await sandbox.reloadVolumes()
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
> **Note:** Keep the working directory outside every Volume mount (for example `/workspace`). Modal can't reload a Volume that
|
|
178
|
+
> **Note:** Keep the working directory outside every Volume mount (for example `/workspace`). Modal can't reload a Volume that's the current working directory, so `ModalSandbox` throws if `workingDirectory` is at or inside a mount path.
|
|
179
179
|
|
|
180
180
|
## Background processes
|
|
181
181
|
|
|
@@ -143,7 +143,7 @@ const sandbox = new RailwaySandbox({
|
|
|
143
143
|
|
|
144
144
|
`RailwaySandbox` refreshes the checkpoint shortly before the idle timeout. Recovery restores the latest successful checkpoint. It doesn't restore running processes or filesystem writes made after the last checkpoint.
|
|
145
145
|
|
|
146
|
-
Set `seedCheckpointName` to provide a boot-only fallback when `checkpointName` doesn't exist yet. Railway restores `checkpointName` first when both checkpoints exist. Later snapshots write only to `checkpointName`,
|
|
146
|
+
Set `seedCheckpointName` to provide a boot-only fallback when `checkpointName` doesn't exist yet. Railway restores `checkpointName` first when both checkpoints exist. Later snapshots write only to `checkpointName`, which keeps each sandbox's recovery history independent.
|
|
147
147
|
|
|
148
148
|
```typescript
|
|
149
149
|
const sandbox = new RailwaySandbox({
|
|
@@ -85,7 +85,7 @@ const response = await agent.generate(
|
|
|
85
85
|
console.log(response.text)
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
### Reusing a
|
|
88
|
+
### Reusing a sprite
|
|
89
89
|
|
|
90
90
|
The `id` is the Sprite name. On `start()`, `SpritesSandbox` looks up a Sprite with that name and reconnects to it, or creates one when none exists. Files written in an earlier session are still there:
|
|
91
91
|
|
|
@@ -199,7 +199,7 @@ await handle.sendStdin('reload\n')
|
|
|
199
199
|
await handle.kill()
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
Processes started by one `SpritesSandbox` instance
|
|
202
|
+
Processes started by one `SpritesSandbox` instance aren't visible to another instance, and `stop()` kills them.
|
|
203
203
|
|
|
204
204
|
See [`SandboxProcessManager` reference](https://mastra.ai/reference/workspace/process-manager) for the full API.
|
|
205
205
|
|