@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
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
Run a Mastra application across multiple pods on [Kubernetes](https://kubernetes.io/), so it scales horizontally behind a load balancer. Because each pod is a separate process, the pods must share a pub/sub backend and a database, otherwise work started on one pod is invisible to the others.
|
|
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
|
-
> **Beta:** Multi-pod support relies on [durable agents](https://mastra.ai/docs/
|
|
9
|
+
> **Beta:** Multi-pod support relies on [durable agents](https://mastra.ai/docs/harness/durable-agents). Breaking changes may occur without a major version bump until the API is stable. Read [Known limitations](#known-limitations) before you rely on this in production.
|
|
10
10
|
|
|
11
11
|
## Before you begin
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ A single pod keeps run state in its own memory. With one pod that's fine, becaus
|
|
|
25
25
|
Redis and Postgres close that gap:
|
|
26
26
|
|
|
27
27
|
- **Pub/sub** carries events between pods. When an event is published on one pod, the others receive it. Mastra uses [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams), which also provides the per-thread leasing that keeps a single pod as the owner of a conversation at a time. See [PubSub](https://mastra.ai/docs/server/pubsub).
|
|
28
|
-
- **Storage** persists run state. [Durable agents](https://mastra.ai/docs/
|
|
28
|
+
- **Storage** persists run state. [Durable agents](https://mastra.ai/docs/harness/durable-agents) save each run as a workflow snapshot, so any pod can resume a run from the database after a restart or when a request is routed elsewhere.
|
|
29
29
|
|
|
30
30
|
## Configure shared infrastructure
|
|
31
31
|
|
|
@@ -87,7 +87,7 @@ The `cache` is what makes resumable streams work across pods. A reconnecting cli
|
|
|
87
87
|
|
|
88
88
|
## Use durable agents
|
|
89
89
|
|
|
90
|
-
A plain [`Agent`](https://mastra.ai/docs/agents/overview) keeps its stream and approval state in one pod's memory, so those don't survive a request landing on another pod. A [durable agent](https://mastra.ai/docs/
|
|
90
|
+
A plain [`Agent`](https://mastra.ai/docs/agents/overview) keeps its stream and approval state in one pod's memory, so those don't survive a request landing on another pod. A [durable agent](https://mastra.ai/docs/harness/durable-agents) runs the agentic loop inside a workflow and persists its state, so any pod can observe or resume the same run.
|
|
91
91
|
|
|
92
92
|
Wrap the agent with `createDurableAgent()`:
|
|
93
93
|
|
|
@@ -109,7 +109,7 @@ Register the durable agent with the `Mastra` instance above. Its run state now l
|
|
|
109
109
|
|
|
110
110
|
## Deploy
|
|
111
111
|
|
|
112
|
-
1. Build and containerize the Mastra server, then push the image to your registry. Follow the [Mastra server](https://mastra.ai/docs/server/
|
|
112
|
+
1. Build and containerize the Mastra server, then push the image to your registry. Follow the [Mastra server](https://mastra.ai/docs/server/overview) guide for the build, and ensure the server reads `process.env.PORT` and listens on `0.0.0.0`.
|
|
113
113
|
|
|
114
114
|
2. Store the shared connection strings as a Secret:
|
|
115
115
|
|
|
@@ -242,7 +242,7 @@ Register the durable agent with the `Mastra` instance above. Its run state now l
|
|
|
242
242
|
|
|
243
243
|
A JSON list of your agents means the deployment is serving.
|
|
244
244
|
|
|
245
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
245
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
246
246
|
|
|
247
247
|
## Streaming and reconnection
|
|
248
248
|
|
|
@@ -258,7 +258,7 @@ for await (const chunk of output.fullStream) {
|
|
|
258
258
|
cleanup()
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
Because the run state is in Postgres and the events are in Redis, the reconnecting request can be served by any pod, not only the one that started the run. See [Resumable streams](https://mastra.ai/docs/
|
|
261
|
+
Because the run state is in Postgres and the events are in Redis, the reconnecting request can be served by any pod, not only the one that started the run. See [Resumable streams](https://mastra.ai/docs/harness/durable-agents).
|
|
262
262
|
|
|
263
263
|
Multiple clients can observe the same run at once. Each `observe()` call receives the full stream, so a user watching from two devices, or two people following the same run, stay in sync.
|
|
264
264
|
|
|
@@ -281,11 +281,11 @@ The run suspends before the tool runs. Approve it later, from any pod:
|
|
|
281
281
|
await durableAssistant.resume(runId, { approved: true })
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
-
The pod that handles the approval loads the suspended run from Postgres. It then runs the approved tool and publishes the result over the shared pub/sub, so a client observing the run receives the continuation. See [Tool approval](https://mastra.ai/docs/
|
|
284
|
+
The pod that handles the approval loads the suspended run from Postgres. It then runs the approved tool and publishes the result over the shared pub/sub, so a client observing the run receives the continuation. See [Tool approval](https://mastra.ai/docs/harness/durable-agents).
|
|
285
285
|
|
|
286
286
|
## Known limitations
|
|
287
287
|
|
|
288
|
-
- The default in-process setup keeps run state in one pod's memory and doesn't share it across pods. Use [durable agents](https://mastra.ai/docs/
|
|
288
|
+
- The default in-process setup keeps run state in one pod's memory and doesn't share it across pods. Use [durable agents](https://mastra.ai/docs/harness/durable-agents) with shared Redis and Postgres so streaming, approvals, and reconnection work across pods.
|
|
289
289
|
- Cross-pod streaming, approvals, and reconnection require the durable-agent path. A plain agent keeps run state in memory and doesn't resume on another pod.
|
|
290
290
|
- When multiple pods start at once against an uninitialized database, they can race to create the schema and a pod may fail to start. Start with one replica so the schema is created once, then scale up.
|
|
291
291
|
- For a stricter setup, initialize the schema outside the app (for example, a one-off Kubernetes Job) and set `disableInit: true` on the `PostgresStore` in every pod.
|
|
@@ -293,7 +293,7 @@ The pod that handles the approval loads the suspended run from Postgres. It then
|
|
|
293
293
|
## Related
|
|
294
294
|
|
|
295
295
|
- [PubSub](https://mastra.ai/docs/server/pubsub)
|
|
296
|
-
- [Durable agents](https://mastra.ai/docs/
|
|
296
|
+
- [Durable agents](https://mastra.ai/docs/harness/durable-agents)
|
|
297
297
|
- [Workers](https://mastra.ai/docs/deployment/workers): Split background processing into separate containers on Kubernetes
|
|
298
|
-
- [Mastra server](https://mastra.ai/docs/server/
|
|
298
|
+
- [Mastra server](https://mastra.ai/docs/server/overview)
|
|
299
299
|
- [Deployment overview](https://mastra.ai/docs/deployment/overview)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Use `@mastra/deployer-netlify` to deploy your Mastra server on Netlify. The deployer bundles your code and generates a `.netlify` directory conforming to Netlify's [Frameworks API](https://docs.netlify.com/build/frameworks/frameworks-api/), ready to deploy. You can deploy as serverless functions (default) or as [edge functions](https://docs.netlify.com/build/edge-functions/overview/) for lower latency and longer execution times.
|
|
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
|
|
|
@@ -85,10 +85,10 @@ After setting up your project, push it to your remote Git provider of choice (e.
|
|
|
85
85
|
|
|
86
86
|
3. Verify your deployment at `https://<random-slug>.netlify.app/api/agents`, which should return a JSON list of your agents.
|
|
87
87
|
|
|
88
|
-
Since the [Mastra server](https://mastra.ai/docs/server/
|
|
88
|
+
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.
|
|
89
89
|
|
|
90
90
|
> **Note:** Netlify functions are typically deployed at `https://<random-slug>.netlify.app/.netlify/functions/api`. The `NetlifyDeployer` redirects any request from `/*` to `/.netlify/functions/api/:splat`, so you don't need to include the `.netlify/functions` prefix in your URLs.
|
|
91
91
|
|
|
92
92
|
4. You can now call your Mastra endpoints over HTTP.
|
|
93
93
|
|
|
94
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
94
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Render
|
|
4
|
+
|
|
5
|
+
Deploy Mastra applications on [Render](https://render.com/). Host the Mastra API as a [web service](https://render.com/docs/web-services), or use [Render Workflows](https://render.com/docs/workflows) for long-running tasks with independent retry policies.
|
|
6
|
+
|
|
7
|
+
Choose the deployment path that fits your application:
|
|
8
|
+
|
|
9
|
+
- **Mastra API**: Deploy Mastra's [server](https://mastra.ai/docs/server/overview) as a web service with a public endpoint. The [Web Services guide](https://render.com/docs/web-services) explains how to deploy custom code or a supported [server adapter](https://mastra.ai/docs/server/server-adapters).
|
|
10
|
+
- **Mastra workflow**: Run an entire Mastra workflow within one task. Render controls the outer run, while Mastra manages its steps and state. See [Defining Workflow Tasks](https://render.com/docs/workflows-defining) for configuration details.
|
|
11
|
+
- **Distributed agent operations**: Give each operation its own compute plan, timeout, and retry policy. Render Workflows handles the execution queue and provides run observability.
|
|
12
|
+
|
|
13
|
+
This guide builds an editorial pipeline that reviews a draft from three perspectives in parallel, then passes the feedback to an editor agent. Use the links above if you want to deploy a Mastra API or execute an entire Mastra workflow as one task.
|
|
14
|
+
|
|
15
|
+
## How Render Workflows integrates with Mastra
|
|
16
|
+
|
|
17
|
+
Mastra supplies the agents and application logic, while Render Workflows defines the execution boundaries. A typical pipeline has three layers:
|
|
18
|
+
|
|
19
|
+
1. A parent task coordinates the run.
|
|
20
|
+
2. Child tasks invoke Mastra agents for focused work.
|
|
21
|
+
3. A final task combines the results.
|
|
22
|
+
|
|
23
|
+
Calling one task from another creates a chained run in a separate instance, with its own compute plan, timeout, and retry policy.
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
Create an empty Mastra project named `render-workflows`:
|
|
28
|
+
|
|
29
|
+
**npm**:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm create mastra@latest render-workflows -- --empty
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**pnpm**:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm create mastra render-workflows --empty
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Yarn**:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn create mastra render-workflows --empty
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Bun**:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bunx create-mastra render-workflows --empty
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Install two additional dependencies:
|
|
54
|
+
|
|
55
|
+
**npm**:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install @renderinc/sdk tsx
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**pnpm**:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm add @renderinc/sdk tsx
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Yarn**:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
yarn add @renderinc/sdk tsx
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Bun**:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
bun add @renderinc/sdk tsx
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Add your API key to an `.env` file. This example uses OpenAI, but any supported [model provider](https://mastra.ai/models) works.
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
OPENAI_API_KEY=your_openai_api_key
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Install the [Render CLI](https://render.com/docs/cli) to run workflow commands from your terminal.
|
|
86
|
+
|
|
87
|
+
## Distributed agent pipeline
|
|
88
|
+
|
|
89
|
+
### Create the agents
|
|
90
|
+
|
|
91
|
+
In `src/mastra`, create an `agents` directory with `reviewer-agent.ts` and `editor-agent.ts`. Define both agents:
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { Agent } from '@mastra/core/agent'
|
|
95
|
+
|
|
96
|
+
export const reviewerAgent = new Agent({
|
|
97
|
+
id: 'reviewer-agent',
|
|
98
|
+
name: 'Reviewer Agent',
|
|
99
|
+
model: 'openai/gpt-5.6-sol',
|
|
100
|
+
instructions: `
|
|
101
|
+
Review the supplied draft only from the requested perspective.
|
|
102
|
+
Identify concrete problems and recommend specific changes.
|
|
103
|
+
Do not rewrite the full draft.
|
|
104
|
+
`,
|
|
105
|
+
})
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import { Agent } from '@mastra/core/agent'
|
|
110
|
+
|
|
111
|
+
export const editorAgent = new Agent({
|
|
112
|
+
id: 'editor-agent',
|
|
113
|
+
name: 'Editor Agent',
|
|
114
|
+
model: 'openai/gpt-5.6-sol',
|
|
115
|
+
instructions: `
|
|
116
|
+
Revise the supplied draft using the reviewers' feedback.
|
|
117
|
+
Return the complete revised draft and nothing else.
|
|
118
|
+
Preserve accurate details and do not introduce unsupported claims.
|
|
119
|
+
`,
|
|
120
|
+
})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Configure the Mastra instance
|
|
124
|
+
|
|
125
|
+
Add both agents to the Mastra instance in `src/mastra/index.ts`:
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
129
|
+
import { editorAgent } from './agents/editor-agent.js'
|
|
130
|
+
import { reviewerAgent } from './agents/reviewer-agent.js'
|
|
131
|
+
|
|
132
|
+
export const mastra = new Mastra({
|
|
133
|
+
agents: {
|
|
134
|
+
editorAgent,
|
|
135
|
+
reviewerAgent,
|
|
136
|
+
},
|
|
137
|
+
})
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Create the tasks
|
|
141
|
+
|
|
142
|
+
In `src`, create a `tasks` directory with `review-task.ts`, `revision-task.ts`, and `editorial-task.ts`.
|
|
143
|
+
|
|
144
|
+
#### Review task
|
|
145
|
+
|
|
146
|
+
The reviewer agent handles one area of focus. Its compute plan, five-minute timeout, and retry policy apply only to that analysis. A temporary model-provider failure can trigger another attempt without restarting the other reviewers.
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
import { task } from '@renderinc/sdk/workflows'
|
|
150
|
+
import { mastra } from '../mastra/index.js'
|
|
151
|
+
|
|
152
|
+
type Review = {
|
|
153
|
+
focus: string
|
|
154
|
+
feedback: string
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export const reviewDraft = task(
|
|
158
|
+
{
|
|
159
|
+
name: 'review_draft',
|
|
160
|
+
plan: 'starter',
|
|
161
|
+
timeoutSeconds: 300,
|
|
162
|
+
retry: {
|
|
163
|
+
maxRetries: 2,
|
|
164
|
+
waitDurationMs: 1_000,
|
|
165
|
+
backoffScaling: 2,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
async function reviewDraft(draft: string, focus: string): Promise<Review> {
|
|
169
|
+
const reviewer = mastra.getAgentById('reviewer-agent')
|
|
170
|
+
const response = await reviewer.generate(`
|
|
171
|
+
Review this draft for ${focus}.
|
|
172
|
+
Draft: ${draft}
|
|
173
|
+
`)
|
|
174
|
+
if (!response.text) {
|
|
175
|
+
throw new Error(`The ${focus} review returned no text`)
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
focus,
|
|
179
|
+
feedback: response.text,
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Revision task
|
|
186
|
+
|
|
187
|
+
This task combines the feedback and produces a revised draft. It uses a larger compute plan and a longer timeout than each reviewer.
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import { task } from '@renderinc/sdk/workflows'
|
|
191
|
+
import { mastra } from '../mastra/index.js'
|
|
192
|
+
|
|
193
|
+
type Review = {
|
|
194
|
+
focus: string
|
|
195
|
+
feedback: string
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export const reviseDraft = task(
|
|
199
|
+
{
|
|
200
|
+
name: 'revise_draft',
|
|
201
|
+
plan: 'standard',
|
|
202
|
+
timeoutSeconds: 600,
|
|
203
|
+
retry: {
|
|
204
|
+
maxRetries: 2,
|
|
205
|
+
waitDurationMs: 1_000,
|
|
206
|
+
backoffScaling: 2,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
async function reviseDraft(draft: string, reviews: Review[]): Promise<{ draft: string }> {
|
|
210
|
+
const editor = mastra.getAgentById('editor-agent')
|
|
211
|
+
const response = await editor.generate(`
|
|
212
|
+
Revise the draft using the review feedback.
|
|
213
|
+
Draft: ${draft}
|
|
214
|
+
Reviews: ${JSON.stringify(reviews, null, 2)}
|
|
215
|
+
`)
|
|
216
|
+
if (!response.text) {
|
|
217
|
+
throw new Error('The editor returned no text')
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
draft: response.text,
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
#### Editorial task
|
|
227
|
+
|
|
228
|
+
The parent dispatches three reviews in parallel with `Promise.all()`, then sends their combined feedback to the revision step. Retries are disabled at this level because each child defines its own policy. If you enable orchestration retries, ensure that another attempt can't duplicate external side effects or other non-idempotent work.
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
import { task } from '@renderinc/sdk/workflows'
|
|
232
|
+
import { reviewDraft } from './review-task.js'
|
|
233
|
+
import { reviseDraft } from './revision-task.js'
|
|
234
|
+
|
|
235
|
+
export const editorialPipeline = task(
|
|
236
|
+
{
|
|
237
|
+
name: 'editorial_pipeline',
|
|
238
|
+
plan: 'starter',
|
|
239
|
+
timeoutSeconds: 1_200,
|
|
240
|
+
retry: {
|
|
241
|
+
maxRetries: 0,
|
|
242
|
+
waitDurationMs: 1_000,
|
|
243
|
+
backoffScaling: 2,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
async function editorialPipeline(draft: string): Promise<{ draft: string }> {
|
|
247
|
+
const focuses = ['technical clarity', 'structure and flow', 'reader usefulness']
|
|
248
|
+
const reviews = await Promise.all(focuses.map(focus => reviewDraft(draft, focus)))
|
|
249
|
+
return reviseDraft(draft, reviews)
|
|
250
|
+
},
|
|
251
|
+
)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Set up the entry point
|
|
255
|
+
|
|
256
|
+
Create `src/index.ts` and import the editorial task:
|
|
257
|
+
|
|
258
|
+
```ts
|
|
259
|
+
import './tasks/editorial-task.js'
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
In `package.json`, add scripts to build the TypeScript project and run the workflow:
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"scripts": {
|
|
267
|
+
"build": "tsc",
|
|
268
|
+
"dev:workflows": "tsx src/index.ts",
|
|
269
|
+
"start:workflows": "node dist/index.js"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Configure `tsconfig.json` for the build:
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"compilerOptions": {
|
|
279
|
+
"target": "ES2022",
|
|
280
|
+
"module": "NodeNext",
|
|
281
|
+
"moduleResolution": "NodeNext",
|
|
282
|
+
"rootDir": "src",
|
|
283
|
+
"outDir": "dist",
|
|
284
|
+
"strict": true,
|
|
285
|
+
"esModuleInterop": true,
|
|
286
|
+
"skipLibCheck": true
|
|
287
|
+
},
|
|
288
|
+
"include": ["src/**/*"]
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Build the project. The command compiles the JavaScript files into `dist`.
|
|
293
|
+
|
|
294
|
+
**npm**:
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
npm run build
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**pnpm**:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
pnpm run build
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Yarn**:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
yarn build
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Bun**:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
bun run build
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Run the pipeline
|
|
319
|
+
|
|
320
|
+
### Locally
|
|
321
|
+
|
|
322
|
+
Start the local development server with the Render CLI:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
render workflows dev -- npm run dev:workflows
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
The server lists the registered tasks:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
➜ render workflows dev -- npm run dev:workflows
|
|
332
|
+
Workflow server listening on port 8120
|
|
333
|
+
Loaded environment variables from .env
|
|
334
|
+
3 tasks found in npm run dev:workflows
|
|
335
|
+
• editorial_pipeline
|
|
336
|
+
• review_draft
|
|
337
|
+
• revise_draft
|
|
338
|
+
|
|
339
|
+
To browse and run tasks, open another terminal and run:
|
|
340
|
+
render workflows tasks list --local
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
In another terminal, confirm that the tasks are available:
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
render workflows tasks list --local
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
The command displays each task's name, ID, and creation time. Press `Ctrl+C`, then start the editorial pipeline from the same terminal:
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
render workflows tasks runs start editorial_pipeline \
|
|
353
|
+
--local \
|
|
354
|
+
--input='["Render Workflows runs long-running tasks outside the request lifecycle."]'
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
The development server records the parent run, three parallel reviews, and the final revision.
|
|
358
|
+
|
|
359
|
+
### Production
|
|
360
|
+
|
|
361
|
+
Create a workflow service from the current repository:
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
render workflows create \
|
|
365
|
+
--name mastra-workflows \
|
|
366
|
+
--repo . \
|
|
367
|
+
--runtime node \
|
|
368
|
+
--build-command "npm install && npm run build" \
|
|
369
|
+
--run-command "npm run start:workflows"
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Add `OPENAI_API_KEY`, or the key for your chosen model provider, to the service's environment variables.
|
|
373
|
+
|
|
374
|
+
After deployment, start a production run. If needed, replace `mastra-workflows/editorial_pipeline` with the task slug shown in the Render Dashboard.
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
render workflows tasks start mastra-workflows/editorial_pipeline \
|
|
378
|
+
--input='["Render Workflows runs long-running tasks outside the request lifecycle."]'
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Open the workflow service in the Render Dashboard to inspect each task run, attempt, result, and log stream.
|
|
382
|
+
|
|
383
|
+
## Related
|
|
384
|
+
|
|
385
|
+
- [Render Workflows documentation](https://render.com/docs/workflows)
|
|
386
|
+
- [Defining Render workflow tasks](https://render.com/docs/workflows-defining)
|
|
387
|
+
- [Triggering task runs](https://render.com/docs/workflows-running)
|
|
388
|
+
- [Render Workflows TypeScript SDK](https://render.com/docs/workflows-sdk-typescript)
|
|
389
|
+
- [Render Workflows limits and pricing](https://render.com/docs/workflows-limits)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Use `@mastra/deployer-vercel` to deploy your Mastra server as serverless functions on Vercel. The deployer bundles your code and generates a `.vercel/output` directory conforming to Vercel's [Build Output API](https://vercel.com/docs/build-output-api/v3), ready to deploy with no additional configuration.
|
|
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
|
|
|
@@ -67,7 +67,7 @@ export const mastra = new Mastra({
|
|
|
67
67
|
|
|
68
68
|
4. You can now call your Mastra endpoints over HTTP.
|
|
69
69
|
|
|
70
|
-
> **Warning:** Set up [authentication](https://mastra.ai/docs/
|
|
70
|
+
> **Warning:** Set up [authentication](https://mastra.ai/docs/auth/overview) before exposing your endpoints publicly.
|
|
71
71
|
|
|
72
72
|
## Studio
|
|
73
73
|
|
|
@@ -271,4 +271,4 @@ See [E2BSandbox reference](https://mastra.ai/integrations/sandboxes/e2b) for mor
|
|
|
271
271
|
- [GCSFilesystem reference](https://mastra.ai/integrations/file-storage/google-cloud-storage)
|
|
272
272
|
- [AzureBlobFilesystem reference](https://mastra.ai/integrations/file-storage/azure-blob)
|
|
273
273
|
- [E2BSandbox reference](https://mastra.ai/integrations/sandboxes/e2b)
|
|
274
|
-
- [Filesystem](https://mastra.ai/docs/
|
|
274
|
+
- [Filesystem](https://mastra.ai/docs/sandbox/filesystem)
|
|
@@ -217,4 +217,4 @@ const config = filesystem.getMountConfig()
|
|
|
217
217
|
- [WorkspaceFilesystem interface](https://mastra.ai/reference/workspace/filesystem)
|
|
218
218
|
- [S3Filesystem reference](https://mastra.ai/integrations/file-storage/amazon-s3)
|
|
219
219
|
- [GCSFilesystem reference](https://mastra.ai/integrations/file-storage/google-cloud-storage)
|
|
220
|
-
- [Filesystem](https://mastra.ai/docs/
|
|
220
|
+
- [Filesystem](https://mastra.ai/docs/sandbox/filesystem)
|
|
@@ -194,4 +194,4 @@ See [E2BSandbox reference](https://mastra.ai/integrations/sandboxes/e2b) for mor
|
|
|
194
194
|
- [S3Filesystem reference](https://mastra.ai/integrations/file-storage/amazon-s3)
|
|
195
195
|
- [AzureBlobFilesystem reference](https://mastra.ai/integrations/file-storage/azure-blob)
|
|
196
196
|
- [E2BSandbox reference](https://mastra.ai/integrations/sandboxes/e2b)
|
|
197
|
-
- [Filesystem](https://mastra.ai/docs/
|
|
197
|
+
- [Filesystem](https://mastra.ai/docs/sandbox/filesystem)
|
|
@@ -316,6 +316,6 @@ Read operations still work. Write operations throw `WorkspaceReadOnlyError`.
|
|
|
316
316
|
## Related
|
|
317
317
|
|
|
318
318
|
- [WorkspaceFilesystem interface](https://mastra.ai/reference/workspace/filesystem)
|
|
319
|
-
- [Filesystem docs](https://mastra.ai/docs/
|
|
320
|
-
- [Sandbox](https://mastra.ai/docs/
|
|
319
|
+
- [Filesystem docs](https://mastra.ai/docs/sandbox/filesystem)
|
|
320
|
+
- [Sandbox](https://mastra.ai/docs/sandbox/overview)
|
|
321
321
|
- [Mesa documentation](https://docs.mesa.dev/content/getting-started/introduction)
|
|
@@ -184,5 +184,5 @@ const url = await filesystem.files.url('reports/q3.pdf')
|
|
|
184
184
|
- [S3Filesystem reference](https://mastra.ai/integrations/file-storage/amazon-s3)
|
|
185
185
|
- [GCSFilesystem reference](https://mastra.ai/integrations/file-storage/google-cloud-storage)
|
|
186
186
|
- [AzureBlobFilesystem reference](https://mastra.ai/integrations/file-storage/azure-blob)
|
|
187
|
-
- [Filesystem](https://mastra.ai/docs/
|
|
187
|
+
- [Filesystem](https://mastra.ai/docs/sandbox/filesystem)
|
|
188
188
|
- [FilesSDK documentation](https://files-sdk.dev)
|
|
@@ -153,7 +153,7 @@ yarn add @mastra/ai-sdk@latest @ai-sdk/react ai
|
|
|
153
153
|
bun add @mastra/ai-sdk@latest @ai-sdk/react ai
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
Next, initialize AI Elements. When prompted, choose the
|
|
156
|
+
Next, initialize AI Elements. When prompted to select a component library, choose **Radix UI**, then accept the defaults for the remaining prompts:
|
|
157
157
|
|
|
158
158
|
**npm**:
|
|
159
159
|
|
|
@@ -179,6 +179,10 @@ yarn dlx ai-elements@latest
|
|
|
179
179
|
bun x ai-elements@latest
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
+
> **Note:** The `ai-elements` command runs `shadcn add` against the AI Elements registry, which currently publishes Radix UI components only. Installing them into a Base UI project produces TypeScript errors, tracked in [vercel/ai-elements#383](https://github.com/vercel/ai-elements/issues/383).
|
|
183
|
+
>
|
|
184
|
+
> The component library prompt only appears when your project has no `components.json`. If you already have one, check that its `style` is a Radix option, such as `new-york` or a `radix-*` style, and not a `base-*` style, before running the command.
|
|
185
|
+
|
|
182
186
|
This downloads the entire AI Elements UI component library into a `@/components/ai-elements` folder.
|
|
183
187
|
|
|
184
188
|
## Create a chat route
|
|
@@ -391,7 +395,7 @@ Congratulations on building your Mastra agent with Astro! 🎉
|
|
|
391
395
|
From here, you can extend the project with your own tools and logic:
|
|
392
396
|
|
|
393
397
|
- Learn more about [agents](https://mastra.ai/docs/agents/overview)
|
|
394
|
-
- Give your agent its own [tools](https://mastra.ai/docs/agents/
|
|
398
|
+
- Give your agent its own [tools](https://mastra.ai/docs/agents/tools)
|
|
395
399
|
- Add human-like [memory](https://mastra.ai/docs/memory/overview) to your agent
|
|
396
400
|
|
|
397
401
|
When you're ready, read more about how Mastra integrates with AI SDK UI and how to deploy your agent anywhere:
|
|
@@ -497,7 +497,7 @@ Congratulations on building your Mastra agent with Electron! 🎉
|
|
|
497
497
|
From here, you can extend the project with your own tools and logic:
|
|
498
498
|
|
|
499
499
|
- Learn more about [agents](https://mastra.ai/docs/agents/overview)
|
|
500
|
-
- Give your agent its own [tools](https://mastra.ai/docs/agents/
|
|
500
|
+
- Give your agent its own [tools](https://mastra.ai/docs/agents/tools)
|
|
501
501
|
- Add human-like [memory](https://mastra.ai/docs/memory/overview) to your agent
|
|
502
502
|
|
|
503
503
|
When you're ready, read more about how Mastra integrates with AI SDK UI and React, and how to deploy your agent anywhere:
|
|
@@ -245,7 +245,7 @@ Congratulations on building your Mastra agent with Express! 🎉
|
|
|
245
245
|
From here, you can extend the project with your own tools and logic:
|
|
246
246
|
|
|
247
247
|
- Learn more about [agents](https://mastra.ai/docs/agents/overview)
|
|
248
|
-
- Give your agent its own [tools](https://mastra.ai/docs/agents/
|
|
248
|
+
- Give your agent its own [tools](https://mastra.ai/docs/agents/tools)
|
|
249
249
|
- Add human-like [memory](https://mastra.ai/docs/memory/overview) to your agent
|
|
250
250
|
|
|
251
251
|
When you're ready, read more about how Mastra integrates with Express:
|
|
@@ -184,7 +184,7 @@ Congratulations on building your Mastra agent with Hono! 🎉
|
|
|
184
184
|
From here, you can extend the project with your own tools and logic:
|
|
185
185
|
|
|
186
186
|
- Learn more about [agents](https://mastra.ai/docs/agents/overview)
|
|
187
|
-
- Give your agent its own [tools](https://mastra.ai/docs/agents/
|
|
187
|
+
- Give your agent its own [tools](https://mastra.ai/docs/agents/tools)
|
|
188
188
|
- Add human-like [memory](https://mastra.ai/docs/memory/overview) to your agent
|
|
189
189
|
|
|
190
190
|
When you're ready, read more about how Mastra integrates with Hono:
|
|
@@ -232,7 +232,7 @@ Both approaches use the same singleton `Mastra` instance registered by `MastraMo
|
|
|
232
232
|
You now have a working Mastra agent running inside NestJS. To extend the project:
|
|
233
233
|
|
|
234
234
|
- [Agents overview](https://mastra.ai/docs/agents/overview)
|
|
235
|
-
- [Using tools](https://mastra.ai/docs/agents/
|
|
235
|
+
- [Using tools](https://mastra.ai/docs/agents/tools)
|
|
236
236
|
- [Agent memory](https://mastra.ai/docs/memory/overview)
|
|
237
237
|
|
|
238
238
|
For details on the NestJS integration:
|
|
@@ -121,7 +121,7 @@ yarn add @mastra/ai-sdk@latest @ai-sdk/react ai
|
|
|
121
121
|
bun add @mastra/ai-sdk@latest @ai-sdk/react ai
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
Next, initialize AI Elements. When prompted, choose the
|
|
124
|
+
Next, initialize AI Elements. When prompted to select a component library, choose **Radix UI**, then accept the defaults for the remaining prompts:
|
|
125
125
|
|
|
126
126
|
**npm**:
|
|
127
127
|
|
|
@@ -147,6 +147,10 @@ yarn dlx ai-elements@latest
|
|
|
147
147
|
bun x ai-elements@latest
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
+
> **Note:** The `ai-elements` command runs `shadcn add` against the AI Elements registry, which currently publishes Radix UI components only. Installing them into a Base UI project produces TypeScript errors, tracked in [vercel/ai-elements#383](https://github.com/vercel/ai-elements/issues/383).
|
|
151
|
+
>
|
|
152
|
+
> The component library prompt only appears when your project has no `components.json`. If you already have one, check that its `style` is a Radix option, such as `new-york` or a `radix-*` style, and not a `base-*` style, before running the command.
|
|
153
|
+
|
|
150
154
|
This downloads the entire AI Elements UI component library into a `@/components/ai-elements` folder.
|
|
151
155
|
|
|
152
156
|
## Create a chat route
|
|
@@ -335,7 +339,7 @@ Congratulations on building your Mastra agent with Next.js! 🎉
|
|
|
335
339
|
From here, you can extend the project with your own tools and logic:
|
|
336
340
|
|
|
337
341
|
- Learn more about [agents](https://mastra.ai/docs/agents/overview)
|
|
338
|
-
- Give your agent its own [tools](https://mastra.ai/docs/agents/
|
|
342
|
+
- Give your agent its own [tools](https://mastra.ai/docs/agents/tools)
|
|
339
343
|
- Add human-like [memory](https://mastra.ai/docs/memory/overview) to your agent
|
|
340
344
|
|
|
341
345
|
When you're ready, read more about how Mastra integrates with AI SDK UI and Next.js, and how to deploy your agent anywhere, including Vercel:
|
|
@@ -490,7 +490,7 @@ Congratulations on building your Mastra agent with Nuxt! 🎉
|
|
|
490
490
|
From here, you can extend the project with your own tools and logic:
|
|
491
491
|
|
|
492
492
|
- Learn more about [agents](https://mastra.ai/docs/agents/overview)
|
|
493
|
-
- Give your agent its own [tools](https://mastra.ai/docs/agents/
|
|
493
|
+
- Give your agent its own [tools](https://mastra.ai/docs/agents/tools)
|
|
494
494
|
- Add human-like [memory](https://mastra.ai/docs/memory/overview) to your agent
|
|
495
495
|
|
|
496
496
|
When you're ready, read more about how Mastra integrates with AI SDK UI and Nuxt, and how to deploy your agent anywhere:
|