@mastra/mcp-docs-server 1.2.17-alpha.7 → 1.2.17
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/course/02-agent-tools-mcp/32-conclusion.md +1 -1
- package/.docs/docs/agents/code-mode.md +3 -3
- package/.docs/docs/agents/guardrails.md +1 -1
- package/.docs/docs/agents/{agent-approval.md → human-in-the-loop.md} +5 -5
- package/.docs/docs/agents/networks.md +3 -3
- package/.docs/docs/agents/overview.md +7 -7
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/{using-tools.md → tools.md} +7 -7
- package/.docs/docs/{server/auth → auth}/custom-auth-provider.md +1 -1
- package/.docs/docs/{server/auth → auth}/fga.md +27 -1
- package/.docs/docs/{server/auth.md → auth/overview.md} +4 -4
- package/.docs/docs/{server/auth → auth}/simple-auth.md +1 -1
- package/.docs/docs/{server/auth → auth}/workers.md +2 -2
- package/.docs/docs/{capabilities/channels.md → channels.md} +2 -2
- package/.docs/docs/{agents → connections}/a2a.md +2 -2
- package/.docs/docs/{agents → connections}/acp.md +18 -6
- package/.docs/docs/{mcp/overview.md → connections/mcp.md} +1 -1
- package/.docs/docs/connections/overview.md +5 -5
- package/.docs/docs/{agents → connections}/sdk-agents.md +3 -1
- package/.docs/docs/deployment/cloud-providers.md +1 -0
- package/.docs/docs/deployment/mastra-server.md +2 -2
- package/.docs/docs/deployment/overview.md +2 -1
- package/.docs/docs/deployment/sandbox.md +3 -3
- package/.docs/docs/deployment/workers.md +4 -4
- package/.docs/docs/guides/multi-agent-systems.md +7 -7
- package/.docs/docs/guides/streaming.md +1 -1
- package/.docs/docs/harness/agent-controller.md +5 -3
- package/.docs/docs/{long-running-agents → harness}/background-tasks.md +5 -5
- package/.docs/docs/{long-running-agents → harness}/durable-agents.md +18 -2
- package/.docs/docs/{long-running-agents → harness}/goals.md +6 -6
- package/.docs/docs/harness/overview.md +11 -10
- package/.docs/docs/{long-running-agents → harness}/schedules.md +5 -5
- package/.docs/docs/{long-running-agents → harness}/signal-providers.md +4 -4
- package/.docs/docs/mastra-platform/deploy.md +1 -1
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/memory/message-history.md +1 -1
- package/.docs/docs/memory/overview.md +4 -4
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
- package/.docs/docs/{workspace → sandbox}/filesystem.md +2 -2
- package/.docs/docs/{workspace → sandbox}/lsp.md +3 -3
- package/.docs/docs/{workspace/sandbox.md → sandbox/overview.md} +4 -3
- package/.docs/docs/{workspace → sandbox}/search.md +2 -2
- package/.docs/docs/{workspace → sandbox}/skills.md +5 -5
- package/.docs/docs/server/custom-api-routes.md +2 -2
- package/.docs/docs/server/mastra-client.md +2 -2
- package/.docs/docs/server/{mastra-server.md → overview.md} +3 -3
- package/.docs/docs/server/pubsub.md +2 -2
- package/.docs/docs/server/server-adapters.md +4 -4
- package/.docs/docs/{agents/skills.md → skills.md} +4 -4
- package/.docs/docs/{storage/overview.md → storage.md} +2 -1
- package/.docs/docs/studio/auth.md +4 -4
- package/.docs/docs/studio/overview.md +2 -2
- package/.docs/docs/{capabilities/subagents.md → subagents.md} +35 -5
- package/.docs/docs/workflows/agents-and-tools.md +1 -1
- package/.docs/docs/workflows/control-flow.md +0 -4
- package/.docs/docs/workflows/human-in-the-loop.md +0 -4
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +2 -2
- package/.docs/docs/workflows/snapshots.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +0 -4
- package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
- package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
- package/.docs/integrations/auth/google.md +2 -2
- package/.docs/integrations/auth/workos.md +1 -1
- package/.docs/integrations/browsers/agent-browser.md +2 -2
- package/.docs/integrations/browsers/browser-viewer.md +6 -6
- package/.docs/integrations/browsers/firecrawl.md +1 -1
- package/.docs/integrations/browsers/stagehand.md +2 -2
- package/.docs/integrations/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +1 -1
- package/.docs/integrations/channels/imessage.md +4 -4
- package/.docs/integrations/channels/slack.md +5 -5
- package/.docs/integrations/channels/teams.md +2 -2
- package/.docs/integrations/channels/telegram.md +2 -2
- package/.docs/integrations/channels/whatsapp.md +2 -2
- package/.docs/integrations/databases/postgresql.md +1 -0
- package/.docs/integrations/deploy/amazon-ec2.md +2 -2
- package/.docs/integrations/deploy/aws-lambda.md +3 -3
- 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 +3 -3
- package/.docs/integrations/deploy/kubernetes.md +11 -11
- package/.docs/integrations/deploy/netlify.md +3 -3
- package/.docs/integrations/deploy/render.md +389 -0
- package/.docs/integrations/deploy/vercel.md +2 -2
- package/.docs/integrations/file-storage/amazon-s3.md +1 -1
- package/.docs/integrations/file-storage/azure-blob.md +1 -1
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/file-storage/mesa.md +2 -2
- package/.docs/integrations/file-storage/vercel-files.md +1 -1
- package/.docs/integrations/frameworks/astro.md +6 -2
- 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 +1 -1
- package/.docs/integrations/frameworks/next-js.md +6 -2
- package/.docs/integrations/frameworks/nuxt.md +1 -1
- package/.docs/integrations/frameworks/sveltekit.md +1 -1
- package/.docs/integrations/frameworks/vite-react.md +6 -2
- package/.docs/integrations/sandboxes/agentcore.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +1 -1
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +118 -0
- package/.docs/integrations/sandboxes/daytona.md +1 -1
- package/.docs/integrations/sandboxes/docker.md +4 -3
- package/.docs/integrations/sandboxes/e2b.md +1 -1
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +11 -0
- package/.docs/integrations.md +4 -0
- package/.docs/models/environment-variables.md +8 -2
- package/.docs/models/gateways/merge-gateway.md +212 -0
- package/.docs/models/gateways/openrouter.md +5 -1
- package/.docs/models/gateways/vercel.md +22 -1
- package/.docs/models/gateways.md +1 -0
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +2 -1
- package/.docs/models/providers/alibaba-token-plan.md +2 -1
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/amd.md +73 -0
- package/.docs/models/providers/arcee.md +79 -0
- package/.docs/models/providers/baseten.md +1 -1
- package/.docs/models/providers/cerebras.md +2 -3
- package/.docs/models/providers/chutes.md +2 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +3 -2
- package/.docs/models/providers/cortecs.md +2 -1
- package/.docs/models/providers/crof.md +1 -1
- package/.docs/models/providers/crossmodel.md +3 -2
- package/.docs/models/providers/deepinfra.md +5 -1
- package/.docs/models/providers/digitalocean.md +3 -2
- package/.docs/models/providers/edenai.md +19 -5
- package/.docs/models/providers/empiriolabs.md +10 -1
- package/.docs/models/providers/hetzner.md +6 -8
- package/.docs/models/providers/huggingface.md +4 -1
- package/.docs/models/providers/hyper.md +9 -8
- package/.docs/models/providers/inferx.md +19 -13
- package/.docs/models/providers/jalapeno.md +89 -0
- package/.docs/models/providers/kilo.md +17 -14
- package/.docs/models/providers/kosmik.md +73 -0
- package/.docs/models/providers/llmgateway.md +3 -3
- package/.docs/models/providers/llmtr.md +35 -10
- package/.docs/models/providers/nano-gpt.md +18 -19
- package/.docs/models/providers/ofox.md +3 -3
- package/.docs/models/providers/opencode-go.md +2 -2
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/runinfra.md +76 -0
- package/.docs/models/providers/sakana.md +3 -2
- package/.docs/models/providers/scnet-token-plan.md +85 -0
- package/.docs/models/providers/scx-ai.md +76 -0
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +2 -1
- package/.docs/models/providers/umans-ai.md +2 -1
- package/.docs/models/providers/vivgrid.md +2 -1
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers/xai.md +2 -1
- package/.docs/models/providers.md +7 -2
- package/.docs/reference/acp/acp-agent.md +2 -2
- package/.docs/reference/acp/create-acp-tool.md +1 -1
- package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
- package/.docs/reference/agents/agent.md +2 -2
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/createSkill.md +2 -2
- package/.docs/reference/agents/durable-agent.md +1 -1
- package/.docs/reference/agents/generate.md +3 -1
- package/.docs/reference/agents/getSkill.md +1 -1
- package/.docs/reference/agents/listSkills.md +1 -1
- package/.docs/reference/agents/listSuspendedRuns.md +6 -6
- package/.docs/reference/agents/listTools.md +2 -2
- package/.docs/reference/agents/network.md +3 -1
- package/.docs/reference/ai-sdk/chat-route.md +1 -1
- package/.docs/reference/ai-sdk/handle-chat-stream.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +2 -2
- package/.docs/reference/ai-sdk/handle-workflow-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +2 -2
- package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/ai-sdk/workflow-route.md +1 -1
- package/.docs/reference/auth/fga.md +7 -5
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +2 -2
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/build-with-ai.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/cli/mastra.md +2 -0
- package/.docs/reference/client-js/agents.md +24 -4
- package/.docs/reference/coding-agent/create-coding-agent.md +142 -13
- package/.docs/reference/configuration.md +6 -6
- package/.docs/reference/core/getEditor.md +1 -1
- package/.docs/reference/core/getMCPServer.md +1 -1
- package/.docs/reference/core/getMCPServerById.md +1 -1
- package/.docs/reference/core/getTool.md +1 -1
- package/.docs/reference/core/getToolById.md +1 -1
- package/.docs/reference/core/listMCPServers.md +1 -1
- package/.docs/reference/core/listTools.md +1 -1
- package/.docs/reference/core/removeWorkspace.md +1 -1
- package/.docs/reference/editor/mastra-editor.md +2 -2
- package/.docs/reference/editor/prompt-blocks.md +2 -2
- package/.docs/reference/editor/tool-provider.md +108 -1
- package/.docs/reference/editor/tools.md +1 -1
- package/.docs/reference/editor/versioning.md +3 -3
- package/.docs/reference/evals/prompt-alignment.md +18 -0
- package/.docs/reference/evals/rubric.md +1 -1
- package/.docs/reference/file-based-agents/memory.md +2 -2
- package/.docs/reference/file-based-agents/server.md +3 -3
- package/.docs/reference/file-based-agents/skills.md +1 -1
- package/.docs/reference/file-based-agents/storage.md +3 -3
- package/.docs/reference/file-based-agents/subagents.md +1 -1
- package/.docs/reference/file-based-agents/workspace.md +3 -3
- package/.docs/reference/index.md +1 -0
- package/.docs/reference/manual-install.md +3 -3
- package/.docs/reference/memory/memory-class.md +1 -0
- package/.docs/reference/memory/settled.md +57 -0
- package/.docs/reference/migrations/network-to-supervisor.md +2 -2
- package/.docs/reference/processors/provider-history-compat.md +6 -5
- package/.docs/reference/processors/skill-search-processor.md +3 -1
- package/.docs/reference/processors/token-limiter-processor.md +4 -0
- package/.docs/reference/processors/tool-call-filter.md +7 -7
- package/.docs/reference/processors/tool-search-processor.md +1 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +3 -3
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/rag/graph-rag.md +71 -8
- package/.docs/reference/rag/retrieval.md +26 -18
- package/.docs/reference/schedules/overview.md +1 -1
- package/.docs/reference/streaming/ChunkType.md +2 -2
- package/.docs/reference/streaming/agents/stream.md +29 -4
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/tools/ask-user-tool.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +1 -1
- package/.docs/reference/tools/create-tool.md +4 -4
- package/.docs/reference/tools/mcp-client.md +2 -0
- package/.docs/reference/tools/mcp-server.md +97 -4
- package/.docs/reference/tools/submit-plan-tool.md +1 -1
- package/.docs/reference/tools/task-tools.md +2 -2
- package/.docs/reference/vectors/vectorize.md +12 -2
- package/.docs/reference/workers/overview.md +2 -2
- package/.docs/reference/workspace/local-filesystem.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +4 -3
- package/.docs/reference/workspace/platform-sandbox.md +11 -0
- package/.docs/reference/workspace/process-manager.md +20 -4
- package/.docs/reference/workspace/sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +5 -5
- package/CHANGELOG.md +80 -0
- package/package.json +6 -6
- package/.docs/models/providers/merge-gateway.md +0 -265
- /package/.docs/docs/{server/auth → auth}/composite-auth.md +0 -0
- /package/.docs/docs/{server/auth → auth}/jwt.md +0 -0
- /package/.docs/docs/{browser/overview.md → browser.md} +0 -0
- /package/.docs/docs/{getting-started/develop.md → develop.md} +0 -0
- /package/.docs/docs/{long-running-agents → harness}/signals.md +0 -0
- /package/.docs/docs/{editor/overview.md → studio/editor.md} +0 -0
|
@@ -10,7 +10,7 @@ Storage powers:
|
|
|
10
10
|
- [Workflows](https://mastra.ai/docs/workflows/overview): Durable snapshots for suspended and resumed workflow runs.
|
|
11
11
|
- [Observability](https://mastra.ai/docs/observability/overview): Traces, spans, metrics, logs, and feedback.
|
|
12
12
|
- [Evals](https://mastra.ai/docs/evals/overview): Scores, datasets, experiments, and evaluation results.
|
|
13
|
-
- [Long-running agents](https://mastra.ai/docs/
|
|
13
|
+
- [Long-running agents](https://mastra.ai/docs/harness/durable-agents): Background tasks, schedules, goals, and thread state.
|
|
14
14
|
|
|
15
15
|
## When to configure storage
|
|
16
16
|
|
|
@@ -200,6 +200,7 @@ Each provider page includes installation instructions, configuration parameters,
|
|
|
200
200
|
- [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
|
|
201
201
|
- [LanceDB](https://mastra.ai/integrations/databases/lancedb)
|
|
202
202
|
- [libSQL](https://mastra.ai/integrations/databases/libsql)
|
|
203
|
+
- [Mastra](https://mastra.ai/docs/mastra-platform/database)
|
|
203
204
|
- [MongoDB](https://mastra.ai/integrations/databases/mongodb)
|
|
204
205
|
- [MSSQL](https://mastra.ai/integrations/databases/mssql)
|
|
205
206
|
- [Neon Postgres](https://mastra.ai/integrations/databases/neon)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Studio auth
|
|
4
4
|
|
|
5
|
-
When you configure [authentication](https://mastra.ai/docs/
|
|
5
|
+
When you configure [authentication](https://mastra.ai/docs/auth/overview) on your Mastra server, Studio automatically displays a login screen and enforces access control. One configuration secures both the Studio UI and your API routes.
|
|
6
6
|
|
|
7
7
|
Without authentication, Studio and all API routes are publicly accessible.
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ Without authentication, Studio and all API routes are publicly accessible.
|
|
|
14
14
|
|
|
15
15
|
## Quickstart
|
|
16
16
|
|
|
17
|
-
Add an auth provider to your Mastra server configuration. This example uses [Simple Auth](https://mastra.ai/docs/
|
|
17
|
+
Add an auth provider to your Mastra server configuration. This example uses [Simple Auth](https://mastra.ai/docs/auth/simple-auth) for a minimal setup:
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
import { Mastra } from '@mastra/core'
|
|
@@ -35,7 +35,7 @@ export const mastra = new Mastra({
|
|
|
35
35
|
})
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Once configured, Studio shows a login screen and requires authentication for all API requests. Visit the [Auth docs](https://mastra.ai/docs/
|
|
38
|
+
Once configured, Studio shows a login screen and requires authentication for all API requests. Visit the [Auth docs](https://mastra.ai/docs/auth/overview) for a full list of supported providers.
|
|
39
39
|
|
|
40
40
|
## How it works
|
|
41
41
|
|
|
@@ -157,6 +157,6 @@ Studio Auth features (SSO login, RBAC, permission-based UI) are part of the Mast
|
|
|
157
157
|
|
|
158
158
|
## Related
|
|
159
159
|
|
|
160
|
-
- [Auth overview](https://mastra.ai/docs/
|
|
160
|
+
- [Auth overview](https://mastra.ai/docs/auth/overview): Full list of supported auth providers.
|
|
161
161
|
- [Studio deployment](https://mastra.ai/docs/studio/deployment): Deploy Studio to production.
|
|
162
162
|
- [Custom API routes](https://mastra.ai/docs/server/custom-api-routes): Control authentication on individual endpoints.
|
|
@@ -57,7 +57,7 @@ You can also attach [scorers](#scorers) to measure and compare response quality
|
|
|
57
57
|
|
|
58
58
|
You can send a follow-up message in the same thread during an agent response stream. Studio shows the message as pending until the stream confirms it, then continues the response below that follow-up. Other Studio tabs that have the same thread open can observe the active stream.
|
|
59
59
|
|
|
60
|
-
Use [Editor](https://mastra.ai/docs/editor
|
|
60
|
+
Use [Editor](https://mastra.ai/docs/studio/editor) to let non-technical team members iterate on agents and version every change, plus run experiments without redeploying.
|
|
61
61
|
|
|
62
62
|
Use [Agent Builder](https://agent-builder.mastra.ai) to create and manage fully stored agents through a separate browser-based interface.
|
|
63
63
|
|
|
@@ -85,7 +85,7 @@ Run tools on their own to observe behavior and test them before assigning them t
|
|
|
85
85
|
|
|
86
86
|
Browse the files in your agent's workspace filesystem using a built-in file browser. Switch between workspace mounts, create directories, and view file contents with syntax highlighting. Writable workspaces allow directory creation and file deletion; read-only workspaces are labeled accordingly. The Skills tab lists all discovered skills with their instructions, references, and metadata. Install community skills from [skills.sh](https://skills.sh) or remove existing ones.
|
|
87
87
|
|
|
88
|
-
See [workspaces](https://mastra.ai/docs/
|
|
88
|
+
See [workspaces](https://mastra.ai/docs/sandbox/overview) for configuration details.
|
|
89
89
|
|
|
90
90
|
### Request context
|
|
91
91
|
|
|
@@ -166,6 +166,36 @@ The `context` object includes:
|
|
|
166
166
|
| `error` | Error if the delegation failed |
|
|
167
167
|
| `bail()` | Function to stop the parent agent's loop |
|
|
168
168
|
|
|
169
|
+
### Hook errors
|
|
170
|
+
|
|
171
|
+
If a delegation hook throws, the delegation continues by default: `onDelegationStart` proceeds with the original prompt, `messageFilter` falls back to the unfiltered context, and `onDelegationComplete` keeps the subagent's original result. Set `hookErrorStrategy: 'throw'` to fail the delegation instead.
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
const stream = await parentAgent.stream('Research AI trends', {
|
|
175
|
+
maxSteps: 10,
|
|
176
|
+
delegation: {
|
|
177
|
+
hookErrorStrategy: 'throw',
|
|
178
|
+
onDelegationComplete: async ({ result }) => {
|
|
179
|
+
// If this throws, the parent sees a failed delegation instead of a
|
|
180
|
+
// successful one whose result was silently dropped.
|
|
181
|
+
await reportToAnalytics(result)
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Either way, every hook failure is recorded on the run's request context under `__mastra_delegationHookErrors` as a list of `{ hook, primitiveId, toolCallId, runId, name, message }` entries, so you can detect a hook failure programmatically:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
const requestContext = new RequestContext()
|
|
191
|
+
|
|
192
|
+
await parentAgent.generate('Research AI trends', { maxSteps: 10, requestContext })
|
|
193
|
+
|
|
194
|
+
const hookErrors = requestContext.get('__mastra_delegationHookErrors') ?? []
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
When `hookErrorStrategy` is `'throw'`, a throwing `onDelegationStart` blocks the subagent from running at all, and a throwing `messageFilter` or `onDelegationComplete` surfaces to the parent as a failed tool call. If `onDelegationComplete` throws while handling a failed delegation, the original delegation error is still what surfaces, and the hook is never re-invoked for its own failure.
|
|
198
|
+
|
|
169
199
|
## Message filtering
|
|
170
200
|
|
|
171
201
|
By default, subagents receive the full conversation context from the parent agent. Use `messageFilter` to control what messages are shared, for example, to remove sensitive data or limit context size.
|
|
@@ -399,7 +429,7 @@ Success criteria:
|
|
|
399
429
|
|
|
400
430
|
## Running subagents in the background
|
|
401
431
|
|
|
402
|
-
Subagent invocations are dispatched as tool calls, so they can run as [background tasks](https://mastra.ai/docs/
|
|
432
|
+
Subagent invocations are dispatched as tool calls, so they can run as [background tasks](https://mastra.ai/docs/harness/background-tasks). This is useful when one or more delegations are long-running and you don't want them to block the parent agent's response.
|
|
403
433
|
|
|
404
434
|
Enable the [backgroundTasks manager](https://mastra.ai/reference/configuration) on the Mastra instance, then opt subagents in on the parent agent:
|
|
405
435
|
|
|
@@ -424,11 +454,11 @@ const stream = await parentAgent.streamUntilIdle('Research AI in education and w
|
|
|
424
454
|
|
|
425
455
|
Use [`streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) instead of `stream()` so the stream stays open until the subagents complete and the parent agent has had a chance to respond to their results.
|
|
426
456
|
|
|
427
|
-
If a subagent isn't listed under the parent agent's `backgroundTasks.tools` but has its own background-eligible tools, the parent agent still dispatches the subagent as a background task and inherits its config. See [Inheriting from the subagent](https://mastra.ai/docs/
|
|
457
|
+
If a subagent isn't listed under the parent agent's `backgroundTasks.tools` but has its own background-eligible tools, the parent agent still dispatches the subagent as a background task and inherits its config. See [Inheriting from the subagent](https://mastra.ai/docs/harness/background-tasks) for details.
|
|
428
458
|
|
|
429
459
|
## Subagent versioning
|
|
430
460
|
|
|
431
|
-
When using the [editor](https://mastra.ai/docs/editor
|
|
461
|
+
When using the [editor](https://mastra.ai/docs/studio/editor), you can control which stored version of each subagent the parent agent uses at runtime. Set version overrides on the Mastra instance or per invocation:
|
|
432
462
|
|
|
433
463
|
```typescript
|
|
434
464
|
const result = await parentAgent.generate('Research and write about AI safety', {
|
|
@@ -445,13 +475,13 @@ Version overrides propagate automatically through delegation. See [Subagent vers
|
|
|
445
475
|
|
|
446
476
|
## Related
|
|
447
477
|
|
|
448
|
-
- [Background tasks](https://mastra.ai/docs/
|
|
478
|
+
- [Background tasks](https://mastra.ai/docs/harness/background-tasks)
|
|
449
479
|
- [Subagent versioning](https://mastra.ai/reference/editor/versioning)
|
|
450
480
|
- [Guide: Research coordinator](https://mastra.ai/blog/build-a-research-coordinator-with-supervisor-agents)
|
|
451
481
|
- [Agent.stream() reference](https://mastra.ai/reference/streaming/agents/stream)
|
|
452
482
|
- [Agent.streamUntilIdle() reference](https://mastra.ai/reference/streaming/agents/streamUntilIdle)
|
|
453
483
|
- [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
|
|
454
|
-
- [Agent approval](https://mastra.ai/docs/agents/
|
|
484
|
+
- [Agent approval](https://mastra.ai/docs/agents/human-in-the-loop)
|
|
455
485
|
- [Memory in multi-agent systems](https://mastra.ai/docs/memory/overview)
|
|
456
486
|
- [Concept: Multi-agent systems](https://mastra.ai/docs/guides/multi-agent-systems)
|
|
457
487
|
- 📹 [Mastra supervisor agents workshop](https://www.youtube.com/watch?v=FNb2fL9WhQg\&t=1872s)
|
|
@@ -189,4 +189,4 @@ Like `.agent()`, `.tool()` records a declarative entry, so the workflow can be p
|
|
|
189
189
|
## Related
|
|
190
190
|
|
|
191
191
|
- [Using Agents](https://mastra.ai/docs/agents/overview)
|
|
192
|
-
- [MCP Overview](https://mastra.ai/docs/mcp
|
|
192
|
+
- [MCP Overview](https://mastra.ai/docs/connections/mcp)
|
|
@@ -17,8 +17,6 @@ Each step connects to the next in the workflow through defined schemas that keep
|
|
|
17
17
|
|
|
18
18
|
Use `.then()` to run steps in order, allowing each step to access the result of the step before it.
|
|
19
19
|
|
|
20
|
-

|
|
21
|
-
|
|
22
20
|
```typescript
|
|
23
21
|
const step1 = createStep({
|
|
24
22
|
inputSchema: z.object({
|
|
@@ -55,8 +53,6 @@ export const testWorkflow = createWorkflow({
|
|
|
55
53
|
|
|
56
54
|
Use `.parallel()` to run steps simultaneously. All parallel steps must complete before the workflow continues to the next step. Each step's `id` is used when defining a following step's `inputSchema` and becomes the key on the `inputData` object used to access the previous step's values. The outputs of parallel steps can then be referenced or combined by a following step.
|
|
57
55
|
|
|
58
|
-

|
|
59
|
-
|
|
60
56
|
```typescript
|
|
61
57
|
const step1 = createStep({
|
|
62
58
|
id: 'step-1',
|
|
@@ -8,8 +8,6 @@ Some workflows need to pause for human input before continuing. When a workflow
|
|
|
8
8
|
|
|
9
9
|
Human-in-the-loop (HITL) input works much like [pausing a workflow](https://mastra.ai/docs/workflows/suspend-and-resume) using `suspend()`. The key difference is that when human input is required, you can return `suspend()` with a payload that provides context or guidance to the user on how to continue.
|
|
10
10
|
|
|
11
|
-

|
|
12
|
-
|
|
13
11
|
```typescript
|
|
14
12
|
import { createWorkflow, createStep } from '@mastra/core/workflows'
|
|
15
13
|
import { z } from 'zod'
|
|
@@ -93,8 +91,6 @@ The data returned by the step can include a reason and help the user understand
|
|
|
93
91
|
|
|
94
92
|
As with [restarting a workflow](https://mastra.ai/docs/workflows/suspend-and-resume), use `resume()` with `resumeData` to continue a workflow after receiving input from a human. The workflow resumes from the step where it was paused.
|
|
95
93
|
|
|
96
|
-

|
|
97
|
-
|
|
98
94
|
```typescript
|
|
99
95
|
const workflow = mastra.getWorkflow('testWorkflow')
|
|
100
96
|
const run = await workflow.createRun()
|
|
@@ -105,7 +105,7 @@ Visit [`Step`](https://mastra.ai/reference/workflows/step) for a full list of co
|
|
|
105
105
|
|
|
106
106
|
### Using agents and tools
|
|
107
107
|
|
|
108
|
-
Workflow steps can also call registered agents or import and execute tools directly, visit the [Using Tools](https://mastra.ai/docs/agents/
|
|
108
|
+
Workflow steps can also call registered agents or import and execute tools directly, visit the [Using Tools](https://mastra.ai/docs/agents/tools) page for more information.
|
|
109
109
|
|
|
110
110
|
## Creating a workflow
|
|
111
111
|
|
|
@@ -137,7 +137,7 @@ A few rules worth knowing:
|
|
|
137
137
|
- Resume recomputes `nextFireAt` from now. A schedule paused for a week doesn't fire seven backlogged runs the moment you resume it. It fires on the next regular cron tick.
|
|
138
138
|
- Unpause with `resumeSchedule` or the **Resume** button in Studio. Editing the workflow's `schedule` config doesn't unpause a paused row.
|
|
139
139
|
- Pause and resume are idempotent. Calling pause on an already-paused schedule is a no-op.
|
|
140
|
-
- This operational override controls existing schedules. Author declarative schedules in code. Declarative schedules are created, deleted, and edited in code via the `schedule` field on `createWorkflow`. To create schedules imperatively at runtime instead, use the unified [`mastra.schedules`](https://mastra.ai/docs/
|
|
140
|
+
- This operational override controls existing schedules. Author declarative schedules in code. Declarative schedules are created, deleted, and edited in code via the `schedule` field on `createWorkflow`. To create schedules imperatively at runtime instead, use the unified [`mastra.schedules`](https://mastra.ai/docs/harness/schedules) service with a `workflowId`.
|
|
141
141
|
|
|
142
142
|
The underlying HTTP routes are `POST /api/schedules/:scheduleId/pause` and `POST /api/schedules/:scheduleId/resume`. Both require the `schedules:write` permission.
|
|
143
143
|
|
|
@@ -182,4 +182,4 @@ Manage Inngest schedules from the [Inngest dashboard](https://www.inngest.com/do
|
|
|
182
182
|
- [Workflow overview](https://mastra.ai/docs/workflows/overview)
|
|
183
183
|
- [Suspend and resume](https://mastra.ai/docs/workflows/suspend-and-resume)
|
|
184
184
|
- [Workers](https://mastra.ai/docs/deployment/workers): The [scheduler worker](https://mastra.ai/docs/deployment/workers) runs cron schedules in a dedicated process
|
|
185
|
-
- [Agent schedules](https://mastra.ai/docs/
|
|
185
|
+
- [Agent schedules](https://mastra.ai/docs/harness/schedules): Run an agent rather than a workflow on a cron schedule, and manage both schedule types at runtime through `mastra.schedules`.
|
|
@@ -147,7 +147,7 @@ export const mastra = new Mastra({
|
|
|
147
147
|
- [Upstash Storage](https://mastra.ai/integrations/databases/upstash)
|
|
148
148
|
- [Cloudflare D1](https://mastra.ai/integrations/databases/cloudflare-d1)
|
|
149
149
|
- [DynamoDB](https://mastra.ai/integrations/databases/dynamodb)
|
|
150
|
-
- [More storage providers](https://mastra.ai/docs/storage
|
|
150
|
+
- [More storage providers](https://mastra.ai/docs/storage)
|
|
151
151
|
|
|
152
152
|
## Best practices
|
|
153
153
|
|
|
@@ -11,8 +11,6 @@ Use `suspend()` to pause workflow execution at a specific step. You can define a
|
|
|
11
11
|
- If the condition isn’t met, the workflow pauses and returns `suspend()`.
|
|
12
12
|
- If the condition is met, the workflow continues with the remaining logic in the step.
|
|
13
13
|
|
|
14
|
-

|
|
15
|
-
|
|
16
14
|
```typescript
|
|
17
15
|
const step1 = createStep({
|
|
18
16
|
id: 'step-1',
|
|
@@ -56,8 +54,6 @@ export const testWorkflow = createWorkflow({
|
|
|
56
54
|
|
|
57
55
|
Use `resume()` to restart a suspended workflow from the step where it paused. Pass `resumeData` matching the step's `resumeSchema` to satisfy the suspend condition and continue execution.
|
|
58
56
|
|
|
59
|
-

|
|
60
|
-
|
|
61
57
|
```typescript
|
|
62
58
|
import { step1 } from './workflows/test-workflow'
|
|
63
59
|
|
|
@@ -909,7 +909,7 @@ export function TaskChat() {
|
|
|
909
909
|
|
|
910
910
|
### Tool streaming
|
|
911
911
|
|
|
912
|
-
Tools can also stream data using `context.writer.write()` for lower-level control, or pipe an agent's stream directly to the tool's writer. For more details, see [Tool Streaming](https://mastra.ai/docs/agents/
|
|
912
|
+
Tools can also stream data using `context.writer.write()` for lower-level control, or pipe an agent's stream directly to the tool's writer. For more details, see [Tool Streaming](https://mastra.ai/docs/agents/tools).
|
|
913
913
|
|
|
914
914
|
### Examples
|
|
915
915
|
|
|
@@ -545,7 +545,7 @@ export default function Page() {
|
|
|
545
545
|
|
|
546
546
|
Inside `StepsFeedback`, let the user toggle steps and then call `respond({ accepted: true, steps })` to resume the agent, or `respond({ accepted: false })` to reject. The agent reads the returned value and continues accordingly. See the full component in the [UI Dojo](https://ui-dojo.mastra.ai/).
|
|
547
547
|
|
|
548
|
-
The example above uses a client tool: the agent calls `generate_task_steps` and the frontend fulfills it through `respond`. Mastra can also pause on the server, suspending a tool call before it executes so a human approves or supplies input. For that path, see Mastra's [Agent approval](https://mastra.ai/docs/agents/
|
|
548
|
+
The example above uses a client tool: the agent calls `generate_task_steps` and the frontend fulfills it through `respond`. Mastra can also pause on the server, suspending a tool call before it executes so a human approves or supplies input. For that path, see Mastra's [Agent approval](https://mastra.ai/docs/agents/human-in-the-loop) guide for the backend side and CopilotKit's [`useHumanInTheLoop`](https://docs.copilotkit.ai/reference/hooks/useHumanInTheLoop) reference for the frontend.
|
|
549
549
|
|
|
550
550
|
## Channels
|
|
551
551
|
|
|
@@ -278,6 +278,6 @@ curl -X POST http://localhost:4111/api/agents/weatherAgent/generate \
|
|
|
278
278
|
|
|
279
279
|
## Related
|
|
280
280
|
|
|
281
|
-
- [Auth overview](https://mastra.ai/docs/
|
|
282
|
-
- [Composite Auth](https://mastra.ai/docs/
|
|
281
|
+
- [Auth overview](https://mastra.ai/docs/auth/overview)
|
|
282
|
+
- [Composite Auth](https://mastra.ai/docs/auth/composite-auth)
|
|
283
283
|
- [MastraAuthGoogle reference](https://mastra.ai/reference/auth/google)
|
|
@@ -89,7 +89,7 @@ By default, `MastraAuthWorkos` grants access to any authenticated WorkOS user. T
|
|
|
89
89
|
|
|
90
90
|
### FGA membership loading
|
|
91
91
|
|
|
92
|
-
Set `fetchMemberships: true` when you use [`MastraFGAWorkos`](https://mastra.ai/docs/
|
|
92
|
+
Set `fetchMemberships: true` when you use [`MastraFGAWorkos`](https://mastra.ai/docs/auth/fga). This tells the auth provider to load the user's WorkOS organization memberships during authentication so FGA checks can resolve the correct organization membership ID.
|
|
93
93
|
|
|
94
94
|
```typescript
|
|
95
95
|
import { MastraAuthWorkos, MastraFGAWorkos } from '@mastra/auth-workos'
|
|
@@ -99,11 +99,11 @@ const browser = new AgentBrowser({
|
|
|
99
99
|
})
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
This adds `browser_record` and `browser_record_caption` to the agent's toolset. See [Browser recording (Beta)](https://mastra.ai/docs/browser
|
|
102
|
+
This adds `browser_record` and `browser_record_caption` to the agent's toolset. See [Browser recording (Beta)](https://mastra.ai/docs/browser) for details. See [AgentBrowser reference](https://mastra.ai/reference/browser/agent-browser) for all configuration options and tool details.
|
|
103
103
|
|
|
104
104
|
## Related
|
|
105
105
|
|
|
106
|
-
- [Browser overview](https://mastra.ai/docs/browser
|
|
106
|
+
- [Browser overview](https://mastra.ai/docs/browser)
|
|
107
107
|
- [Stagehand](https://mastra.ai/integrations/browsers/stagehand)
|
|
108
108
|
- [Firecrawl](https://mastra.ai/integrations/browsers/firecrawl)
|
|
109
109
|
- [AgentBrowser reference](https://mastra.ai/reference/browser/agent-browser)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# BrowserViewer
|
|
4
4
|
|
|
5
|
-
The `@mastra/browser-viewer` package provides browser automation for CLI-based tools like [agent-browser](https://www.npmjs.com/package/agent-browser), [browser-use](https://pypi.org/project/browser-use/), and [browse](https://www.npmjs.com/package/browse). BrowserViewer launches Chrome via Playwright, exposes a Chrome DevTools Protocol (CDP) URL, and automatically injects it into CLI commands run through [sandbox tools](https://mastra.ai/docs/
|
|
5
|
+
The `@mastra/browser-viewer` package provides browser automation for CLI-based tools like [agent-browser](https://www.npmjs.com/package/agent-browser), [browser-use](https://pypi.org/project/browser-use/), and [browse](https://www.npmjs.com/package/browse). BrowserViewer launches Chrome via Playwright, exposes a Chrome DevTools Protocol (CDP) URL, and automatically injects it into CLI commands run through [sandbox tools](https://mastra.ai/docs/sandbox/overview).
|
|
6
6
|
|
|
7
7
|
## When to use BrowserViewer
|
|
8
8
|
|
|
@@ -49,7 +49,7 @@ Install the CLI tool in your workspace environment. This example uses `browser-u
|
|
|
49
49
|
pip install browser-use
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Install the corresponding [skill](https://mastra.ai/docs/
|
|
52
|
+
Install the corresponding [skill](https://mastra.ai/docs/sandbox/skills) so the agent knows how to use the CLI:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
55
|
npx skills add browser-use/browser-use --skill browser-use
|
|
@@ -104,7 +104,7 @@ When the agent runs a CLI command like `browser-use open https://example.com`, M
|
|
|
104
104
|
|
|
105
105
|
## Supported CLIs
|
|
106
106
|
|
|
107
|
-
BrowserViewer supports three CLI providers. Each CLI must be installed separately in your workspace environment. Each CLI also publishes a [skill](https://mastra.ai/docs/
|
|
107
|
+
BrowserViewer supports three CLI providers. Each CLI must be installed separately in your workspace environment. Each CLI also publishes a [skill](https://mastra.ai/docs/sandbox/skills) that teaches the agent its commands and workflows.
|
|
108
108
|
|
|
109
109
|
Set the `cli` option to match the CLI your agent uses:
|
|
110
110
|
|
|
@@ -144,8 +144,8 @@ CDP flag: `--ws` See [BrowserViewer reference](https://mastra.ai/reference/brows
|
|
|
144
144
|
|
|
145
145
|
## Related
|
|
146
146
|
|
|
147
|
-
- [Browser overview](https://mastra.ai/docs/browser
|
|
147
|
+
- [Browser overview](https://mastra.ai/docs/browser)
|
|
148
148
|
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
149
149
|
- [Stagehand](https://mastra.ai/integrations/browsers/stagehand)
|
|
150
|
-
- [Sandbox](https://mastra.ai/docs/
|
|
151
|
-
- [Workspace skills](https://mastra.ai/docs/
|
|
150
|
+
- [Sandbox](https://mastra.ai/docs/sandbox/overview)
|
|
151
|
+
- [Workspace skills](https://mastra.ai/docs/sandbox/skills)
|
|
@@ -123,6 +123,6 @@ const browser = new FirecrawlBrowser({
|
|
|
123
123
|
|
|
124
124
|
## Related
|
|
125
125
|
|
|
126
|
-
- [Browser overview](https://mastra.ai/docs/browser
|
|
126
|
+
- [Browser overview](https://mastra.ai/docs/browser)
|
|
127
127
|
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
128
128
|
- [FirecrawlBrowser reference](https://mastra.ai/reference/browser/firecrawl-browser)
|
|
@@ -162,10 +162,10 @@ const browser = new StagehandBrowser({
|
|
|
162
162
|
})
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
This adds `browser_record` and `browser_record_caption` to the agent's toolset. See [Browser recording (Beta)](https://mastra.ai/docs/browser
|
|
165
|
+
This adds `browser_record` and `browser_record_caption` to the agent's toolset. See [Browser recording (Beta)](https://mastra.ai/docs/browser) for details.
|
|
166
166
|
|
|
167
167
|
## Related
|
|
168
168
|
|
|
169
|
-
- [Browser overview](https://mastra.ai/docs/browser
|
|
169
|
+
- [Browser overview](https://mastra.ai/docs/browser)
|
|
170
170
|
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
171
171
|
- [StagehandBrowser reference](https://mastra.ai/reference/browser/stagehand-browser)
|
|
@@ -94,5 +94,5 @@ Use this URL anywhere the Discord adapter docs ask for the interactions endpoint
|
|
|
94
94
|
|
|
95
95
|
## Related
|
|
96
96
|
|
|
97
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
98
|
-
- [More](https://mastra.ai/docs/
|
|
97
|
+
- [Channels overview](https://mastra.ai/docs/channels)
|
|
98
|
+
- [More](https://mastra.ai/docs/channels)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# GitHub
|
|
4
4
|
|
|
5
|
-
The `@mastra/github-signals` provider lets an agent follow pull requests (PRs). It polls subscribed PRs and sends [notification signals](https://mastra.ai/docs/
|
|
5
|
+
The `@mastra/github-signals` provider lets an agent follow pull requests (PRs). It polls subscribed PRs and sends [notification signals](https://mastra.ai/docs/harness/signals) to the agent thread when relevant activity occurs.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -110,7 +110,7 @@ https://your-app.example.com/api/agents/imessage-agent/channels/imessage/webhook
|
|
|
110
110
|
|
|
111
111
|
Register this URL in the [Photon dashboard](https://app.photon.codes), then set the signing secret it returns as `IMESSAGE_WEBHOOK_SECRET`. The secret is shown once at registration. The adapter verifies the signature on every delivery and rejects requests that don't match. Webhooks are available in hosted mode only.
|
|
112
112
|
|
|
113
|
-
> **Note:** Photon delivers to public HTTPS endpoints only. It won't deliver to `http://`, to private addresses like `localhost`, or through a redirect. For local development, use a tunnel as described in the [Channels overview](https://mastra.ai/docs/
|
|
113
|
+
> **Note:** Photon delivers to public HTTPS endpoints only. It won't deliver to `http://`, to private addresses like `localhost`, or through a redirect. For local development, use a tunnel as described in the [Channels overview](https://mastra.ai/docs/channels).
|
|
114
114
|
|
|
115
115
|
## Duplicate deliveries
|
|
116
116
|
|
|
@@ -181,9 +181,9 @@ imessage: {
|
|
|
181
181
|
},
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
On serverless platforms, prefer webhooks. A gateway listener needs a process that stays alive. See [Serverless deployment](https://mastra.ai/docs/
|
|
184
|
+
On serverless platforms, prefer webhooks. A gateway listener needs a process that stays alive. See [Serverless deployment](https://mastra.ai/docs/channels).
|
|
185
185
|
|
|
186
186
|
## Related
|
|
187
187
|
|
|
188
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
189
|
-
- [More](https://mastra.ai/docs/
|
|
188
|
+
- [Channels overview](https://mastra.ai/docs/channels)
|
|
189
|
+
- [More](https://mastra.ai/docs/channels)
|
|
@@ -273,7 +273,7 @@ For finer control, gate on the sender's identity. Every request carries the send
|
|
|
273
273
|
|
|
274
274
|
### Server authentication
|
|
275
275
|
|
|
276
|
-
The Slack webhook route is exempt from Mastra's [server authentication](https://mastra.ai/docs/
|
|
276
|
+
The Slack webhook route is exempt from Mastra's [server authentication](https://mastra.ai/docs/auth/overview). Slack can't send a bearer token, so Mastra registers the channel webhook as a public route and verifies each request with the Slack signing secret instead. This holds even when you enable a provider like [`MastraAuthSimple`](https://mastra.ai/docs/auth/simple-auth): the rest of your API stays protected, but the webhook route relies on the signing secret rather than your server auth. Keep `SLACK_SIGNING_SECRET` set so the adapter can reject requests that Slack didn't sign.
|
|
277
277
|
|
|
278
278
|
### External channels
|
|
279
279
|
|
|
@@ -315,13 +315,13 @@ The channel context includes:
|
|
|
315
315
|
- `platform`: The platform identifier, `slack` for this adapter.
|
|
316
316
|
- `userId` and `userName`: The sender's Slack user ID and display name.
|
|
317
317
|
|
|
318
|
-
Mastra also turns this context into a short system message. The agent learns the platform and its own identity, plus whether the conversation is a direct message or a public channel. See [thread context](https://mastra.ai/docs/
|
|
318
|
+
Mastra also turns this context into a short system message. The agent learns the platform and its own identity, plus whether the conversation is a direct message or a public channel. See [thread context](https://mastra.ai/docs/channels) in the channels overview for how to change that behavior.
|
|
319
319
|
|
|
320
320
|
## Production deployment
|
|
321
321
|
|
|
322
322
|
When you deploy the Mastra server, update both request URLs in the Slack app settings to the production webhook URL. The tunnel URL used for local development is temporary and changes when the tunnel restarts.
|
|
323
323
|
|
|
324
|
-
Channels on serverless platforms may need `waitUntil` and shared pub/sub configuration so background responses and thread leases work across short-lived instances. See [serverless deployment](https://mastra.ai/docs/
|
|
324
|
+
Channels on serverless platforms may need `waitUntil` and shared pub/sub configuration so background responses and thread leases work across short-lived instances. See [serverless deployment](https://mastra.ai/docs/channels) in the channels overview.
|
|
325
325
|
|
|
326
326
|
### Idle servers
|
|
327
327
|
|
|
@@ -329,7 +329,7 @@ Platform servers scale down to idle when they aren't receiving traffic, and that
|
|
|
329
329
|
|
|
330
330
|
## Related
|
|
331
331
|
|
|
332
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
333
|
-
- [More](https://mastra.ai/docs/
|
|
332
|
+
- [Channels overview](https://mastra.ai/docs/channels)
|
|
333
|
+
- [More](https://mastra.ai/docs/channels)
|
|
334
334
|
- [Channels reference](https://mastra.ai/reference/agents/channels)
|
|
335
335
|
- [Deployment overview](https://mastra.ai/docs/deployment/overview)
|
|
@@ -96,5 +96,5 @@ Use this URL anywhere the Teams adapter docs ask for the bot endpoint or webhook
|
|
|
96
96
|
|
|
97
97
|
## Related
|
|
98
98
|
|
|
99
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
100
|
-
- [More](https://mastra.ai/docs/
|
|
99
|
+
- [Channels overview](https://mastra.ai/docs/channels)
|
|
100
|
+
- [More](https://mastra.ai/docs/channels)
|
|
@@ -94,5 +94,5 @@ Use this URL anywhere the Telegram adapter docs ask for the webhook URL. Telegra
|
|
|
94
94
|
|
|
95
95
|
## Related
|
|
96
96
|
|
|
97
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
98
|
-
- [More](https://mastra.ai/docs/
|
|
97
|
+
- [Channels overview](https://mastra.ai/docs/channels)
|
|
98
|
+
- [More](https://mastra.ai/docs/channels)
|
|
@@ -95,5 +95,5 @@ Use this URL for incoming WhatsApp event delivery. The generated Mastra route ha
|
|
|
95
95
|
|
|
96
96
|
## Related
|
|
97
97
|
|
|
98
|
-
- [Channels overview](https://mastra.ai/docs/
|
|
99
|
-
- [More](https://mastra.ai/docs/
|
|
98
|
+
- [Channels overview](https://mastra.ai/docs/channels)
|
|
99
|
+
- [More](https://mastra.ai/docs/channels)
|
|
@@ -408,6 +408,7 @@ PostgreSQL storage creates composite indexes during initialization for common qu
|
|
|
408
408
|
- `mastra_ai_spans_scope_startedat_idx`: (scope, startedAt DESC)
|
|
409
409
|
- `mastra_scores_trace_id_span_id_created_at_idx`: (traceId, spanId, createdAt DESC)
|
|
410
410
|
- `mastra_workflow_snapshot_name_createdat_idx`: (workflow\_name, createdAt DESC)
|
|
411
|
+
- `mastra_workflow_snapshot_name_status_createdat_idx`: (workflow\_name, snapshot->>'status', createdAt DESC), created only when the `snapshot` column is `jsonb`
|
|
411
412
|
|
|
412
413
|
These indexes improve performance for filtered queries with sorting, including `dateRange` filters on message queries and Studio's workflow runs-list.
|
|
413
414
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Deploy your Mastra server to Amazon EC2. The server runs on infrastructure you manage and can support long-running agents and workflows.
|
|
6
6
|
|
|
7
|
-
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/
|
|
7
|
+
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/overview). If you're using a [server adapter](https://mastra.ai/docs/server/server-adapters) or [web framework](https://mastra.ai/docs/deployment/web-framework), deploy the way you normally would for that framework.
|
|
8
8
|
|
|
9
9
|
## Before you begin
|
|
10
10
|
|
|
@@ -114,7 +114,7 @@ For production, you'll also need:
|
|
|
114
114
|
|
|
115
115
|
This is a basic example. In production, use a process manager like [PM2](https://pm2.keymetrics.io/) or [systemd](https://systemd.io/) to keep your application running and handle restarts.
|
|
116
116
|
|
|
117
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
117
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
118
118
|
|
|
119
119
|
6. Your Mastra server is now running on port 4111, but it's only accessible locally.
|
|
120
120
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Deploy your Mastra application to AWS Lambda using Docker containers and the [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter). This approach runs your Mastra server as a containerized Lambda function with automatic scaling.
|
|
6
6
|
|
|
7
|
-
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/
|
|
7
|
+
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/overview). If you're using a [server adapter](https://mastra.ai/docs/server/server-adapters) or [web framework](https://mastra.ai/docs/deployment/web-framework), deploy the way you normally would for that framework.
|
|
8
8
|
|
|
9
9
|
## Before you begin
|
|
10
10
|
|
|
@@ -146,7 +146,7 @@ CMD ["node", ".mastra/output/index.mjs"]
|
|
|
146
146
|
|
|
147
147
|
2. You can now call your Mastra endpoints over HTTP.
|
|
148
148
|
|
|
149
|
-
> **Warning:** For production deployments, set up [authentication](https://mastra.ai/docs/
|
|
149
|
+
> **Warning:** For production deployments, set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly, restrict CORS origins to your trusted domains, use AWS IAM roles for secure access to other AWS services, and store sensitive environment variables in AWS Secrets Manager or Parameter Store.
|
|
150
150
|
|
|
151
151
|
## Next steps
|
|
152
152
|
|
|
@@ -155,7 +155,7 @@ This guide provides a quickstart for deploying Mastra to AWS Lambda. For product
|
|
|
155
155
|
## Related
|
|
156
156
|
|
|
157
157
|
- [Deployment overview](https://mastra.ai/docs/deployment/overview)
|
|
158
|
-
- [Mastra server](https://mastra.ai/docs/server/
|
|
158
|
+
- [Mastra server](https://mastra.ai/docs/server/overview)
|
|
159
159
|
- [Server adapters](https://mastra.ai/docs/server/server-adapters)
|
|
160
160
|
- [AWS Lambda documentation](https://docs.aws.amazon.com/lambda/)
|
|
161
161
|
- [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Deploy your Mastra applications to Azure App Services.
|
|
6
6
|
|
|
7
|
-
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/
|
|
7
|
+
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/overview). If you're using a [server adapter](https://mastra.ai/docs/server/server-adapters) or [web framework](https://mastra.ai/docs/deployment/web-framework), deploy the way you normally would for that framework.
|
|
8
8
|
|
|
9
9
|
## Before you begin
|
|
10
10
|
|
|
@@ -83,7 +83,7 @@ Copy the URL from the Azure portal and visit `https://<your-app-name>.azurewebsi
|
|
|
83
83
|
|
|
84
84
|
You can now call your Mastra endpoints over HTTP.
|
|
85
85
|
|
|
86
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
86
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
87
87
|
|
|
88
88
|
## Next steps
|
|
89
89
|
|
|
@@ -94,8 +94,8 @@ After setting up your project, push it to your remote Git provider of choice (e.
|
|
|
94
94
|
|
|
95
95
|
3. Try out your newly deployed function by going to `https://<your-project-name>.<slug>.workers.dev/api/agents`. You should get a JSON response listing all available agents.
|
|
96
96
|
|
|
97
|
-
Since the [Mastra server](https://mastra.ai/docs/server/
|
|
97
|
+
Since the [Mastra server](https://mastra.ai/docs/server/overview) prefixes every API endpoint with `/api`, you have to add it to your URLs when making requests.
|
|
98
98
|
|
|
99
99
|
4. You can now call your Mastra endpoints over HTTP.
|
|
100
100
|
|
|
101
|
-
> **Note:** Set up [authentication](https://mastra.ai/docs/
|
|
101
|
+
> **Note:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
This guide covers Digital Ocean's App Platform and Droplets. Each of these offerings has its own set of strengths and is suited for different types of projects and developer expertise. Read [Digital Ocean's comparison](https://www.digitalocean.com/community/conceptual-articles/digitalocean-app-platform-vs-doks-vs-droplets) to understand the differences and choose the best option for your project.
|
|
6
6
|
|
|
7
|
-
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/
|
|
7
|
+
> **Note:** This guide covers deploying the [Mastra server](https://mastra.ai/docs/server/overview). If you're using a [server adapter](https://mastra.ai/docs/server/server-adapters) or [web framework](https://mastra.ai/docs/deployment/web-framework), deploy the way you normally would for that framework.
|
|
8
8
|
|
|
9
9
|
## Before you begin
|
|
10
10
|
|
|
@@ -50,7 +50,7 @@ After setting up your project, push it to your remote Git provider of choice (e.
|
|
|
50
50
|
|
|
51
51
|
5. You can now call your Mastra endpoints over HTTP.
|
|
52
52
|
|
|
53
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
53
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
54
54
|
|
|
55
55
|
## Droplets
|
|
56
56
|
|
|
@@ -162,7 +162,7 @@ After setting up your project, push it to your remote Git provider of choice (e.
|
|
|
162
162
|
|
|
163
163
|
6. You can now call your Mastra endpoints over HTTP.
|
|
164
164
|
|
|
165
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
165
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
166
166
|
|
|
167
167
|
## Related
|
|
168
168
|
|