@mastra/mcp-docs-server 1.2.16-alpha.1 → 1.2.16-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agents/a2a.md +1 -1
- package/.docs/docs/agents/overview.md +2 -0
- package/.docs/docs/agents/processors.md +4 -4
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/using-tools.md +15 -11
- package/.docs/docs/browser/overview.md +22 -3
- package/.docs/docs/capabilities/subagents.md +2 -2
- package/.docs/docs/datasets/running-experiments.md +2 -2
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/sandbox.md +1 -1
- package/.docs/docs/deployment/workers.md +5 -5
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/editor/overview.md +3 -1
- package/.docs/docs/evals/custom-scorers.md +1 -1
- package/.docs/docs/evals/multi-turn.md +1 -1
- package/.docs/docs/evals/overview.md +3 -3
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/harness/overview.md +1 -1
- package/.docs/docs/long-running-agents/background-tasks.md +2 -2
- package/.docs/docs/long-running-agents/goals.md +3 -2
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +1 -1
- package/.docs/docs/mastra-platform/github.md +1 -1
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/mastra-platform/overview.md +3 -3
- package/.docs/docs/mastra-platform/server.md +2 -2
- package/.docs/docs/mastra-platform/trace-intelligence.md +3 -3
- package/.docs/docs/memory/memory-processors.md +1 -1
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +13 -13
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/querying.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +3 -3
- package/.docs/docs/server/custom-adapters.md +2 -2
- package/.docs/docs/server/custom-api-routes.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/studio/deployment.md +2 -2
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/studio/overview.md +2 -0
- package/.docs/docs/workflows/dynamic-workflows.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workspace/lsp.md +27 -0
- package/.docs/docs/workspace/overview.md +2 -1
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +1 -1
- package/.docs/integrations/browsers/agent-browser.md +2 -3
- package/.docs/integrations/browsers/firecrawl.md +0 -1
- package/.docs/integrations/browsers/stagehand.md +2 -3
- package/.docs/models/environment-variables.md +2 -0
- package/.docs/models/gateways/openrouter.md +5 -2
- package/.docs/models/gateways/vercel.md +3 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/aiand.md +3 -2
- package/.docs/models/providers/digitalocean.md +2 -1
- package/.docs/models/providers/edenai.md +88 -0
- package/.docs/models/providers/hyper.md +3 -3
- package/.docs/models/providers/inceptron.md +8 -9
- package/.docs/models/providers/kilo.md +10 -7
- package/.docs/models/providers/llmgateway.md +3 -1
- package/.docs/models/providers/merge-gateway.md +262 -0
- package/.docs/models/providers/nano-gpt.md +11 -34
- package/.docs/models/providers/opencode.md +2 -1
- package/.docs/models/providers/tinfoil.md +9 -8
- package/.docs/models/providers/xai.md +2 -1
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/acp/acp-agent.md +1 -1
- package/.docs/reference/agent-controller/session.md +1 -1
- package/.docs/reference/agents/channels.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/ai-sdk/overview.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/stagehand-browser.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 +5 -5
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +2 -1
- package/.docs/reference/configuration.md +3 -3
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/getWorkflow.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/deployer/netlify.md +1 -1
- package/.docs/reference/deployer.md +1 -1
- package/.docs/reference/editor/prompt-blocks.md +1 -1
- package/.docs/reference/editor/tools.md +1 -1
- package/.docs/reference/evals/completeness.md +1 -1
- package/.docs/reference/evals/noise-sensitivity.md +1 -1
- package/.docs/reference/evals/summarization.md +1 -1
- package/.docs/reference/file-based-agents/config.md +1 -1
- package/.docs/reference/file-based-agents/skills.md +5 -5
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/logging/pino-logger.md +1 -1
- package/.docs/reference/memory/observational-memory.md +12 -4
- package/.docs/reference/migrations/upgrade-to-v1/agent.md +3 -3
- package/.docs/reference/migrations/upgrade-to-v1/client.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/mcp.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/processors.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/storage.md +5 -5
- package/.docs/reference/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/reference/observability/tracing/bridges/datadog.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +2 -2
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/sentry.md +1 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +27 -3
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -2
- package/.docs/reference/processors/processor-interface.md +16 -16
- package/.docs/reference/processors/stream-error-retry-processor.md +2 -2
- package/.docs/reference/rag/chunking-and-embedding.md +1 -1
- package/.docs/reference/rag/metadata-filters.md +1 -1
- package/.docs/reference/server/koa-adapter.md +1 -1
- package/.docs/reference/signals/webhook-signal-provider.md +1 -1
- package/.docs/reference/storage/retention.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +1 -1
- package/.docs/reference/tools/mcp-client.md +3 -3
- package/.docs/reference/tools/mcp-server.md +5 -5
- package/.docs/reference/tools/task-tools.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -1
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +1 -1
- package/.docs/reference/vectors/couchbase.md +1 -1
- package/.docs/reference/vectors/mongodb.md +2 -2
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/qdrant.md +2 -2
- package/.docs/reference/voice/overview.md +1 -1
- package/.docs/reference/voice/speech-to-speech.md +1 -1
- package/.docs/reference/voice/speech-to-text.md +1 -1
- package/.docs/reference/voice/voice.on.md +1 -1
- package/.docs/reference/voice/voice.updateConfig.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
- package/.docs/docs/browser/recording.md +0 -120
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# NanoGPT
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 599 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
8
8
|
|
|
@@ -88,6 +88,8 @@ for await (const chunk of stream) {
|
|
|
88
88
|
| `nano-gpt/brave` | 8K | | | | | | $5 | $5 |
|
|
89
89
|
| `nano-gpt/brave-pro` | 8K | | | | | | $5 | $5 |
|
|
90
90
|
| `nano-gpt/brave-research` | 16K | | | | | | $5 | $5 |
|
|
91
|
+
| `nano-gpt/bytedance-seed/seed-2-1-turbo` | 262K | | | | | | $0.50 | $3 |
|
|
92
|
+
| `nano-gpt/bytedance-seed/seed-2.0-code` | 262K | | | | | | $0.50 | $3 |
|
|
91
93
|
| `nano-gpt/bytedance-seed/seed-2.0-lite` | 262K | | | | | | $0.25 | $2 |
|
|
92
94
|
| `nano-gpt/bytedance/doubao-seed-2.1-pro` | 256K | | | | | | $1 | $5 |
|
|
93
95
|
| `nano-gpt/bytedance/doubao-seed-2.1-turbo` | 256K | | | | | | $0.50 | $3 |
|
|
@@ -143,7 +145,7 @@ for await (const chunk of stream) {
|
|
|
143
145
|
| `nano-gpt/deepseek-reasoner` | 64K | | | | | | $0.40 | $2 |
|
|
144
146
|
| `nano-gpt/deepseek-reasoner-cheaper` | 128K | | | | | | $0.40 | $2 |
|
|
145
147
|
| `nano-gpt/deepseek-v3-0324` | 128K | | | | | | $0.20 | $0.77 |
|
|
146
|
-
| `nano-gpt/deepseek/deepseek-latest` | 1.0M | | | | | | $
|
|
148
|
+
| `nano-gpt/deepseek/deepseek-latest` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
147
149
|
| `nano-gpt/deepseek/deepseek-prover-v2-671b` | 160K | | | | | | $1 | $3 |
|
|
148
150
|
| `nano-gpt/deepseek/deepseek-v3.2` | 163K | | | | | | $0.28 | $0.42 |
|
|
149
151
|
| `nano-gpt/deepseek/deepseek-v3.2:thinking` | 163K | | | | | | $0.28 | $0.42 |
|
|
@@ -155,6 +157,8 @@ for await (const chunk of stream) {
|
|
|
155
157
|
| `nano-gpt/deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
156
158
|
| `nano-gpt/deepseek/deepseek-v4-flash:thinking` | 1.0M | | | | | | $0.07 | $0.14 |
|
|
157
159
|
| `nano-gpt/deepseek/deepseek-v4-pro` | 1.0M | | | | | | $1 | $2 |
|
|
160
|
+
| `nano-gpt/deepseek/deepseek-v4-pro-0813` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
161
|
+
| `nano-gpt/deepseek/deepseek-v4-pro-0813:thinking` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
158
162
|
| `nano-gpt/deepseek/deepseek-v4-pro-cheaper` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
159
163
|
| `nano-gpt/deepseek/deepseek-v4-pro-cheaper:thinking` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
160
164
|
| `nano-gpt/deepseek/deepseek-v4-pro:thinking` | 1.0M | | | | | | $1 | $2 |
|
|
@@ -211,8 +215,6 @@ for await (const chunk of stream) {
|
|
|
211
215
|
| `nano-gpt/Gemma-4-31B-Cognitive-Unshackled` | 262K | | | | | | $0.31 | $0.31 |
|
|
212
216
|
| `nano-gpt/Gemma-4-31B-DarkIdol` | 262K | | | | | | $0.31 | $0.31 |
|
|
213
217
|
| `nano-gpt/Gemma-4-31B-GarnetV2` | 262K | | | | | | $0.31 | $0.31 |
|
|
214
|
-
| `nano-gpt/Gemma-4-31B-Gemopus` | 262K | | | | | | $0.31 | $0.31 |
|
|
215
|
-
| `nano-gpt/Gemma-4-31B-Musica-v1` | 262K | | | | | | $0.31 | $0.31 |
|
|
216
218
|
| `nano-gpt/Gemma-4-31B-Queen` | 262K | | | | | | $0.31 | $0.31 |
|
|
217
219
|
| `nano-gpt/gemma-4-e2b-it` | 131K | | | | | | $0.02 | $0.10 |
|
|
218
220
|
| `nano-gpt/gemma-4-e4b-it` | 131K | | | | | | $0.04 | $0.20 |
|
|
@@ -282,6 +284,7 @@ for await (const chunk of stream) {
|
|
|
282
284
|
| `nano-gpt/kwaipilot/kat-coder-pro-v2.5` | 256K | | | | | | $0.74 | $3 |
|
|
283
285
|
| `nano-gpt/LatitudeGames/Wayfarer-Large-70B-Llama-3.3` | 16K | | | | | | $0.70 | $0.70 |
|
|
284
286
|
| `nano-gpt/learnlm-1.5-pro-experimental` | 33K | | | | | | $4 | $11 |
|
|
287
|
+
| `nano-gpt/liquid/lfm-2.5-2.6b` | 128K | | | | | | $0.10 | $0.20 |
|
|
285
288
|
| `nano-gpt/LLM360/K2-Think` | 128K | | | | | | $0.17 | $0.68 |
|
|
286
289
|
| `nano-gpt/longcat-2.0` | 1.0M | | | | | | $0.75 | $3 |
|
|
287
290
|
| `nano-gpt/longcat-2.0:thinking` | 1.0M | | | | | | $0.75 | $3 |
|
|
@@ -373,6 +376,8 @@ for await (const chunk of stream) {
|
|
|
373
376
|
| `nano-gpt/nvidia/nemotron-3-super-120b-a12b:thinking` | 262K | | | | | | $0.05 | $0.25 |
|
|
374
377
|
| `nano-gpt/nvidia/nemotron-3-ultra-550b-a55b` | 1.0M | | | | | | $0.50 | $3 |
|
|
375
378
|
| `nano-gpt/nvidia/nemotron-3-ultra-550b-a55b:thinking` | 1.0M | | | | | | $0.50 | $3 |
|
|
379
|
+
| `nano-gpt/nvidia/nemotron-3.5-lightning` | 1.0M | | | | | | $0.05 | $0.20 |
|
|
380
|
+
| `nano-gpt/nvidia/nemotron-3.5-lightning:thinking` | 1.0M | | | | | | $0.05 | $0.20 |
|
|
376
381
|
| `nano-gpt/openai/gpt-3.5-turbo` | 16K | | | | | | $0.50 | $2 |
|
|
377
382
|
| `nano-gpt/openai/gpt-4-turbo` | 128K | | | | | | $10 | $30 |
|
|
378
383
|
| `nano-gpt/openai/gpt-4-turbo-preview` | 128K | | | | | | $10 | $30 |
|
|
@@ -474,36 +479,8 @@ for await (const chunk of stream) {
|
|
|
474
479
|
| `nano-gpt/qwen3.5-122b-a10b` | 131K | | | | | | $0.44 | $3 |
|
|
475
480
|
| `nano-gpt/qwen3.5-122b-a10b:thinking` | 131K | | | | | | $0.44 | $3 |
|
|
476
481
|
| `nano-gpt/qwen3.5-27b` | 260K | | | | | | $0.27 | $2 |
|
|
477
|
-
| `nano-gpt/Qwen3.5-27B-Anko` | 262K | | | | | | $0.31 | $0.31 |
|
|
478
|
-
| `nano-gpt/Qwen3.5-27B-BlueStar-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
479
|
-
| `nano-gpt/Qwen3.5-27B-BlueStar-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
480
|
-
| `nano-gpt/Qwen3.5-27B-BlueStar-v2-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
481
|
-
| `nano-gpt/Qwen3.5-27B-BlueStar-v2-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
482
482
|
| `nano-gpt/Qwen3.5-27B-BlueStar-v3-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
483
|
-
| `nano-gpt/Qwen3.5-27B-BlueStar-v3-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
484
|
-
| `nano-gpt/Qwen3.5-27B-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
485
|
-
| `nano-gpt/Qwen3.5-27B-earica-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
486
|
-
| `nano-gpt/Qwen3.5-27B-earica-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
487
|
-
| `nano-gpt/Qwen3.5-27B-Infracelestial` | 262K | | | | | | $0.31 | $0.31 |
|
|
488
|
-
| `nano-gpt/Qwen3.5-27B-Marvin-DPO-V2-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
489
|
-
| `nano-gpt/Qwen3.5-27B-Marvin-DPO-V2-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
490
|
-
| `nano-gpt/Qwen3.5-27B-Marvin-V2-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
491
|
-
| `nano-gpt/Qwen3.5-27B-Marvin-V2-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
492
|
-
| `nano-gpt/Qwen3.5-27B-Musica-v1` | 262K | | | | | | $0.31 | $0.31 |
|
|
493
|
-
| `nano-gpt/Qwen3.5-27B-NaNovel-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
494
|
-
| `nano-gpt/Qwen3.5-27B-NaNovel-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
495
|
-
| `nano-gpt/Qwen3.5-27B-Omega-Evolution-v2.0-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
496
|
-
| `nano-gpt/Qwen3.5-27B-Omega-Evolution-v2.0-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
497
|
-
| `nano-gpt/Qwen3.5-27B-Omega-Evolution-v2.2-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
498
|
-
| `nano-gpt/Qwen3.5-27B-Omega-Evolution-v2.2-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
499
483
|
| `nano-gpt/Qwen3.5-27B-Queen-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
500
|
-
| `nano-gpt/Qwen3.5-27B-Queen-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
501
|
-
| `nano-gpt/Qwen3.5-27B-RpRMax-v1` | 262K | | | | | | $0.31 | $0.31 |
|
|
502
|
-
| `nano-gpt/Qwen3.5-27B-Vivid-Durian` | 262K | | | | | | $0.31 | $0.31 |
|
|
503
|
-
| `nano-gpt/Qwen3.5-27B-Writer-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
504
|
-
| `nano-gpt/Qwen3.5-27B-Writer-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
505
|
-
| `nano-gpt/Qwen3.5-27B-Writer-V2-Derestricted` | 262K | | | | | | $0.31 | $0.31 |
|
|
506
|
-
| `nano-gpt/Qwen3.5-27B-Writer-V2-Derestricted-Lite` | 262K | | | | | | $0.31 | $0.31 |
|
|
507
484
|
| `nano-gpt/qwen3.5-27b:thinking` | 260K | | | | | | $0.27 | $2 |
|
|
508
485
|
| `nano-gpt/qwen3.5-35b-a3b` | 260K | | | | | | $0.23 | $2 |
|
|
509
486
|
| `nano-gpt/qwen3.5-35b-a3b:thinking` | 260K | | | | | | $0.23 | $2 |
|
|
@@ -519,12 +496,10 @@ for await (const chunk of stream) {
|
|
|
519
496
|
| `nano-gpt/qwen3.7-plus` | 992K | | | | | | $0.40 | $2 |
|
|
520
497
|
| `nano-gpt/qwen3.7-plus:thinking` | 984K | | | | | | $0.40 | $2 |
|
|
521
498
|
| `nano-gpt/qwen3.8-max` | 991K | | | | | | $2 | $6 |
|
|
522
|
-
| `nano-gpt/qwen3.8-max-preview` | 991K | | | | | | $2 | $5 |
|
|
523
499
|
| `nano-gpt/qwen3.8-max:thinking` | 991K | | | | | | $2 | $6 |
|
|
524
500
|
| `nano-gpt/ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0` | 16K | | | | | | $0.50 | $0.50 |
|
|
525
501
|
| `nano-gpt/sakana/fugu-ultra` | 1.0M | | | | | | $5 | $32 |
|
|
526
502
|
| `nano-gpt/sakana/fugu-ultra-v1.1` | 1.0M | | | | | | $5 | $32 |
|
|
527
|
-
| `nano-gpt/sakana/sakana-namazu` | 262K | | | | | | $1.00 | $4 |
|
|
528
503
|
| `nano-gpt/Salesforce/Llama-xLAM-2-70b-fc-r` | 128K | | | | | | $3 | $3 |
|
|
529
504
|
| `nano-gpt/Sao10K/L3-8B-Stheno-v3.2` | 16K | | | | | | $0.20 | $0.20 |
|
|
530
505
|
| `nano-gpt/Sao10K/L3.1-70B-Euryale-v2.2` | 20K | | | | | | $0.31 | $0.36 |
|
|
@@ -572,6 +547,7 @@ for await (const chunk of stream) {
|
|
|
572
547
|
| `nano-gpt/TEE/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
573
548
|
| `nano-gpt/TEE/llama3-3-70b` | 128K | | | | | | $2 | $3 |
|
|
574
549
|
| `nano-gpt/TEE/minimax-m2.5` | 197K | | | | | | $0.20 | $1 |
|
|
550
|
+
| `nano-gpt/TEE/muse-glimmer-30b` | 131K | | | | | | $0.35 | $2 |
|
|
575
551
|
| `nano-gpt/TEE/qwen2.5-vl-72b-instruct` | 66K | | | | | | $0.70 | $0.70 |
|
|
576
552
|
| `nano-gpt/TEE/qwen3.5-122b-a10b` | 262K | | | | | | $0.46 | $4 |
|
|
577
553
|
| `nano-gpt/TEE/qwen3.5-27b` | 262K | | | | | | $0.30 | $2 |
|
|
@@ -613,6 +589,7 @@ for await (const chunk of stream) {
|
|
|
613
589
|
| `nano-gpt/x-ai/grok-4.20-multi-agent` | 2.0M | | | | | | $2 | $6 |
|
|
614
590
|
| `nano-gpt/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
|
|
615
591
|
| `nano-gpt/x-ai/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
592
|
+
| `nano-gpt/x-ai/grok-4.6` | 500K | | | | | | $2 | $6 |
|
|
616
593
|
| `nano-gpt/x-ai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
617
594
|
| `nano-gpt/x-ai/grok-latest` | 500K | | | | | | $2 | $6 |
|
|
618
595
|
| `nano-gpt/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenCode Zen
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 89 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
8
8
|
|
|
@@ -80,6 +80,7 @@ for await (const chunk of stream) {
|
|
|
80
80
|
| `opencode/gpt-5.6-sol` | 1.1M | | | | | | $5 | $30 |
|
|
81
81
|
| `opencode/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
|
|
82
82
|
| `opencode/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
83
|
+
| `opencode/grok-4.6` | 500K | | | | | | $2 | $6 |
|
|
83
84
|
| `opencode/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
84
85
|
| `opencode/hy3-free` | 190K | | | | | | — | — |
|
|
85
86
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Tinfoil
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 8 Tinfoil models through Mastra's model router. Authentication is handled automatically using the `TINFOIL_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Tinfoil documentation](https://docs.tinfoil.sh).
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "tinfoil/
|
|
20
|
+
model: "tinfoil/deepseek-v4-flash"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -36,12 +36,13 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| -------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
-
| `tinfoil/
|
|
40
|
-
| `tinfoil/
|
|
39
|
+
| `tinfoil/deepseek-v4-flash` | 1.0M | | | | | | $0.70 | $2 |
|
|
40
|
+
| `tinfoil/gemma4-31b` | 262K | | | | | | $0.40 | $1 |
|
|
41
|
+
| `tinfoil/glm-5-2` | 393K | | | | | | $2 | $5 |
|
|
41
42
|
| `tinfoil/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
42
43
|
| `tinfoil/gpt-oss-safeguard-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
43
|
-
| `tinfoil/kimi-k3` |
|
|
44
|
-
| `tinfoil/llama3-3-70b` |
|
|
44
|
+
| `tinfoil/kimi-k3` | 262K | | | | | | $4 | $20 |
|
|
45
|
+
| `tinfoil/llama3-3-70b` | 131K | | | | | | $2 | $3 |
|
|
45
46
|
| `tinfoil/nomic-embed-text` | 8K | | | | | | $0.05 | — |
|
|
46
47
|
|
|
47
48
|
## Advanced configuration
|
|
@@ -54,7 +55,7 @@ const agent = new Agent({
|
|
|
54
55
|
name: "custom-agent",
|
|
55
56
|
model: {
|
|
56
57
|
url: "https://inference.tinfoil.sh/v1",
|
|
57
|
-
id: "tinfoil/
|
|
58
|
+
id: "tinfoil/deepseek-v4-flash",
|
|
58
59
|
apiKey: process.env.TINFOIL_API_KEY,
|
|
59
60
|
headers: {
|
|
60
61
|
"X-Custom-Header": "value"
|
|
@@ -73,7 +74,7 @@ const agent = new Agent({
|
|
|
73
74
|
const useAdvanced = requestContext.task === "complex";
|
|
74
75
|
return useAdvanced
|
|
75
76
|
? "tinfoil/nomic-embed-text"
|
|
76
|
-
: "tinfoil/
|
|
77
|
+
: "tinfoil/deepseek-v4-flash";
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
80
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# xAI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 11 xAI models through Mastra's model router. Authentication is handled automatically using the `XAI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [xAI documentation](https://docs.x.ai/docs/models).
|
|
8
8
|
|
|
@@ -39,6 +39,7 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| `xai/grok-4.20-multi-agent-0309` | 1.0M | | | | | | $1 | $3 |
|
|
40
40
|
| `xai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
|
|
41
41
|
| `xai/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
42
|
+
| `xai/grok-4.6` | 500K | | | | | | $2 | $6 |
|
|
42
43
|
| `xai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
43
44
|
| `xai/grok-imagine-image` | 8K | | | | | | — | — |
|
|
44
45
|
| `xai/grok-imagine-image-quality` | 8K | | | | | | — | — |
|
|
@@ -50,6 +50,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
50
50
|
- [DigitalOcean](https://mastra.ai/models/providers/digitalocean)
|
|
51
51
|
- [DInference](https://mastra.ai/models/providers/dinference)
|
|
52
52
|
- [EBCloud](https://mastra.ai/models/providers/ebcloud)
|
|
53
|
+
- [Eden AI](https://mastra.ai/models/providers/edenai)
|
|
53
54
|
- [EmpirioLabs AI](https://mastra.ai/models/providers/empiriolabs)
|
|
54
55
|
- [evroc](https://mastra.ai/models/providers/evroc)
|
|
55
56
|
- [FastRouter](https://mastra.ai/models/providers/fastrouter)
|
|
@@ -85,6 +86,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
85
86
|
- [LucidQuery](https://mastra.ai/models/providers/lucidquery)
|
|
86
87
|
- [Lynkr](https://mastra.ai/models/providers/lynkr)
|
|
87
88
|
- [Meganova](https://mastra.ai/models/providers/meganova)
|
|
89
|
+
- [Merge Gateway](https://mastra.ai/models/providers/merge-gateway)
|
|
88
90
|
- [Meta](https://mastra.ai/models/providers/meta)
|
|
89
91
|
- [MiniMax (minimax.io)](https://mastra.ai/models/providers/minimax)
|
|
90
92
|
- [MiniMax (minimaxi.com)](https://mastra.ai/models/providers/minimax-cn)
|
|
@@ -98,7 +98,7 @@ export const claudeCodeAgent = new AcpAgent({
|
|
|
98
98
|
|
|
99
99
|
#### `generate(messages, options?)`
|
|
100
100
|
|
|
101
|
-
Sends the prompt to the ACP agent
|
|
101
|
+
Sends the prompt to the ACP agent and buffers text chunks from the response before returning a Mastra subagent generate result.
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
104
|
const result = await codeAgent.generate('Inspect the repository and summarize the test setup')
|
|
@@ -249,7 +249,7 @@ const usage = session.getTokenUsage()
|
|
|
249
249
|
|
|
250
250
|
## Identity
|
|
251
251
|
|
|
252
|
-
`session.identity` owns the stable identifiers for the conversation: the resource ID
|
|
252
|
+
`session.identity` owns the stable identifiers for the conversation: the resource ID and session `id`, plus an `ownerId`. The `id` and `ownerId` are stable for the life of the session and don't change when the resource ID is switched. They mirror the `id` and `ownerId` fields on `SessionRecord` in storage.
|
|
253
253
|
|
|
254
254
|
### `session.identity.getId()`
|
|
255
255
|
|
|
@@ -309,7 +309,7 @@ The `ResolveResourceIdContext` passed to the function:
|
|
|
309
309
|
|
|
310
310
|
## Thread ID resolution
|
|
311
311
|
|
|
312
|
-
By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself: for example, give the thread the same id as
|
|
312
|
+
By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself: for example, give the thread the same id as its session to match the names your app assigns to threads it creates.
|
|
313
313
|
|
|
314
314
|
The hook runs after `resolveResourceId`, so the resolved owner is available on the context. Like `resolveResourceId` it runs only when a new thread is created: reused threads keep their stored id and never call the hook. The returned id must be unique across the memory store. If it already belongs to an existing thread, Mastra logs a warning and uses a generated id instead so the existing thread is never overwritten. Return `ctx.defaultThreadId` to keep the built-in behavior.
|
|
315
315
|
|
|
@@ -121,7 +121,7 @@ Returns: [`Promise<InngestAgentStreamResult>`](#inngestagentstreamresult)
|
|
|
121
121
|
|
|
122
122
|
#### `resume(runId, resumeData, options?)`
|
|
123
123
|
|
|
124
|
-
Resumes a suspended Inngest run, for example after a tool approval. Loads the workflow snapshot from storage
|
|
124
|
+
Resumes a suspended Inngest run, for example after a tool approval. Loads the workflow snapshot from storage and finds the suspended step before sending a resume event to Inngest.
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
127
|
const { output, cleanup } = await durableAgent.resume(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# AI SDK
|
|
4
4
|
|
|
5
|
-
If you're already using the [Vercel AI SDK](https://sdk.vercel.ai) directly and want to add Mastra capabilities like [processors](https://mastra.ai/docs/agents/processors) or [memory](https://mastra.ai/docs/memory/memory-processors) without switching to the full Mastra agent API, [`withMastra()`](https://mastra.ai/reference/ai-sdk/with-mastra) lets you wrap any AI SDK model with these features. This is useful when you want to keep your existing AI SDK code but add input/output processing
|
|
5
|
+
If you're already using the [Vercel AI SDK](https://sdk.vercel.ai) directly and want to add Mastra capabilities like [processors](https://mastra.ai/docs/agents/processors) or [memory](https://mastra.ai/docs/memory/memory-processors) without switching to the full Mastra agent API, [`withMastra()`](https://mastra.ai/reference/ai-sdk/with-mastra) lets you wrap any AI SDK model with these features. This is useful when you want to keep your existing AI SDK code but add input/output processing and conversation persistence, including content filtering.
|
|
6
6
|
|
|
7
7
|
> **Tip:** If you want to use Mastra together with AI SDK UI (e.g. `useChat()`), visit the [AI SDK UI guide](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui).
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ export const mastra = new Mastra({
|
|
|
26
26
|
|
|
27
27
|
**domain** (`string`): Your Auth0 domain (e.g., your-tenant.auth0.com). This is used to verify JWT tokens issued by your Auth0 tenant. (Default: `process.env.AUTH0_DOMAIN`)
|
|
28
28
|
|
|
29
|
-
**audience** (`string`): Your Auth0 API identifier/audience
|
|
29
|
+
**audience** (`string`): Your Auth0 API identifier/audience, which restricts tokens to your API. (Default: `process.env.AUTH0_AUDIENCE`)
|
|
30
30
|
|
|
31
31
|
**name** (`string`): Custom name for the auth provider instance. (Default: `"auth0"`)
|
|
32
32
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## MastraAuthGoogle class
|
|
6
6
|
|
|
7
|
-
The `MastraAuthGoogle` class provides authentication for Mastra using Google Workspace. It implements an OAuth 2.0 / OIDC login flow with encrypted session cookies
|
|
7
|
+
The `MastraAuthGoogle` class provides authentication for Mastra using Google Workspace. It implements an OAuth 2.0 / OIDC login flow with encrypted session cookies and verifies Google ID tokens. It integrates with the Mastra server through the `auth` option.
|
|
8
8
|
|
|
9
9
|
### Usage example
|
|
10
10
|
|
|
@@ -46,7 +46,7 @@ then interact with elements using their refs (e.g., @e5).`,
|
|
|
46
46
|
|
|
47
47
|
**screencast** (`ScreencastOptions`): Configuration for streaming browser frames to Studio.
|
|
48
48
|
|
|
49
|
-
**recording** (`BrowserRecordingOptions`):
|
|
49
|
+
**recording** (`BrowserRecordingOptions`): Beta option for adding browser recording tools. Provide outputDir to add browser\_record and browser\_record\_caption to the toolset. You can also set maxDurationMs, maxWidth, and maxHeight as defaults for every recording.
|
|
50
50
|
|
|
51
51
|
**excludeTools** (`BrowserToolName[]`): Tool names to exclude from the browser toolset. Use this to disable specific tools for models that do not support certain capabilities, such as vision.
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ then interact with elements using their refs (e.g., @e5).`,
|
|
|
54
54
|
|
|
55
55
|
`AgentBrowser` provides 16 deterministic tools for browser automation. All tools that interact with elements use refs from the accessibility tree snapshot.
|
|
56
56
|
|
|
57
|
-
When `recording` is configured, `AgentBrowser` also adds the
|
|
57
|
+
When `recording` is configured, `AgentBrowser` also adds the Beta `browser_record` and `browser_record_caption` tools. See [Browser recording (Beta)](https://mastra.ai/docs/browser/overview).
|
|
58
58
|
|
|
59
59
|
### Core tools
|
|
60
60
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# BrowserViewer
|
|
4
4
|
|
|
5
|
-
The `BrowserViewer` class provides browser automation for CLI-based tools. It launches Chrome
|
|
5
|
+
The `BrowserViewer` class provides browser automation for CLI-based tools. It launches Chrome through Playwright and exposes a Chrome DevTools Protocol (CDP) URL. It automatically injects that URL into CLI commands run through workspace tools.
|
|
6
6
|
|
|
7
7
|
Use `BrowserViewer` when your agent drives a browser through a CLI tool like `browser-use`, `agent-browser`, or `browse`. For SDK-based browser automation, use [`AgentBrowser`](https://mastra.ai/reference/browser/agent-browser) or [`StagehandBrowser`](https://mastra.ai/reference/browser/stagehand-browser).
|
|
8
8
|
|
|
@@ -63,7 +63,7 @@ Use stagehand_extract to get data from pages.`,
|
|
|
63
63
|
|
|
64
64
|
**screencast** (`ScreencastOptions`): Configuration for streaming browser frames to Studio.
|
|
65
65
|
|
|
66
|
-
**recording** (`BrowserRecordingOptions`):
|
|
66
|
+
**recording** (`BrowserRecordingOptions`): Beta option for adding browser recording tools. Provide outputDir to add browser\_record and browser\_record\_caption to the toolset. You can also set maxDurationMs, maxWidth, and maxHeight as defaults for every recording.
|
|
67
67
|
|
|
68
68
|
**excludeTools** (`StagehandToolName[]`): Tool names to exclude from the browser toolset. Use this to disable specific tools for models that do not support certain capabilities, such as vision.
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@ Use stagehand_extract to get data from pages.`,
|
|
|
71
71
|
|
|
72
72
|
`StagehandBrowser` provides 7 AI-powered tools for browser automation.
|
|
73
73
|
|
|
74
|
-
When `recording` is configured, `StagehandBrowser` also adds the
|
|
74
|
+
When `recording` is configured, `StagehandBrowser` also adds the Beta `browser_record` and `browser_record_caption` tools. See [Browser recording (Beta)](https://mastra.ai/docs/browser/overview).
|
|
75
75
|
|
|
76
76
|
Core tools:
|
|
77
77
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# ChannelProvider
|
|
4
4
|
|
|
5
|
-
`ChannelProvider` is the interface that platform integrations implement to connect agents to a messaging platform. A provider owns the full lifecycle
|
|
5
|
+
`ChannelProvider` is the interface that platform integrations implement to connect agents to a messaging platform. A provider owns the full integration lifecycle. This includes app provisioning with OAuth, webhook routing with event handling, adapter creation and agent wiring, and credential management.
|
|
6
6
|
|
|
7
7
|
Register providers on the `Mastra` constructor under `channels`, keyed by an id you choose. Each provider's routes are merged into the server's API routes automatically, and `initialize()` runs during Mastra startup.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# SlackProvider
|
|
4
4
|
|
|
5
|
-
`SlackProvider` is the managed path for connecting agents to Slack. Register it on `Mastra.channels` and it provisions Slack apps
|
|
5
|
+
`SlackProvider` is the managed path for connecting agents to Slack. Register it on `Mastra.channels` and it provisions Slack apps through the Manifest API and runs the OAuth install flow. It also rotates configuration tokens and routes Slack events to your agents. Use it when you want Mastra to own app creation and installation. For the lower-level path where you create the Slack app and configure scopes and webhooks yourself, use [`createSlackAdapter`](https://mastra.ai/integrations/channels/slack) on the agent's `channels.adapters` instead.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -226,7 +226,7 @@ The content digest excludes `experiment-worker-manifest.json` to avoid a self-re
|
|
|
226
226
|
|
|
227
227
|
The worker implements the pinned experiment companion-worker protocol version `1`. It reads strict UTF-8 NDJSON frames from standard input and requires every frame, including the last one, to end with a newline. Frames larger than 1 MiB, malformed or truncated frames, unsupported protocol or canonicalization versions, and messages that don't match the active experiment correlation are rejected as protocol failures.
|
|
228
228
|
|
|
229
|
-
A run request must match the artifact's embedded build ID and include the ordered dataset item count and SHA-256 attestation. The worker emits contiguous sequence numbers starting at `0`, timer-driven heartbeats, awaited experiment lifecycle events, and exactly one terminal event. Cancellation must match the active protocol version
|
|
229
|
+
A run request must match the artifact's embedded build ID and include the ordered dataset item count and SHA-256 attestation. The worker emits contiguous sequence numbers starting at `0`, timer-driven heartbeats, awaited experiment lifecycle events, and exactly one terminal event. Cancellation must match the active protocol version and experiment ID, plus the job ID, attempt, and idempotency key.
|
|
230
230
|
|
|
231
231
|
Protocol exit codes are:
|
|
232
232
|
|
|
@@ -528,7 +528,7 @@ Emit machine-readable JSON.
|
|
|
528
528
|
|
|
529
529
|
Provisions and attaches a managed database, then polls until it's ready. Provisioning errors are printed with the provider's error detail.
|
|
530
530
|
|
|
531
|
-
By default the database is scoped to a single environment
|
|
531
|
+
By default, the database is scoped to a single environment. Pass an environment argument to select it. If you omit the argument, the CLI uses the project's only environment or prompts you when several are available. In non-interactive contexts (CI, `--json`) an environment argument is required. Pass `--shared` to attach a project-scoped database that's shared by every environment instead.
|
|
532
532
|
|
|
533
533
|
Environment-scoped databases inherit their provider region from the environment. Shared databases accept `--region`.
|
|
534
534
|
|
|
@@ -797,7 +797,7 @@ Lists all environment variables for the linked project. Values are partially mas
|
|
|
797
797
|
|
|
798
798
|
### `mastra server env set`
|
|
799
799
|
|
|
800
|
-
Sets an environment variable. The CLI reads the current map
|
|
800
|
+
Sets an environment variable. The CLI reads the current map and applies the change before uploading the result.
|
|
801
801
|
|
|
802
802
|
```bash
|
|
803
803
|
mastra server env set <key> <value>
|
|
@@ -1226,7 +1226,7 @@ mastra api agent get <agentId>
|
|
|
1226
1226
|
|
|
1227
1227
|
#### `mastra api agent run`
|
|
1228
1228
|
|
|
1229
|
-
Runs an agent with JSON input. Use command help to see examples for text prompts
|
|
1229
|
+
Runs an agent with JSON input. Use command help to see examples for text prompts and chat messages, including memory thread options.
|
|
1230
1230
|
|
|
1231
1231
|
```bash
|
|
1232
1232
|
mastra api agent run <agentId> <input>
|
|
@@ -1370,7 +1370,7 @@ mastra api thread get <threadId>
|
|
|
1370
1370
|
|
|
1371
1371
|
#### `mastra api thread create`
|
|
1372
1372
|
|
|
1373
|
-
Creates a memory thread. Pass one JSON input object
|
|
1373
|
+
Creates a memory thread. Pass one JSON input object. The CLI splits fields such as `agentId` into query parameters when required by the server route.
|
|
1374
1374
|
|
|
1375
1375
|
```bash
|
|
1376
1376
|
mastra api thread create <input>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
6
6
|
|
|
7
|
-
The `mountAgentControllerOnMastra()` function builds the Mastra Code agent controller (the coding agent behind
|
|
7
|
+
The `mountAgentControllerOnMastra()` function builds the Mastra Code agent controller (the coding agent behind [Mastra Code](https://code.mastra.ai), with its modes, tools, memory, and thread management) and registers it on a server-owned [Mastra](https://mastra.ai/reference/core/mastra-class) instance. Use it to serve the Mastra Code agent to your own UI (web app, editor, bot): each client creates or resumes its own isolated session through the returned [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
|
|
8
8
|
|
|
9
9
|
To construct the `Mastra` instance yourself (for example in a deployable entry file), use `prepareAgentControllerMount()` from the same package, which returns the constructor args plus a `finalize()` callback.
|
|
10
10
|
|
|
@@ -74,4 +74,5 @@ const prompt = buildBasePrompt({
|
|
|
74
74
|
|
|
75
75
|
## Related
|
|
76
76
|
|
|
77
|
-
- [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent)
|
|
77
|
+
- [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent)
|
|
78
|
+
- [Mastra Code](https://code.mastra.ai)
|
|
@@ -801,7 +801,7 @@ export const mastra = new Mastra({
|
|
|
801
801
|
|
|
802
802
|
**Type:** `(err: Error, c: Context) => Response | Promise<Response>`
|
|
803
803
|
|
|
804
|
-
Custom error handler called when an unhandled error occurs. Use this to customize error responses
|
|
804
|
+
Custom error handler called when an unhandled error occurs. Use this to customize error responses or log errors to external services such as Sentry. You can also implement custom error formatting.
|
|
805
805
|
|
|
806
806
|
This hook is supported by all server adapters. The `c` parameter provides a Hono-compatible context object: for non-Hono adapters (Koa, Express, Fastify), a shim is provided with commonly used methods like `c.json()` and `c.req.path`.
|
|
807
807
|
|
|
@@ -830,7 +830,7 @@ export const mastra = new Mastra({
|
|
|
830
830
|
|
|
831
831
|
**Type:** `(error: ZodError, context: 'query' | 'body' | 'path') => { status: number; body: unknown } | undefined`
|
|
832
832
|
|
|
833
|
-
Custom handler called when a request fails Zod schema validation. Use this to customize validation error responses
|
|
833
|
+
Custom handler called when a request fails Zod schema validation. Use this to customize validation error responses and change the status code, or to format errors to match your API standards.
|
|
834
834
|
|
|
835
835
|
Return a `{ status, body }` object to override the default `400` response, or `undefined` to use the default behavior. This hook is supported by all server adapters (Hono, Express, Fastify, Koa).
|
|
836
836
|
|
|
@@ -886,7 +886,7 @@ export const mastra = new Mastra({
|
|
|
886
886
|
|
|
887
887
|
Base path for hosting [Studio](https://mastra.ai/docs/studio/overview). Use this to host the Studio on a sub-path of your existing application instead of the root.
|
|
888
888
|
|
|
889
|
-
This is useful when integrating with existing applications
|
|
889
|
+
This is useful when integrating with existing applications or authentication tools such as Cloudflare Zero Trust that benefit from shared domains. It also supports managing multiple services under one domain.
|
|
890
890
|
|
|
891
891
|
```typescript
|
|
892
892
|
import { Mastra } from '@mastra/core'
|
|
@@ -8,7 +8,7 @@ Use `mastra.getAgentById(id)` to retrieve the code-defined agent. Use `await mas
|
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
11
|
-
The following example registers an agent
|
|
11
|
+
The following example registers an agent and retrieves it by ID before using the returned agent.
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Mastra.getWorkflow()
|
|
4
4
|
|
|
5
|
-
The `.getWorkflow()` method is used to retrieve a workflow by its registration key.
|
|
5
|
+
The `.getWorkflow()` method is used to retrieve a workflow by its registration key. The method provides full TypeScript type inference for workflow input and output schemas.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ await run.startAsync({
|
|
|
19
19
|
|
|
20
20
|
## Type inference
|
|
21
21
|
|
|
22
|
-
For best TypeScript support, use `getWorkflow()` with the workflow's **registration key** (the key used when adding the workflow to Mastra).
|
|
22
|
+
For best TypeScript support, use `getWorkflow()` with the workflow's **registration key** (the key used when adding the workflow to Mastra). The registration key provides full type inference for:
|
|
23
23
|
|
|
24
24
|
- Input data schemas
|
|
25
25
|
- Output data schemas
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The `Mastra` class is the central orchestrator in any Mastra application, managing agents, workflows, storage, logging, observability, and more. Typically, you create a single instance of `Mastra` to coordinate your application.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`Mastra` is the top-level registry where you register agents, workflows, tools, and other components that need to be accessible throughout your application.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -50,7 +50,7 @@ export const mastra = new Mastra({
|
|
|
50
50
|
- `target?: 'serverless' | 'edge'`: Deploy target for Netlify. Defaults to `'serverless'`.
|
|
51
51
|
|
|
52
52
|
- `'serverless'`: Standard [Netlify Functions](https://docs.netlify.com/functions/overview/) (Node.js runtime, 60s default timeout).
|
|
53
|
-
- `'edge'`: [Netlify Edge Functions](https://docs.netlify.com/build/edge-functions/overview/) (Deno-based runtime
|
|
53
|
+
- `'edge'`: [Netlify Edge Functions](https://docs.netlify.com/build/edge-functions/overview/) (Deno-based runtime that runs at the edge closest to users without a fixed timeout).
|
|
54
54
|
|
|
55
55
|
### Edge functions example
|
|
56
56
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Deployer
|
|
4
4
|
|
|
5
|
-
The Deployer handles the deployment of standalone Mastra applications by packaging code
|
|
5
|
+
The Deployer handles the deployment of standalone Mastra applications by packaging code and managing environment files while serving applications through the Hono framework. Concrete implementations must define the deploy method for specific deployment targets.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Prompt blocks
|
|
4
4
|
|
|
5
|
-
Prompt blocks are reusable instruction templates managed by Editor. An agent's instructions can combine inline text
|
|
5
|
+
Prompt blocks are reusable instruction templates managed by Editor. An agent's instructions can combine inline text with embedded prompt blocks and references to independently versioned prompt blocks.
|
|
6
6
|
|
|
7
7
|
See [Prompt blocks](https://mastra.ai/docs/editor/overview) for the Studio workflow and common uses.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Tool configuration
|
|
4
4
|
|
|
5
|
-
Editor stores tool selections as part of an agent version. A stored configuration can add registered tools
|
|
5
|
+
Editor stores tool selections as part of an agent version. A stored configuration can add registered tools and tools from integration providers, as well as tools from Model Context Protocol (MCP) clients.
|
|
6
6
|
|
|
7
7
|
See [Editor tools](https://mastra.ai/docs/editor/overview) for the Studio workflow and common uses.
|
|
8
8
|
|
|
@@ -177,7 +177,7 @@ Include in your test harness to:
|
|
|
177
177
|
|
|
178
178
|
- Benchmark different models' noise resistance before deployment
|
|
179
179
|
- Identify agents vulnerable to manipulation during development
|
|
180
|
-
- Create detailed test coverage for
|
|
180
|
+
- Create detailed test coverage for multiple noise types
|
|
181
181
|
- Ensure consistent behavior across updates
|
|
182
182
|
|
|
183
183
|
### Security Testing
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Summarization scorer
|
|
4
4
|
|
|
5
|
-
The `createSummarizationScorer()` function creates a scorer that evaluates a summary on two axes: whether every claim
|
|
5
|
+
The `createSummarizationScorer()` function creates a scorer that evaluates a summary on two axes: whether every claim has source-text support and whether the summary preserves the source information. The final score is the lower of the two. A summary can't pass by being faithful but empty or by being thorough but wrong.
|
|
6
6
|
|
|
7
7
|
The summary is the agent's last message that carries text, and the source text defaults to the first user message of the run input. Pass `source` or `sourceExtractor` when the text being summarized lives somewhere else, such as a tool result.
|
|
8
8
|
|