@mastra/mcp-docs-server 1.1.5 → 1.1.6
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/adding-voice.md +349 -0
- package/.docs/docs/agents/agent-approval.md +558 -0
- package/.docs/docs/agents/agent-memory.md +209 -0
- package/.docs/docs/agents/guardrails.md +374 -0
- package/.docs/docs/agents/network-approval.md +275 -0
- package/.docs/docs/agents/networks.md +299 -0
- package/.docs/docs/agents/overview.md +304 -0
- package/.docs/docs/agents/processors.md +622 -0
- package/.docs/docs/agents/structured-output.md +273 -0
- package/.docs/docs/agents/supervisor-agents.md +304 -0
- package/.docs/docs/agents/using-tools.md +214 -0
- package/.docs/docs/build-with-ai/mcp-docs-server.md +238 -0
- package/.docs/docs/build-with-ai/skills.md +35 -0
- package/.docs/docs/community/contributing-templates.md +3 -0
- package/.docs/docs/community/discord.md +9 -0
- package/.docs/docs/community/licensing.md +66 -0
- package/.docs/docs/deployment/cloud-providers.md +15 -0
- package/.docs/docs/deployment/mastra-server.md +122 -0
- package/.docs/docs/deployment/monorepo.md +142 -0
- package/.docs/docs/deployment/overview.md +62 -0
- package/.docs/docs/deployment/studio.md +239 -0
- package/.docs/docs/deployment/web-framework.md +52 -0
- package/.docs/docs/deployment/workflow-runners.md +9 -0
- package/.docs/docs/evals/built-in-scorers.md +47 -0
- package/.docs/docs/evals/custom-scorers.md +519 -0
- package/.docs/docs/evals/overview.md +141 -0
- package/.docs/docs/evals/running-in-ci.md +124 -0
- package/.docs/docs/getting-started/build-with-ai.md +68 -0
- package/.docs/docs/getting-started/manual-install.md +226 -0
- package/.docs/docs/getting-started/project-structure.md +60 -0
- package/.docs/docs/getting-started/start.md +28 -0
- package/.docs/docs/getting-started/studio.md +101 -0
- package/.docs/docs/index.md +43 -0
- package/.docs/docs/mastra-cloud/deployment.md +77 -0
- package/.docs/docs/mastra-cloud/observability.md +38 -0
- package/.docs/docs/mastra-cloud/overview.md +23 -0
- package/.docs/docs/mastra-cloud/setup.md +42 -0
- package/.docs/docs/mastra-cloud/studio.md +24 -0
- package/.docs/docs/mastra-code/configuration.md +299 -0
- package/.docs/docs/mastra-code/customization.md +228 -0
- package/.docs/docs/mastra-code/modes.md +104 -0
- package/.docs/docs/mastra-code/overview.md +135 -0
- package/.docs/docs/mastra-code/tools.md +229 -0
- package/.docs/docs/mcp/overview.md +373 -0
- package/.docs/docs/mcp/publishing-mcp-server.md +95 -0
- package/.docs/docs/memory/memory-processors.md +314 -0
- package/.docs/docs/memory/message-history.md +260 -0
- package/.docs/docs/memory/observational-memory.md +248 -0
- package/.docs/docs/memory/overview.md +45 -0
- package/.docs/docs/memory/semantic-recall.md +272 -0
- package/.docs/docs/memory/storage.md +261 -0
- package/.docs/docs/memory/working-memory.md +400 -0
- package/.docs/docs/observability/datasets/overview.md +198 -0
- package/.docs/docs/observability/datasets/running-experiments.md +274 -0
- package/.docs/docs/observability/logging.md +99 -0
- package/.docs/docs/observability/overview.md +70 -0
- package/.docs/docs/observability/tracing/bridges/otel.md +209 -0
- package/.docs/docs/observability/tracing/exporters/arize.md +272 -0
- package/.docs/docs/observability/tracing/exporters/braintrust.md +111 -0
- package/.docs/docs/observability/tracing/exporters/cloud.md +127 -0
- package/.docs/docs/observability/tracing/exporters/datadog.md +187 -0
- package/.docs/docs/observability/tracing/exporters/default.md +209 -0
- package/.docs/docs/observability/tracing/exporters/laminar.md +100 -0
- package/.docs/docs/observability/tracing/exporters/langfuse.md +213 -0
- package/.docs/docs/observability/tracing/exporters/langsmith.md +198 -0
- package/.docs/docs/observability/tracing/exporters/otel.md +476 -0
- package/.docs/docs/observability/tracing/exporters/posthog.md +148 -0
- package/.docs/docs/observability/tracing/exporters/sentry.md +208 -0
- package/.docs/docs/observability/tracing/overview.md +1112 -0
- package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +300 -0
- package/.docs/docs/rag/chunking-and-embedding.md +183 -0
- package/.docs/docs/rag/graph-rag.md +215 -0
- package/.docs/docs/rag/overview.md +72 -0
- package/.docs/docs/rag/retrieval.md +515 -0
- package/.docs/docs/rag/vector-databases.md +645 -0
- package/.docs/docs/server/auth/auth0.md +220 -0
- package/.docs/docs/server/auth/better-auth.md +203 -0
- package/.docs/docs/server/auth/clerk.md +132 -0
- package/.docs/docs/server/auth/composite-auth.md +234 -0
- package/.docs/docs/server/auth/custom-auth-provider.md +513 -0
- package/.docs/docs/server/auth/firebase.md +272 -0
- package/.docs/docs/server/auth/jwt.md +110 -0
- package/.docs/docs/server/auth/simple-auth.md +180 -0
- package/.docs/docs/server/auth/supabase.md +117 -0
- package/.docs/docs/server/auth/workos.md +186 -0
- package/.docs/docs/server/auth.md +38 -0
- package/.docs/docs/server/custom-adapters.md +378 -0
- package/.docs/docs/server/custom-api-routes.md +267 -0
- package/.docs/docs/server/mastra-client.md +243 -0
- package/.docs/docs/server/mastra-server.md +71 -0
- package/.docs/docs/server/middleware.md +225 -0
- package/.docs/docs/server/request-context.md +471 -0
- package/.docs/docs/server/server-adapters.md +547 -0
- package/.docs/docs/streaming/events.md +237 -0
- package/.docs/docs/streaming/overview.md +175 -0
- package/.docs/docs/streaming/tool-streaming.md +175 -0
- package/.docs/docs/streaming/workflow-streaming.md +109 -0
- package/.docs/docs/voice/overview.md +959 -0
- package/.docs/docs/voice/speech-to-speech.md +102 -0
- package/.docs/docs/voice/speech-to-text.md +79 -0
- package/.docs/docs/voice/text-to-speech.md +83 -0
- package/.docs/docs/workflows/agents-and-tools.md +166 -0
- package/.docs/docs/workflows/control-flow.md +822 -0
- package/.docs/docs/workflows/error-handling.md +360 -0
- package/.docs/docs/workflows/human-in-the-loop.md +215 -0
- package/.docs/docs/workflows/overview.md +370 -0
- package/.docs/docs/workflows/snapshots.md +238 -0
- package/.docs/docs/workflows/suspend-and-resume.md +205 -0
- package/.docs/docs/workflows/time-travel.md +309 -0
- package/.docs/docs/workflows/workflow-state.md +181 -0
- package/.docs/docs/workspace/filesystem.md +164 -0
- package/.docs/docs/workspace/overview.md +239 -0
- package/.docs/docs/workspace/sandbox.md +63 -0
- package/.docs/docs/workspace/search.md +243 -0
- package/.docs/docs/workspace/skills.md +169 -0
- package/.docs/guides/agent-frameworks/ai-sdk.md +140 -0
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +1499 -0
- package/.docs/guides/build-your-ui/assistant-ui.md +156 -0
- package/.docs/guides/build-your-ui/copilotkit.md +289 -0
- package/.docs/guides/deployment/amazon-ec2.md +130 -0
- package/.docs/guides/deployment/aws-lambda.md +248 -0
- package/.docs/guides/deployment/azure-app-services.md +114 -0
- package/.docs/guides/deployment/cloudflare.md +99 -0
- package/.docs/guides/deployment/digital-ocean.md +168 -0
- package/.docs/guides/deployment/inngest.md +682 -0
- package/.docs/guides/deployment/netlify.md +77 -0
- package/.docs/guides/deployment/vercel.md +101 -0
- package/.docs/guides/getting-started/astro.md +398 -0
- package/.docs/guides/getting-started/electron.md +504 -0
- package/.docs/guides/getting-started/express.md +251 -0
- package/.docs/guides/getting-started/hono.md +190 -0
- package/.docs/guides/getting-started/next-js.md +347 -0
- package/.docs/guides/getting-started/nuxt.md +497 -0
- package/.docs/guides/getting-started/quickstart.md +67 -0
- package/.docs/guides/getting-started/sveltekit.md +296 -0
- package/.docs/guides/getting-started/vite-react.md +425 -0
- package/.docs/guides/guide/ai-recruiter.md +226 -0
- package/.docs/guides/guide/chef-michel.md +211 -0
- package/.docs/guides/guide/code-review-bot.md +226 -0
- package/.docs/guides/guide/dev-assistant.md +307 -0
- package/.docs/guides/guide/docs-manager.md +238 -0
- package/.docs/guides/guide/github-actions-pr-description.md +236 -0
- package/.docs/guides/guide/notes-mcp-server.md +416 -0
- package/.docs/guides/guide/research-assistant.md +348 -0
- package/.docs/guides/guide/research-coordinator.md +416 -0
- package/.docs/guides/guide/stock-agent.md +132 -0
- package/.docs/guides/guide/web-search.md +320 -0
- package/.docs/guides/guide/whatsapp-chat-bot.md +405 -0
- package/.docs/guides/index.md +3 -0
- package/.docs/guides/migrations/agentnetwork.md +97 -0
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +112 -0
- package/.docs/guides/migrations/network-to-supervisor.md +261 -0
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +404 -0
- package/.docs/guides/migrations/upgrade-to-v1/cli.md +57 -0
- package/.docs/guides/migrations/upgrade-to-v1/client.md +337 -0
- package/.docs/guides/migrations/upgrade-to-v1/deployment.md +37 -0
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +239 -0
- package/.docs/guides/migrations/upgrade-to-v1/mastra.md +143 -0
- package/.docs/guides/migrations/upgrade-to-v1/mcp.md +97 -0
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +285 -0
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +119 -0
- package/.docs/guides/migrations/upgrade-to-v1/processors.md +68 -0
- package/.docs/guides/migrations/upgrade-to-v1/rag.md +42 -0
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +553 -0
- package/.docs/guides/migrations/upgrade-to-v1/tools.md +180 -0
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +412 -0
- package/.docs/guides/migrations/upgrade-to-v1/vectors.md +87 -0
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +30 -0
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +341 -0
- package/.docs/guides/migrations/vnext-to-standard-apis.md +362 -0
- package/.docs/models/embeddings.md +161 -0
- package/.docs/models/gateways/azure-openai.md +128 -0
- package/.docs/models/gateways/custom-gateways.md +545 -0
- package/.docs/models/gateways/netlify.md +88 -0
- package/.docs/models/gateways/openrouter.md +219 -0
- package/.docs/models/gateways/vercel.md +225 -0
- package/.docs/models/gateways.md +14 -0
- package/.docs/models/index.md +286 -0
- package/.docs/models/providers/302ai.md +134 -0
- package/.docs/models/providers/abacus.md +125 -0
- package/.docs/models/providers/agentrouter.md +90 -0
- package/.docs/models/providers/aihubmix.md +107 -0
- package/.docs/models/providers/alibaba-cn.md +135 -0
- package/.docs/models/providers/alibaba.md +111 -0
- package/.docs/models/providers/amazon-bedrock.md +33 -0
- package/.docs/models/providers/anthropic.md +153 -0
- package/.docs/models/providers/azure.md +33 -0
- package/.docs/models/providers/bailing.md +72 -0
- package/.docs/models/providers/baseten.md +77 -0
- package/.docs/models/providers/berget.md +78 -0
- package/.docs/models/providers/cerebras.md +101 -0
- package/.docs/models/providers/chutes.md +136 -0
- package/.docs/models/providers/cloudflare-ai-gateway.md +33 -0
- package/.docs/models/providers/cloudflare-workers-ai.md +109 -0
- package/.docs/models/providers/cohere.md +33 -0
- package/.docs/models/providers/cortecs.md +91 -0
- package/.docs/models/providers/deepinfra.md +112 -0
- package/.docs/models/providers/deepseek.md +88 -0
- package/.docs/models/providers/fastrouter.md +84 -0
- package/.docs/models/providers/fireworks-ai.md +89 -0
- package/.docs/models/providers/firmware.md +85 -0
- package/.docs/models/providers/friendli.md +78 -0
- package/.docs/models/providers/github-models.md +125 -0
- package/.docs/models/providers/google-vertex.md +33 -0
- package/.docs/models/providers/google.md +159 -0
- package/.docs/models/providers/groq.md +107 -0
- package/.docs/models/providers/helicone.md +161 -0
- package/.docs/models/providers/huggingface.md +90 -0
- package/.docs/models/providers/iflowcn.md +84 -0
- package/.docs/models/providers/inception.md +72 -0
- package/.docs/models/providers/inference.md +79 -0
- package/.docs/models/providers/io-intelligence.md +87 -0
- package/.docs/models/providers/io-net.md +87 -0
- package/.docs/models/providers/jiekou.md +131 -0
- package/.docs/models/providers/kilo.md +333 -0
- package/.docs/models/providers/kimi-for-coding.md +100 -0
- package/.docs/models/providers/kuae-cloud-coding-plan.md +71 -0
- package/.docs/models/providers/llama.md +77 -0
- package/.docs/models/providers/lmstudio.md +73 -0
- package/.docs/models/providers/lucidquery.md +72 -0
- package/.docs/models/providers/minimax-cn-coding-plan.md +102 -0
- package/.docs/models/providers/minimax-cn.md +102 -0
- package/.docs/models/providers/minimax-coding-plan.md +102 -0
- package/.docs/models/providers/minimax.md +104 -0
- package/.docs/models/providers/mistral.md +124 -0
- package/.docs/models/providers/moark.md +72 -0
- package/.docs/models/providers/modelscope.md +77 -0
- package/.docs/models/providers/moonshotai-cn.md +76 -0
- package/.docs/models/providers/moonshotai.md +76 -0
- package/.docs/models/providers/morph.md +73 -0
- package/.docs/models/providers/nano-gpt.md +103 -0
- package/.docs/models/providers/nebius.md +116 -0
- package/.docs/models/providers/nova.md +72 -0
- package/.docs/models/providers/novita-ai.md +154 -0
- package/.docs/models/providers/nvidia.md +141 -0
- package/.docs/models/providers/ollama-cloud.md +103 -0
- package/.docs/models/providers/ollama.md +33 -0
- package/.docs/models/providers/openai.md +193 -0
- package/.docs/models/providers/opencode.md +100 -0
- package/.docs/models/providers/ovhcloud.md +83 -0
- package/.docs/models/providers/perplexity.md +100 -0
- package/.docs/models/providers/poe.md +183 -0
- package/.docs/models/providers/privatemode-ai.md +75 -0
- package/.docs/models/providers/requesty.md +90 -0
- package/.docs/models/providers/scaleway.md +84 -0
- package/.docs/models/providers/siliconflow-cn.md +138 -0
- package/.docs/models/providers/siliconflow.md +140 -0
- package/.docs/models/providers/stackit.md +78 -0
- package/.docs/models/providers/stepfun.md +73 -0
- package/.docs/models/providers/submodel.md +79 -0
- package/.docs/models/providers/synthetic.md +96 -0
- package/.docs/models/providers/togetherai.md +115 -0
- package/.docs/models/providers/upstage.md +73 -0
- package/.docs/models/providers/venice.md +95 -0
- package/.docs/models/providers/vivgrid.md +106 -0
- package/.docs/models/providers/vultr.md +75 -0
- package/.docs/models/providers/wandb.md +80 -0
- package/.docs/models/providers/xai.md +141 -0
- package/.docs/models/providers/xiaomi.md +71 -0
- package/.docs/models/providers/zai-coding-plan.md +80 -0
- package/.docs/models/providers/zai.md +79 -0
- package/.docs/models/providers/zenmux.md +161 -0
- package/.docs/models/providers/zhipuai-coding-plan.md +79 -0
- package/.docs/models/providers/zhipuai.md +79 -0
- package/.docs/models/providers.md +81 -0
- package/.docs/reference/agents/agent.md +141 -0
- package/.docs/reference/agents/generate.md +186 -0
- package/.docs/reference/agents/generateLegacy.md +173 -0
- package/.docs/reference/agents/getDefaultGenerateOptions.md +36 -0
- package/.docs/reference/agents/getDefaultOptions.md +34 -0
- package/.docs/reference/agents/getDefaultStreamOptions.md +36 -0
- package/.docs/reference/agents/getDescription.md +21 -0
- package/.docs/reference/agents/getInstructions.md +34 -0
- package/.docs/reference/agents/getLLM.md +37 -0
- package/.docs/reference/agents/getMemory.md +34 -0
- package/.docs/reference/agents/getModel.md +34 -0
- package/.docs/reference/agents/getTools.md +29 -0
- package/.docs/reference/agents/getVoice.md +34 -0
- package/.docs/reference/agents/listAgents.md +35 -0
- package/.docs/reference/agents/listScorers.md +34 -0
- package/.docs/reference/agents/listTools.md +34 -0
- package/.docs/reference/agents/listWorkflows.md +34 -0
- package/.docs/reference/agents/network.md +133 -0
- package/.docs/reference/ai-sdk/chat-route.md +82 -0
- package/.docs/reference/ai-sdk/handle-chat-stream.md +53 -0
- package/.docs/reference/ai-sdk/handle-network-stream.md +37 -0
- package/.docs/reference/ai-sdk/handle-workflow-stream.md +55 -0
- package/.docs/reference/ai-sdk/network-route.md +74 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +231 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +79 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +76 -0
- package/.docs/reference/ai-sdk/with-mastra.md +59 -0
- package/.docs/reference/ai-sdk/workflow-route.md +79 -0
- package/.docs/reference/auth/auth0.md +73 -0
- package/.docs/reference/auth/better-auth.md +71 -0
- package/.docs/reference/auth/clerk.md +36 -0
- package/.docs/reference/auth/firebase.md +80 -0
- package/.docs/reference/auth/jwt.md +26 -0
- package/.docs/reference/auth/supabase.md +33 -0
- package/.docs/reference/auth/workos.md +84 -0
- package/.docs/reference/cli/create-mastra.md +137 -0
- package/.docs/reference/cli/mastra.md +336 -0
- package/.docs/reference/client-js/agents.md +437 -0
- package/.docs/reference/client-js/error-handling.md +16 -0
- package/.docs/reference/client-js/logs.md +24 -0
- package/.docs/reference/client-js/mastra-client.md +63 -0
- package/.docs/reference/client-js/memory.md +221 -0
- package/.docs/reference/client-js/observability.md +72 -0
- package/.docs/reference/client-js/telemetry.md +20 -0
- package/.docs/reference/client-js/tools.md +44 -0
- package/.docs/reference/client-js/vectors.md +79 -0
- package/.docs/reference/client-js/workflows.md +199 -0
- package/.docs/reference/configuration.md +752 -0
- package/.docs/reference/core/addGateway.md +42 -0
- package/.docs/reference/core/getAgent.md +21 -0
- package/.docs/reference/core/getAgentById.md +21 -0
- package/.docs/reference/core/getDeployer.md +22 -0
- package/.docs/reference/core/getGateway.md +38 -0
- package/.docs/reference/core/getGatewayById.md +41 -0
- package/.docs/reference/core/getLogger.md +22 -0
- package/.docs/reference/core/getMCPServer.md +47 -0
- package/.docs/reference/core/getMCPServerById.md +55 -0
- package/.docs/reference/core/getMemory.md +50 -0
- package/.docs/reference/core/getScorer.md +54 -0
- package/.docs/reference/core/getScorerById.md +54 -0
- package/.docs/reference/core/getServer.md +22 -0
- package/.docs/reference/core/getStorage.md +22 -0
- package/.docs/reference/core/getStoredAgentById.md +89 -0
- package/.docs/reference/core/getTelemetry.md +22 -0
- package/.docs/reference/core/getVector.md +22 -0
- package/.docs/reference/core/getWorkflow.md +42 -0
- package/.docs/reference/core/listAgents.md +21 -0
- package/.docs/reference/core/listGateways.md +40 -0
- package/.docs/reference/core/listLogs.md +38 -0
- package/.docs/reference/core/listLogsByRunId.md +36 -0
- package/.docs/reference/core/listMCPServers.md +55 -0
- package/.docs/reference/core/listMemory.md +56 -0
- package/.docs/reference/core/listScorers.md +29 -0
- package/.docs/reference/core/listStoredAgents.md +93 -0
- package/.docs/reference/core/listVectors.md +22 -0
- package/.docs/reference/core/listWorkflows.md +21 -0
- package/.docs/reference/core/mastra-class.md +66 -0
- package/.docs/reference/core/mastra-model-gateway.md +153 -0
- package/.docs/reference/core/setLogger.md +26 -0
- package/.docs/reference/core/setStorage.md +27 -0
- package/.docs/reference/datasets/addItem.md +37 -0
- package/.docs/reference/datasets/addItems.md +35 -0
- package/.docs/reference/datasets/compareExperiments.md +52 -0
- package/.docs/reference/datasets/create.md +51 -0
- package/.docs/reference/datasets/dataset.md +82 -0
- package/.docs/reference/datasets/datasets-manager.md +94 -0
- package/.docs/reference/datasets/delete.md +25 -0
- package/.docs/reference/datasets/deleteExperiment.md +27 -0
- package/.docs/reference/datasets/deleteItem.md +27 -0
- package/.docs/reference/datasets/deleteItems.md +29 -0
- package/.docs/reference/datasets/get.md +31 -0
- package/.docs/reference/datasets/getDetails.md +47 -0
- package/.docs/reference/datasets/getExperiment.md +30 -0
- package/.docs/reference/datasets/getItem.md +33 -0
- package/.docs/reference/datasets/getItemHistory.md +31 -0
- package/.docs/reference/datasets/list.md +31 -0
- package/.docs/reference/datasets/listExperimentResults.md +39 -0
- package/.docs/reference/datasets/listExperiments.md +33 -0
- package/.docs/reference/datasets/listItems.md +46 -0
- package/.docs/reference/datasets/listVersions.md +33 -0
- package/.docs/reference/datasets/startExperiment.md +62 -0
- package/.docs/reference/datasets/startExperimentAsync.md +43 -0
- package/.docs/reference/datasets/update.md +48 -0
- package/.docs/reference/datasets/updateItem.md +38 -0
- package/.docs/reference/deployer/cloudflare.md +79 -0
- package/.docs/reference/deployer/netlify.md +80 -0
- package/.docs/reference/deployer/vercel.md +91 -0
- package/.docs/reference/deployer.md +100 -0
- package/.docs/reference/evals/answer-relevancy.md +105 -0
- package/.docs/reference/evals/answer-similarity.md +99 -0
- package/.docs/reference/evals/bias.md +120 -0
- package/.docs/reference/evals/completeness.md +136 -0
- package/.docs/reference/evals/content-similarity.md +101 -0
- package/.docs/reference/evals/context-precision.md +196 -0
- package/.docs/reference/evals/context-relevance.md +531 -0
- package/.docs/reference/evals/create-scorer.md +270 -0
- package/.docs/reference/evals/faithfulness.md +114 -0
- package/.docs/reference/evals/hallucination.md +213 -0
- package/.docs/reference/evals/keyword-coverage.md +128 -0
- package/.docs/reference/evals/mastra-scorer.md +123 -0
- package/.docs/reference/evals/noise-sensitivity.md +675 -0
- package/.docs/reference/evals/prompt-alignment.md +614 -0
- package/.docs/reference/evals/run-evals.md +179 -0
- package/.docs/reference/evals/scorer-utils.md +326 -0
- package/.docs/reference/evals/textual-difference.md +113 -0
- package/.docs/reference/evals/tone-consistency.md +119 -0
- package/.docs/reference/evals/tool-call-accuracy.md +533 -0
- package/.docs/reference/evals/toxicity.md +123 -0
- package/.docs/reference/harness/harness-class.md +708 -0
- package/.docs/reference/index.md +277 -0
- package/.docs/reference/logging/pino-logger.md +117 -0
- package/.docs/reference/mastra-code/createMastraCode.md +108 -0
- package/.docs/reference/memory/clone-utilities.md +199 -0
- package/.docs/reference/memory/cloneThread.md +130 -0
- package/.docs/reference/memory/createThread.md +68 -0
- package/.docs/reference/memory/deleteMessages.md +38 -0
- package/.docs/reference/memory/getThreadById.md +24 -0
- package/.docs/reference/memory/listThreads.md +145 -0
- package/.docs/reference/memory/memory-class.md +147 -0
- package/.docs/reference/memory/observational-memory.md +565 -0
- package/.docs/reference/memory/recall.md +91 -0
- package/.docs/reference/observability/tracing/bridges/otel.md +131 -0
- package/.docs/reference/observability/tracing/configuration.md +178 -0
- package/.docs/reference/observability/tracing/exporters/arize.md +141 -0
- package/.docs/reference/observability/tracing/exporters/braintrust.md +93 -0
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +163 -0
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +138 -0
- package/.docs/reference/observability/tracing/exporters/datadog.md +116 -0
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +174 -0
- package/.docs/reference/observability/tracing/exporters/laminar.md +78 -0
- package/.docs/reference/observability/tracing/exporters/langfuse.md +134 -0
- package/.docs/reference/observability/tracing/exporters/langsmith.md +108 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +199 -0
- package/.docs/reference/observability/tracing/exporters/posthog.md +92 -0
- package/.docs/reference/observability/tracing/exporters/sentry.md +184 -0
- package/.docs/reference/observability/tracing/instances.md +107 -0
- package/.docs/reference/observability/tracing/interfaces.md +743 -0
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +144 -0
- package/.docs/reference/observability/tracing/spans.md +224 -0
- package/.docs/reference/processors/batch-parts-processor.md +61 -0
- package/.docs/reference/processors/language-detector.md +82 -0
- package/.docs/reference/processors/message-history-processor.md +85 -0
- package/.docs/reference/processors/moderation-processor.md +104 -0
- package/.docs/reference/processors/pii-detector.md +108 -0
- package/.docs/reference/processors/processor-interface.md +521 -0
- package/.docs/reference/processors/prompt-injection-detector.md +72 -0
- package/.docs/reference/processors/semantic-recall-processor.md +117 -0
- package/.docs/reference/processors/system-prompt-scrubber.md +80 -0
- package/.docs/reference/processors/token-limiter-processor.md +115 -0
- package/.docs/reference/processors/tool-call-filter.md +85 -0
- package/.docs/reference/processors/tool-search-processor.md +111 -0
- package/.docs/reference/processors/unicode-normalizer.md +62 -0
- package/.docs/reference/processors/working-memory-processor.md +152 -0
- package/.docs/reference/rag/chunk.md +221 -0
- package/.docs/reference/rag/database-config.md +261 -0
- package/.docs/reference/rag/document.md +114 -0
- package/.docs/reference/rag/embeddings.md +92 -0
- package/.docs/reference/rag/extract-params.md +168 -0
- package/.docs/reference/rag/graph-rag.md +111 -0
- package/.docs/reference/rag/metadata-filters.md +216 -0
- package/.docs/reference/rag/rerank.md +75 -0
- package/.docs/reference/rag/rerankWithScorer.md +80 -0
- package/.docs/reference/server/create-route.md +262 -0
- package/.docs/reference/server/express-adapter.md +176 -0
- package/.docs/reference/server/fastify-adapter.md +90 -0
- package/.docs/reference/server/hono-adapter.md +162 -0
- package/.docs/reference/server/koa-adapter.md +127 -0
- package/.docs/reference/server/mastra-server.md +298 -0
- package/.docs/reference/server/register-api-route.md +249 -0
- package/.docs/reference/server/routes.md +306 -0
- package/.docs/reference/storage/cloudflare-d1.md +218 -0
- package/.docs/reference/storage/cloudflare.md +88 -0
- package/.docs/reference/storage/composite.md +235 -0
- package/.docs/reference/storage/convex.md +161 -0
- package/.docs/reference/storage/dynamodb.md +282 -0
- package/.docs/reference/storage/lance.md +131 -0
- package/.docs/reference/storage/libsql.md +135 -0
- package/.docs/reference/storage/mongodb.md +262 -0
- package/.docs/reference/storage/mssql.md +157 -0
- package/.docs/reference/storage/overview.md +121 -0
- package/.docs/reference/storage/postgresql.md +526 -0
- package/.docs/reference/storage/upstash.md +160 -0
- package/.docs/reference/streaming/ChunkType.md +292 -0
- package/.docs/reference/streaming/agents/MastraModelOutput.md +182 -0
- package/.docs/reference/streaming/agents/stream.md +221 -0
- package/.docs/reference/streaming/agents/streamLegacy.md +142 -0
- package/.docs/reference/streaming/workflows/observeStream.md +42 -0
- package/.docs/reference/streaming/workflows/resumeStream.md +61 -0
- package/.docs/reference/streaming/workflows/stream.md +88 -0
- package/.docs/reference/streaming/workflows/timeTravelStream.md +142 -0
- package/.docs/reference/templates/overview.md +194 -0
- package/.docs/reference/tools/create-tool.md +237 -0
- package/.docs/reference/tools/document-chunker-tool.md +89 -0
- package/.docs/reference/tools/graph-rag-tool.md +182 -0
- package/.docs/reference/tools/mcp-client.md +954 -0
- package/.docs/reference/tools/mcp-server.md +1271 -0
- package/.docs/reference/tools/vector-query-tool.md +459 -0
- package/.docs/reference/vectors/astra.md +121 -0
- package/.docs/reference/vectors/chroma.md +264 -0
- package/.docs/reference/vectors/convex.md +300 -0
- package/.docs/reference/vectors/couchbase.md +226 -0
- package/.docs/reference/vectors/duckdb.md +318 -0
- package/.docs/reference/vectors/elasticsearch.md +189 -0
- package/.docs/reference/vectors/lance.md +220 -0
- package/.docs/reference/vectors/libsql.md +305 -0
- package/.docs/reference/vectors/mongodb.md +295 -0
- package/.docs/reference/vectors/opensearch.md +99 -0
- package/.docs/reference/vectors/pg.md +408 -0
- package/.docs/reference/vectors/pinecone.md +168 -0
- package/.docs/reference/vectors/qdrant.md +222 -0
- package/.docs/reference/vectors/s3vectors.md +277 -0
- package/.docs/reference/vectors/turbopuffer.md +157 -0
- package/.docs/reference/vectors/upstash.md +294 -0
- package/.docs/reference/vectors/vectorize.md +147 -0
- package/.docs/reference/voice/azure.md +148 -0
- package/.docs/reference/voice/cloudflare.md +83 -0
- package/.docs/reference/voice/composite-voice.md +121 -0
- package/.docs/reference/voice/deepgram.md +79 -0
- package/.docs/reference/voice/elevenlabs.md +98 -0
- package/.docs/reference/voice/google-gemini-live.md +378 -0
- package/.docs/reference/voice/google.md +228 -0
- package/.docs/reference/voice/mastra-voice.md +311 -0
- package/.docs/reference/voice/murf.md +122 -0
- package/.docs/reference/voice/openai-realtime.md +203 -0
- package/.docs/reference/voice/openai.md +88 -0
- package/.docs/reference/voice/playai.md +80 -0
- package/.docs/reference/voice/sarvam.md +126 -0
- package/.docs/reference/voice/speechify.md +75 -0
- package/.docs/reference/voice/voice.addInstructions.md +55 -0
- package/.docs/reference/voice/voice.addTools.md +67 -0
- package/.docs/reference/voice/voice.answer.md +54 -0
- package/.docs/reference/voice/voice.close.md +51 -0
- package/.docs/reference/voice/voice.connect.md +94 -0
- package/.docs/reference/voice/voice.events.md +37 -0
- package/.docs/reference/voice/voice.getSpeakers.md +129 -0
- package/.docs/reference/voice/voice.listen.md +164 -0
- package/.docs/reference/voice/voice.off.md +54 -0
- package/.docs/reference/voice/voice.on.md +111 -0
- package/.docs/reference/voice/voice.send.md +65 -0
- package/.docs/reference/voice/voice.speak.md +157 -0
- package/.docs/reference/voice/voice.updateConfig.md +60 -0
- package/.docs/reference/workflows/run-methods/cancel.md +86 -0
- package/.docs/reference/workflows/run-methods/restart.md +33 -0
- package/.docs/reference/workflows/run-methods/resume.md +59 -0
- package/.docs/reference/workflows/run-methods/start.md +58 -0
- package/.docs/reference/workflows/run-methods/startAsync.md +67 -0
- package/.docs/reference/workflows/run-methods/timeTravel.md +142 -0
- package/.docs/reference/workflows/run.md +59 -0
- package/.docs/reference/workflows/step.md +119 -0
- package/.docs/reference/workflows/workflow-methods/branch.md +25 -0
- package/.docs/reference/workflows/workflow-methods/commit.md +17 -0
- package/.docs/reference/workflows/workflow-methods/create-run.md +63 -0
- package/.docs/reference/workflows/workflow-methods/dountil.md +25 -0
- package/.docs/reference/workflows/workflow-methods/dowhile.md +25 -0
- package/.docs/reference/workflows/workflow-methods/foreach.md +118 -0
- package/.docs/reference/workflows/workflow-methods/map.md +93 -0
- package/.docs/reference/workflows/workflow-methods/parallel.md +21 -0
- package/.docs/reference/workflows/workflow-methods/sleep.md +35 -0
- package/.docs/reference/workflows/workflow-methods/sleepUntil.md +35 -0
- package/.docs/reference/workflows/workflow-methods/then.md +21 -0
- package/.docs/reference/workflows/workflow.md +157 -0
- package/.docs/reference/workspace/e2b-sandbox.md +289 -0
- package/.docs/reference/workspace/filesystem.md +255 -0
- package/.docs/reference/workspace/gcs-filesystem.md +174 -0
- package/.docs/reference/workspace/local-filesystem.md +343 -0
- package/.docs/reference/workspace/local-sandbox.md +301 -0
- package/.docs/reference/workspace/s3-filesystem.md +175 -0
- package/.docs/reference/workspace/sandbox.md +87 -0
- package/.docs/reference/workspace/workspace-class.md +244 -0
- package/CHANGELOG.md +16 -0
- package/package.json +6 -6
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Moark
|
|
2
|
+
|
|
3
|
+
Access 2 Moark models through Mastra's model router. Authentication is handled automatically using the `MOARK_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Moark documentation](https://moark.com).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MOARK_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "moark/GLM-4.7"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Moark documentation](https://moark.com) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| -------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `moark/GLM-4.7` | 205K | | | | | | $4 | $14 |
|
|
38
|
+
| `moark/MiniMax-M2.1` | 205K | | | | | | $2 | $8 |
|
|
39
|
+
|
|
40
|
+
## Advanced Configuration
|
|
41
|
+
|
|
42
|
+
### Custom Headers
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
const agent = new Agent({
|
|
46
|
+
id: "custom-agent",
|
|
47
|
+
name: "custom-agent",
|
|
48
|
+
model: {
|
|
49
|
+
url: "https://moark.com/v1",
|
|
50
|
+
id: "moark/GLM-4.7",
|
|
51
|
+
apiKey: process.env.MOARK_API_KEY,
|
|
52
|
+
headers: {
|
|
53
|
+
"X-Custom-Header": "value"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Dynamic Model Selection
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
const agent = new Agent({
|
|
63
|
+
id: "dynamic-agent",
|
|
64
|
+
name: "Dynamic Agent",
|
|
65
|
+
model: ({ requestContext }) => {
|
|
66
|
+
const useAdvanced = requestContext.task === "complex";
|
|
67
|
+
return useAdvanced
|
|
68
|
+
? "moark/MiniMax-M2.1"
|
|
69
|
+
: "moark/GLM-4.7";
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# ModelScope
|
|
2
|
+
|
|
3
|
+
Access 7 ModelScope models through Mastra's model router. Authentication is handled automatically using the `MODELSCOPE_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [ModelScope documentation](https://modelscope.cn/docs/model-service/API-Inference/intro).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MODELSCOPE_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "modelscope/Qwen/Qwen3-235B-A22B-Instruct-2507"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [ModelScope documentation](https://modelscope.cn/docs/model-service/API-Inference/intro) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ----------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `modelscope/Qwen/Qwen3-235B-A22B-Instruct-2507` | 262K | | | | | | — | — |
|
|
38
|
+
| `modelscope/Qwen/Qwen3-235B-A22B-Thinking-2507` | 262K | | | | | | — | — |
|
|
39
|
+
| `modelscope/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | — | — |
|
|
40
|
+
| `modelscope/Qwen/Qwen3-30B-A3B-Thinking-2507` | 262K | | | | | | — | — |
|
|
41
|
+
| `modelscope/Qwen/Qwen3-Coder-30B-A3B-Instruct` | 262K | | | | | | — | — |
|
|
42
|
+
| `modelscope/ZhipuAI/GLM-4.5` | 131K | | | | | | — | — |
|
|
43
|
+
| `modelscope/ZhipuAI/GLM-4.6` | 203K | | | | | | — | — |
|
|
44
|
+
|
|
45
|
+
## Advanced Configuration
|
|
46
|
+
|
|
47
|
+
### Custom Headers
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
const agent = new Agent({
|
|
51
|
+
id: "custom-agent",
|
|
52
|
+
name: "custom-agent",
|
|
53
|
+
model: {
|
|
54
|
+
url: "https://api-inference.modelscope.cn/v1",
|
|
55
|
+
id: "modelscope/Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
56
|
+
apiKey: process.env.MODELSCOPE_API_KEY,
|
|
57
|
+
headers: {
|
|
58
|
+
"X-Custom-Header": "value"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Dynamic Model Selection
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
const agent = new Agent({
|
|
68
|
+
id: "dynamic-agent",
|
|
69
|
+
name: "Dynamic Agent",
|
|
70
|
+
model: ({ requestContext }) => {
|
|
71
|
+
const useAdvanced = requestContext.task === "complex";
|
|
72
|
+
return useAdvanced
|
|
73
|
+
? "modelscope/ZhipuAI/GLM-4.6"
|
|
74
|
+
: "modelscope/Qwen/Qwen3-235B-A22B-Instruct-2507";
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Moonshot AI (China)
|
|
2
|
+
|
|
3
|
+
Access 6 Moonshot AI (China) models through Mastra's model router. Authentication is handled automatically using the `MOONSHOT_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Moonshot AI (China) documentation](https://platform.moonshot.cn).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MOONSHOT_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "moonshotai-cn/kimi-k2-0711-preview"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Moonshot AI (China) documentation](https://platform.moonshot.cn) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| -------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `moonshotai-cn/kimi-k2-0711-preview` | 131K | | | | | | $0.60 | $3 |
|
|
38
|
+
| `moonshotai-cn/kimi-k2-0905-preview` | 262K | | | | | | $0.60 | $3 |
|
|
39
|
+
| `moonshotai-cn/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
|
|
40
|
+
| `moonshotai-cn/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $8 |
|
|
41
|
+
| `moonshotai-cn/kimi-k2-turbo-preview` | 262K | | | | | | $2 | $10 |
|
|
42
|
+
| `moonshotai-cn/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
43
|
+
|
|
44
|
+
## Advanced Configuration
|
|
45
|
+
|
|
46
|
+
### Custom Headers
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
const agent = new Agent({
|
|
50
|
+
id: "custom-agent",
|
|
51
|
+
name: "custom-agent",
|
|
52
|
+
model: {
|
|
53
|
+
url: "https://api.moonshot.cn/anthropic/v1",
|
|
54
|
+
id: "moonshotai-cn/kimi-k2-0711-preview",
|
|
55
|
+
apiKey: process.env.MOONSHOT_API_KEY,
|
|
56
|
+
headers: {
|
|
57
|
+
"X-Custom-Header": "value"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Dynamic Model Selection
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
const agent = new Agent({
|
|
67
|
+
id: "dynamic-agent",
|
|
68
|
+
name: "Dynamic Agent",
|
|
69
|
+
model: ({ requestContext }) => {
|
|
70
|
+
const useAdvanced = requestContext.task === "complex";
|
|
71
|
+
return useAdvanced
|
|
72
|
+
? "moonshotai-cn/kimi-k2.5"
|
|
73
|
+
: "moonshotai-cn/kimi-k2-0711-preview";
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Moonshot AI
|
|
2
|
+
|
|
3
|
+
Access 6 Moonshot AI models through Mastra's model router. Authentication is handled automatically using the `MOONSHOT_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Moonshot AI documentation](https://platform.moonshot.ai).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MOONSHOT_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "moonshotai/kimi-k2-0711-preview"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Moonshot AI documentation](https://platform.moonshot.ai) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ----------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `moonshotai/kimi-k2-0711-preview` | 131K | | | | | | $0.60 | $3 |
|
|
38
|
+
| `moonshotai/kimi-k2-0905-preview` | 262K | | | | | | $0.60 | $3 |
|
|
39
|
+
| `moonshotai/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
|
|
40
|
+
| `moonshotai/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $8 |
|
|
41
|
+
| `moonshotai/kimi-k2-turbo-preview` | 262K | | | | | | $2 | $10 |
|
|
42
|
+
| `moonshotai/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
43
|
+
|
|
44
|
+
## Advanced Configuration
|
|
45
|
+
|
|
46
|
+
### Custom Headers
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
const agent = new Agent({
|
|
50
|
+
id: "custom-agent",
|
|
51
|
+
name: "custom-agent",
|
|
52
|
+
model: {
|
|
53
|
+
url: "https://api.moonshot.ai/anthropic/v1",
|
|
54
|
+
id: "moonshotai/kimi-k2-0711-preview",
|
|
55
|
+
apiKey: process.env.MOONSHOT_API_KEY,
|
|
56
|
+
headers: {
|
|
57
|
+
"X-Custom-Header": "value"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Dynamic Model Selection
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
const agent = new Agent({
|
|
67
|
+
id: "dynamic-agent",
|
|
68
|
+
name: "Dynamic Agent",
|
|
69
|
+
model: ({ requestContext }) => {
|
|
70
|
+
const useAdvanced = requestContext.task === "complex";
|
|
71
|
+
return useAdvanced
|
|
72
|
+
? "moonshotai/kimi-k2.5"
|
|
73
|
+
: "moonshotai/kimi-k2-0711-preview";
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Morph
|
|
2
|
+
|
|
3
|
+
Access 3 Morph models through Mastra's model router. Authentication is handled automatically using the `MORPH_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Morph documentation](https://docs.morphllm.com).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MORPH_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "morph/auto"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Morph documentation](https://docs.morphllm.com) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ---------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `morph/auto` | 32K | | | | | | $0.85 | $2 |
|
|
38
|
+
| `morph/morph-v3-fast` | 16K | | | | | | $0.80 | $1 |
|
|
39
|
+
| `morph/morph-v3-large` | 32K | | | | | | $0.90 | $2 |
|
|
40
|
+
|
|
41
|
+
## Advanced Configuration
|
|
42
|
+
|
|
43
|
+
### Custom Headers
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const agent = new Agent({
|
|
47
|
+
id: "custom-agent",
|
|
48
|
+
name: "custom-agent",
|
|
49
|
+
model: {
|
|
50
|
+
url: "https://api.morphllm.com/v1",
|
|
51
|
+
id: "morph/auto",
|
|
52
|
+
apiKey: process.env.MORPH_API_KEY,
|
|
53
|
+
headers: {
|
|
54
|
+
"X-Custom-Header": "value"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Dynamic Model Selection
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
const agent = new Agent({
|
|
64
|
+
id: "dynamic-agent",
|
|
65
|
+
name: "Dynamic Agent",
|
|
66
|
+
model: ({ requestContext }) => {
|
|
67
|
+
const useAdvanced = requestContext.task === "complex";
|
|
68
|
+
return useAdvanced
|
|
69
|
+
? "morph/morph-v3-large"
|
|
70
|
+
: "morph/auto";
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# NanoGPT
|
|
2
|
+
|
|
3
|
+
Access 33 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
NANO_GPT_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "nano-gpt/deepseek/deepseek-r1"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [NanoGPT documentation](https://docs.nano-gpt.com) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| ------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `nano-gpt/deepseek/deepseek-r1` | 128K | | | | | | $1 | $2 |
|
|
38
|
+
| `nano-gpt/deepseek/deepseek-v3.2:thinking` | 128K | | | | | | $1 | $2 |
|
|
39
|
+
| `nano-gpt/meta-llama/llama-3.3-70b-instruct` | 128K | | | | | | $1 | $2 |
|
|
40
|
+
| `nano-gpt/meta-llama/llama-4-maverick` | 128K | | | | | | $1 | $2 |
|
|
41
|
+
| `nano-gpt/minimax/minimax-m2.1` | 128K | | | | | | $1 | $2 |
|
|
42
|
+
| `nano-gpt/minimax/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
|
|
43
|
+
| `nano-gpt/minimax/minimax-m2.5-official` | 205K | | | | | | $0.30 | $1 |
|
|
44
|
+
| `nano-gpt/mistralai/devstral-2-123b-instruct-2512` | 131K | | | | | | $1 | $2 |
|
|
45
|
+
| `nano-gpt/mistralai/ministral-14b-instruct-2512` | 131K | | | | | | $1 | $2 |
|
|
46
|
+
| `nano-gpt/mistralai/mistral-large-3-675b-instruct-2512` | 131K | | | | | | $1 | $2 |
|
|
47
|
+
| `nano-gpt/moonshotai/kimi-k2-instruct` | 131K | | | | | | $1 | $2 |
|
|
48
|
+
| `nano-gpt/moonshotai/kimi-k2-thinking` | 33K | | | | | | $1 | $2 |
|
|
49
|
+
| `nano-gpt/moonshotai/kimi-k2.5` | 256K | | | | | | $0.30 | $2 |
|
|
50
|
+
| `nano-gpt/moonshotai/kimi-k2.5-thinking` | 256K | | | | | | $0.30 | $2 |
|
|
51
|
+
| `nano-gpt/nousresearch/hermes-4-405b:thinking` | 128K | | | | | | $1 | $2 |
|
|
52
|
+
| `nano-gpt/nvidia/llama-3_3-nemotron-super-49b-v1_5` | 128K | | | | | | $1 | $2 |
|
|
53
|
+
| `nano-gpt/openai/gpt-oss-120b` | 128K | | | | | | $1 | $2 |
|
|
54
|
+
| `nano-gpt/qwen/qwen3-235b-a22b-thinking-2507` | 262K | | | | | | $1 | $2 |
|
|
55
|
+
| `nano-gpt/qwen/qwen3-coder` | 106K | | | | | | $1 | $2 |
|
|
56
|
+
| `nano-gpt/qwen/qwen3.5-397b-a17b` | 258K | | | | | | $0.60 | $4 |
|
|
57
|
+
| `nano-gpt/qwen/qwen3.5-397b-a17b-thinking` | 258K | | | | | | $0.60 | $4 |
|
|
58
|
+
| `nano-gpt/qwen/qwen3.5-plus` | 984K | | | | | | $0.40 | $2 |
|
|
59
|
+
| `nano-gpt/qwen/qwen3.5-plus-thinking` | 984K | | | | | | $0.40 | $2 |
|
|
60
|
+
| `nano-gpt/zai-org/glm-4.5-air` | 128K | | | | | | $1 | $2 |
|
|
61
|
+
| `nano-gpt/zai-org/glm-4.5-air:thinking` | 128K | | | | | | $1 | $2 |
|
|
62
|
+
| `nano-gpt/zai-org/glm-4.6` | 200K | | | | | | $1 | $2 |
|
|
63
|
+
| `nano-gpt/zai-org/glm-4.6:thinking` | 128K | | | | | | $1 | $2 |
|
|
64
|
+
| `nano-gpt/zai-org/glm-4.7` | 205K | | | | | | $1 | $2 |
|
|
65
|
+
| `nano-gpt/zai-org/glm-4.7:thinking` | 128K | | | | | | $1 | $2 |
|
|
66
|
+
| `nano-gpt/zai-org/glm-5` | 200K | | | | | | $0.80 | $3 |
|
|
67
|
+
| `nano-gpt/zai-org/glm-5-original` | 200K | | | | | | $0.80 | $3 |
|
|
68
|
+
| `nano-gpt/zai-org/glm-5-original:thinking` | 200K | | | | | | $0.80 | $3 |
|
|
69
|
+
| `nano-gpt/zai-org/glm-5:thinking` | 200K | | | | | | $0.80 | $3 |
|
|
70
|
+
|
|
71
|
+
## Advanced Configuration
|
|
72
|
+
|
|
73
|
+
### Custom Headers
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
const agent = new Agent({
|
|
77
|
+
id: "custom-agent",
|
|
78
|
+
name: "custom-agent",
|
|
79
|
+
model: {
|
|
80
|
+
url: "https://nano-gpt.com/api/v1",
|
|
81
|
+
id: "nano-gpt/deepseek/deepseek-r1",
|
|
82
|
+
apiKey: process.env.NANO_GPT_API_KEY,
|
|
83
|
+
headers: {
|
|
84
|
+
"X-Custom-Header": "value"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Dynamic Model Selection
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
const agent = new Agent({
|
|
94
|
+
id: "dynamic-agent",
|
|
95
|
+
name: "Dynamic Agent",
|
|
96
|
+
model: ({ requestContext }) => {
|
|
97
|
+
const useAdvanced = requestContext.task === "complex";
|
|
98
|
+
return useAdvanced
|
|
99
|
+
? "nano-gpt/zai-org/glm-5:thinking"
|
|
100
|
+
: "nano-gpt/deepseek/deepseek-r1";
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Nebius Token Factory
|
|
2
|
+
|
|
3
|
+
Access 46 Nebius Token Factory models through Mastra's model router. Authentication is handled automatically using the `NEBIUS_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Nebius Token Factory documentation](https://docs.tokenfactory.nebius.com/).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
NEBIUS_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "nebius/BAAI/bge-en-icl"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Nebius Token Factory documentation](https://docs.tokenfactory.nebius.com/) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| --------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `nebius/BAAI/bge-en-icl` | 33K | | | | | | $0.01 | — |
|
|
38
|
+
| `nebius/BAAI/bge-multilingual-gemma2` | 8K | | | | | | $0.01 | — |
|
|
39
|
+
| `nebius/black-forest-labs/flux-dev` | 77 | | | | | | — | — |
|
|
40
|
+
| `nebius/black-forest-labs/flux-schnell` | 77 | | | | | | — | — |
|
|
41
|
+
| `nebius/deepseek-ai/deepseek-r1-0528` | 128K | | | | | | $0.80 | $2 |
|
|
42
|
+
| `nebius/deepseek-ai/deepseek-r1-0528-fast` | 131K | | | | | | $2 | $6 |
|
|
43
|
+
| `nebius/deepseek-ai/deepseek-v3-0324` | 128K | | | | | | $0.50 | $2 |
|
|
44
|
+
| `nebius/deepseek-ai/deepseek-v3-0324-fast` | 128K | | | | | | $0.75 | $2 |
|
|
45
|
+
| `nebius/deepseek-ai/deepseek-v3.2` | 128K | | | | | | $0.30 | $0.45 |
|
|
46
|
+
| `nebius/google/gemma-2-2b-it` | 8K | | | | | | $0.02 | $0.06 |
|
|
47
|
+
| `nebius/google/gemma-2-9b-it-fast` | 8K | | | | | | $0.03 | $0.09 |
|
|
48
|
+
| `nebius/google/gemma-3-27b-it` | 128K | | | | | | $0.10 | $0.30 |
|
|
49
|
+
| `nebius/google/gemma-3-27b-it-fast` | 128K | | | | | | $0.20 | $0.60 |
|
|
50
|
+
| `nebius/intfloat/e5-mistral-7b-instruct` | 33K | | | | | | $0.01 | — |
|
|
51
|
+
| `nebius/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.13 | $0.40 |
|
|
52
|
+
| `nebius/meta-llama/llama-3.3-70b-instruct-fast` | 128K | | | | | | $0.25 | $0.75 |
|
|
53
|
+
| `nebius/meta-llama/llama-guard-3-8b` | 8K | | | | | | $0.02 | $0.06 |
|
|
54
|
+
| `nebius/meta-llama/meta-llama-3.1-8b-instruct` | 128K | | | | | | $0.02 | $0.06 |
|
|
55
|
+
| `nebius/meta-llama/meta-llama-3.1-8b-instruct-fast` | 128K | | | | | | $0.03 | $0.09 |
|
|
56
|
+
| `nebius/MiniMaxAI/minimax-m2.1` | 128K | | | | | | $0.30 | $1 |
|
|
57
|
+
| `nebius/moonshotai/kimi-k2-instruct` | 200K | | | | | | $0.50 | $2 |
|
|
58
|
+
| `nebius/moonshotai/kimi-k2-thinking` | 128K | | | | | | $0.60 | $3 |
|
|
59
|
+
| `nebius/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.50 | $3 |
|
|
60
|
+
| `nebius/NousResearch/hermes-4-405b` | 128K | | | | | | $1 | $3 |
|
|
61
|
+
| `nebius/NousResearch/hermes-4-70b` | 128K | | | | | | $0.13 | $0.40 |
|
|
62
|
+
| `nebius/nvidia/llama-3_1-nemotron-ultra-253b-v1` | 128K | | | | | | $0.60 | $2 |
|
|
63
|
+
| `nebius/nvidia/nemotron-nano-v2-12b` | 32K | | | | | | $0.07 | $0.20 |
|
|
64
|
+
| `nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b` | 32K | | | | | | $0.06 | $0.24 |
|
|
65
|
+
| `nebius/openai/gpt-oss-120b` | 128K | | | | | | $0.15 | $0.60 |
|
|
66
|
+
| `nebius/openai/gpt-oss-20b` | 128K | | | | | | $0.05 | $0.20 |
|
|
67
|
+
| `nebius/PrimeIntellect/intellect-3` | 128K | | | | | | $0.20 | $1 |
|
|
68
|
+
| `nebius/qwen/qwen2.5-coder-7b-fast` | 128K | | | | | | $0.03 | $0.09 |
|
|
69
|
+
| `nebius/qwen/qwen2.5-vl-72b-instruct` | 128K | | | | | | $0.25 | $0.75 |
|
|
70
|
+
| `nebius/qwen/qwen3-235b-a22b-instruct-2507` | 262K | | | | | | $0.20 | $0.60 |
|
|
71
|
+
| `nebius/qwen/qwen3-235b-a22b-thinking-2507` | 262K | | | | | | $0.20 | $0.80 |
|
|
72
|
+
| `nebius/qwen/qwen3-30b-a3b-instruct-2507` | 128K | | | | | | $0.10 | $0.30 |
|
|
73
|
+
| `nebius/qwen/qwen3-30b-a3b-thinking-2507` | 128K | | | | | | $0.10 | $0.30 |
|
|
74
|
+
| `nebius/qwen/qwen3-32b` | 128K | | | | | | $0.10 | $0.30 |
|
|
75
|
+
| `nebius/qwen/qwen3-32b-fast` | 128K | | | | | | $0.20 | $0.60 |
|
|
76
|
+
| `nebius/qwen/qwen3-coder-30b-a3b-instruct` | 128K | | | | | | $0.10 | $0.30 |
|
|
77
|
+
| `nebius/qwen/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.40 | $2 |
|
|
78
|
+
| `nebius/qwen/qwen3-embedding-8b` | 33K | | | | | | $0.01 | — |
|
|
79
|
+
| `nebius/qwen/qwen3-next-80b-a3b-thinking` | 128K | | | | | | $0.15 | $1 |
|
|
80
|
+
| `nebius/zai-org/glm-4.5` | 128K | | | | | | $0.60 | $2 |
|
|
81
|
+
| `nebius/zai-org/glm-4.5-air` | 128K | | | | | | $0.20 | $1 |
|
|
82
|
+
| `nebius/zai-org/glm-4.7-fp8` | 128K | | | | | | $0.40 | $2 |
|
|
83
|
+
|
|
84
|
+
## Advanced Configuration
|
|
85
|
+
|
|
86
|
+
### Custom Headers
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
const agent = new Agent({
|
|
90
|
+
id: "custom-agent",
|
|
91
|
+
name: "custom-agent",
|
|
92
|
+
model: {
|
|
93
|
+
url: "https://api.tokenfactory.nebius.com/v1",
|
|
94
|
+
id: "nebius/BAAI/bge-en-icl",
|
|
95
|
+
apiKey: process.env.NEBIUS_API_KEY,
|
|
96
|
+
headers: {
|
|
97
|
+
"X-Custom-Header": "value"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Dynamic Model Selection
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
const agent = new Agent({
|
|
107
|
+
id: "dynamic-agent",
|
|
108
|
+
name: "Dynamic Agent",
|
|
109
|
+
model: ({ requestContext }) => {
|
|
110
|
+
const useAdvanced = requestContext.task === "complex";
|
|
111
|
+
return useAdvanced
|
|
112
|
+
? "nebius/zai-org/glm-4.7-fp8"
|
|
113
|
+
: "nebius/BAAI/bge-en-icl";
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Nova
|
|
2
|
+
|
|
3
|
+
Access 2 Nova models through Mastra's model router. Authentication is handled automatically using the `NOVA_API_KEY` environment variable.
|
|
4
|
+
|
|
5
|
+
Learn more in the [Nova documentation](https://nova.amazon.com/dev/documentation).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
NOVA_API_KEY=your-api-key
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from "@mastra/core/agent";
|
|
13
|
+
|
|
14
|
+
const agent = new Agent({
|
|
15
|
+
id: "my-agent",
|
|
16
|
+
name: "My Agent",
|
|
17
|
+
instructions: "You are a helpful assistant",
|
|
18
|
+
model: "nova/nova-2-lite-v1"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Generate a response
|
|
22
|
+
const response = await agent.generate("Hello!");
|
|
23
|
+
|
|
24
|
+
// Stream a response
|
|
25
|
+
const stream = await agent.stream("Tell me a story");
|
|
26
|
+
for await (const chunk of stream) {
|
|
27
|
+
console.log(chunk);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Nova documentation](https://nova.amazon.com/dev/documentation) for details.
|
|
32
|
+
|
|
33
|
+
## Models
|
|
34
|
+
|
|
35
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
36
|
+
| --------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
|
+
| `nova/nova-2-lite-v1` | 1.0M | | | | | | — | — |
|
|
38
|
+
| `nova/nova-2-pro-v1` | 1.0M | | | | | | — | — |
|
|
39
|
+
|
|
40
|
+
## Advanced Configuration
|
|
41
|
+
|
|
42
|
+
### Custom Headers
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
const agent = new Agent({
|
|
46
|
+
id: "custom-agent",
|
|
47
|
+
name: "custom-agent",
|
|
48
|
+
model: {
|
|
49
|
+
url: "https://api.nova.amazon.com/v1",
|
|
50
|
+
id: "nova/nova-2-lite-v1",
|
|
51
|
+
apiKey: process.env.NOVA_API_KEY,
|
|
52
|
+
headers: {
|
|
53
|
+
"X-Custom-Header": "value"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Dynamic Model Selection
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
const agent = new Agent({
|
|
63
|
+
id: "dynamic-agent",
|
|
64
|
+
name: "Dynamic Agent",
|
|
65
|
+
model: ({ requestContext }) => {
|
|
66
|
+
const useAdvanced = requestContext.task === "complex";
|
|
67
|
+
return useAdvanced
|
|
68
|
+
? "nova/nova-2-pro-v1"
|
|
69
|
+
: "nova/nova-2-lite-v1";
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
```
|