@mastra/mcp-docs-server 1.2.11 → 1.2.12-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agent-builder/access-control.md +3 -3
- package/.docs/docs/agent-builder/browser.md +1 -1
- package/.docs/docs/agent-builder/channels.md +1 -1
- package/.docs/docs/agent-builder/configuration.md +3 -3
- package/.docs/docs/agent-builder/deploying.md +2 -2
- package/.docs/docs/agent-builder/integrations.md +8 -8
- package/.docs/docs/agent-builder/memory.md +2 -2
- package/.docs/docs/agent-builder/overview.md +1 -1
- package/.docs/docs/agent-controller/channels.md +8 -6
- package/.docs/docs/agent-controller/modes.md +6 -6
- package/.docs/docs/agent-controller/overview.md +13 -9
- package/.docs/docs/agent-controller/session.md +27 -9
- package/.docs/docs/agent-controller/subagents.md +9 -6
- package/.docs/docs/agent-controller/threads-and-state.md +12 -8
- package/.docs/docs/agent-controller/tool-approvals.md +7 -3
- package/.docs/docs/agents/a2a.md +4 -2
- package/.docs/docs/agents/acp.md +5 -5
- package/.docs/docs/agents/agent-approval.md +13 -11
- package/.docs/docs/agents/code-mode.md +29 -6
- package/.docs/docs/agents/guardrails.md +8 -8
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +9 -7
- package/.docs/docs/agents/processors.md +15 -15
- package/.docs/docs/agents/skills.md +6 -6
- package/.docs/docs/agents/structured-output.md +6 -6
- package/.docs/docs/agents/supervisor-agents.md +19 -13
- package/.docs/docs/agents/using-tools.md +48 -21
- package/.docs/docs/browser/agent-browser.md +4 -4
- package/.docs/docs/browser/browser-viewer.md +2 -2
- package/.docs/docs/browser/firecrawl.md +1 -1
- package/.docs/docs/browser/overview.md +2 -2
- package/.docs/docs/browser/recording.md +1 -1
- package/.docs/docs/browser/stagehand.md +7 -7
- package/.docs/docs/capabilities/channels/discord.md +1 -1
- package/.docs/docs/capabilities/channels/other-adapters.md +1 -1
- package/.docs/docs/capabilities/channels/overview.md +9 -5
- package/.docs/docs/capabilities/channels/slack.md +2 -2
- package/.docs/docs/capabilities/channels/teams.md +1 -1
- package/.docs/docs/capabilities/channels/telegram.md +1 -1
- package/.docs/docs/capabilities/channels/whatsapp.md +1 -1
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/overview.md +6 -2
- package/.docs/docs/deployment/sandbox.md +3 -1
- package/.docs/docs/deployment/workers.md +137 -0
- package/.docs/docs/editor/overview.md +37 -31
- package/.docs/docs/editor/prompts.md +8 -4
- package/.docs/docs/editor/tools.md +3 -3
- package/.docs/docs/evals/built-in-scorers.md +4 -4
- package/.docs/docs/evals/custom-scorers.md +5 -5
- package/.docs/docs/evals/datasets/running-experiments.md +7 -7
- package/.docs/docs/evals/evals-with-memory.md +4 -4
- package/.docs/docs/evals/gates-and-verdicts.md +4 -4
- package/.docs/docs/evals/multi-turn.md +12 -12
- package/.docs/docs/evals/overview.md +6 -4
- package/.docs/docs/evals/quick-checks.md +2 -2
- package/.docs/docs/getting-started/build-with-ai.md +6 -4
- package/.docs/docs/getting-started/file-based-agents.md +6 -4
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/index.md +9 -90
- package/.docs/docs/long-running-agents/background-tasks.md +10 -10
- package/.docs/docs/long-running-agents/durable-agents.md +46 -5
- package/.docs/docs/long-running-agents/goals.md +15 -11
- package/.docs/docs/long-running-agents/schedules.md +3 -3
- package/.docs/docs/long-running-agents/signal-providers.md +8 -6
- package/.docs/docs/long-running-agents/signals.md +9 -5
- package/.docs/docs/mastra-platform/configuration.md +3 -3
- package/.docs/docs/mastra-platform/database.md +8 -8
- package/.docs/docs/mastra-platform/deploy.md +8 -4
- package/.docs/docs/mastra-platform/environments.md +8 -4
- package/.docs/docs/mastra-platform/github.md +3 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/studio.md +2 -2
- package/.docs/docs/mastra-platform/workspace.md +6 -6
- package/.docs/docs/mcp/mcp-apps.md +1 -1
- package/.docs/docs/mcp/overview.md +9 -9
- package/.docs/docs/memory/memory-processors.md +10 -10
- package/.docs/docs/memory/message-history.md +11 -5
- package/.docs/docs/memory/multi-user-threads.md +6 -6
- package/.docs/docs/memory/observational-memory.md +27 -25
- package/.docs/docs/memory/overview.md +10 -10
- package/.docs/docs/memory/semantic-recall.md +3 -3
- package/.docs/docs/memory/working-memory.md +8 -8
- package/.docs/docs/observability/integrations/bridges/datadog.md +6 -6
- package/.docs/docs/observability/integrations/bridges/otel.md +5 -5
- package/.docs/docs/observability/integrations/exporters/datadog.md +1 -1
- package/.docs/docs/observability/integrations/exporters/laminar.md +1 -1
- package/.docs/docs/observability/integrations/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/integrations/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
- package/.docs/docs/observability/integrations/exporters/otel.md +26 -4
- package/.docs/docs/observability/integrations/exporters/sentry.md +1 -1
- package/.docs/docs/observability/integrations/overview.md +1 -1
- package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/observability/metrics/querying.md +8 -8
- package/.docs/docs/observability/overview.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +18 -12
- package/.docs/docs/rag/chunking-and-embedding.md +1 -1
- package/.docs/docs/rag/graph-rag.md +7 -7
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +18 -18
- package/.docs/docs/rag/vector-databases.md +2 -2
- package/.docs/docs/server/auth/composite-auth.md +2 -2
- package/.docs/docs/server/auth/fga.md +6 -6
- package/.docs/docs/server/auth/firebase.md +2 -2
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +133 -0
- package/.docs/docs/server/custom-adapters.md +4 -4
- package/.docs/docs/server/mastra-client.md +3 -3
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/pubsub.md +7 -4
- package/.docs/docs/server/request-context.md +11 -11
- package/.docs/docs/server/server-adapters.md +2 -2
- package/.docs/docs/storage/overview.md +2 -2
- package/.docs/docs/studio/auth.md +5 -5
- package/.docs/docs/studio/deployment.md +1 -1
- package/.docs/docs/studio/observability.md +2 -2
- package/.docs/docs/studio/overview.md +11 -9
- package/.docs/docs/voice/overview.md +26 -26
- package/.docs/docs/voice/realtime-voice.md +8 -8
- package/.docs/docs/voice/speech-to-speech.md +9 -9
- package/.docs/docs/voice/speech-to-text.md +3 -3
- package/.docs/docs/voice/text-to-speech.md +6 -6
- package/.docs/docs/what-is-mastra.md +161 -0
- package/.docs/docs/workflows/agents-and-tools.md +3 -3
- package/.docs/docs/workflows/control-flow.md +10 -8
- package/.docs/docs/workflows/error-handling.md +2 -2
- package/.docs/docs/workflows/overview.md +7 -6
- package/.docs/docs/workflows/scheduled-workflows.md +12 -12
- package/.docs/docs/workflows/snapshots.md +3 -3
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +3 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +10 -10
- package/.docs/docs/workspace/lsp.md +1 -1
- package/.docs/docs/workspace/overview.md +12 -12
- package/.docs/docs/workspace/sandbox.md +9 -7
- package/.docs/docs/workspace/search.md +3 -3
- package/.docs/docs/workspace/skills.md +7 -7
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +6 -6
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +9 -9
- package/.docs/guides/build-your-ui/copilotkit/overview.md +2 -2
- package/.docs/guides/build-your-ui/openui.md +2 -2
- package/.docs/guides/concepts/multi-agent-systems.md +5 -5
- package/.docs/guides/concepts/streaming.md +10 -10
- package/.docs/guides/deployment/amazon-ec2.md +1 -1
- package/.docs/guides/deployment/aws-lambda.md +1 -1
- package/.docs/guides/deployment/azure-app-services.md +1 -1
- package/.docs/guides/deployment/cloudflare.md +1 -1
- package/.docs/guides/deployment/inngest.md +6 -6
- package/.docs/guides/deployment/kubernetes.md +1 -1
- package/.docs/guides/deployment/mastra-workers.md +232 -0
- package/.docs/guides/deployment/temporal.md +1 -1
- package/.docs/guides/deployment/vercel.md +1 -1
- package/.docs/guides/getting-started/astro.md +1 -1
- package/.docs/guides/getting-started/electron.md +1 -1
- package/.docs/guides/getting-started/nestjs.md +5 -5
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +1 -1
- package/.docs/guides/guide/chef-michel.md +2 -2
- package/.docs/guides/guide/code-review-bot.md +2 -2
- package/.docs/guides/guide/coding-agent.md +5 -5
- package/.docs/guides/guide/dev-assistant.md +2 -2
- package/.docs/guides/guide/docs-manager.md +4 -4
- package/.docs/guides/guide/firecrawl.md +1 -1
- package/.docs/guides/guide/github-actions-pr-description.md +5 -5
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +5 -5
- package/.docs/guides/guide/signal-provider.md +1 -1
- package/.docs/guides/guide/slack-assistant.md +1 -1
- package/.docs/guides/guide/stock-agent.md +3 -3
- package/.docs/guides/guide/web-search.md +4 -4
- package/.docs/guides/guide/whatsapp-chat-bot.md +2 -2
- package/.docs/guides/index.md +1 -1
- package/.docs/guides/migrations/agentnetwork.md +4 -4
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/guides/migrations/mastra-cloud.md +6 -6
- package/.docs/guides/migrations/network-to-supervisor.md +9 -9
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +6 -6
- package/.docs/guides/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/client.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/processors.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +11 -11
- package/.docs/guides/migrations/upgrade-to-v1/tools.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +2 -2
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +3 -3
- package/.docs/models/gateways/openrouter.md +1 -3
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/index.md +6 -6
- package/.docs/models/providers/baseten.md +1 -1
- package/.docs/models/providers/chutes.md +2 -1
- package/.docs/models/providers/crossmodel.md +2 -2
- package/.docs/models/providers/deepinfra.md +1 -1
- package/.docs/models/providers/hyper.md +3 -3
- package/.docs/models/providers/llmgateway.md +4 -3
- package/.docs/models/providers/modal.md +73 -0
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/acp/acp-agent.md +4 -4
- package/.docs/reference/acp/create-acp-tool.md +3 -3
- package/.docs/reference/agent-controller/agent-controller-class.md +36 -36
- package/.docs/reference/agent-controller/session.md +6 -6
- package/.docs/reference/agents/agent.md +14 -14
- package/.docs/reference/agents/channels.md +29 -13
- package/.docs/reference/agents/durable-agent.md +54 -5
- package/.docs/reference/agents/generate.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getLLM.md +2 -2
- package/.docs/reference/agents/getMetadata.md +2 -2
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/listScorers.md +1 -1
- package/.docs/reference/agents/listSkills.md +1 -1
- package/.docs/reference/agents/listSuspendedRuns.md +2 -2
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/chat-route.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
- package/.docs/reference/ai-sdk/workflow-route.md +1 -1
- package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +2 -2
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/fga.md +2 -2
- package/.docs/reference/auth/google.md +2 -2
- package/.docs/reference/auth/okta.md +1 -1
- package/.docs/reference/auth/workos.md +2 -2
- package/.docs/reference/browser/agent-browser.md +3 -3
- package/.docs/reference/browser/browser-viewer.md +4 -4
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +4 -4
- package/.docs/reference/browser/stagehand-browser.md +8 -8
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/create-mastra.md +1 -1
- package/.docs/reference/cli/mastra.md +155 -24
- package/.docs/reference/client-js/agents.md +26 -9
- package/.docs/reference/client-js/memory.md +2 -2
- package/.docs/reference/client-js/workflows.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +2 -2
- package/.docs/reference/coding-agent/create-coding-agent.md +2 -2
- package/.docs/reference/configuration.md +7 -7
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/getMCPServer.md +1 -1
- package/.docs/reference/core/getScorer.md +1 -1
- package/.docs/reference/core/mastra-class.md +48 -1
- package/.docs/reference/core/mastra-model-gateway.md +1 -1
- package/.docs/reference/datasets/addItem.md +1 -1
- package/.docs/reference/datasets/listItems.md +1 -1
- package/.docs/reference/deployer/netlify.md +4 -4
- package/.docs/reference/deployer/vercel.md +7 -7
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +6 -6
- package/.docs/reference/editor/agent-builder/builder-models.md +3 -3
- package/.docs/reference/editor/blob-store-provider.md +1 -1
- package/.docs/reference/editor/browser-provider.md +3 -3
- package/.docs/reference/editor/filesystem-provider.md +4 -4
- package/.docs/reference/editor/mastra-editor.md +5 -5
- package/.docs/reference/editor/processor-provider.md +3 -3
- package/.docs/reference/editor/sandbox-provider.md +4 -4
- package/.docs/reference/editor/storage-browser-ref.md +6 -6
- package/.docs/reference/editor/storage-workspace-ref.md +4 -4
- package/.docs/reference/editor/tool-provider.md +1 -1
- package/.docs/reference/evals/answer-relevancy.md +5 -5
- package/.docs/reference/evals/answer-similarity.md +1 -1
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/checks.md +3 -3
- package/.docs/reference/evals/completeness.md +5 -5
- package/.docs/reference/evals/content-similarity.md +5 -5
- package/.docs/reference/evals/context-precision.md +5 -5
- package/.docs/reference/evals/context-recall.md +11 -11
- package/.docs/reference/evals/context-relevance.md +15 -15
- package/.docs/reference/evals/create-scorer.md +1 -1
- package/.docs/reference/evals/faithfulness.md +4 -4
- package/.docs/reference/evals/filter-run.md +2 -2
- package/.docs/reference/evals/hallucination.md +11 -11
- package/.docs/reference/evals/keyword-coverage.md +6 -6
- package/.docs/reference/evals/mastra-scorer.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +15 -15
- package/.docs/reference/evals/prompt-alignment.md +20 -20
- package/.docs/reference/evals/rubric.md +2 -2
- package/.docs/reference/evals/run-evals.md +3 -3
- package/.docs/reference/evals/scorer-utils.md +4 -4
- package/.docs/reference/evals/textual-difference.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +4 -4
- package/.docs/reference/evals/toxicity.md +5 -5
- package/.docs/reference/evals/trajectory-accuracy.md +10 -10
- package/.docs/reference/file-based-agents/config.md +3 -3
- package/.docs/reference/file-based-agents/instructions.md +3 -3
- package/.docs/reference/file-based-agents/logger.md +1 -1
- package/.docs/reference/file-based-agents/observability.md +1 -1
- package/.docs/reference/file-based-agents/processors.md +1 -1
- package/.docs/reference/file-based-agents/skills.md +1 -1
- package/.docs/reference/file-based-agents/storage.md +1 -1
- package/.docs/reference/file-based-agents/studio.md +1 -1
- package/.docs/reference/file-based-agents/subagents.md +4 -4
- package/.docs/reference/file-based-agents/tools.md +1 -1
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/logging/pino-logger.md +3 -3
- package/.docs/reference/memory/clone-utilities.md +1 -1
- package/.docs/reference/memory/cloneThread.md +3 -3
- package/.docs/reference/memory/listThreads.md +1 -1
- package/.docs/reference/memory/memory-class.md +4 -4
- package/.docs/reference/memory/observational-memory.md +15 -15
- package/.docs/reference/memory/recall.md +2 -2
- package/.docs/reference/memory/serialized-memory-config.md +4 -4
- package/.docs/reference/memory/summarizeConversation.md +3 -3
- package/.docs/reference/memory/summarizeThread.md +3 -3
- package/.docs/reference/observability/feedback.md +1 -1
- package/.docs/reference/observability/metrics/automatic-metrics.md +7 -7
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +1 -1
- package/.docs/reference/observability/tracing/interfaces.md +1 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -1
- package/.docs/reference/observability/tracing/span-filtering.md +1 -1
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/cost-guard-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -1
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/moderation-processor.md +2 -2
- package/.docs/reference/processors/pii-detector.md +3 -3
- package/.docs/reference/processors/processor-interface.md +13 -13
- package/.docs/reference/processors/prompt-injection-detector.md +2 -2
- package/.docs/reference/processors/provider-history-compat.md +1 -1
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/response-cache.md +8 -8
- package/.docs/reference/processors/semantic-recall-processor.md +1 -1
- package/.docs/reference/processors/skill-search-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +2 -2
- package/.docs/reference/processors/token-limiter-processor.md +4 -4
- package/.docs/reference/processors/tool-call-filter.md +2 -2
- package/.docs/reference/processors/tool-search-processor.md +9 -9
- package/.docs/reference/processors/unicode-normalizer.md +2 -2
- package/.docs/reference/processors/working-memory-processor.md +1 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/pubsub/base.md +4 -4
- package/.docs/reference/pubsub/google-cloud-pubsub.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +4 -4
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunk.md +5 -5
- package/.docs/reference/rag/database-config.md +2 -2
- package/.docs/reference/rag/metadata-filters.md +2 -2
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/schedules/overview.md +1 -1
- package/.docs/reference/server/register-api-route.md +1 -1
- package/.docs/reference/server/routes.md +7 -7
- package/.docs/reference/signals/create-notification-inbox-tool.md +1 -1
- package/.docs/reference/signals/signal-provider.md +8 -8
- package/.docs/reference/storage/clickhouse.md +4 -4
- package/.docs/reference/storage/cloudflare-d1.md +4 -4
- package/.docs/reference/storage/convex.md +4 -4
- package/.docs/reference/storage/dsql.md +3 -3
- package/.docs/reference/storage/dynamodb.md +7 -7
- package/.docs/reference/storage/lance.md +1 -1
- package/.docs/reference/storage/mongodb.md +2 -2
- package/.docs/reference/storage/mssql.md +1 -1
- package/.docs/reference/storage/postgresql.md +2 -2
- package/.docs/reference/storage/redis.md +1 -1
- package/.docs/reference/storage/retention.md +33 -33
- package/.docs/reference/storage/spanner.md +8 -8
- package/.docs/reference/storage/upstash.md +1 -1
- package/.docs/reference/streaming/ChunkType.md +2 -2
- package/.docs/reference/streaming/agents/MastraModelOutput.md +1 -1
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamUntilIdle.md +2 -2
- package/.docs/reference/streaming/workflows/observeStream.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/streaming/workflows/timeTravelStream.md +2 -2
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/brightdata.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -3
- package/.docs/reference/tools/create-tool.md +1 -1
- package/.docs/reference/tools/graph-rag-tool.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +74 -0
- package/.docs/reference/tools/mcp-client.md +15 -15
- package/.docs/reference/tools/mcp-server.md +21 -21
- package/.docs/reference/tools/submit-plan-tool.md +1 -1
- package/.docs/reference/tools/tavily.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +5 -5
- package/.docs/reference/vectors/astra.md +1 -1
- package/.docs/reference/vectors/chroma.md +2 -2
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/couchbase.md +4 -4
- package/.docs/reference/vectors/libsql.md +2 -2
- package/.docs/reference/vectors/mongodb.md +3 -3
- package/.docs/reference/vectors/pg.md +5 -5
- package/.docs/reference/vectors/qdrant.md +2 -2
- package/.docs/reference/vectors/s3vectors.md +4 -4
- package/.docs/reference/vectors/turbopuffer.md +1 -1
- package/.docs/reference/vectors/upstash.md +1 -1
- package/.docs/reference/voice/aws-nova-sonic.md +1 -1
- package/.docs/reference/voice/azure.md +1 -1
- package/.docs/reference/voice/google-gemini-live.md +4 -4
- package/.docs/reference/voice/inworld-realtime.md +7 -7
- package/.docs/reference/voice/livekit.md +13 -13
- package/.docs/reference/voice/mistral.md +1 -1
- package/.docs/reference/voice/openai-realtime.md +1 -1
- package/.docs/reference/voice/sarvam.md +1 -1
- package/.docs/reference/voice/voice.addInstructions.md +1 -1
- package/.docs/reference/voice/voice.addTools.md +1 -1
- package/.docs/reference/voice/voice.events.md +1 -1
- package/.docs/reference/voice/voice.getSpeakers.md +2 -2
- package/.docs/reference/voice/voice.on.md +2 -2
- package/.docs/reference/voice/xai-realtime.md +2 -2
- package/.docs/reference/workers/overview.md +85 -0
- package/.docs/reference/workflows/run-methods/cancel.md +1 -1
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
- package/.docs/reference/workflows/workflow-methods/sleep.md +1 -1
- package/.docs/reference/workflows/workflow-state-reader.md +2 -2
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
- package/.docs/reference/workspace/apple-container-sandbox.md +2 -2
- package/.docs/reference/workspace/daytona-sandbox.md +3 -3
- package/.docs/reference/workspace/docker-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/files-sdk-filesystem.md +3 -3
- package/.docs/reference/workspace/google-drive-filesystem.md +4 -4
- package/.docs/reference/workspace/local-filesystem.md +3 -3
- package/.docs/reference/workspace/local-sandbox.md +3 -3
- package/.docs/reference/workspace/modal-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +2 -2
- package/.docs/reference/workspace/process-manager.md +1 -1
- package/.docs/reference/workspace/railway-sandbox.md +4 -4
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/.docs/reference/workspace/vercel-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +10 -10
- package/CHANGELOG.md +21 -0
- package/package.json +3 -3
|
@@ -432,7 +432,7 @@ This connects [`useChat()`](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat
|
|
|
432
432
|
|
|
433
433
|
## Test your agent
|
|
434
434
|
|
|
435
|
-
|
|
435
|
+
To test your agent with the chat interface, run both the Mastra server and the Electron app.
|
|
436
436
|
|
|
437
437
|
1. Start the mastra development server:
|
|
438
438
|
|
|
@@ -199,11 +199,11 @@ export class AgentService {
|
|
|
199
199
|
|
|
200
200
|
`MastraService` exposes:
|
|
201
201
|
|
|
202
|
-
- `getMastra()
|
|
203
|
-
- `getAgent(id)
|
|
204
|
-
- `getWorkflow(id)
|
|
205
|
-
- `getOptions()
|
|
206
|
-
- `isShuttingDown
|
|
202
|
+
- `getMastra()`: Returns the underlying `Mastra` instance
|
|
203
|
+
- `getAgent(id)`: Shorthand for `mastra.getAgent(id)`
|
|
204
|
+
- `getWorkflow(id)`: Shorthand for `mastra.getWorkflow(id)`
|
|
205
|
+
- `getOptions()`: Returns the module configuration
|
|
206
|
+
- `isShuttingDown`: `true` after graceful shutdown begins
|
|
207
207
|
|
|
208
208
|
### MASTRA token
|
|
209
209
|
|
|
@@ -353,7 +353,7 @@ It renders the response text using the [`<MessageResponse>`](https://ai-sdk.dev/
|
|
|
353
353
|
|
|
354
354
|
## Test your agent
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
To test your agent with the chat interface, run both the Mastra server and the Vite development server.
|
|
357
357
|
|
|
358
358
|
1. Start the Mastra development server:
|
|
359
359
|
|
|
@@ -49,7 +49,7 @@ Set up the Workflow, define steps to extract and classify candidate data, and th
|
|
|
49
49
|
id: 'recruiter-agent',
|
|
50
50
|
name: 'Recruiter Agent',
|
|
51
51
|
instructions: `You are a recruiter.`,
|
|
52
|
-
model: 'openai/gpt-5.
|
|
52
|
+
model: 'openai/gpt-5.6-sol',
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
const gatherCandidateInfo = createStep({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
In this guide, you'll create a "Chef Assistant" agent that helps users cook meals with available ingredients.
|
|
6
6
|
|
|
7
|
-
You'll learn how to create the agent and register it with Mastra. Next, you'll interact with the agent through your terminal and get to know different response formats.
|
|
7
|
+
You'll learn how to create the agent and register it with Mastra. Next, you'll interact with the agent through your terminal and get to know different response formats. You'll then access the agent through Mastra's local API endpoints.
|
|
8
8
|
|
|
9
9
|
## Prerequisites
|
|
10
10
|
|
|
@@ -27,7 +27,7 @@ To create an agent in Mastra use the `Agent` class to define it and then registe
|
|
|
27
27
|
instructions:
|
|
28
28
|
'You are Michel, a practical and experienced home chef' +
|
|
29
29
|
'You help people cook with whatever ingredients they have available.',
|
|
30
|
-
model: 'openai/gpt-5.
|
|
30
|
+
model: 'openai/gpt-5.6-sol',
|
|
31
31
|
})
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Building a code review bot
|
|
4
4
|
|
|
5
|
-
In this guide, you'll build a code review bot that automatically reviews pull requests using workspace skills. The bot loads coding standards from skill files and provides structured feedback. You'll
|
|
5
|
+
In this guide, you'll build a code review bot that automatically reviews pull requests using workspace skills. The bot loads coding standards from skill files and provides structured feedback. You'll create a workspace with a skills directory and define an [Agent Skill](https://agentskills.io) with review instructions and reference files. Then you'll connect the skill to an agent that performs automated reviews.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -124,7 +124,7 @@ When asked to review code:
|
|
|
124
124
|
2. Follow the review process from the skill
|
|
125
125
|
3. Check against the style guide in skill references
|
|
126
126
|
4. Be constructive and specific with line numbers`,
|
|
127
|
-
model: 'openai/gpt-5.
|
|
127
|
+
model: 'openai/gpt-5.6-sol',
|
|
128
128
|
})
|
|
129
129
|
```
|
|
130
130
|
|
|
@@ -55,7 +55,7 @@ import { basename } from 'node:path'
|
|
|
55
55
|
import { buildBasePrompt, createCodingAgent } from '@mastra/core/coding-agent'
|
|
56
56
|
|
|
57
57
|
export const projectPath = process.cwd()
|
|
58
|
-
const model = 'openai/gpt-5.
|
|
58
|
+
const model = 'openai/gpt-5.6-sol'
|
|
59
59
|
|
|
60
60
|
const instructions = buildBasePrompt({
|
|
61
61
|
projectPath,
|
|
@@ -146,7 +146,7 @@ Open [Studio](https://mastra.ai/docs/studio/overview), select **Coding Agent**,
|
|
|
146
146
|
Inspect project-notes.md and report the project name, status, and owner. Do not modify files.
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
The response should identify the Acme support portal
|
|
149
|
+
The response should identify the Acme support portal and describe its development status. It should report that the Platform team owns the project and leave the file unchanged. Model wording may vary.
|
|
150
150
|
|
|
151
151
|
## Create the agent controller
|
|
152
152
|
|
|
@@ -191,13 +191,13 @@ export async function createCodingAgentSession() {
|
|
|
191
191
|
}
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
This example uses one mode and disables the controller's additional built-in tools so the introductory UI can focus on workspace execution.
|
|
194
|
+
This example uses one mode and disables the controller's additional built-in tools so the introductory UI can focus on workspace execution. The simplified setup is intended for this tutorial. In a production application, enable the built-in tools your product needs and implement their UI flows: interactive tools such as `ask_user` and `submit_plan` suspend until your interface resumes them, while task and subagent tools have their own lifecycle events. See [tool approvals and suspensions](https://mastra.ai/docs/agent-controller/tool-approvals).
|
|
195
195
|
|
|
196
196
|
The example also omits storage, so the conversation lasts only for the current process. You can add storage later when you want to resume sessions.
|
|
197
197
|
|
|
198
198
|
## Build the terminal UI
|
|
199
199
|
|
|
200
|
-
Create `src/coding-agent-tui.ts`. The UI renders assistant message updates
|
|
200
|
+
Create `src/coding-agent-tui.ts`. The UI renders assistant message updates and shows tool activity. It also asks the user to approve or decline each workspace tool call.
|
|
201
201
|
|
|
202
202
|
```typescript
|
|
203
203
|
import { pathToFileURL } from 'node:url'
|
|
@@ -334,7 +334,7 @@ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
|
|
|
334
334
|
}
|
|
335
335
|
```
|
|
336
336
|
|
|
337
|
-
The optional `Terminal` parameter supports automated tests while using `ProcessTerminal` during normal execution. The UI intentionally renders only the latest response
|
|
337
|
+
The optional `Terminal` parameter supports automated tests while using `ProcessTerminal` during normal execution. The UI intentionally renders only the latest response. The `Session` still maintains the conversation context for follow-up prompts.
|
|
338
338
|
|
|
339
339
|
## Run the coding agent
|
|
340
340
|
|
|
@@ -9,7 +9,7 @@ In this guide, you'll build a complete development assistant that combines all w
|
|
|
9
9
|
- [Skills](https://mastra.ai/docs/workspace/skills) for coding standards
|
|
10
10
|
- [Search](https://mastra.ai/docs/workspace/search) for finding examples
|
|
11
11
|
|
|
12
|
-
You'll set up a workspace with a sample project
|
|
12
|
+
You'll set up a workspace with a sample project and add coding standards as a skill. Then you'll create an agent that writes code following TDD practices. By the end, the agent can read existing code and write new implementations, then run tests in a sandbox and iterate based on the results.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -197,7 +197,7 @@ When adding features:
|
|
|
197
197
|
For every new feature: Write code → Write tests → Run tests → Update docs
|
|
198
198
|
|
|
199
199
|
Always explain your reasoning and steps.`,
|
|
200
|
-
model: 'openai/gpt-5.
|
|
200
|
+
model: 'openai/gpt-5.6-sol',
|
|
201
201
|
})
|
|
202
202
|
```
|
|
203
203
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Building a docs manager
|
|
4
4
|
|
|
5
|
-
In this guide, you'll build a documentation manager that maintains your project's docs. It creates well-structured markdown files
|
|
5
|
+
In this guide, you'll build a documentation manager that maintains your project's docs. It creates well-structured markdown files and keeps documentation organized while preventing accidental overwrites. You'll set up a workspace filesystem and create an agent with document management instructions. Then you'll use conversational prompts to generate and update documentation.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ Inside the `workspace` directory, create the following folders:
|
|
|
40
40
|
- `docs/api/`: For API reference documentation
|
|
41
41
|
- `docs/tutorials/`: For step-by-step tutorials
|
|
42
42
|
|
|
43
|
-
Create
|
|
43
|
+
Create `workspace/docs/README.md` as the documentation index:
|
|
44
44
|
|
|
45
45
|
```markdown
|
|
46
46
|
# Project Documentation
|
|
@@ -105,7 +105,7 @@ When updating existing docs:
|
|
|
105
105
|
|
|
106
106
|
Use kebab-case naming for files (getting-started.md).
|
|
107
107
|
Always explain what you're creating and why.`,
|
|
108
|
-
model: 'openai/gpt-5.
|
|
108
|
+
model: 'openai/gpt-5.6-sol',
|
|
109
109
|
})
|
|
110
110
|
```
|
|
111
111
|
|
|
@@ -217,7 +217,7 @@ Try updating an existing document:
|
|
|
217
217
|
Update the getting started guide to include a section on configuration after the Quick Example
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
The agent should read the existing `getting-started.md` file
|
|
220
|
+
The agent should read the existing `getting-started.md` file and find the right insertion point. It should add the new section without disrupting existing content.
|
|
221
221
|
|
|
222
222
|
### Organize documentation
|
|
223
223
|
|
|
@@ -109,7 +109,7 @@ Create a tool file that exposes Firecrawl search and scrape to Mastra.
|
|
|
109
109
|
id: 'web-agent',
|
|
110
110
|
name: 'Web Agent',
|
|
111
111
|
instructions: 'Use Firecrawl tools to search and scrape web pages, then summarize the results.',
|
|
112
|
-
model: 'openai/gpt-5.
|
|
112
|
+
model: 'openai/gpt-5.6-sol',
|
|
113
113
|
tools: { firecrawlSearch, firecrawlScrape },
|
|
114
114
|
})
|
|
115
115
|
```
|
|
@@ -99,7 +99,7 @@ Output format:
|
|
|
99
99
|
|
|
100
100
|
- [Same changes in Japanese]
|
|
101
101
|
`,
|
|
102
|
-
model: 'openai/gpt-5.
|
|
102
|
+
model: 'openai/gpt-5.6-sol',
|
|
103
103
|
})
|
|
104
104
|
```
|
|
105
105
|
|
|
@@ -121,11 +121,11 @@ The agent will return a formatted description with sections in English, Spanish,
|
|
|
121
121
|
|
|
122
122
|
## GitHub actions
|
|
123
123
|
|
|
124
|
-
GitHub Actions run your workflows in short-lived environments on GitHub's infrastructure. Each run starts with a clean virtual machine
|
|
124
|
+
GitHub Actions run your workflows in short-lived environments on GitHub's infrastructure. Each run starts with a clean virtual machine and checks out your code. It installs dependencies before running your workflow steps. The environment shuts down when the run completes. Nothing persists between runs unless you explicitly save it as an artifact or cache.
|
|
125
125
|
|
|
126
126
|
### Create the workflow
|
|
127
127
|
|
|
128
|
-
GitHub Actions workflows live in the `.github/workflows` directory. Create a `.github` directory at the root of your project, then create a `workflows` directory inside it. Add
|
|
128
|
+
GitHub Actions workflows live in the `.github/workflows` directory. Create a `.github` directory at the root of your project, then create a `workflows` directory inside it. Add `pr-description.yml`.
|
|
129
129
|
|
|
130
130
|
This workflow runs whenever a pull request is opened or updated. It generates a diff for the PR, calls the Mastra agent to describe the changes, and writes the description directly into the PR in the GitHub UI.
|
|
131
131
|
|
|
@@ -187,7 +187,7 @@ jobs:
|
|
|
187
187
|
|
|
188
188
|
### Create the workflow script
|
|
189
189
|
|
|
190
|
-
Create a `scripts` directory inside `.github` and add
|
|
190
|
+
Create a `scripts` directory inside `.github` and add `generate-description.ts`.
|
|
191
191
|
|
|
192
192
|
This script reads the PR diff from `PR_DIFF_FILE`, generates a description using the Mastra agent, and writes the result to `PR_DESCRIPTION_FILE` for the workflow to publish to the pull request.
|
|
193
193
|
|
|
@@ -229,7 +229,7 @@ ${readFileSync(process.env.PR_DIFF_FILE!, 'utf-8')}
|
|
|
229
229
|
|
|
230
230
|
You now have a GitHub Action that generates multi-language PR descriptions using a Mastra agent. Once the workflow and supporting files are merged into your main branch, the agent will run automatically the next time a pull request is created or updated. You can monitor the run in the **Actions** tab of your repository.
|
|
231
231
|
|
|
232
|
-
From here,
|
|
232
|
+
From here, customize the agent instructions or change the output languages. You can also extend the workflow to handle other events.
|
|
233
233
|
|
|
234
234
|
To learn more:
|
|
235
235
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
In this guide, you'll create an AI research assistant that can analyze academic papers and answer specific questions about their content using Retrieval Augmented Generation (RAG).
|
|
6
6
|
|
|
7
|
-
You'll use the
|
|
7
|
+
You'll use the original Transformer paper ["Attention Is All You Need"](https://arxiv.org/html/1706.03762) as your example. As a database you'll use a local libSQL database.
|
|
8
8
|
|
|
9
9
|
## Prerequisites
|
|
10
10
|
|
|
@@ -101,7 +101,7 @@ Let's define the agent's behavior, connect it to your Mastra project, and create
|
|
|
101
101
|
and provide accurate, well-supported answers based on the retrieved content.
|
|
102
102
|
Focus on the specific content available in the tool and acknowledge if you cannot find sufficient information to answer a question.
|
|
103
103
|
Base your responses only on the content provided, not on general knowledge.`,
|
|
104
|
-
model: 'openai/gpt-5.
|
|
104
|
+
model: 'openai/gpt-5.6-sol',
|
|
105
105
|
tools: {
|
|
106
106
|
vectorQueryTool,
|
|
107
107
|
},
|
|
@@ -155,7 +155,7 @@ Let's define the agent's behavior, connect it to your Mastra project, and create
|
|
|
155
155
|
|
|
156
156
|
## Processing documents
|
|
157
157
|
|
|
158
|
-
In the following steps you'll fetch the research paper
|
|
158
|
+
In the following steps, you'll fetch the research paper and split it into smaller chunks. You'll then generate embeddings and store the chunks in the vector database.
|
|
159
159
|
|
|
160
160
|
1. In this step the research paper is retrieved by providing an URL, then converted to a document object, and split into smaller, manageable chunks. By splitting into chunks the processing is faster and more efficient.
|
|
161
161
|
|
|
@@ -201,7 +201,7 @@ In the following steps you'll fetch the research paper, split it into smaller ch
|
|
|
201
201
|
|
|
202
202
|
> **Note:** This metadata is crucial as it allows for returning the actual content when the vector store finds relevant matches.
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
The agent uses the vector index to search for and retrieve relevant information.
|
|
205
205
|
|
|
206
206
|
Open the `src/store.ts` file and add the following:
|
|
207
207
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# Build a research coordinator with supervisor agents
|
|
4
4
|
|
|
5
|
-
In this guide, you'll build a research coordinator that orchestrates multiple specialized agents using supervisor agents. The coordinator will delegate research tasks to a research agent and writing tasks to a writing agent, then synthesize the results into a
|
|
5
|
+
In this guide, you'll build a research coordinator that orchestrates multiple specialized agents using supervisor agents. The coordinator will delegate research tasks to a research agent and writing tasks to a writing agent, then synthesize the results into a detailed report.
|
|
6
6
|
|
|
7
|
-
You'll
|
|
7
|
+
You'll set up subagents with clear roles and configure a supervisor agent to coordinate them. You'll also use delegation hooks to control execution and scorers to validate task completion.
|
|
8
8
|
|
|
9
9
|
## Prerequisites
|
|
10
10
|
|
|
@@ -96,7 +96,7 @@ Success criteria:
|
|
|
96
96
|
- Information is accurate and well-sourced
|
|
97
97
|
- Final output is well-formatted and complete
|
|
98
98
|
- If anything is missing or uncertain, continue gathering information`,
|
|
99
|
-
model: 'openai/gpt-5.
|
|
99
|
+
model: 'openai/gpt-5.6-sol',
|
|
100
100
|
agents: {
|
|
101
101
|
researchAgent,
|
|
102
102
|
writingAgent,
|
|
@@ -172,7 +172,7 @@ export const mastra = new Mastra({
|
|
|
172
172
|
The `defaultOptions` on the supervisor agent configure delegation hooks and iteration monitoring:
|
|
173
173
|
|
|
174
174
|
- `onDelegationStart` modifies the research agent's prompt to request recent data
|
|
175
|
-
- `onDelegationComplete` logs completion
|
|
175
|
+
- `onDelegationComplete` logs completion and stops on errors, then provides feedback
|
|
176
176
|
- `messageFilter` limits context to the last 10 messages for efficiency
|
|
177
177
|
- `onIterationComplete` monitors progress after each iteration
|
|
178
178
|
|
|
@@ -290,7 +290,7 @@ Success criteria:
|
|
|
290
290
|
- Information is accurate and well-sourced
|
|
291
291
|
- Final output is well-formatted and complete
|
|
292
292
|
- If anything is missing or uncertain, continue gathering information`,
|
|
293
|
-
model: 'openai/gpt-5.
|
|
293
|
+
model: 'openai/gpt-5.6-sol',
|
|
294
294
|
agents: {
|
|
295
295
|
researchAgent,
|
|
296
296
|
writingAgent,
|
|
@@ -160,7 +160,7 @@ Select **Save Changes**. Slack requires you to reinstall the app after changing
|
|
|
160
160
|
|
|
161
161
|
## Test the agent
|
|
162
162
|
|
|
163
|
-
Before testing with Slack, you can refine your agent's behavior in [Studio](https://mastra.ai/docs/studio/overview). Open <http://localhost:4111/> to chat with your agent
|
|
163
|
+
Before testing with Slack, you can refine your agent's behavior in [Studio](https://mastra.ai/docs/studio/overview). Open <http://localhost:4111/> to chat with your agent and adjust its instructions. Inspect traces to see how responses are generated.
|
|
164
164
|
|
|
165
165
|
Once you're happy with the agent's responses, test the Slack integration. Invite the bot to a channel in Slack:
|
|
166
166
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Building an AI stock agent
|
|
4
4
|
|
|
5
|
-
In this guide, you'
|
|
5
|
+
In this guide, you'll create an agent that fetches the previous day's closing stock price for a symbol. You'll create a tool and add it to an agent, then use the agent to fetch stock prices.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ To create an agent in Mastra use the `Agent` class to define it and then registe
|
|
|
24
24
|
name: 'Stock Agent',
|
|
25
25
|
instructions:
|
|
26
26
|
'You are a helpful assistant that provides current stock prices. When asked about a stock, use the stock price tool to fetch the stock price.',
|
|
27
|
-
model: 'openai/gpt-5.
|
|
27
|
+
model: 'openai/gpt-5.6-sol',
|
|
28
28
|
})
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -83,7 +83,7 @@ The Stock Agent doesn't yet know anything about current stock prices. To change
|
|
|
83
83
|
name: 'Stock Agent',
|
|
84
84
|
instructions:
|
|
85
85
|
'You are a helpful assistant that provides current stock prices. When asked about a stock, use the stock price tool to fetch the stock price.',
|
|
86
|
-
model: 'openai/gpt-5.
|
|
86
|
+
model: 'openai/gpt-5.6-sol',
|
|
87
87
|
tools: {
|
|
88
88
|
stockPrices,
|
|
89
89
|
},
|
|
@@ -130,7 +130,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
|
|
|
130
130
|
id: 'search-agent',
|
|
131
131
|
name: 'Search Agent',
|
|
132
132
|
instructions: 'You are a search agent that can search the web for information.',
|
|
133
|
-
model: 'openai/gpt-5.
|
|
133
|
+
model: 'openai/gpt-5.6-sol',
|
|
134
134
|
})
|
|
135
135
|
```
|
|
136
136
|
|
|
@@ -159,7 +159,7 @@ Some LLM providers include built-in web search capabilities that can be used dir
|
|
|
159
159
|
id: 'search-agent',
|
|
160
160
|
name: 'Search Agent',
|
|
161
161
|
instructions: 'You are a search agent that can search the web for information.',
|
|
162
|
-
model: 'openai/gpt-5.
|
|
162
|
+
model: 'openai/gpt-5.6-sol',
|
|
163
163
|
tools: {
|
|
164
164
|
webSearch: openai.tools.webSearch(),
|
|
165
165
|
},
|
|
@@ -243,7 +243,7 @@ For more control over search behavior, you can integrate external search APIs as
|
|
|
243
243
|
id: 'search-agent',
|
|
244
244
|
name: 'Search Agent',
|
|
245
245
|
instructions: 'You are a search agent that can search the web for information.',
|
|
246
|
-
model: 'openai/gpt-5.
|
|
246
|
+
model: 'openai/gpt-5.6-sol',
|
|
247
247
|
})
|
|
248
248
|
```
|
|
249
249
|
|
|
@@ -295,7 +295,7 @@ For more control over search behavior, you can integrate external search APIs as
|
|
|
295
295
|
id: 'search-agent',
|
|
296
296
|
name: 'Search Agent',
|
|
297
297
|
instructions: 'You are a search agent that can search the web for information.',
|
|
298
|
-
model: 'openai/gpt-5.
|
|
298
|
+
model: 'openai/gpt-5.6-sol',
|
|
299
299
|
tools: {
|
|
300
300
|
webSearch,
|
|
301
301
|
},
|
|
@@ -119,7 +119,7 @@ export const chatAgent = new Agent({
|
|
|
119
119
|
|
|
120
120
|
Always aim to be helpful while maintaining a friendly, approachable conversation style.
|
|
121
121
|
`,
|
|
122
|
-
model: 'openai/gpt-5.
|
|
122
|
+
model: 'openai/gpt-5.6-sol',
|
|
123
123
|
memory: new Memory({
|
|
124
124
|
storage: new LibSQLStore({
|
|
125
125
|
id: 'agent-storage',
|
|
@@ -157,7 +157,7 @@ export const textMessageAgent = new Agent({
|
|
|
157
157
|
|
|
158
158
|
Always return exactly 5-8 messages in the messages array.
|
|
159
159
|
`,
|
|
160
|
-
model: 'openai/gpt-5.
|
|
160
|
+
model: 'openai/gpt-5.6-sol',
|
|
161
161
|
memory: new Memory({
|
|
162
162
|
storage: new LibSQLStore({
|
|
163
163
|
id: 'agent-storage',
|
package/.docs/guides/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Mastra Guides
|
|
4
4
|
|
|
5
|
-
Mastra offers
|
|
5
|
+
Mastra offers guides for building agents and workflows, using the Mastra SDK and API, and implementing different UI frameworks. Explore these guides to find the resources you need to get started and build with Mastra.
|
|
6
6
|
|
|
7
7
|
## New project
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ const agent = new AgentNetwork({
|
|
|
29
29
|
name: 'agent-network',
|
|
30
30
|
agents: [agent1, agent2],
|
|
31
31
|
tools: { tool1, tool2 },
|
|
32
|
-
model: 'openai/gpt-5.
|
|
32
|
+
model: 'openai/gpt-5.6-sol',
|
|
33
33
|
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
34
34
|
})
|
|
35
35
|
|
|
@@ -49,7 +49,7 @@ const agent = new Agent({
|
|
|
49
49
|
name: 'agent-network',
|
|
50
50
|
agents: { agent1, agent2 },
|
|
51
51
|
tools: { tool1, tool2 },
|
|
52
|
-
model: 'openai/gpt-5.
|
|
52
|
+
model: 'openai/gpt-5.6-sol',
|
|
53
53
|
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
54
54
|
memory,
|
|
55
55
|
})
|
|
@@ -70,7 +70,7 @@ const agent = new NewAgentNetwork({
|
|
|
70
70
|
agents: { agent1, agent2 },
|
|
71
71
|
workflows: { workflow1 },
|
|
72
72
|
tools: { tool1, tool2 },
|
|
73
|
-
model: 'openai/gpt-5.
|
|
73
|
+
model: 'openai/gpt-5.6-sol',
|
|
74
74
|
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
75
75
|
})
|
|
76
76
|
|
|
@@ -91,7 +91,7 @@ const agent = new Agent({
|
|
|
91
91
|
agents: { agent1, agent2 },
|
|
92
92
|
workflows: { workflow1 },
|
|
93
93
|
tools: { tool1, tool2 },
|
|
94
|
-
model: 'openai/gpt-5.
|
|
94
|
+
model: 'openai/gpt-5.6-sol',
|
|
95
95
|
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
96
96
|
memory,
|
|
97
97
|
})
|
|
@@ -13,7 +13,7 @@ This guide covers only the Mastra-specific aspects of the migration.
|
|
|
13
13
|
|
|
14
14
|
## Memory and storage
|
|
15
15
|
|
|
16
|
-
Mastra automatically handles AI SDK v4 data using its internal `MessageList` class, which manages format conversion
|
|
16
|
+
Mastra automatically handles AI SDK v4 data using its internal `MessageList` class, which manages format conversion, including v4 to v5. No database migrations are required. Your existing messages are translated on the fly and continue working after you upgrade.
|
|
17
17
|
|
|
18
18
|
## Message format conversion
|
|
19
19
|
|
|
@@ -60,7 +60,7 @@ The Mastra platform replaces Mastra Cloud with separate Studio and Server produc
|
|
|
60
60
|
|
|
61
61
|
Mastra Cloud provided a managed libSQL database, backed by [Turso](https://turso.tech). The Mastra platform doesn't host a database for you, so you need to point your storage at an externally hosted instance.
|
|
62
62
|
|
|
63
|
-
If you were already using a hosted database ("bring your own"),
|
|
63
|
+
If you were already using a hosted database ("bring your own"), keep the existing database configuration. Ensure the connection string is set as an environment variable in the dashboard rather than hardcoded.
|
|
64
64
|
|
|
65
65
|
If you were using Cloud Store, follow the steps below to export your data and load it into a new libSQL database that you control.
|
|
66
66
|
|
|
@@ -68,7 +68,7 @@ If you were using Cloud Store, follow the steps below to export your data and lo
|
|
|
68
68
|
|
|
69
69
|
You can export your Cloud Store data in two ways: download it from the dashboard, or create a manual dump with the Turso CLI.
|
|
70
70
|
|
|
71
|
-
#### Option A
|
|
71
|
+
#### Option A: Export from the dashboard (recommended)
|
|
72
72
|
|
|
73
73
|
Open your project in the [Mastra dashboard](https://projects.mastra.ai) and navigate to **Runtime → Settings → Storage**. Click the **Export Database** button. The dashboard generates a full `.sql` dump of your Cloud Store and downloads it directly to your Downloads folder.
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ sqlite3 mydb.db < ~/Downloads/mastra-cloud-dump.sql
|
|
|
80
80
|
|
|
81
81
|
You now have a portable `mydb.db` file you can inspect locally, back up, or use as the source for the new database in the steps that follow.
|
|
82
82
|
|
|
83
|
-
#### Option B
|
|
83
|
+
#### Option B: Export via the Turso CLI
|
|
84
84
|
|
|
85
85
|
If you prefer to work from the command line, or need to script the export, you can dump the database directly using the [Turso CLI](https://docs.turso.tech/cli). This approach requires the database URL and an auth token, both surfaced in the dashboard.
|
|
86
86
|
|
|
@@ -269,7 +269,7 @@ Deploy your hosted Studio instance:
|
|
|
269
269
|
mastra studio deploy
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
The CLI builds your project
|
|
272
|
+
The CLI builds your project and uploads the artifact before deploying it. On first deploy, a `.mastra-project.json` file is created to link your local project to the platform. Commit this file to your repository.
|
|
273
273
|
|
|
274
274
|
A local env file is optional. When a `.env` or `.env.*` file is present in the project directory, the deploy bundles its environment variables.
|
|
275
275
|
|
|
@@ -283,14 +283,14 @@ See [Studio deployment](https://mastra.ai/docs/studio/deployment) for details.
|
|
|
283
283
|
|
|
284
284
|
### Multiple environments
|
|
285
285
|
|
|
286
|
-
A single Mastra platform project runs the same codebase across multiple
|
|
286
|
+
A single Mastra platform project runs the same codebase across multiple [environments](https://mastra.ai/docs/mastra-platform/environments), such as `production` and `staging`. Deploy to each with the unified [`mastra deploy`](https://mastra.ai/docs/mastra-platform/deploy) command:
|
|
287
287
|
|
|
288
288
|
```bash
|
|
289
289
|
mastra deploy --env production --yes
|
|
290
290
|
mastra deploy --env staging --env-file .env.staging --yes
|
|
291
291
|
```
|
|
292
292
|
|
|
293
|
-
Each environment
|
|
293
|
+
Each environment has a dedicated URL and environment variables, along with a separate deploy history.
|
|
294
294
|
|
|
295
295
|
## Deploy Server (optional)
|
|
296
296
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Supervisor agents using `Agent.stream()` and `Agent.generate()` are the recommended approach for coordinating multiple agents, replacing the older `.network()` API. This guide walks you through each step of the migration.
|
|
6
6
|
|
|
7
|
-
> **.network() Deprecation:** `.network()` is deprecated and will be removed in a future release.
|
|
7
|
+
> **.network() Deprecation:** `.network()` is deprecated and will be removed in a future release. Existing code will continue to work until then, but development now focuses on supervisor agents. Migrate to supervisor agents as soon as possible.
|
|
8
8
|
|
|
9
9
|
## Replace `.network()` with `.stream()` or `.generate()`
|
|
10
10
|
|
|
11
|
-
The core change is replacing `.network()` calls with `.stream()` (for streaming) or `.generate()` (for non-streaming). The agent configuration stays the same
|
|
11
|
+
The core change is replacing `.network()` calls with `.stream()` (for streaming) or `.generate()` (for non-streaming). The agent configuration stays the same. You still define `agents`, `workflows`, `tools`, and `memory` on the agent. The difference is how you call it and how you process the results.
|
|
12
12
|
|
|
13
13
|
With `.network()`, you iterated over custom event types like `network-execution-event-step-finish`. With `.stream()`, you use the standard `textStream` or `fullStream` iterators.
|
|
14
14
|
|
|
@@ -50,9 +50,9 @@ console.log(result.text)
|
|
|
50
50
|
|
|
51
51
|
## Write clear supervisor instructions
|
|
52
52
|
|
|
53
|
-
With `.network()`, the routing agent relied on generic instructions and primitive descriptions to decide what to call. Supervisor agents work the same way, but clear and specific instructions
|
|
53
|
+
With `.network()`, the routing agent relied on generic instructions and primitive descriptions to decide what to call. Supervisor agents work the same way, but clear and specific instructions improve delegation accuracy.
|
|
54
54
|
|
|
55
|
-
Your supervisor's `instructions` should
|
|
55
|
+
Your supervisor's `instructions` should identify the available resources and when to use each one. They should also explain how to coordinate those resources and recognize when the task is complete.
|
|
56
56
|
|
|
57
57
|
**Before:**
|
|
58
58
|
|
|
@@ -92,7 +92,7 @@ Success criteria:
|
|
|
92
92
|
|
|
93
93
|
## Add descriptions to subagents
|
|
94
94
|
|
|
95
|
-
Each subagent should have a `description` field that explains
|
|
95
|
+
Each subagent should have a `description` field that explains its purpose and return format. The description should also state when to use the subagent. The supervisor uses these descriptions to decide which agent to delegate to.
|
|
96
96
|
|
|
97
97
|
```typescript
|
|
98
98
|
const researchAgent = new Agent({
|
|
@@ -129,7 +129,7 @@ If you were handling specific `.network()` events, update them to use the standa
|
|
|
129
129
|
|
|
130
130
|
Supervisor agents let you hook into the delegation lifecycle to monitor, modify, or reject delegations. These hooks can be configured in the agent's `defaultOptions` or passed per-call.
|
|
131
131
|
|
|
132
|
-
`onDelegationStart` is called before the supervisor delegates to a subagent. You can modify the prompt
|
|
132
|
+
`onDelegationStart` is called before the supervisor delegates to a subagent. You can modify the prompt or limit the subagent's steps. The hook can also reject the delegation entirely:
|
|
133
133
|
|
|
134
134
|
```typescript
|
|
135
135
|
const stream = await supervisorAgent.stream('Research AI in education', {
|
|
@@ -159,7 +159,7 @@ const stream = await supervisorAgent.stream('Research AI in education', {
|
|
|
159
159
|
})
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
`onDelegationComplete` is called after a delegation finishes.
|
|
162
|
+
`onDelegationComplete` is called after a delegation finishes. Inspect the result and call `context.bail()` when the supervisor loop should stop. You can also return feedback that gets saved to the supervisor's memory:
|
|
163
163
|
|
|
164
164
|
```typescript
|
|
165
165
|
const stream = await supervisorAgent.stream('Research AI in education', {
|
|
@@ -179,7 +179,7 @@ const stream = await supervisorAgent.stream('Research AI in education', {
|
|
|
179
179
|
|
|
180
180
|
## Add message filtering
|
|
181
181
|
|
|
182
|
-
By default, subagents receive the full conversation context from the supervisor. Use `messageFilter` to control what messages are shared
|
|
182
|
+
By default, subagents receive the full conversation context from the supervisor. Use `messageFilter` to control what messages are shared. For example, remove sensitive data or limit the number of messages:
|
|
183
183
|
|
|
184
184
|
```typescript
|
|
185
185
|
const stream = await supervisorAgent.stream('Research AI in education', {
|
|
@@ -200,7 +200,7 @@ const stream = await supervisorAgent.stream('Research AI in education', {
|
|
|
200
200
|
|
|
201
201
|
## Add iteration monitoring
|
|
202
202
|
|
|
203
|
-
`onIterationComplete` is called after each iteration of the supervisor loop.
|
|
203
|
+
`onIterationComplete` is called after each iteration of the supervisor loop. Use it to log progress or provide feedback that guides the agent. The hook can also stop execution early:
|
|
204
204
|
|
|
205
205
|
```typescript
|
|
206
206
|
const stream = await supervisorAgent.stream('Research AI in education', {
|