@mastra/mcp-docs-server 1.0.0-beta.8 → 1.0.0
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/organized/changelogs/%40internal%2Fchangeset-cli.md +1 -13
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +1 -5
- package/.docs/organized/changelogs/%40internal%2Fplayground.md +40 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +1 -53
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +287 -287
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +315 -315
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +53 -53
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +38 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +66 -66
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +522 -212
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +658 -196
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +439 -234
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +450 -211
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +208 -0
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +448 -22
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +3341 -271
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +60 -60
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +289 -289
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +90 -90
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +74 -74
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +70 -70
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +247 -220
- package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +70 -0
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +403 -225
- package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +72 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +145 -145
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +54 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +456 -226
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +604 -208
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +71 -71
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +247 -247
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +28 -28
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +285 -285
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +354 -156
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +545 -212
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +481 -202
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +194 -194
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +759 -213
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +198 -198
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +636 -229
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +163 -163
- package/.docs/organized/changelogs/%40mastra%2Frag.md +310 -310
- package/.docs/organized/changelogs/%40mastra%2Freact.md +328 -230
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +64 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +160 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +829 -218
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +57 -57
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +479 -232
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +53 -53
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +47 -47
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +110 -110
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +15 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +98 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +54 -54
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +46 -46
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +93 -93
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +47 -47
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +45 -45
- package/.docs/organized/changelogs/create-mastra.md +227 -227
- package/.docs/organized/changelogs/mastra.md +277 -277
- package/.docs/organized/code-examples/a2a.md +2 -2
- package/.docs/organized/code-examples/agent-v6.md +221 -0
- package/.docs/organized/code-examples/agui.md +4 -4
- package/.docs/organized/code-examples/ai-elements.md +3 -3
- package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-v5.md +3 -3
- package/.docs/organized/code-examples/assistant-ui.md +5 -5
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +3 -3
- package/.docs/organized/code-examples/client-side-tools.md +4 -4
- package/.docs/organized/code-examples/crypto-chatbot.md +5 -5
- package/.docs/organized/code-examples/experimental-auth-weather-agent.md +1 -1
- package/.docs/organized/code-examples/fireworks-r1.md +2 -2
- package/.docs/organized/code-examples/heads-up-game.md +7 -7
- package/.docs/organized/code-examples/inngest.md +1075 -0
- package/.docs/organized/code-examples/mcp-configuration.md +1 -1
- package/.docs/organized/code-examples/mcp-server-adapters.md +3 -4
- package/.docs/organized/code-examples/memory-per-resource-example.md +3 -3
- package/.docs/organized/code-examples/memory-todo-agent.md +1 -1
- package/.docs/organized/code-examples/memory-with-context.md +1 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/openapi-spec-writer.md +3 -3
- package/.docs/organized/code-examples/processors-with-ai-sdk.md +14 -0
- package/.docs/organized/code-examples/quick-start.md +1 -5
- package/.docs/organized/code-examples/server-app-access.md +3 -3
- package/.docs/organized/code-examples/server-express-adapter.md +1 -1
- package/.docs/organized/code-examples/server-fastify-adapter.md +83 -0
- package/.docs/organized/code-examples/server-hono-adapter.md +3 -3
- package/.docs/organized/code-examples/server-koa-adapter.md +94 -0
- package/.docs/organized/code-examples/stock-price-tool.md +21 -2
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +24 -6
- package/.docs/raw/agents/agent-approval.mdx +209 -12
- package/.docs/raw/agents/agent-memory.mdx +36 -32
- package/.docs/raw/agents/guardrails.mdx +105 -56
- package/.docs/raw/agents/network-approval.mdx +281 -0
- package/.docs/raw/agents/networks.mdx +69 -13
- package/.docs/raw/agents/overview.mdx +43 -25
- package/.docs/raw/agents/processors.mdx +234 -17
- package/.docs/raw/agents/structured-output.mdx +78 -8
- package/.docs/raw/agents/using-tools.mdx +67 -6
- package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
- package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
- package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +1 -2
- package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +3 -3
- package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -2
- package/.docs/raw/course/03-agent-memory/07-understanding-memory-threads.md +35 -0
- package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
- package/.docs/raw/course/03-agent-memory/13-vector-store-configuration.md +1 -1
- package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +4 -5
- package/.docs/raw/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +1 -1
- package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +3 -4
- package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +3 -4
- package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +3 -4
- package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +3 -4
- package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
- package/.docs/raw/deployment/cloud-providers.mdx +22 -0
- package/.docs/raw/deployment/mastra-server.mdx +140 -0
- package/.docs/raw/deployment/monorepo.mdx +106 -42
- package/.docs/raw/deployment/overview.mdx +35 -48
- package/.docs/raw/deployment/web-framework.mdx +17 -19
- package/.docs/raw/deployment/workflow-runners.mdx +16 -0
- package/.docs/raw/evals/built-in-scorers.mdx +2 -0
- package/.docs/raw/evals/custom-scorers.mdx +60 -12
- package/.docs/raw/evals/overview.mdx +6 -6
- package/.docs/raw/evals/running-in-ci.mdx +4 -2
- package/.docs/raw/getting-started/manual-install.mdx +20 -20
- package/.docs/raw/getting-started/mcp-docs-server.mdx +59 -2
- package/.docs/raw/getting-started/project-structure.mdx +2 -2
- package/.docs/raw/getting-started/start.mdx +17 -1
- package/.docs/raw/getting-started/studio.mdx +10 -37
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +151 -0
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1034 -80
- package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +32 -11
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +9 -9
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +13 -16
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +5 -7
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/cloudflare-deployer.mdx +8 -5
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +18 -23
- package/.docs/raw/guides/deployment/index.mdx +32 -0
- package/.docs/raw/guides/deployment/inngest.mdx +673 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/netlify-deployer.mdx +7 -3
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/vercel-deployer.mdx +8 -5
- package/.docs/raw/guides/getting-started/astro.mdx +292 -451
- package/.docs/raw/guides/getting-started/express.mdx +72 -153
- package/.docs/raw/guides/getting-started/hono.mdx +227 -0
- package/.docs/raw/guides/getting-started/next-js.mdx +173 -61
- package/.docs/raw/guides/getting-started/nuxt.mdx +505 -0
- package/.docs/raw/guides/getting-started/quickstart.mdx +5 -5
- package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
- package/.docs/raw/guides/getting-started/vite-react.mdx +317 -147
- package/.docs/raw/guides/guide/ai-recruiter.mdx +10 -10
- package/.docs/raw/guides/guide/chef-michel.mdx +9 -11
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +15 -15
- package/.docs/raw/guides/guide/research-assistant.mdx +20 -20
- package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
- package/.docs/raw/guides/guide/web-search.mdx +38 -38
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
- package/.docs/raw/guides/index.mdx +0 -1
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +105 -4
- package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +15 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +170 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/deployment.mdx +42 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +0 -35
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +40 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +17 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +11 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/rag.mdx +47 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +271 -25
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +3 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +72 -17
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +46 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +50 -7
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +21 -23
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/mastra-cloud/deployment.mdx +86 -0
- package/.docs/raw/mastra-cloud/observability.mdx +43 -0
- package/.docs/raw/mastra-cloud/overview.mdx +31 -0
- package/.docs/raw/mastra-cloud/setup.mdx +64 -0
- package/.docs/raw/mastra-cloud/studio.mdx +35 -0
- package/.docs/raw/mcp/overview.mdx +60 -25
- package/.docs/raw/mcp/publishing-mcp-server.mdx +7 -4
- package/.docs/raw/memory/memory-processors.mdx +17 -12
- package/.docs/raw/memory/message-history.mdx +72 -0
- package/.docs/raw/memory/overview.mdx +38 -76
- package/.docs/raw/memory/semantic-recall.mdx +65 -52
- package/.docs/raw/memory/storage.mdx +248 -0
- package/.docs/raw/memory/working-memory.mdx +24 -13
- package/.docs/raw/observability/logging.mdx +16 -15
- package/.docs/raw/observability/overview.mdx +27 -7
- package/.docs/raw/observability/tracing/bridges/otel.mdx +7 -4
- package/.docs/raw/observability/tracing/exporters/arize.mdx +61 -24
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +32 -22
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +24 -5
- package/.docs/raw/observability/tracing/exporters/datadog.mdx +175 -0
- package/.docs/raw/observability/tracing/exporters/default.mdx +28 -7
- package/.docs/raw/observability/tracing/exporters/laminar.mdx +89 -0
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +31 -22
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +33 -3
- package/.docs/raw/observability/tracing/exporters/otel.mdx +194 -22
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +32 -22
- package/.docs/raw/observability/tracing/exporters/sentry.mdx +198 -0
- package/.docs/raw/observability/tracing/overview.mdx +388 -108
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +27 -7
- package/.docs/raw/rag/chunking-and-embedding.mdx +22 -33
- package/.docs/raw/rag/graph-rag.mdx +223 -0
- package/.docs/raw/rag/overview.mdx +6 -3
- package/.docs/raw/rag/retrieval.mdx +53 -57
- package/.docs/raw/rag/vector-databases.mdx +55 -31
- package/.docs/raw/reference/agents/agent.mdx +17 -14
- package/.docs/raw/reference/agents/generate.mdx +172 -44
- package/.docs/raw/reference/agents/generateLegacy.mdx +5 -3
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +5 -3
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +5 -3
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +5 -3
- package/.docs/raw/reference/agents/getDescription.mdx +3 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +5 -3
- package/.docs/raw/reference/agents/getLLM.mdx +5 -3
- package/.docs/raw/reference/agents/getMemory.mdx +5 -3
- package/.docs/raw/reference/agents/getModel.mdx +5 -3
- package/.docs/raw/reference/agents/getTools.mdx +4 -2
- package/.docs/raw/reference/agents/getVoice.mdx +4 -2
- package/.docs/raw/reference/agents/listAgents.mdx +4 -2
- package/.docs/raw/reference/agents/listScorers.mdx +5 -3
- package/.docs/raw/reference/agents/listTools.mdx +4 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +4 -2
- package/.docs/raw/reference/agents/network.mdx +113 -1
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +6 -3
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +4 -2
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +4 -2
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +5 -3
- package/.docs/raw/reference/ai-sdk/network-route.mdx +6 -3
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +10 -6
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +130 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +110 -0
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +122 -0
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +7 -4
- package/.docs/raw/reference/auth/auth0.mdx +5 -3
- package/.docs/raw/reference/auth/clerk.mdx +5 -3
- package/.docs/raw/reference/auth/firebase.mdx +6 -5
- package/.docs/raw/reference/auth/jwt.mdx +5 -3
- package/.docs/raw/reference/auth/supabase.mdx +5 -3
- package/.docs/raw/reference/auth/workos.mdx +5 -3
- package/.docs/raw/reference/cli/create-mastra.mdx +12 -10
- package/.docs/raw/reference/cli/mastra.mdx +63 -15
- package/.docs/raw/reference/client-js/agents.mdx +311 -85
- package/.docs/raw/reference/client-js/error-handling.mdx +3 -3
- package/.docs/raw/reference/client-js/logs.mdx +2 -0
- package/.docs/raw/reference/client-js/mastra-client.mdx +6 -4
- package/.docs/raw/reference/client-js/memory.mdx +47 -2
- package/.docs/raw/reference/client-js/observability.mdx +2 -0
- package/.docs/raw/reference/client-js/telemetry.mdx +2 -0
- package/.docs/raw/reference/client-js/tools.mdx +2 -0
- package/.docs/raw/reference/client-js/vectors.mdx +2 -0
- package/.docs/raw/reference/client-js/workflows.mdx +47 -3
- package/.docs/raw/reference/configuration.mdx +761 -0
- package/.docs/raw/reference/core/addGateway.mdx +2 -0
- package/.docs/raw/reference/core/getAgent.mdx +3 -1
- package/.docs/raw/reference/core/getAgentById.mdx +3 -1
- package/.docs/raw/reference/core/getDeployer.mdx +3 -1
- package/.docs/raw/reference/core/getGateway.mdx +2 -0
- package/.docs/raw/reference/core/getGatewayById.mdx +2 -0
- package/.docs/raw/reference/core/getLogger.mdx +3 -1
- package/.docs/raw/reference/core/getMCPServer.mdx +3 -1
- package/.docs/raw/reference/core/getMCPServerById.mdx +3 -1
- package/.docs/raw/reference/core/getMemory.mdx +77 -0
- package/.docs/raw/reference/core/getScorer.mdx +2 -0
- package/.docs/raw/reference/core/getScorerById.mdx +2 -0
- package/.docs/raw/reference/core/getServer.mdx +6 -4
- package/.docs/raw/reference/core/getStorage.mdx +5 -3
- package/.docs/raw/reference/core/getStoredAgentById.mdx +185 -0
- package/.docs/raw/reference/core/getTelemetry.mdx +3 -1
- package/.docs/raw/reference/core/getVector.mdx +3 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +3 -1
- package/.docs/raw/reference/core/listAgents.mdx +3 -1
- package/.docs/raw/reference/core/listGateways.mdx +2 -0
- package/.docs/raw/reference/core/listLogs.mdx +3 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +3 -1
- package/.docs/raw/reference/core/listMCPServers.mdx +3 -1
- package/.docs/raw/reference/core/listMemory.mdx +74 -0
- package/.docs/raw/reference/core/listScorers.mdx +2 -0
- package/.docs/raw/reference/core/listStoredAgents.mdx +153 -0
- package/.docs/raw/reference/core/listVectors.mdx +3 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +3 -1
- package/.docs/raw/reference/core/mastra-class.mdx +35 -20
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +2 -0
- package/.docs/raw/reference/core/setLogger.mdx +3 -1
- package/.docs/raw/reference/core/setStorage.mdx +6 -4
- package/.docs/raw/reference/deployer/cloudflare.mdx +22 -53
- package/.docs/raw/reference/deployer/deployer.mdx +2 -1
- package/.docs/raw/reference/deployer/netlify.mdx +4 -1
- package/.docs/raw/reference/deployer/vercel.mdx +5 -4
- package/.docs/raw/reference/evals/answer-relevancy.mdx +4 -1
- package/.docs/raw/reference/evals/answer-similarity.mdx +4 -1
- package/.docs/raw/reference/evals/bias.mdx +4 -1
- package/.docs/raw/reference/evals/completeness.mdx +4 -1
- package/.docs/raw/reference/evals/content-similarity.mdx +4 -1
- package/.docs/raw/reference/evals/context-precision.mdx +4 -1
- package/.docs/raw/reference/evals/context-relevance.mdx +2 -0
- package/.docs/raw/reference/evals/create-scorer.mdx +11 -3
- package/.docs/raw/reference/evals/faithfulness.mdx +4 -1
- package/.docs/raw/reference/evals/hallucination.mdx +4 -1
- package/.docs/raw/reference/evals/keyword-coverage.mdx +4 -1
- package/.docs/raw/reference/evals/mastra-scorer.mdx +2 -0
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +2 -0
- package/.docs/raw/reference/evals/prompt-alignment.mdx +9 -7
- package/.docs/raw/reference/evals/run-evals.mdx +3 -1
- package/.docs/raw/reference/evals/scorer-utils.mdx +3 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +4 -1
- package/.docs/raw/reference/evals/tone-consistency.mdx +4 -1
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +25 -23
- package/.docs/raw/reference/evals/toxicity.mdx +4 -1
- package/.docs/raw/reference/index.mdx +2 -1
- package/.docs/raw/reference/logging/pino-logger.mdx +10 -8
- package/.docs/raw/reference/memory/clone-utilities.mdx +345 -0
- package/.docs/raw/reference/memory/cloneThread.mdx +237 -0
- package/.docs/raw/reference/memory/createThread.mdx +6 -4
- package/.docs/raw/reference/memory/deleteMessages.mdx +4 -2
- package/.docs/raw/reference/memory/getThreadById.mdx +3 -1
- package/.docs/raw/reference/memory/listThreads.mdx +187 -0
- package/.docs/raw/reference/memory/memory-class.mdx +27 -20
- package/.docs/raw/reference/memory/recall.mdx +6 -4
- package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +6 -2
- package/.docs/raw/reference/observability/tracing/configuration.mdx +51 -0
- package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +25 -6
- package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +23 -2
- package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +10 -0
- package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +3 -0
- package/.docs/raw/reference/observability/tracing/exporters/datadog.mdx +172 -0
- package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +10 -0
- package/.docs/raw/reference/observability/tracing/exporters/laminar.mdx +139 -0
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +26 -4
- package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +10 -0
- package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +51 -34
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +25 -4
- package/.docs/raw/reference/observability/tracing/exporters/sentry.mdx +224 -0
- package/.docs/raw/reference/observability/tracing/instances.mdx +2 -0
- package/.docs/raw/reference/observability/tracing/interfaces.mdx +20 -0
- package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +2 -0
- package/.docs/raw/reference/observability/tracing/spans.mdx +2 -0
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +4 -2
- package/.docs/raw/reference/processors/language-detector.mdx +6 -3
- package/.docs/raw/reference/processors/message-history-processor.mdx +5 -2
- package/.docs/raw/reference/processors/moderation-processor.mdx +6 -4
- package/.docs/raw/reference/processors/pii-detector.mdx +6 -4
- package/.docs/raw/reference/processors/processor-interface.mdx +326 -23
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +5 -3
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +7 -2
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +5 -3
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +62 -19
- package/.docs/raw/reference/processors/tool-call-filter.mdx +5 -3
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +6 -3
- package/.docs/raw/reference/processors/working-memory-processor.mdx +6 -3
- package/.docs/raw/reference/rag/chunk.mdx +7 -6
- package/.docs/raw/reference/rag/database-config.mdx +8 -6
- package/.docs/raw/reference/rag/document.mdx +2 -0
- package/.docs/raw/reference/rag/embeddings.mdx +2 -0
- package/.docs/raw/reference/rag/extract-params.mdx +57 -3
- package/.docs/raw/reference/rag/graph-rag.mdx +2 -0
- package/.docs/raw/reference/rag/metadata-filters.mdx +27 -7
- package/.docs/raw/reference/rag/rerank.mdx +2 -0
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +2 -0
- package/.docs/raw/reference/server/create-route.mdx +34 -18
- package/.docs/raw/reference/server/express-adapter.mdx +78 -50
- package/.docs/raw/reference/server/fastify-adapter.mdx +130 -0
- package/.docs/raw/reference/server/hono-adapter.mdx +78 -48
- package/.docs/raw/reference/server/koa-adapter.mdx +129 -0
- package/.docs/raw/reference/server/mastra-server.mdx +52 -34
- package/.docs/raw/reference/server/routes.mdx +73 -10
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +10 -5
- package/.docs/raw/reference/storage/cloudflare.mdx +12 -2
- package/.docs/raw/reference/storage/composite.mdx +245 -0
- package/.docs/raw/reference/storage/convex.mdx +8 -6
- package/.docs/raw/reference/storage/dynamodb.mdx +134 -8
- package/.docs/raw/reference/storage/lance.mdx +9 -5
- package/.docs/raw/reference/storage/libsql.mdx +76 -54
- package/.docs/raw/reference/storage/mongodb.mdx +115 -16
- package/.docs/raw/reference/storage/mssql.mdx +11 -6
- package/.docs/raw/{server-db/storage.mdx → reference/storage/overview.mdx} +15 -111
- package/.docs/raw/reference/storage/postgresql.mdx +228 -83
- package/.docs/raw/reference/storage/upstash.mdx +78 -2
- package/.docs/raw/reference/streaming/ChunkType.mdx +31 -3
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +67 -6
- package/.docs/raw/reference/streaming/agents/stream.mdx +48 -51
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +5 -3
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +3 -1
- package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +3 -1
- package/.docs/raw/reference/streaming/workflows/stream.mdx +37 -22
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +6 -4
- package/.docs/raw/reference/templates/overview.mdx +3 -2
- package/.docs/raw/reference/tools/client.mdx +3 -0
- package/.docs/raw/reference/tools/create-tool.mdx +127 -5
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +2 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +40 -3
- package/.docs/raw/reference/tools/mcp-client.mdx +110 -1
- package/.docs/raw/reference/tools/mcp-server.mdx +278 -24
- package/.docs/raw/reference/tools/vector-query-tool.mdx +68 -4
- package/.docs/raw/reference/vectors/astra.mdx +5 -3
- package/.docs/raw/reference/vectors/chroma.mdx +5 -3
- package/.docs/raw/reference/vectors/convex.mdx +14 -12
- package/.docs/raw/reference/vectors/couchbase.mdx +7 -5
- package/.docs/raw/reference/vectors/duckdb.mdx +12 -10
- package/.docs/raw/reference/vectors/elasticsearch.mdx +12 -4
- package/.docs/raw/reference/vectors/lance.mdx +6 -4
- package/.docs/raw/reference/vectors/libsql.mdx +66 -13
- package/.docs/raw/reference/vectors/mongodb.mdx +90 -10
- package/.docs/raw/reference/vectors/opensearch.mdx +30 -3
- package/.docs/raw/reference/vectors/pg.mdx +58 -6
- package/.docs/raw/reference/vectors/pinecone.mdx +23 -8
- package/.docs/raw/reference/vectors/qdrant.mdx +148 -4
- package/.docs/raw/reference/vectors/s3vectors.mdx +8 -6
- package/.docs/raw/reference/vectors/turbopuffer.mdx +6 -4
- package/.docs/raw/reference/vectors/upstash.mdx +60 -6
- package/.docs/raw/reference/vectors/vectorize.mdx +5 -3
- package/.docs/raw/reference/voice/azure.mdx +2 -0
- package/.docs/raw/reference/voice/cloudflare.mdx +2 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +4 -0
- package/.docs/raw/reference/voice/deepgram.mdx +2 -0
- package/.docs/raw/reference/voice/elevenlabs.mdx +2 -0
- package/.docs/raw/reference/voice/google-gemini-live.mdx +3 -0
- package/.docs/raw/reference/voice/google.mdx +2 -0
- package/.docs/raw/reference/voice/mastra-voice.mdx +2 -0
- package/.docs/raw/reference/voice/murf.mdx +2 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +3 -0
- package/.docs/raw/reference/voice/openai.mdx +2 -0
- package/.docs/raw/reference/voice/playai.mdx +2 -0
- package/.docs/raw/reference/voice/sarvam.mdx +2 -0
- package/.docs/raw/reference/voice/speechify.mdx +2 -0
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +3 -0
- package/.docs/raw/reference/voice/voice.addTools.mdx +3 -0
- package/.docs/raw/reference/voice/voice.answer.mdx +4 -0
- package/.docs/raw/reference/voice/voice.close.mdx +3 -0
- package/.docs/raw/reference/voice/voice.connect.mdx +5 -1
- package/.docs/raw/reference/voice/voice.events.mdx +2 -0
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +3 -0
- package/.docs/raw/reference/voice/voice.listen.mdx +6 -0
- package/.docs/raw/reference/voice/voice.off.mdx +2 -0
- package/.docs/raw/reference/voice/voice.on.mdx +5 -1
- package/.docs/raw/reference/voice/voice.send.mdx +4 -0
- package/.docs/raw/reference/voice/voice.speak.mdx +6 -0
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +2 -0
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +55 -5
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +3 -3
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +6 -4
- package/.docs/raw/reference/workflows/run-methods/start.mdx +7 -5
- package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +145 -0
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +10 -8
- package/.docs/raw/reference/workflows/run.mdx +11 -3
- package/.docs/raw/reference/workflows/step.mdx +56 -3
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +39 -2
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +71 -4
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +9 -7
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +4 -6
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +4 -6
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow.mdx +193 -2
- package/.docs/raw/{auth → server/auth}/auth0.mdx +40 -21
- package/.docs/raw/{auth → server/auth}/clerk.mdx +37 -16
- package/.docs/raw/{auth → server/auth}/firebase.mdx +47 -25
- package/.docs/raw/{auth → server/auth}/index.mdx +8 -6
- package/.docs/raw/{auth → server/auth}/jwt.mdx +22 -10
- package/.docs/raw/{auth → server/auth}/supabase.mdx +45 -25
- package/.docs/raw/{auth → server/auth}/workos.mdx +39 -20
- package/.docs/raw/{server-db → server}/custom-adapters.mdx +40 -24
- package/.docs/raw/{server-db → server}/custom-api-routes.mdx +6 -6
- package/.docs/raw/{server-db → server}/mastra-client.mdx +35 -38
- package/.docs/raw/server/mastra-server.mdx +86 -0
- package/.docs/raw/{server-db → server}/middleware.mdx +11 -9
- package/.docs/raw/{server-db → server}/request-context.mdx +85 -43
- package/.docs/raw/server/server-adapters.mdx +410 -0
- package/.docs/raw/streaming/events.mdx +16 -7
- package/.docs/raw/streaming/overview.mdx +30 -17
- package/.docs/raw/streaming/tool-streaming.mdx +15 -17
- package/.docs/raw/streaming/workflow-streaming.mdx +8 -8
- package/.docs/raw/tools-mcp/advanced-usage.mdx +4 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +46 -12
- package/.docs/raw/tools-mcp/overview.mdx +14 -13
- package/.docs/raw/voice/overview.mdx +17 -2
- package/.docs/raw/voice/speech-to-speech.mdx +5 -0
- package/.docs/raw/voice/speech-to-text.mdx +4 -0
- package/.docs/raw/voice/text-to-speech.mdx +3 -0
- package/.docs/raw/workflows/agents-and-tools.mdx +70 -21
- package/.docs/raw/workflows/control-flow.mdx +369 -34
- package/.docs/raw/workflows/error-handling.mdx +192 -18
- package/.docs/raw/workflows/human-in-the-loop.mdx +8 -7
- package/.docs/raw/workflows/input-data-mapping.mdx +9 -7
- package/.docs/raw/workflows/overview.mdx +80 -34
- package/.docs/raw/workflows/snapshots.mdx +19 -45
- package/.docs/raw/workflows/suspend-and-resume.mdx +14 -14
- package/.docs/raw/workflows/time-travel.mdx +25 -21
- package/.docs/raw/workflows/workflow-state.mdx +7 -8
- package/CHANGELOG.md +254 -0
- package/README.md +36 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/logger.d.ts +3 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/stdio.js +746 -49
- package/dist/tools/course.d.ts.map +1 -1
- package/dist/tools/embedded-docs.d.ts +276 -0
- package/dist/tools/embedded-docs.d.ts.map +1 -0
- package/package.json +9 -8
- package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +0 -1
- package/.docs/raw/deployment/building-mastra.mdx +0 -73
- package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
- package/.docs/raw/deployment/mastra-cloud/dashboard.mdx +0 -100
- package/.docs/raw/deployment/mastra-cloud/observability.mdx +0 -53
- package/.docs/raw/deployment/mastra-cloud/overview.mdx +0 -65
- package/.docs/raw/deployment/mastra-cloud/setting-up.mdx +0 -105
- package/.docs/raw/memory/conversation-history.mdx +0 -24
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -150
- package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
- package/.docs/raw/memory/threads-and-resources.mdx +0 -95
- package/.docs/raw/reference/core/setTelemetry.mdx +0 -36
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +0 -110
- package/.docs/raw/reference/memory/query.mdx +0 -189
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +0 -70
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +0 -66
- package/.docs/raw/server-db/mastra-server.mdx +0 -97
- package/.docs/raw/server-db/server-adapters.mdx +0 -286
- package/.docs/raw/workflows/inngest-workflow.mdx +0 -363
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Reference: CLI Commands | CLI"
|
|
3
3
|
description: Documentation for the Mastra CLI to develop, build, and start your project.
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/core"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# CLI Commands
|
|
@@ -19,7 +21,7 @@ The command accepts [common flags][common-flags] and the following additional fl
|
|
|
19
21
|
|
|
20
22
|
#### `--https`
|
|
21
23
|
|
|
22
|
-
Enable local HTTPS support. [Learn more](/
|
|
24
|
+
Enable local HTTPS support. [Learn more](/reference/v1/configuration#serverhttps).
|
|
23
25
|
|
|
24
26
|
#### `--inspect`
|
|
25
27
|
|
|
@@ -41,7 +43,7 @@ You can set certain environment variables to modify the behavior of `mastra dev`
|
|
|
41
43
|
|
|
42
44
|
Set `MASTRA_DEV_NO_CACHE=1` to force a full rebuild rather than using the cached assets under `.mastra/`:
|
|
43
45
|
|
|
44
|
-
```bash
|
|
46
|
+
```bash
|
|
45
47
|
MASTRA_DEV_NO_CACHE=1 mastra dev
|
|
46
48
|
```
|
|
47
49
|
|
|
@@ -51,7 +53,7 @@ This helps when you are debugging bundler plugins or suspect stale output.
|
|
|
51
53
|
|
|
52
54
|
`MASTRA_CONCURRENCY` caps how many expensive operations run in parallel (primarily build and evaluation steps). For example:
|
|
53
55
|
|
|
54
|
-
```bash
|
|
56
|
+
```bash
|
|
55
57
|
MASTRA_CONCURRENCY=4 mastra dev
|
|
56
58
|
```
|
|
57
59
|
|
|
@@ -61,7 +63,7 @@ Leave it unset to let the CLI pick a sensible default for the machine.
|
|
|
61
63
|
|
|
62
64
|
When using providers supported by the Vercel AI SDK you can redirect requests through proxies or internal gateways by setting a base URL. For OpenAI:
|
|
63
65
|
|
|
64
|
-
```bash
|
|
66
|
+
```bash
|
|
65
67
|
OPENAI_API_KEY=<your-api-key> \
|
|
66
68
|
OPENAI_BASE_URL=https://openrouter.example/v1 \
|
|
67
69
|
mastra dev
|
|
@@ -69,7 +71,7 @@ mastra dev
|
|
|
69
71
|
|
|
70
72
|
For Anthropic:
|
|
71
73
|
|
|
72
|
-
```bash
|
|
74
|
+
```bash
|
|
73
75
|
ANTHROPIC_API_KEY=<your-api-key> \
|
|
74
76
|
ANTHROPIC_BASE_URL=https://anthropic.internal \
|
|
75
77
|
mastra dev
|
|
@@ -86,10 +88,16 @@ Under the hood Mastra's Rollup server locates your Mastra entry file and bundles
|
|
|
86
88
|
|
|
87
89
|
The output in `.mastra` can be deployed to any cloud server using [`mastra start`](#mastra-start).
|
|
88
90
|
|
|
89
|
-
If you're deploying to a [serverless platform](/
|
|
91
|
+
If you're deploying to a [serverless platform](/guides/v1/deployment) you need to install the correct deployer in order to receive the correct output in `.mastra`.
|
|
90
92
|
|
|
91
93
|
It accepts [common flags][common-flags].
|
|
92
94
|
|
|
95
|
+
### Flags
|
|
96
|
+
|
|
97
|
+
#### `--studio`
|
|
98
|
+
|
|
99
|
+
Bundle the Studio UI with the build.
|
|
100
|
+
|
|
93
101
|
### Configs
|
|
94
102
|
|
|
95
103
|
You can set certain environment variables to modify the behavior of `mastra build`.
|
|
@@ -98,7 +106,7 @@ You can set certain environment variables to modify the behavior of `mastra buil
|
|
|
98
106
|
|
|
99
107
|
For CI or when running in resource constrained environments you can cap how many expensive tasks run at once by setting `MASTRA_CONCURRENCY`.
|
|
100
108
|
|
|
101
|
-
```bash
|
|
109
|
+
```bash
|
|
102
110
|
MASTRA_CONCURRENCY=2 mastra build
|
|
103
111
|
```
|
|
104
112
|
|
|
@@ -124,6 +132,30 @@ The path to your built Mastra output directory. Defaults to `.mastra/output`.
|
|
|
124
132
|
|
|
125
133
|
Disable the [OTEL Tracing](/docs/v1/observability/tracing/overview).
|
|
126
134
|
|
|
135
|
+
## `mastra studio`
|
|
136
|
+
|
|
137
|
+
Starts [Mastra Studio](/docs/v1/getting-started/studio) as a static server. After starting, you can enter your Mastra instance URL (e.g. `http://localhost:4111`) to connect Studio to your Mastra backend.
|
|
138
|
+
|
|
139
|
+
### Flags
|
|
140
|
+
|
|
141
|
+
The command accepts [common flags][common-flags] and the following additional flags:
|
|
142
|
+
|
|
143
|
+
#### `--port`
|
|
144
|
+
|
|
145
|
+
The port to run Studio on. Defaults to `3000`.
|
|
146
|
+
|
|
147
|
+
#### `--server-host`
|
|
148
|
+
|
|
149
|
+
The host of the Mastra API server to connect to. Defaults to `localhost`.
|
|
150
|
+
|
|
151
|
+
#### `--server-port`
|
|
152
|
+
|
|
153
|
+
The port of the Mastra API server to connect to. Defaults to `4111`.
|
|
154
|
+
|
|
155
|
+
#### `--server-protocol`
|
|
156
|
+
|
|
157
|
+
The protocol of the Mastra API server to connect to. Defaults to `http`.
|
|
158
|
+
|
|
127
159
|
## `mastra lint`
|
|
128
160
|
|
|
129
161
|
The `mastra lint` command validates the structure and code of your Mastra project to ensure it follows best practices and is error-free.
|
|
@@ -140,13 +172,13 @@ Read the [Scorers overview](/docs/v1/evals/overview) to learn more.
|
|
|
140
172
|
|
|
141
173
|
Add a new scorer to your project. You can use an interactive prompt:
|
|
142
174
|
|
|
143
|
-
```bash
|
|
175
|
+
```bash
|
|
144
176
|
mastra scorers add
|
|
145
177
|
```
|
|
146
178
|
|
|
147
179
|
Or provide a scorer name directly:
|
|
148
180
|
|
|
149
|
-
```bash
|
|
181
|
+
```bash
|
|
150
182
|
mastra scorers add answer-relevancy
|
|
151
183
|
```
|
|
152
184
|
|
|
@@ -196,29 +228,45 @@ Do not include example code. Useful when using the `--default` flag.
|
|
|
196
228
|
|
|
197
229
|
Configure your code editor with Mastra's MCP server. Choose from: `"cursor" | "cursor-global" | "windsurf" | "vscode"`.
|
|
198
230
|
|
|
231
|
+
## `mastra migrate`
|
|
232
|
+
|
|
233
|
+
Runs database migrations to update your storage schema. This command is useful when upgrading Mastra versions that include storage schema changes.
|
|
234
|
+
|
|
235
|
+
The command bundles your project, connects to your configured storage backend, and executes any pending migrations. Currently supports:
|
|
236
|
+
|
|
237
|
+
- **Duplicate spans migration**: Removes duplicate `(traceId, spanId)` entries and adds a unique constraint to ensure data integrity.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
mastra migrate
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
See the [Storage migration guide](/guides/v1/migrations/upgrade-to-v1/storage#duplicate-spans-migration) for details on when migrations are needed.
|
|
244
|
+
|
|
245
|
+
It accepts [common flags][common-flags].
|
|
246
|
+
|
|
199
247
|
## Common flags
|
|
200
248
|
|
|
201
249
|
### `--dir`
|
|
202
250
|
|
|
203
|
-
**Available in:** `dev`, `build`, `lint`
|
|
251
|
+
**Available in:** `dev`, `build`, `lint`, `migrate`
|
|
204
252
|
|
|
205
253
|
The path to your Mastra folder. Defaults to `src/mastra`.
|
|
206
254
|
|
|
207
255
|
### `--debug`
|
|
208
256
|
|
|
209
|
-
**Available in:** `dev`, `build`
|
|
257
|
+
**Available in:** `dev`, `build`, `migrate`
|
|
210
258
|
|
|
211
259
|
Enable verbose logging for Mastra's internals. Defaults to `false`.
|
|
212
260
|
|
|
213
261
|
### `--env`
|
|
214
262
|
|
|
215
|
-
**Available in:** `dev`, `start`
|
|
263
|
+
**Available in:** `dev`, `start`, `studio`, `migrate`
|
|
216
264
|
|
|
217
265
|
Custom environment variables file to include. By default, includes `.env.development`, `.env.local`, and `.env`.
|
|
218
266
|
|
|
219
267
|
### `--root`
|
|
220
268
|
|
|
221
|
-
**Available in:** `dev`, `build`, `lint`
|
|
269
|
+
**Available in:** `dev`, `build`, `lint`, `migrate`
|
|
222
270
|
|
|
223
271
|
Path to your root folder. Defaults to `process.cwd()`.
|
|
224
272
|
|
|
@@ -246,13 +294,13 @@ By default, Mastra collects anonymous information about your project like your O
|
|
|
246
294
|
|
|
247
295
|
You can opt out of the CLI analytics by setting an environment variable:
|
|
248
296
|
|
|
249
|
-
```bash
|
|
297
|
+
```bash
|
|
250
298
|
MASTRA_TELEMETRY_DISABLED=1
|
|
251
299
|
```
|
|
252
300
|
|
|
253
301
|
You can also set this while using other `mastra` commands:
|
|
254
302
|
|
|
255
|
-
```bash
|
|
303
|
+
```bash
|
|
256
304
|
MASTRA_TELEMETRY_DISABLED=1 mastra dev
|
|
257
305
|
```
|
|
258
306
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Reference: Agents API | Client SDK"
|
|
3
3
|
description: Learn how to interact with Mastra AI agents, including generating responses, streaming interactions, and managing agent tools using the client-js SDK.
|
|
4
|
+
packages:
|
|
5
|
+
- "@mastra/ai-sdk"
|
|
6
|
+
- "@mastra/client-js"
|
|
7
|
+
- "@mastra/core"
|
|
4
8
|
---
|
|
5
9
|
|
|
6
10
|
# Agents API
|
|
@@ -15,19 +19,25 @@ Retrieve a list of all available agents:
|
|
|
15
19
|
const agents = await mastraClient.listAgents();
|
|
16
20
|
```
|
|
17
21
|
|
|
18
|
-
Returns a record of agent IDs to their serialized agent configurations.
|
|
22
|
+
Returns a record of agent IDs to their serialized agent configurations.
|
|
19
23
|
|
|
20
24
|
## Working with a Specific Agent
|
|
21
25
|
|
|
22
|
-
Get an instance of a specific agent:
|
|
26
|
+
Get an instance of a specific agent by its ID:
|
|
27
|
+
|
|
28
|
+
```typescript title="src/mastra/agents/my-agent.ts"
|
|
29
|
+
export const myAgent = new Agent({
|
|
30
|
+
id: "my-agent",
|
|
31
|
+
});
|
|
32
|
+
```
|
|
23
33
|
|
|
24
34
|
```typescript
|
|
25
|
-
const agent = mastraClient.getAgent("agent
|
|
35
|
+
const agent = mastraClient.getAgent("my-agent");
|
|
26
36
|
```
|
|
27
37
|
|
|
28
38
|
## Agent Methods
|
|
29
39
|
|
|
30
|
-
###
|
|
40
|
+
### details()
|
|
31
41
|
|
|
32
42
|
Retrieve detailed information about an agent:
|
|
33
43
|
|
|
@@ -35,39 +45,45 @@ Retrieve detailed information about an agent:
|
|
|
35
45
|
const details = await agent.details();
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Generate Response
|
|
48
|
+
### generate()
|
|
41
49
|
|
|
42
50
|
Generate a response from the agent:
|
|
43
51
|
|
|
44
52
|
```typescript
|
|
45
|
-
const response = await agent.generate(
|
|
46
|
-
|
|
53
|
+
const response = await agent.generate(
|
|
54
|
+
[
|
|
47
55
|
{
|
|
48
56
|
role: "user",
|
|
49
57
|
content: "Hello, how are you?",
|
|
50
58
|
},
|
|
51
59
|
],
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
{
|
|
61
|
+
memory: {
|
|
62
|
+
thread: "thread-abc", // Optional: Thread ID for conversation context
|
|
63
|
+
resource: "user-123", // Optional: Resource ID
|
|
64
|
+
},
|
|
65
|
+
structuredOutput: {} // Optional: Structured Output configuration
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
You can also use the simplified string format with memory options:
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
const response = await agent.generate("Hello, how are you?", {
|
|
74
|
+
memory: {
|
|
75
|
+
thread: "thread-1",
|
|
76
|
+
resource: "resource-1",
|
|
77
|
+
},
|
|
55
78
|
});
|
|
56
79
|
```
|
|
57
80
|
|
|
58
|
-
###
|
|
81
|
+
### stream()
|
|
59
82
|
|
|
60
83
|
Stream responses from the agent for real-time interactions:
|
|
61
84
|
|
|
62
85
|
```typescript
|
|
63
|
-
const response = await agent.stream(
|
|
64
|
-
messages: [
|
|
65
|
-
{
|
|
66
|
-
role: "user",
|
|
67
|
-
content: "Tell me a story",
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
});
|
|
86
|
+
const response = await agent.stream("Tell me a story");
|
|
71
87
|
|
|
72
88
|
// Process data stream with the processDataStream util
|
|
73
89
|
response.processDataStream({
|
|
@@ -75,8 +91,31 @@ response.processDataStream({
|
|
|
75
91
|
console.log(chunk);
|
|
76
92
|
},
|
|
77
93
|
});
|
|
94
|
+
```
|
|
78
95
|
|
|
79
|
-
|
|
96
|
+
You can also use the simplified string format with memory options:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
const response = await agent.stream("Tell me a story", {
|
|
100
|
+
memory: {
|
|
101
|
+
thread: "thread-1",
|
|
102
|
+
resource: "resource-1",
|
|
103
|
+
},
|
|
104
|
+
clientTools: { colorChangeTool },
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
response.processDataStream({
|
|
108
|
+
onChunk: async (chunk) => {
|
|
109
|
+
if (chunk.type === "text-delta") {
|
|
110
|
+
console.log(chunk.payload.text);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
You can also read from response body directly:
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
80
119
|
const reader = response.body.getReader();
|
|
81
120
|
while (true) {
|
|
82
121
|
const { done, value } = await reader.read();
|
|
@@ -85,11 +124,150 @@ while (true) {
|
|
|
85
124
|
}
|
|
86
125
|
```
|
|
87
126
|
|
|
88
|
-
|
|
127
|
+
#### AI SDK compatible format
|
|
128
|
+
|
|
129
|
+
To stream AI SDK-formatted parts on the client from an `agent.stream(...)` response, wrap `response.processDataStream` into a `ReadableStream<ChunkType>` and use `toAISdkStream`:
|
|
89
130
|
|
|
90
|
-
|
|
131
|
+
```typescript title="client-ai-sdk-transform.ts"
|
|
132
|
+
import { createUIMessageStream } from "ai";
|
|
133
|
+
import { toAISdkStream } from "@mastra/ai-sdk";
|
|
134
|
+
import type { ChunkType, MastraModelOutput } from "@mastra/core/stream";
|
|
135
|
+
|
|
136
|
+
const response = await agent.stream("Tell me a story");
|
|
137
|
+
|
|
138
|
+
const chunkStream: ReadableStream<ChunkType> = new ReadableStream<ChunkType>({
|
|
139
|
+
start(controller) {
|
|
140
|
+
response
|
|
141
|
+
.processDataStream({
|
|
142
|
+
onChunk: async (chunk) => controller.enqueue(chunk as ChunkType),
|
|
143
|
+
})
|
|
144
|
+
.finally(() => controller.close());
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const uiMessageStream = createUIMessageStream({
|
|
149
|
+
execute: async ({ writer }) => {
|
|
150
|
+
for await (const part of toAISdkStream(
|
|
151
|
+
chunkStream as unknown as MastraModelOutput,
|
|
152
|
+
{ from: "agent" },
|
|
153
|
+
)) {
|
|
154
|
+
writer.write(part);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
for await (const part of uiMessageStream) {
|
|
160
|
+
console.log(part);
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### getTool()
|
|
165
|
+
|
|
166
|
+
Retrieve information about a specific tool available to the agent:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
const tool = await agent.getTool("tool-id");
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### executeTool()
|
|
91
173
|
|
|
92
|
-
|
|
174
|
+
Execute a specific tool for the agent:
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
const result = await agent.executeTool("tool-id", {
|
|
178
|
+
data: { input: "value" },
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### network()
|
|
183
|
+
|
|
184
|
+
Stream responses from an agent network for multi-agent interactions:
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
const response = await agent.network("Research this topic and write a summary");
|
|
188
|
+
|
|
189
|
+
response.processDataStream({
|
|
190
|
+
onChunk: async (chunk) => {
|
|
191
|
+
console.log(chunk);
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### approveToolCall()
|
|
197
|
+
|
|
198
|
+
Approve a pending tool call that requires human confirmation:
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
const response = await agent.approveToolCall({
|
|
202
|
+
runId: "run-123",
|
|
203
|
+
toolCallId: "tool-call-456",
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
response.processDataStream({
|
|
207
|
+
onChunk: async (chunk) => {
|
|
208
|
+
console.log(chunk);
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### declineToolCall()
|
|
214
|
+
|
|
215
|
+
Decline a pending tool call that requires human confirmation:
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
const response = await agent.declineToolCall({
|
|
219
|
+
runId: "run-123",
|
|
220
|
+
toolCallId: "tool-call-456",
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
response.processDataStream({
|
|
224
|
+
onChunk: async (chunk) => {
|
|
225
|
+
console.log(chunk);
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### approveToolCallGenerate()
|
|
231
|
+
|
|
232
|
+
Approve a pending tool call when using `generate()` (non-streaming). Returns the complete response:
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
const output = await agent.generate("Find user John", {
|
|
236
|
+
requireToolApproval: true,
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
if (output.finishReason === "suspended") {
|
|
240
|
+
const result = await agent.approveToolCallGenerate({
|
|
241
|
+
runId: output.runId,
|
|
242
|
+
toolCallId: output.suspendPayload.toolCallId,
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
console.log(result.text);
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### declineToolCallGenerate()
|
|
250
|
+
|
|
251
|
+
Decline a pending tool call when using `generate()` (non-streaming). Returns the complete response:
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
const output = await agent.generate("Find user John", {
|
|
255
|
+
requireToolApproval: true,
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
if (output.finishReason === "suspended") {
|
|
259
|
+
const result = await agent.declineToolCallGenerate({
|
|
260
|
+
runId: output.runId,
|
|
261
|
+
toolCallId: output.suspendPayload.toolCallId,
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
console.log(result.text);
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Client Tools
|
|
269
|
+
|
|
270
|
+
Client-side tools allow you to execute custom functions on the client side when the agent requests them.
|
|
93
271
|
|
|
94
272
|
```typescript
|
|
95
273
|
import { createTool } from "@mastra/client-js";
|
|
@@ -108,14 +286,16 @@ const colorChangeTool = createTool({
|
|
|
108
286
|
});
|
|
109
287
|
|
|
110
288
|
// Use with generate
|
|
111
|
-
const response = await agent.generate({
|
|
112
|
-
messages: "Change the background to blue",
|
|
289
|
+
const response = await agent.generate("Change the background to blue", {
|
|
113
290
|
clientTools: { colorChangeTool },
|
|
114
291
|
});
|
|
115
292
|
|
|
116
293
|
// Use with stream
|
|
117
|
-
const response = await agent.stream({
|
|
118
|
-
|
|
294
|
+
const response = await agent.stream("Tell me a story", {
|
|
295
|
+
memory: {
|
|
296
|
+
thread: "thread-1",
|
|
297
|
+
resource: "resource-1",
|
|
298
|
+
},
|
|
119
299
|
clientTools: { colorChangeTool },
|
|
120
300
|
});
|
|
121
301
|
|
|
@@ -125,97 +305,143 @@ response.processDataStream({
|
|
|
125
305
|
console.log(chunk.payload.text);
|
|
126
306
|
} else if (chunk.type === "tool-call") {
|
|
127
307
|
console.log(
|
|
128
|
-
`calling tool ${chunk.payload.toolName} with args ${JSON.stringify(
|
|
308
|
+
`calling tool ${chunk.payload.toolName} with args ${JSON.stringify(
|
|
309
|
+
chunk.payload.args,
|
|
310
|
+
null,
|
|
311
|
+
2
|
|
312
|
+
)}`
|
|
129
313
|
);
|
|
130
314
|
}
|
|
131
315
|
},
|
|
132
316
|
});
|
|
133
317
|
```
|
|
134
318
|
|
|
135
|
-
|
|
319
|
+
## Stored Agents
|
|
136
320
|
|
|
137
|
-
|
|
321
|
+
Stored agents are agent configurations stored in a database that can be created, updated, and deleted at runtime. They reference primitives (tools, workflows, other agents, memory, scorers) by key, which are resolved from the Mastra registry when the agent is instantiated.
|
|
322
|
+
|
|
323
|
+
### listStoredAgents()
|
|
324
|
+
|
|
325
|
+
Retrieve a paginated list of all stored agents:
|
|
138
326
|
|
|
139
327
|
```typescript
|
|
140
|
-
const
|
|
328
|
+
const result = await mastraClient.listStoredAgents();
|
|
329
|
+
console.log(result.agents); // Array of stored agents
|
|
330
|
+
console.log(result.total); // Total count
|
|
141
331
|
```
|
|
142
332
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Get evaluation results for the agent:
|
|
333
|
+
With pagination and ordering:
|
|
146
334
|
|
|
147
335
|
```typescript
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
336
|
+
const result = await mastraClient.listStoredAgents({
|
|
337
|
+
page: 0,
|
|
338
|
+
perPage: 20,
|
|
339
|
+
orderBy: {
|
|
340
|
+
field: "createdAt",
|
|
341
|
+
direction: "DESC",
|
|
342
|
+
},
|
|
343
|
+
});
|
|
153
344
|
```
|
|
154
345
|
|
|
155
|
-
###
|
|
346
|
+
### createStoredAgent()
|
|
156
347
|
|
|
157
|
-
|
|
348
|
+
Create a new stored agent:
|
|
158
349
|
|
|
159
350
|
```typescript
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
351
|
+
const agent = await mastraClient.createStoredAgent({
|
|
352
|
+
id: "my-agent",
|
|
353
|
+
name: "My Assistant",
|
|
354
|
+
instructions: "You are a helpful assistant.",
|
|
355
|
+
model: {
|
|
356
|
+
provider: "openai",
|
|
357
|
+
name: "gpt-4",
|
|
358
|
+
},
|
|
163
359
|
});
|
|
360
|
+
```
|
|
164
361
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
362
|
+
With all options:
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
const agent = await mastraClient.createStoredAgent({
|
|
366
|
+
id: "full-agent",
|
|
367
|
+
name: "Full Agent",
|
|
368
|
+
description: "A fully configured agent",
|
|
369
|
+
instructions: "You are a helpful assistant.",
|
|
370
|
+
model: {
|
|
371
|
+
provider: "openai",
|
|
372
|
+
name: "gpt-4",
|
|
373
|
+
},
|
|
374
|
+
tools: ["calculator", "weather"],
|
|
375
|
+
workflows: ["data-processing"],
|
|
376
|
+
agents: ["sub-agent-1"],
|
|
377
|
+
memory: "my-memory",
|
|
378
|
+
scorers: {
|
|
379
|
+
"quality-scorer": {
|
|
380
|
+
sampling: { type: "ratio", rate: 0.1 },
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
defaultOptions: {
|
|
384
|
+
maxSteps: 10,
|
|
385
|
+
},
|
|
386
|
+
metadata: {
|
|
387
|
+
version: "1.0",
|
|
388
|
+
team: "engineering",
|
|
171
389
|
},
|
|
172
390
|
});
|
|
173
391
|
```
|
|
174
392
|
|
|
175
|
-
|
|
393
|
+
### getStoredAgent()
|
|
176
394
|
|
|
177
|
-
|
|
395
|
+
Get an instance of a specific stored agent:
|
|
178
396
|
|
|
179
|
-
```typescript
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
import type { ChunkType, MastraModelOutput } from "@mastra/core/stream";
|
|
397
|
+
```typescript
|
|
398
|
+
const storedAgent = mastraClient.getStoredAgent("my-agent");
|
|
399
|
+
```
|
|
183
400
|
|
|
184
|
-
|
|
401
|
+
## Stored Agent Methods
|
|
185
402
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
403
|
+
### details()
|
|
404
|
+
|
|
405
|
+
Retrieve the stored agent configuration:
|
|
406
|
+
|
|
407
|
+
```typescript
|
|
408
|
+
const details = await storedAgent.details();
|
|
409
|
+
console.log(details.name);
|
|
410
|
+
console.log(details.instructions);
|
|
411
|
+
console.log(details.model);
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### update()
|
|
415
|
+
|
|
416
|
+
Update specific fields of a stored agent. All fields are optional:
|
|
417
|
+
|
|
418
|
+
```typescript
|
|
419
|
+
const updated = await storedAgent.update({
|
|
420
|
+
name: "Updated Agent Name",
|
|
421
|
+
instructions: "New instructions for the agent.",
|
|
194
422
|
});
|
|
423
|
+
```
|
|
195
424
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
{ from: "agent" },
|
|
201
|
-
)) {
|
|
202
|
-
writer.write(part);
|
|
203
|
-
}
|
|
204
|
-
},
|
|
425
|
+
```typescript
|
|
426
|
+
// Update just the tools
|
|
427
|
+
await storedAgent.update({
|
|
428
|
+
tools: ["new-tool-1", "new-tool-2"],
|
|
205
429
|
});
|
|
206
430
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
431
|
+
// Update metadata
|
|
432
|
+
await storedAgent.update({
|
|
433
|
+
metadata: {
|
|
434
|
+
version: "2.0",
|
|
435
|
+
lastModifiedBy: "admin",
|
|
436
|
+
},
|
|
437
|
+
});
|
|
210
438
|
```
|
|
211
439
|
|
|
212
|
-
###
|
|
440
|
+
### delete()
|
|
213
441
|
|
|
214
|
-
|
|
442
|
+
Delete a stored agent:
|
|
215
443
|
|
|
216
444
|
```typescript
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
resourceId: "resource-1",
|
|
220
|
-
});
|
|
445
|
+
const result = await storedAgent.delete();
|
|
446
|
+
console.log(result.success); // true
|
|
221
447
|
```
|