@mastra/core 1.7.0 → 1.8.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/CHANGELOG.md +218 -0
- package/dist/agent/agent-legacy.d.ts +15 -0
- package/dist/agent/agent-legacy.d.ts.map +1 -1
- package/dist/agent/agent.d.ts +7 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.types.d.ts +311 -2
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.d.ts +3 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +18 -18
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/merge/MessageMerger.d.ts.map +1 -1
- package/dist/agent/message-list/message-list.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
- package/dist/{chunk-A72NTLFT.cjs → chunk-2IO5Q7OZ.cjs} +7 -7
- package/dist/{chunk-A72NTLFT.cjs.map → chunk-2IO5Q7OZ.cjs.map} +1 -1
- package/dist/{chunk-DFCRXDVK.js → chunk-2KHPZJNU.js} +10 -8
- package/dist/chunk-2KHPZJNU.js.map +1 -0
- package/dist/{chunk-R4N65TLG.js → chunk-2R5MQMSA.js} +35 -16
- package/dist/chunk-2R5MQMSA.js.map +1 -0
- package/dist/{chunk-ZSBM2SVU.js → chunk-4H5F6AFP.js} +1064 -226
- package/dist/chunk-4H5F6AFP.js.map +1 -0
- package/dist/{chunk-BQHWJLXU.js → chunk-63G75DJE.js} +9 -3
- package/dist/chunk-63G75DJE.js.map +1 -0
- package/dist/{chunk-SBOHDNIZ.cjs → chunk-6GSWC5ZA.cjs} +2 -2
- package/dist/{chunk-SBOHDNIZ.cjs.map → chunk-6GSWC5ZA.cjs.map} +1 -1
- package/dist/{chunk-QTAS3HND.cjs → chunk-6Q2UD3XF.cjs} +21 -14
- package/dist/chunk-6Q2UD3XF.cjs.map +1 -0
- package/dist/{chunk-GPJGPARM.js → chunk-DTPR3JAM.js} +2 -2
- package/dist/{chunk-GPJGPARM.js.map → chunk-DTPR3JAM.js.map} +1 -1
- package/dist/{chunk-NN26FSKL.js → chunk-FHJ2KIU5.js} +3 -3
- package/dist/{chunk-NN26FSKL.js.map → chunk-FHJ2KIU5.js.map} +1 -1
- package/dist/{chunk-RABITNTG.cjs → chunk-HWG7NPJA.cjs} +55 -55
- package/dist/{chunk-RABITNTG.cjs.map → chunk-HWG7NPJA.cjs.map} +1 -1
- package/dist/{chunk-HB6T4554.cjs → chunk-KH3G65IS.cjs} +10 -8
- package/dist/chunk-KH3G65IS.cjs.map +1 -0
- package/dist/{chunk-YQG7NBPR.cjs → chunk-KZ4IKNPN.cjs} +25 -23
- package/dist/chunk-KZ4IKNPN.cjs.map +1 -0
- package/dist/{chunk-6DUTLERJ.js → chunk-MRV5NCPC.js} +3 -3
- package/dist/{chunk-6DUTLERJ.js.map → chunk-MRV5NCPC.js.map} +1 -1
- package/dist/{chunk-O7PZ4VOO.cjs → chunk-N3ROEJG4.cjs} +12 -10
- package/dist/chunk-N3ROEJG4.cjs.map +1 -0
- package/dist/{chunk-7EXW4AAG.js → chunk-NXKI2L4X.js} +6 -4
- package/dist/chunk-NXKI2L4X.js.map +1 -0
- package/dist/{chunk-QWTB53GS.js → chunk-OSEPGSLN.js} +6 -6
- package/dist/{chunk-QWTB53GS.js.map → chunk-OSEPGSLN.js.map} +1 -1
- package/dist/{chunk-6OXW5E2O.js → chunk-PI7ONENO.js} +4 -4
- package/dist/{chunk-6OXW5E2O.js.map → chunk-PI7ONENO.js.map} +1 -1
- package/dist/{chunk-KUXNBWN7.js → chunk-Q4MV4XKX.js} +8 -6
- package/dist/chunk-Q4MV4XKX.js.map +1 -0
- package/dist/{chunk-7UAJ6LMR.cjs → chunk-QKQGKEN7.cjs} +1078 -241
- package/dist/chunk-QKQGKEN7.cjs.map +1 -0
- package/dist/{chunk-IC5OUWKJ.js → chunk-SP7P6Z4L.js} +19 -2
- package/dist/chunk-SP7P6Z4L.js.map +1 -0
- package/dist/{chunk-QDH6MVJ7.cjs → chunk-TGUDI64A.cjs} +14 -14
- package/dist/{chunk-QDH6MVJ7.cjs.map → chunk-TGUDI64A.cjs.map} +1 -1
- package/dist/{chunk-EAZ6YDCQ.cjs → chunk-U3HBG2GU.cjs} +9 -2
- package/dist/chunk-U3HBG2GU.cjs.map +1 -0
- package/dist/{chunk-6QBN6MZY.cjs → chunk-VAKB5EXJ.cjs} +42 -23
- package/dist/chunk-VAKB5EXJ.cjs.map +1 -0
- package/dist/{chunk-QSHV7GPT.js → chunk-VBPU6CLZ.js} +3808 -3026
- package/dist/chunk-VBPU6CLZ.js.map +1 -0
- package/dist/{chunk-2X66GWF5.cjs → chunk-VTVCMIAI.cjs} +3905 -3121
- package/dist/chunk-VTVCMIAI.cjs.map +1 -0
- package/dist/{chunk-PHHJLGZU.cjs → chunk-XNWF6CYR.cjs} +6 -6
- package/dist/{chunk-PHHJLGZU.cjs.map → chunk-XNWF6CYR.cjs.map} +1 -1
- package/dist/{chunk-T6GAM3SQ.js → chunk-ZRPTWYWJ.js} +18 -11
- package/dist/chunk-ZRPTWYWJ.js.map +1 -0
- package/dist/{chunk-DB7U2C5B.cjs → chunk-ZXOWG32X.cjs} +19 -2
- package/dist/chunk-ZXOWG32X.cjs.map +1 -0
- package/dist/datasets/experiment/index.d.ts.map +1 -1
- package/dist/datasets/experiment/scorer.d.ts +1 -1
- package/dist/datasets/experiment/scorer.d.ts.map +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +300 -0
- package/dist/docs/assets/SOURCE_MAP.json +1423 -0
- package/dist/docs/references/docs-agents-adding-voice.md +349 -0
- package/dist/docs/references/docs-agents-agent-approval.md +558 -0
- package/dist/docs/references/docs-agents-agent-memory.md +209 -0
- package/dist/docs/references/docs-agents-guardrails.md +374 -0
- package/dist/docs/references/docs-agents-network-approval.md +275 -0
- package/dist/docs/references/docs-agents-networks.md +299 -0
- package/dist/docs/references/docs-agents-overview.md +304 -0
- package/dist/docs/references/docs-agents-processors.md +622 -0
- package/dist/docs/references/docs-agents-structured-output.md +273 -0
- package/dist/docs/references/docs-agents-supervisor-agents.md +304 -0
- package/dist/docs/references/docs-agents-using-tools.md +214 -0
- package/dist/docs/references/docs-evals-custom-scorers.md +519 -0
- package/dist/docs/references/docs-evals-overview.md +141 -0
- package/dist/docs/references/docs-evals-running-in-ci.md +124 -0
- package/dist/docs/references/docs-memory-memory-processors.md +314 -0
- package/dist/docs/references/docs-memory-observational-memory.md +248 -0
- package/dist/docs/references/docs-memory-overview.md +45 -0
- package/dist/docs/references/docs-memory-semantic-recall.md +272 -0
- package/dist/docs/references/docs-memory-storage.md +261 -0
- package/dist/docs/references/docs-memory-working-memory.md +400 -0
- package/dist/docs/references/docs-observability-datasets-overview.md +198 -0
- package/dist/docs/references/docs-observability-datasets-running-experiments.md +274 -0
- package/dist/docs/references/docs-observability-logging.md +99 -0
- package/dist/docs/references/docs-observability-overview.md +70 -0
- package/dist/docs/references/docs-observability-tracing-bridges-otel.md +209 -0
- package/dist/docs/references/docs-observability-tracing-exporters-arize.md +272 -0
- package/dist/docs/references/docs-observability-tracing-exporters-braintrust.md +111 -0
- package/dist/docs/references/docs-observability-tracing-exporters-cloud.md +127 -0
- package/dist/docs/references/docs-observability-tracing-exporters-datadog.md +187 -0
- package/dist/docs/references/docs-observability-tracing-exporters-default.md +209 -0
- package/dist/docs/references/docs-observability-tracing-exporters-laminar.md +100 -0
- package/dist/docs/references/docs-observability-tracing-exporters-langfuse.md +213 -0
- package/dist/docs/references/docs-observability-tracing-exporters-langsmith.md +198 -0
- package/dist/docs/references/docs-observability-tracing-exporters-otel.md +476 -0
- package/dist/docs/references/docs-observability-tracing-exporters-posthog.md +148 -0
- package/dist/docs/references/docs-observability-tracing-overview.md +1112 -0
- package/dist/docs/references/docs-rag-chunking-and-embedding.md +183 -0
- package/dist/docs/references/docs-rag-graph-rag.md +215 -0
- package/dist/docs/references/docs-rag-overview.md +72 -0
- package/dist/docs/references/docs-rag-retrieval.md +515 -0
- package/dist/docs/references/docs-rag-vector-databases.md +645 -0
- package/dist/docs/references/docs-server-auth-auth0.md +220 -0
- package/dist/docs/references/docs-server-auth-clerk.md +132 -0
- package/dist/docs/references/docs-server-auth-composite-auth.md +234 -0
- package/dist/docs/references/docs-server-auth-custom-auth-provider.md +513 -0
- package/dist/docs/references/docs-server-auth-firebase.md +272 -0
- package/dist/docs/references/docs-server-auth-jwt.md +110 -0
- package/dist/docs/references/docs-server-auth-simple-auth.md +180 -0
- package/dist/docs/references/docs-server-auth-supabase.md +117 -0
- package/dist/docs/references/docs-server-auth-workos.md +186 -0
- package/dist/docs/references/docs-server-custom-adapters.md +378 -0
- package/dist/docs/references/docs-server-custom-api-routes.md +267 -0
- package/dist/docs/references/docs-server-mastra-client.md +243 -0
- package/dist/docs/references/docs-server-mastra-server.md +71 -0
- package/dist/docs/references/docs-server-middleware.md +225 -0
- package/dist/docs/references/docs-server-request-context.md +471 -0
- package/dist/docs/references/docs-streaming-events.md +237 -0
- package/dist/docs/references/docs-streaming-tool-streaming.md +175 -0
- package/dist/docs/references/docs-streaming-workflow-streaming.md +109 -0
- package/dist/docs/references/docs-voice-overview.md +959 -0
- package/dist/docs/references/docs-voice-speech-to-speech.md +102 -0
- package/dist/docs/references/docs-voice-speech-to-text.md +79 -0
- package/dist/docs/references/docs-voice-text-to-speech.md +83 -0
- package/dist/docs/references/docs-workflows-agents-and-tools.md +166 -0
- package/dist/docs/references/docs-workflows-control-flow.md +822 -0
- package/dist/docs/references/docs-workflows-error-handling.md +360 -0
- package/dist/docs/references/docs-workflows-human-in-the-loop.md +215 -0
- package/dist/docs/references/docs-workflows-overview.md +370 -0
- package/dist/docs/references/docs-workflows-snapshots.md +238 -0
- package/dist/docs/references/docs-workflows-suspend-and-resume.md +205 -0
- package/dist/docs/references/docs-workflows-time-travel.md +309 -0
- package/dist/docs/references/docs-workflows-workflow-state.md +181 -0
- package/dist/docs/references/docs-workspace-filesystem.md +164 -0
- package/dist/docs/references/docs-workspace-overview.md +239 -0
- package/dist/docs/references/docs-workspace-sandbox.md +63 -0
- package/dist/docs/references/docs-workspace-search.md +243 -0
- package/dist/docs/references/docs-workspace-skills.md +169 -0
- package/dist/docs/references/guides-agent-frameworks-ai-sdk.md +140 -0
- package/dist/docs/references/reference-agents-agent.md +141 -0
- package/dist/docs/references/reference-agents-generate.md +186 -0
- package/dist/docs/references/reference-agents-generateLegacy.md +173 -0
- package/dist/docs/references/reference-agents-getDefaultGenerateOptions.md +36 -0
- package/dist/docs/references/reference-agents-getDefaultOptions.md +34 -0
- package/dist/docs/references/reference-agents-getDefaultStreamOptions.md +36 -0
- package/dist/docs/references/reference-agents-getDescription.md +21 -0
- package/dist/docs/references/reference-agents-getInstructions.md +34 -0
- package/dist/docs/references/reference-agents-getLLM.md +37 -0
- package/dist/docs/references/reference-agents-getMemory.md +34 -0
- package/dist/docs/references/reference-agents-getModel.md +34 -0
- package/dist/docs/references/reference-agents-getTools.md +29 -0
- package/dist/docs/references/reference-agents-getVoice.md +34 -0
- package/dist/docs/references/reference-agents-listAgents.md +35 -0
- package/dist/docs/references/reference-agents-listScorers.md +34 -0
- package/dist/docs/references/reference-agents-listTools.md +34 -0
- package/dist/docs/references/reference-agents-listWorkflows.md +34 -0
- package/dist/docs/references/reference-agents-network.md +133 -0
- package/dist/docs/references/reference-ai-sdk-chat-route.md +82 -0
- package/dist/docs/references/reference-ai-sdk-network-route.md +74 -0
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +231 -0
- package/dist/docs/references/reference-ai-sdk-with-mastra.md +59 -0
- package/dist/docs/references/reference-ai-sdk-workflow-route.md +79 -0
- package/dist/docs/references/reference-auth-auth0.md +73 -0
- package/dist/docs/references/reference-auth-clerk.md +36 -0
- package/dist/docs/references/reference-auth-firebase.md +80 -0
- package/dist/docs/references/reference-auth-jwt.md +26 -0
- package/dist/docs/references/reference-auth-supabase.md +33 -0
- package/dist/docs/references/reference-auth-workos.md +84 -0
- package/dist/docs/references/reference-client-js-agents.md +437 -0
- package/dist/docs/references/reference-configuration.md +752 -0
- package/dist/docs/references/reference-core-addGateway.md +42 -0
- package/dist/docs/references/reference-core-getAgent.md +21 -0
- package/dist/docs/references/reference-core-getAgentById.md +21 -0
- package/dist/docs/references/reference-core-getDeployer.md +22 -0
- package/dist/docs/references/reference-core-getGateway.md +38 -0
- package/dist/docs/references/reference-core-getGatewayById.md +41 -0
- package/dist/docs/references/reference-core-getLogger.md +22 -0
- package/dist/docs/references/reference-core-getMCPServer.md +47 -0
- package/dist/docs/references/reference-core-getMCPServerById.md +55 -0
- package/dist/docs/references/reference-core-getMemory.md +50 -0
- package/dist/docs/references/reference-core-getScorer.md +54 -0
- package/dist/docs/references/reference-core-getScorerById.md +54 -0
- package/dist/docs/references/reference-core-getServer.md +22 -0
- package/dist/docs/references/reference-core-getStorage.md +22 -0
- package/dist/docs/references/reference-core-getStoredAgentById.md +89 -0
- package/dist/docs/references/reference-core-getTelemetry.md +22 -0
- package/dist/docs/references/reference-core-getVector.md +22 -0
- package/dist/docs/references/reference-core-getWorkflow.md +42 -0
- package/dist/docs/references/reference-core-listAgents.md +21 -0
- package/dist/docs/references/reference-core-listGateways.md +40 -0
- package/dist/docs/references/reference-core-listLogs.md +38 -0
- package/dist/docs/references/reference-core-listLogsByRunId.md +36 -0
- package/dist/docs/references/reference-core-listMCPServers.md +55 -0
- package/dist/docs/references/reference-core-listMemory.md +56 -0
- package/dist/docs/references/reference-core-listScorers.md +29 -0
- package/dist/docs/references/reference-core-listStoredAgents.md +93 -0
- package/dist/docs/references/reference-core-listVectors.md +22 -0
- package/dist/docs/references/reference-core-listWorkflows.md +21 -0
- package/dist/docs/references/reference-core-mastra-class.md +66 -0
- package/dist/docs/references/reference-core-mastra-model-gateway.md +153 -0
- package/dist/docs/references/reference-core-setLogger.md +26 -0
- package/dist/docs/references/reference-core-setStorage.md +27 -0
- package/dist/docs/references/reference-datasets-addItem.md +37 -0
- package/dist/docs/references/reference-datasets-addItems.md +35 -0
- package/dist/docs/references/reference-datasets-compareExperiments.md +52 -0
- package/dist/docs/references/reference-datasets-create.md +51 -0
- package/dist/docs/references/reference-datasets-dataset.md +82 -0
- package/dist/docs/references/reference-datasets-datasets-manager.md +94 -0
- package/dist/docs/references/reference-datasets-delete.md +25 -0
- package/dist/docs/references/reference-datasets-deleteExperiment.md +27 -0
- package/dist/docs/references/reference-datasets-deleteItem.md +27 -0
- package/dist/docs/references/reference-datasets-deleteItems.md +29 -0
- package/dist/docs/references/reference-datasets-get.md +31 -0
- package/dist/docs/references/reference-datasets-getDetails.md +47 -0
- package/dist/docs/references/reference-datasets-getExperiment.md +30 -0
- package/dist/docs/references/reference-datasets-getItem.md +33 -0
- package/dist/docs/references/reference-datasets-getItemHistory.md +31 -0
- package/dist/docs/references/reference-datasets-list.md +31 -0
- package/dist/docs/references/reference-datasets-listExperimentResults.md +39 -0
- package/dist/docs/references/reference-datasets-listExperiments.md +33 -0
- package/dist/docs/references/reference-datasets-listItems.md +46 -0
- package/dist/docs/references/reference-datasets-listVersions.md +33 -0
- package/dist/docs/references/reference-datasets-startExperiment.md +62 -0
- package/dist/docs/references/reference-datasets-startExperimentAsync.md +43 -0
- package/dist/docs/references/reference-datasets-update.md +48 -0
- package/dist/docs/references/reference-datasets-updateItem.md +38 -0
- package/dist/docs/references/reference-evals-answer-relevancy.md +105 -0
- package/dist/docs/references/reference-evals-answer-similarity.md +99 -0
- package/dist/docs/references/reference-evals-bias.md +120 -0
- package/dist/docs/references/reference-evals-completeness.md +136 -0
- package/dist/docs/references/reference-evals-content-similarity.md +101 -0
- package/dist/docs/references/reference-evals-context-precision.md +196 -0
- package/dist/docs/references/reference-evals-create-scorer.md +270 -0
- package/dist/docs/references/reference-evals-faithfulness.md +114 -0
- package/dist/docs/references/reference-evals-hallucination.md +213 -0
- package/dist/docs/references/reference-evals-keyword-coverage.md +128 -0
- package/dist/docs/references/reference-evals-mastra-scorer.md +123 -0
- package/dist/docs/references/reference-evals-run-evals.md +179 -0
- package/dist/docs/references/reference-evals-scorer-utils.md +326 -0
- package/dist/docs/references/reference-evals-textual-difference.md +113 -0
- package/dist/docs/references/reference-evals-tone-consistency.md +119 -0
- package/dist/docs/references/reference-evals-toxicity.md +123 -0
- package/dist/docs/references/reference-harness-harness-class.md +708 -0
- package/dist/docs/references/reference-logging-pino-logger.md +117 -0
- package/dist/docs/references/reference-memory-deleteMessages.md +38 -0
- package/dist/docs/references/reference-memory-memory-class.md +147 -0
- package/dist/docs/references/reference-memory-observational-memory.md +565 -0
- package/dist/docs/references/reference-observability-tracing-bridges-otel.md +131 -0
- package/dist/docs/references/reference-observability-tracing-configuration.md +178 -0
- package/dist/docs/references/reference-observability-tracing-exporters-console-exporter.md +138 -0
- package/dist/docs/references/reference-observability-tracing-exporters-datadog.md +116 -0
- package/dist/docs/references/reference-observability-tracing-instances.md +107 -0
- package/dist/docs/references/reference-observability-tracing-interfaces.md +743 -0
- package/dist/docs/references/reference-observability-tracing-processors-sensitive-data-filter.md +144 -0
- package/dist/docs/references/reference-observability-tracing-spans.md +224 -0
- package/dist/docs/references/reference-processors-batch-parts-processor.md +61 -0
- package/dist/docs/references/reference-processors-language-detector.md +82 -0
- package/dist/docs/references/reference-processors-message-history-processor.md +85 -0
- package/dist/docs/references/reference-processors-moderation-processor.md +104 -0
- package/dist/docs/references/reference-processors-pii-detector.md +108 -0
- package/dist/docs/references/reference-processors-processor-interface.md +521 -0
- package/dist/docs/references/reference-processors-prompt-injection-detector.md +72 -0
- package/dist/docs/references/reference-processors-semantic-recall-processor.md +117 -0
- package/dist/docs/references/reference-processors-system-prompt-scrubber.md +80 -0
- package/dist/docs/references/reference-processors-token-limiter-processor.md +115 -0
- package/dist/docs/references/reference-processors-tool-call-filter.md +85 -0
- package/dist/docs/references/reference-processors-tool-search-processor.md +111 -0
- package/dist/docs/references/reference-processors-unicode-normalizer.md +62 -0
- package/dist/docs/references/reference-processors-working-memory-processor.md +152 -0
- package/dist/docs/references/reference-rag-database-config.md +261 -0
- package/dist/docs/references/reference-rag-embeddings.md +92 -0
- package/dist/docs/references/reference-server-mastra-server.md +298 -0
- package/dist/docs/references/reference-server-register-api-route.md +249 -0
- package/dist/docs/references/reference-storage-cloudflare-d1.md +218 -0
- package/dist/docs/references/reference-storage-composite.md +235 -0
- package/dist/docs/references/reference-storage-lance.md +131 -0
- package/dist/docs/references/reference-storage-libsql.md +135 -0
- package/dist/docs/references/reference-storage-mongodb.md +262 -0
- package/dist/docs/references/reference-storage-mssql.md +157 -0
- package/dist/docs/references/reference-storage-overview.md +121 -0
- package/dist/docs/references/reference-storage-postgresql.md +526 -0
- package/dist/docs/references/reference-storage-upstash.md +160 -0
- package/dist/docs/references/reference-streaming-ChunkType.md +292 -0
- package/dist/docs/references/reference-streaming-agents-MastraModelOutput.md +182 -0
- package/dist/docs/references/reference-streaming-agents-streamLegacy.md +142 -0
- package/dist/docs/references/reference-streaming-workflows-observeStream.md +42 -0
- package/dist/docs/references/reference-streaming-workflows-resumeStream.md +61 -0
- package/dist/docs/references/reference-streaming-workflows-stream.md +88 -0
- package/dist/docs/references/reference-streaming-workflows-timeTravelStream.md +142 -0
- package/dist/docs/references/reference-templates-overview.md +194 -0
- package/dist/docs/references/reference-tools-create-tool.md +237 -0
- package/dist/docs/references/reference-tools-graph-rag-tool.md +182 -0
- package/dist/docs/references/reference-tools-mcp-client.md +954 -0
- package/dist/docs/references/reference-tools-mcp-server.md +1271 -0
- package/dist/docs/references/reference-tools-vector-query-tool.md +459 -0
- package/dist/docs/references/reference-vectors-libsql.md +305 -0
- package/dist/docs/references/reference-vectors-mongodb.md +295 -0
- package/dist/docs/references/reference-vectors-pg.md +408 -0
- package/dist/docs/references/reference-vectors-upstash.md +294 -0
- package/dist/docs/references/reference-voice-composite-voice.md +121 -0
- package/dist/docs/references/reference-voice-mastra-voice.md +311 -0
- package/dist/docs/references/reference-voice-voice.addInstructions.md +55 -0
- package/dist/docs/references/reference-voice-voice.addTools.md +67 -0
- package/dist/docs/references/reference-voice-voice.connect.md +94 -0
- package/dist/docs/references/reference-voice-voice.events.md +37 -0
- package/dist/docs/references/reference-voice-voice.listen.md +164 -0
- package/dist/docs/references/reference-voice-voice.on.md +111 -0
- package/dist/docs/references/reference-voice-voice.speak.md +157 -0
- package/dist/docs/references/reference-workflows-run-methods-cancel.md +86 -0
- package/dist/docs/references/reference-workflows-run-methods-restart.md +33 -0
- package/dist/docs/references/reference-workflows-run-methods-resume.md +59 -0
- package/dist/docs/references/reference-workflows-run-methods-start.md +58 -0
- package/dist/docs/references/reference-workflows-run-methods-startAsync.md +67 -0
- package/dist/docs/references/reference-workflows-run-methods-timeTravel.md +142 -0
- package/dist/docs/references/reference-workflows-run.md +59 -0
- package/dist/docs/references/reference-workflows-step.md +119 -0
- package/dist/docs/references/reference-workflows-workflow-methods-branch.md +25 -0
- package/dist/docs/references/reference-workflows-workflow-methods-commit.md +17 -0
- package/dist/docs/references/reference-workflows-workflow-methods-create-run.md +63 -0
- package/dist/docs/references/reference-workflows-workflow-methods-dountil.md +25 -0
- package/dist/docs/references/reference-workflows-workflow-methods-dowhile.md +25 -0
- package/dist/docs/references/reference-workflows-workflow-methods-foreach.md +118 -0
- package/dist/docs/references/reference-workflows-workflow-methods-map.md +93 -0
- package/dist/docs/references/reference-workflows-workflow-methods-parallel.md +21 -0
- package/dist/docs/references/reference-workflows-workflow-methods-sleep.md +35 -0
- package/dist/docs/references/reference-workflows-workflow-methods-sleepUntil.md +35 -0
- package/dist/docs/references/reference-workflows-workflow-methods-then.md +21 -0
- package/dist/docs/references/reference-workflows-workflow.md +157 -0
- package/dist/docs/references/reference-workspace-filesystem.md +255 -0
- package/dist/docs/references/reference-workspace-local-filesystem.md +343 -0
- package/dist/docs/references/reference-workspace-local-sandbox.md +301 -0
- package/dist/docs/references/reference-workspace-sandbox.md +87 -0
- package/dist/docs/references/reference-workspace-workspace-class.md +244 -0
- package/dist/docs/references/reference.md +277 -0
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/run/index.d.ts +9 -2
- package/dist/evals/run/index.d.ts.map +1 -1
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/harness/harness.d.ts +6 -0
- package/dist/harness/harness.d.ts.map +1 -1
- package/dist/harness/index.cjs +28 -13
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.js +20 -5
- package/dist/harness/index.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/integration/index.cjs +2 -2
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +6 -6
- package/dist/llm/index.js +1 -1
- package/dist/llm/model/embedding-router.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/loop/index.cjs +20 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/network/validation.d.ts +51 -0
- package/dist/loop/network/validation.d.ts.map +1 -1
- package/dist/loop/test-utils/generateText.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/types.d.ts +15 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +3 -0
- package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/is-task-complete-step.d.ts +126 -0
- package/dist/loop/workflows/agentic-execution/is-task-complete-step.d.ts.map +1 -0
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +3 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +1 -0
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +3 -0
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/loop/workflows/schema.d.ts +3 -0
- package/dist/loop/workflows/schema.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +9 -5
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +42 -42
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/skills.d.ts.map +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +56 -56
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +160 -160
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +2 -3
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +1 -0
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +27 -1
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tools/index.cjs +9 -5
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/is-vercel-tool.cjs +2 -2
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/toolchecks.d.ts +10 -0
- package/dist/tools/toolchecks.d.ts.map +1 -1
- package/dist/utils.cjs +23 -23
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/index.js +1 -1
- package/dist/vector/types.d.ts +9 -1
- package/dist/vector/types.d.ts.map +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/types.d.ts +14 -1
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +3 -17
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/workspace/filesystem/composite-filesystem.d.ts +5 -0
- package/dist/workspace/filesystem/composite-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/filesystem.d.ts +12 -0
- package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/fs-utils.d.ts +12 -0
- package/dist/workspace/filesystem/fs-utils.d.ts.map +1 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts +6 -0
- package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
- package/dist/workspace/index.cjs +66 -66
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/lsp/client.d.ts +76 -0
- package/dist/workspace/lsp/client.d.ts.map +1 -0
- package/dist/workspace/lsp/index.d.ts +6 -0
- package/dist/workspace/lsp/index.d.ts.map +1 -0
- package/dist/workspace/lsp/language.d.ts +16 -0
- package/dist/workspace/lsp/language.d.ts.map +1 -0
- package/dist/workspace/lsp/manager.d.ts +72 -0
- package/dist/workspace/lsp/manager.d.ts.map +1 -0
- package/dist/workspace/lsp/servers.d.ts +43 -0
- package/dist/workspace/lsp/servers.d.ts.map +1 -0
- package/dist/workspace/lsp/types.d.ts +45 -0
- package/dist/workspace/lsp/types.d.ts.map +1 -0
- package/dist/workspace/tools/ast-edit.d.ts.map +1 -1
- package/dist/workspace/tools/edit-file.d.ts.map +1 -1
- package/dist/workspace/tools/helpers.d.ts +13 -0
- package/dist/workspace/tools/helpers.d.ts.map +1 -1
- package/dist/workspace/tools/write-file.d.ts.map +1 -1
- package/dist/workspace/workspace.d.ts +33 -0
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/package.json +10 -8
- package/dist/chunk-2X66GWF5.cjs.map +0 -1
- package/dist/chunk-6QBN6MZY.cjs.map +0 -1
- package/dist/chunk-7EXW4AAG.js.map +0 -1
- package/dist/chunk-7UAJ6LMR.cjs.map +0 -1
- package/dist/chunk-BQHWJLXU.js.map +0 -1
- package/dist/chunk-DB7U2C5B.cjs.map +0 -1
- package/dist/chunk-DFCRXDVK.js.map +0 -1
- package/dist/chunk-EAZ6YDCQ.cjs.map +0 -1
- package/dist/chunk-HB6T4554.cjs.map +0 -1
- package/dist/chunk-IC5OUWKJ.js.map +0 -1
- package/dist/chunk-KUXNBWN7.js.map +0 -1
- package/dist/chunk-O7PZ4VOO.cjs.map +0 -1
- package/dist/chunk-QSHV7GPT.js.map +0 -1
- package/dist/chunk-QTAS3HND.cjs.map +0 -1
- package/dist/chunk-R4N65TLG.js.map +0 -1
- package/dist/chunk-T6GAM3SQ.js.map +0 -1
- package/dist/chunk-YQG7NBPR.cjs.map +0 -1
- package/dist/chunk-ZSBM2SVU.js.map +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# WorkspaceSandbox
|
|
2
|
+
|
|
3
|
+
**Added in:** `@mastra/core@1.1.0`
|
|
4
|
+
|
|
5
|
+
The `WorkspaceSandbox` interface defines how workspaces execute commands.
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
### `start()`
|
|
10
|
+
|
|
11
|
+
Start the sandbox. Called automatically by `workspace.init()` or on first `executeCommand()` call.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
await sandbox.start()
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This method prepares the sandbox for command execution.
|
|
18
|
+
|
|
19
|
+
### `stop()`
|
|
20
|
+
|
|
21
|
+
Stop the sandbox.
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
await sandbox.stop?.()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### `destroy()`
|
|
28
|
+
|
|
29
|
+
Clean up sandbox resources. Called by `workspace.destroy()`.
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
await sandbox.destroy()
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### `executeCommand(command, args?, options?)`
|
|
36
|
+
|
|
37
|
+
Execute a shell command.
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
const result = await sandbox.executeCommand('ls', ['-la', '/docs'])
|
|
41
|
+
const result = await sandbox.executeCommand('npm', ['install', 'lodash'])
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Parameters:**
|
|
45
|
+
|
|
46
|
+
**command:** (`string`): Command to execute
|
|
47
|
+
|
|
48
|
+
**args?:** (`string[]`): Command arguments
|
|
49
|
+
|
|
50
|
+
**options.timeout?:** (`number`): Execution timeout in milliseconds
|
|
51
|
+
|
|
52
|
+
**options.cwd?:** (`string`): Working directory for the command
|
|
53
|
+
|
|
54
|
+
**options.env?:** (`Record<string, string>`): Additional environment variables
|
|
55
|
+
|
|
56
|
+
**options.onStdout?:** (`(data: string) => void`): Callback for stdout streaming
|
|
57
|
+
|
|
58
|
+
**options.onStderr?:** (`(data: string) => void`): Callback for stderr streaming
|
|
59
|
+
|
|
60
|
+
### `getInfo()`
|
|
61
|
+
|
|
62
|
+
Get sandbox status and resource information.
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const info = await sandbox.getInfo()
|
|
66
|
+
// { status: 'running', resources: { memoryMB: 512, cpuPercent: 5 } }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `getInstructions(opts?)`
|
|
70
|
+
|
|
71
|
+
Returns a description of how this sandbox works. Injected into the agent's system message when the workspace is assigned to an agent.
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
const instructions = sandbox.getInstructions?.()
|
|
75
|
+
// 'Local command execution. Working directory: "/workspace".'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Parameters:**
|
|
79
|
+
|
|
80
|
+
**opts.requestContext?:** (`RequestContext`): Forwarded to the \`instructions\` function if one was provided in the constructor.
|
|
81
|
+
|
|
82
|
+
**Returns:** `string`
|
|
83
|
+
|
|
84
|
+
## Related
|
|
85
|
+
|
|
86
|
+
- [Workspace Class](https://mastra.ai/reference/workspace/workspace-class)
|
|
87
|
+
- [Filesystem Interface](https://mastra.ai/reference/workspace/filesystem)
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Workspace Class
|
|
2
|
+
|
|
3
|
+
**Added in:** `@mastra/core@1.1.0`
|
|
4
|
+
|
|
5
|
+
The `Workspace` class combines a filesystem and sandbox to provide agents with file storage and command execution capabilities. It also supports BM25 and vector search for indexed content.
|
|
6
|
+
|
|
7
|
+
## Usage Example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { Workspace, LocalFilesystem, LocalSandbox } from '@mastra/core/workspace'
|
|
11
|
+
|
|
12
|
+
const workspace = new Workspace({
|
|
13
|
+
id: 'my-workspace',
|
|
14
|
+
name: 'My Workspace',
|
|
15
|
+
filesystem: new LocalFilesystem({
|
|
16
|
+
basePath: './workspace',
|
|
17
|
+
}),
|
|
18
|
+
sandbox: new LocalSandbox({
|
|
19
|
+
workingDirectory: './workspace',
|
|
20
|
+
}),
|
|
21
|
+
bm25: true,
|
|
22
|
+
autoIndexPaths: ['/docs'],
|
|
23
|
+
})
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Constructor parameters
|
|
27
|
+
|
|
28
|
+
**id?:** (`string`): Unique identifier for the workspace (Default: `Auto-generated`)
|
|
29
|
+
|
|
30
|
+
**name?:** (`string`): Human-readable name (Default: `workspace-{id}`)
|
|
31
|
+
|
|
32
|
+
**filesystem?:** (`WorkspaceFilesystem`): Filesystem provider instance (e.g., LocalFilesystem)
|
|
33
|
+
|
|
34
|
+
**sandbox?:** (`WorkspaceSandbox`): Sandbox provider instance (e.g., LocalSandbox)
|
|
35
|
+
|
|
36
|
+
**bm25?:** (`boolean | BM25Config`): Enable BM25 keyword search. Pass true for defaults or a config object. (Default: `undefined`)
|
|
37
|
+
|
|
38
|
+
**vectorStore?:** (`MastraVector`): Vector store for semantic search
|
|
39
|
+
|
|
40
|
+
**embedder?:** (`(text: string) => Promise<number[]>`): Embedder function for generating vectors. Required when vectorStore is provided.
|
|
41
|
+
|
|
42
|
+
**autoIndexPaths?:** (`string[]`): Paths or glob patterns to auto-index on init(). Supports glob patterns like '\*\*/\*.md' for selective indexing.
|
|
43
|
+
|
|
44
|
+
**skills?:** (`string[] | ((context: SkillsContext) => string[] | Promise<string[]>)`): Paths where SKILL.md files are located. This can be a static array or an async function that resolves paths dynamically. Supports glob patterns like './\*\*/skills' for discovery.
|
|
45
|
+
|
|
46
|
+
**skillSource?:** (`SkillSource`): Custom skill source for skill discovery. When provided, this source is used instead of the workspace filesystem. Use VersionedSkillSource to serve published skill versions from a content-addressable blob store.
|
|
47
|
+
|
|
48
|
+
**onMount?:** (`OnMountHook`): Pre-mount hook called for each filesystem before mounting into a sandbox. Return false to skip mounting, or return { success: true } if the hook handled the mount. Return undefined to use the default mount behavior.
|
|
49
|
+
|
|
50
|
+
**searchIndexName?:** (`string`): Custom index name for the vector store. Must be a valid SQL identifier (start with a letter or underscore, contain only letters, numbers, or underscores, max 63 characters). Defaults to a sanitized version of '{id}\_search'.
|
|
51
|
+
|
|
52
|
+
**tools?:** (`WorkspaceToolsConfig`): Per-tool configuration for enabling tools and setting safety options
|
|
53
|
+
|
|
54
|
+
**operationTimeout?:** (`number`): Timeout for operations in milliseconds
|
|
55
|
+
|
|
56
|
+
## Tool configuration
|
|
57
|
+
|
|
58
|
+
The `tools` option accepts a `WorkspaceToolsConfig` object that controls which workspace tools are enabled and their safety settings.
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { WORKSPACE_TOOLS } from '@mastra/core/workspace';
|
|
62
|
+
|
|
63
|
+
tools: {
|
|
64
|
+
// Global defaults (apply to all tools)
|
|
65
|
+
enabled: true,
|
|
66
|
+
requireApproval: false,
|
|
67
|
+
|
|
68
|
+
// Per-tool overrides using WORKSPACE_TOOLS constants
|
|
69
|
+
[WORKSPACE_TOOLS.FILESYSTEM.WRITE_FILE]: {
|
|
70
|
+
requireApproval: true,
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The config object has two parts:
|
|
76
|
+
|
|
77
|
+
- **Global defaults** (`enabled`, `requireApproval`) - Apply to all tools unless overridden
|
|
78
|
+
- **Per-tool overrides** - Use `WORKSPACE_TOOLS` constants as keys to configure individual tools
|
|
79
|
+
|
|
80
|
+
See [workspace overview](https://mastra.ai/docs/workspace/overview) for more examples.
|
|
81
|
+
|
|
82
|
+
### Per-tool options
|
|
83
|
+
|
|
84
|
+
Each tool can be configured with these options:
|
|
85
|
+
|
|
86
|
+
**enabled?:** (`boolean`): Whether the tool is available to agents (Default: `true`)
|
|
87
|
+
|
|
88
|
+
**requireApproval?:** (`boolean`): Whether the tool requires user approval before execution (Default: `false`)
|
|
89
|
+
|
|
90
|
+
**requireReadBeforeWrite?:** (`boolean`): For write tools: require reading the file first to prevent overwrites (Default: `false`)
|
|
91
|
+
|
|
92
|
+
## Properties
|
|
93
|
+
|
|
94
|
+
**id:** (`string`): Workspace identifier
|
|
95
|
+
|
|
96
|
+
**name:** (`string`): Workspace name
|
|
97
|
+
|
|
98
|
+
**status:** (`WorkspaceStatus`): 'pending' | 'initializing' | 'ready' | 'paused' | 'error' | 'destroying' | 'destroyed'
|
|
99
|
+
|
|
100
|
+
**filesystem:** (`WorkspaceFilesystem | undefined`): The filesystem provider
|
|
101
|
+
|
|
102
|
+
**sandbox:** (`WorkspaceSandbox | undefined`): The sandbox provider
|
|
103
|
+
|
|
104
|
+
**skills:** (`WorkspaceSkills | undefined`): Skills interface for accessing SKILL.md files
|
|
105
|
+
|
|
106
|
+
**canBM25:** (`boolean`): Whether BM25 search is available
|
|
107
|
+
|
|
108
|
+
**canVector:** (`boolean`): Whether vector search is available
|
|
109
|
+
|
|
110
|
+
**canHybrid:** (`boolean`): Whether hybrid search is available
|
|
111
|
+
|
|
112
|
+
## Methods
|
|
113
|
+
|
|
114
|
+
### Lifecycle
|
|
115
|
+
|
|
116
|
+
#### `init()`
|
|
117
|
+
|
|
118
|
+
Initialize the workspace and prepare resources.
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
await workspace.init()
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Calling `init()` is optional in most cases:
|
|
125
|
+
|
|
126
|
+
- **Sandbox**: Auto-starts on first `executeCommand()` call. Use `init()` to avoid first-command latency.
|
|
127
|
+
- **Filesystem**: Creates the base directory and runs any provider-specific setup. Some providers auto-create the directory on first operation.
|
|
128
|
+
- **Search**: Required only if using `autoIndexPaths` for auto-indexing.
|
|
129
|
+
|
|
130
|
+
Initialization performs:
|
|
131
|
+
|
|
132
|
+
- Starts the filesystem provider (creates base directory if needed)
|
|
133
|
+
- Starts the sandbox provider (creates working directory, sets up isolation if configured)
|
|
134
|
+
- Indexes files from `autoIndexPaths` for search
|
|
135
|
+
|
|
136
|
+
#### `destroy()`
|
|
137
|
+
|
|
138
|
+
Destroy the workspace and clean up resources.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
await workspace.destroy()
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Search operations
|
|
145
|
+
|
|
146
|
+
#### `index(path, content, options?)`
|
|
147
|
+
|
|
148
|
+
Index content for search.
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
await workspace.index('/docs/guide.md', 'Guide content...')
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### `search(query, options?)`
|
|
155
|
+
|
|
156
|
+
Search indexed content.
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
const results = await workspace.search('password reset', {
|
|
160
|
+
topK: 10,
|
|
161
|
+
mode: 'hybrid',
|
|
162
|
+
})
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Utility
|
|
166
|
+
|
|
167
|
+
#### `getInfo()`
|
|
168
|
+
|
|
169
|
+
Get workspace information.
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
const info = await workspace.getInfo()
|
|
173
|
+
// { id, name, status, createdAt, lastAccessedAt, filesystem?, sandbox? }
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### `getInstructions(opts?)`
|
|
177
|
+
|
|
178
|
+
Returns combined instructions from the filesystem and sandbox providers. Injected into the agent's system message to help it understand the execution context.
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
const instructions = workspace.getInstructions()
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Pass `requestContext` to enable per-request customization when a provider's `instructions` option is a function:
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
const instructions = workspace.getInstructions({ requestContext })
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Parameters:**
|
|
191
|
+
|
|
192
|
+
**opts.requestContext?:** (`RequestContext`): Forwarded to the \`instructions\` function on the filesystem or sandbox provider, if one is configured.
|
|
193
|
+
|
|
194
|
+
**Returns:** `string`
|
|
195
|
+
|
|
196
|
+
To override the default output, pass an `instructions` option to [LocalFilesystem](https://mastra.ai/reference/workspace/local-filesystem) or [LocalSandbox](https://mastra.ai/reference/workspace/local-sandbox).
|
|
197
|
+
|
|
198
|
+
#### `getToolsConfig()`
|
|
199
|
+
|
|
200
|
+
Get the tools configuration.
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
const config = workspace.getToolsConfig()
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Agent tools
|
|
207
|
+
|
|
208
|
+
A workspace provides tools to agents based on what is configured.
|
|
209
|
+
|
|
210
|
+
### Filesystem tools
|
|
211
|
+
|
|
212
|
+
Added when a filesystem is configured:
|
|
213
|
+
|
|
214
|
+
| Tool | Description |
|
|
215
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
216
|
+
| `mastra_workspace_read_file` | Read file contents. Supports optional line range for reading specific portions of large files. |
|
|
217
|
+
| `mastra_workspace_write_file` | Create or overwrite a file with new content. Creates parent directories automatically. |
|
|
218
|
+
| `mastra_workspace_edit_file` | Edit an existing file by finding and replacing text. Useful for targeted changes without rewriting the entire file. |
|
|
219
|
+
| `mastra_workspace_list_files` | List directory contents as a tree structure. Supports recursive listing with depth limits. |
|
|
220
|
+
| `mastra_workspace_delete` | Delete a file or directory. Supports recursive deletion for directories. |
|
|
221
|
+
| `mastra_workspace_file_stat` | Get metadata about a file or directory including size, type, and modification time. |
|
|
222
|
+
| `mastra_workspace_mkdir` | Create a directory. Creates parent directories automatically if they don't exist. |
|
|
223
|
+
| `mastra_workspace_grep` | Search file contents using regex patterns. Supports glob filtering, context lines, and case-insensitive search. |
|
|
224
|
+
|
|
225
|
+
Write tools (`write_file`, `edit_file`, `delete`, `mkdir`) are excluded when the filesystem is in read-only mode.
|
|
226
|
+
|
|
227
|
+
### Sandbox tools
|
|
228
|
+
|
|
229
|
+
Added when a sandbox is configured:
|
|
230
|
+
|
|
231
|
+
| Tool | Description |
|
|
232
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
233
|
+
| `mastra_workspace_execute_command` | Execute a shell command with arguments. Returns stdout, stderr, and exit code. Supports timeouts and streaming output. |
|
|
234
|
+
|
|
235
|
+
### Search tools
|
|
236
|
+
|
|
237
|
+
Added when BM25 or vector search is configured:
|
|
238
|
+
|
|
239
|
+
| Tool | Description |
|
|
240
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
241
|
+
| `mastra_workspace_search` | Search indexed content using keyword (BM25), semantic (vector), or hybrid search. Returns ranked results with scores. |
|
|
242
|
+
| `mastra_workspace_index` | Index content for search. Associates content with a path for later retrieval. |
|
|
243
|
+
|
|
244
|
+
The `index` tool is excluded when the filesystem is in read-only mode.
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Reference
|
|
2
|
+
|
|
3
|
+
The Reference section provides documentation of Mastra's API, including parameters, types and usage examples.
|
|
4
|
+
|
|
5
|
+
- [Agent Class](https://mastra.ai/reference/agents/agent)
|
|
6
|
+
- [.generate()](https://mastra.ai/reference/agents/generate)
|
|
7
|
+
- [.generateLegacy()](https://mastra.ai/reference/agents/generateLegacy)
|
|
8
|
+
- [.getDefaultGenerateOptionsLegacy()](https://mastra.ai/reference/agents/getDefaultGenerateOptions)
|
|
9
|
+
- [.getDefaultOptions()](https://mastra.ai/reference/agents/getDefaultOptions)
|
|
10
|
+
- [.getDefaultStreamOptionsLegacy()](https://mastra.ai/reference/agents/getDefaultStreamOptions)
|
|
11
|
+
- [.getDescription()](https://mastra.ai/reference/agents/getDescription)
|
|
12
|
+
- [.getInstructions()](https://mastra.ai/reference/agents/getInstructions)
|
|
13
|
+
- [.getLLM()](https://mastra.ai/reference/agents/getLLM)
|
|
14
|
+
- [.getMemory()](https://mastra.ai/reference/agents/getMemory)
|
|
15
|
+
- [.getModel()](https://mastra.ai/reference/agents/getModel)
|
|
16
|
+
- [.getTools()](https://mastra.ai/reference/agents/getTools)
|
|
17
|
+
- [.getVoice()](https://mastra.ai/reference/agents/getVoice)
|
|
18
|
+
- [.listAgents()](https://mastra.ai/reference/agents/listAgents)
|
|
19
|
+
- [.listScorers()](https://mastra.ai/reference/agents/listScorers)
|
|
20
|
+
- [.listTools()](https://mastra.ai/reference/agents/listTools)
|
|
21
|
+
- [.listWorkflows()](https://mastra.ai/reference/agents/listWorkflows)
|
|
22
|
+
- [.network()](https://mastra.ai/reference/agents/network)
|
|
23
|
+
- [chatRoute()](https://mastra.ai/reference/ai-sdk/chat-route)
|
|
24
|
+
- [handleChatStream()](https://mastra.ai/reference/ai-sdk/handle-chat-stream)
|
|
25
|
+
- [handleNetworkStream()](https://mastra.ai/reference/ai-sdk/handle-network-stream)
|
|
26
|
+
- [handleWorkflowStream()](https://mastra.ai/reference/ai-sdk/handle-workflow-stream)
|
|
27
|
+
- [networkRoute()](https://mastra.ai/reference/ai-sdk/network-route)
|
|
28
|
+
- [toAISdkStream()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-stream)
|
|
29
|
+
- [toAISdkV4Messages()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-v4-messages)
|
|
30
|
+
- [toAISdkV5Messages()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-v5-messages)
|
|
31
|
+
- [withMastra()](https://mastra.ai/reference/ai-sdk/with-mastra)
|
|
32
|
+
- [workflowRoute()](https://mastra.ai/reference/ai-sdk/workflow-route)
|
|
33
|
+
- [Auth0](https://mastra.ai/reference/auth/auth0)
|
|
34
|
+
- [Better Auth](https://mastra.ai/reference/auth/better-auth)
|
|
35
|
+
- [Clerk](https://mastra.ai/reference/auth/clerk)
|
|
36
|
+
- [Firebase](https://mastra.ai/reference/auth/firebase)
|
|
37
|
+
- [JSON Web Token](https://mastra.ai/reference/auth/jwt)
|
|
38
|
+
- [Supabase](https://mastra.ai/reference/auth/supabase)
|
|
39
|
+
- [WorkOS](https://mastra.ai/reference/auth/workos)
|
|
40
|
+
- [create-mastra](https://mastra.ai/reference/cli/create-mastra)
|
|
41
|
+
- [mastra](https://mastra.ai/reference/cli/mastra)
|
|
42
|
+
- [Agents API](https://mastra.ai/reference/client-js/agents)
|
|
43
|
+
- [Error Handling](https://mastra.ai/reference/client-js/error-handling)
|
|
44
|
+
- [Logs API](https://mastra.ai/reference/client-js/logs)
|
|
45
|
+
- [Mastra Client SDK](https://mastra.ai/reference/client-js/mastra-client)
|
|
46
|
+
- [Memory API](https://mastra.ai/reference/client-js/memory)
|
|
47
|
+
- [Observability API](https://mastra.ai/reference/client-js/observability)
|
|
48
|
+
- [Telemetry API](https://mastra.ai/reference/client-js/telemetry)
|
|
49
|
+
- [Tools API](https://mastra.ai/reference/client-js/tools)
|
|
50
|
+
- [Vectors API](https://mastra.ai/reference/client-js/vectors)
|
|
51
|
+
- [Workflows API](https://mastra.ai/reference/client-js/workflows)
|
|
52
|
+
- [Mastra Class](https://mastra.ai/reference/core/mastra-class)
|
|
53
|
+
- [MastraModelGateway](https://mastra.ai/reference/core/mastra-model-gateway)
|
|
54
|
+
- [.addGateway()](https://mastra.ai/reference/core/addGateway)
|
|
55
|
+
- [.getAgent()](https://mastra.ai/reference/core/getAgent)
|
|
56
|
+
- [.getAgentById()](https://mastra.ai/reference/core/getAgentById)
|
|
57
|
+
- [.getDeployer()](https://mastra.ai/reference/core/getDeployer)
|
|
58
|
+
- [.getGateway()](https://mastra.ai/reference/core/getGateway)
|
|
59
|
+
- [.getGatewayById()](https://mastra.ai/reference/core/getGatewayById)
|
|
60
|
+
- [.getLogger()](https://mastra.ai/reference/core/getLogger)
|
|
61
|
+
- [.getMCPServer()](https://mastra.ai/reference/core/getMCPServer)
|
|
62
|
+
- [.getMCPServerById()](https://mastra.ai/reference/core/getMCPServerById)
|
|
63
|
+
- [.getMemory()](https://mastra.ai/reference/core/getMemory)
|
|
64
|
+
- [.getScorer()](https://mastra.ai/reference/core/getScorer)
|
|
65
|
+
- [.getScorerById()](https://mastra.ai/reference/core/getScorerById)
|
|
66
|
+
- [.getServer()](https://mastra.ai/reference/core/getServer)
|
|
67
|
+
- [.getStorage()](https://mastra.ai/reference/core/getStorage)
|
|
68
|
+
- [.getStoredAgentById()](https://mastra.ai/reference/core/getStoredAgentById)
|
|
69
|
+
- [.getTelemetry()](https://mastra.ai/reference/core/getTelemetry)
|
|
70
|
+
- [.getVector()](https://mastra.ai/reference/core/getVector)
|
|
71
|
+
- [.getWorkflow()](https://mastra.ai/reference/core/getWorkflow)
|
|
72
|
+
- [.listAgents()](https://mastra.ai/reference/core/listAgents)
|
|
73
|
+
- [.listGateways()](https://mastra.ai/reference/core/listGateways)
|
|
74
|
+
- [.listLogs()](https://mastra.ai/reference/core/listLogs)
|
|
75
|
+
- [.listLogsByRunId()](https://mastra.ai/reference/core/listLogsByRunId)
|
|
76
|
+
- [.listMCPServers()](https://mastra.ai/reference/core/listMCPServers)
|
|
77
|
+
- [.listMemory()](https://mastra.ai/reference/core/listMemory)
|
|
78
|
+
- [.listScorers()](https://mastra.ai/reference/core/listScorers)
|
|
79
|
+
- [.listStoredAgents()](https://mastra.ai/reference/core/listStoredAgents)
|
|
80
|
+
- [.listVectors()](https://mastra.ai/reference/core/listVectors)
|
|
81
|
+
- [.listWorkflows()](https://mastra.ai/reference/core/listWorkflows)
|
|
82
|
+
- [.setLogger()](https://mastra.ai/reference/core/setLogger)
|
|
83
|
+
- [.setStorage()](https://mastra.ai/reference/core/setStorage)
|
|
84
|
+
- [Cloudflare](https://mastra.ai/reference/deployer/cloudflare)
|
|
85
|
+
- [Deployer](https://mastra.ai/reference/deployer)
|
|
86
|
+
- [Netlify](https://mastra.ai/reference/deployer/netlify)
|
|
87
|
+
- [Vercel](https://mastra.ai/reference/deployer/vercel)
|
|
88
|
+
- [Answer Relevancy Scorer](https://mastra.ai/reference/evals/answer-relevancy)
|
|
89
|
+
- [Answer Similarity Scorer](https://mastra.ai/reference/evals/answer-similarity)
|
|
90
|
+
- [Bias](https://mastra.ai/reference/evals/bias)
|
|
91
|
+
- [Completeness](https://mastra.ai/reference/evals/completeness)
|
|
92
|
+
- [Content Similarity Scorer](https://mastra.ai/reference/evals/content-similarity)
|
|
93
|
+
- [Context Precision Scorer](https://mastra.ai/reference/evals/context-precision)
|
|
94
|
+
- [Context Relevance Scorer](https://mastra.ai/reference/evals/context-relevance)
|
|
95
|
+
- [createScorer()](https://mastra.ai/reference/evals/create-scorer)
|
|
96
|
+
- [Faithfulness](https://mastra.ai/reference/evals/faithfulness)
|
|
97
|
+
- [Hallucination](https://mastra.ai/reference/evals/hallucination)
|
|
98
|
+
- [Keyword Coverage Scorer](https://mastra.ai/reference/evals/keyword-coverage)
|
|
99
|
+
- [MastraScorer](https://mastra.ai/reference/evals/mastra-scorer)
|
|
100
|
+
- [Noise Sensitivity Scorer](https://mastra.ai/reference/evals/noise-sensitivity)
|
|
101
|
+
- [Prompt Alignment Scorer](https://mastra.ai/reference/evals/prompt-alignment)
|
|
102
|
+
- [runEvals()](https://mastra.ai/reference/evals/run-evals)
|
|
103
|
+
- [Scorer Utils](https://mastra.ai/reference/evals/scorer-utils)
|
|
104
|
+
- [Textual Difference Scorer](https://mastra.ai/reference/evals/textual-difference)
|
|
105
|
+
- [Tone Consistency Scorer](https://mastra.ai/reference/evals/tone-consistency)
|
|
106
|
+
- [Tool Call Accuracy Scorers](https://mastra.ai/reference/evals/tool-call-accuracy)
|
|
107
|
+
- [Toxicity](https://mastra.ai/reference/evals/toxicity)
|
|
108
|
+
- [Harness Class](https://mastra.ai/reference/harness/harness-class)
|
|
109
|
+
- [createMastraCode()](https://mastra.ai/reference/mastra-code/createMastraCode)
|
|
110
|
+
- [Cloned Thread Utilities](https://mastra.ai/reference/memory/clone-utilities)
|
|
111
|
+
- [Memory Class](https://mastra.ai/reference/memory/memory-class)
|
|
112
|
+
- [Observational Memory](https://mastra.ai/reference/memory/observational-memory)
|
|
113
|
+
- [.cloneThread()](https://mastra.ai/reference/memory/cloneThread)
|
|
114
|
+
- [.createThread()](https://mastra.ai/reference/memory/createThread)
|
|
115
|
+
- [.deleteMessages()](https://mastra.ai/reference/memory/deleteMessages)
|
|
116
|
+
- [.getThreadById()](https://mastra.ai/reference/memory/getThreadById)
|
|
117
|
+
- [.listThreads()](https://mastra.ai/reference/memory/listThreads)
|
|
118
|
+
- [.recall()](https://mastra.ai/reference/memory/recall)
|
|
119
|
+
- [Dataset Class](https://mastra.ai/reference/datasets/dataset)
|
|
120
|
+
- [DatasetsManager Class](https://mastra.ai/reference/datasets/datasets-manager)
|
|
121
|
+
- [.addItem()](https://mastra.ai/reference/datasets/addItem)
|
|
122
|
+
- [.addItems()](https://mastra.ai/reference/datasets/addItems)
|
|
123
|
+
- [.compareExperiments()](https://mastra.ai/reference/datasets/compareExperiments)
|
|
124
|
+
- [.create()](https://mastra.ai/reference/datasets/create)
|
|
125
|
+
- [.delete()](https://mastra.ai/reference/datasets/delete)
|
|
126
|
+
- [.deleteExperiment()](https://mastra.ai/reference/datasets/deleteExperiment)
|
|
127
|
+
- [.deleteItem()](https://mastra.ai/reference/datasets/deleteItem)
|
|
128
|
+
- [.deleteItems()](https://mastra.ai/reference/datasets/deleteItems)
|
|
129
|
+
- [.get()](https://mastra.ai/reference/datasets/get)
|
|
130
|
+
- [.getDetails()](https://mastra.ai/reference/datasets/getDetails)
|
|
131
|
+
- [.getExperiment()](https://mastra.ai/reference/datasets/getExperiment)
|
|
132
|
+
- [.getItem()](https://mastra.ai/reference/datasets/getItem)
|
|
133
|
+
- [.getItemHistory()](https://mastra.ai/reference/datasets/getItemHistory)
|
|
134
|
+
- [.list()](https://mastra.ai/reference/datasets/list)
|
|
135
|
+
- [.listExperimentResults()](https://mastra.ai/reference/datasets/listExperimentResults)
|
|
136
|
+
- [.listExperiments()](https://mastra.ai/reference/datasets/listExperiments)
|
|
137
|
+
- [.listItems()](https://mastra.ai/reference/datasets/listItems)
|
|
138
|
+
- [.listVersions()](https://mastra.ai/reference/datasets/listVersions)
|
|
139
|
+
- [.startExperiment()](https://mastra.ai/reference/datasets/startExperiment)
|
|
140
|
+
- [.startExperimentAsync()](https://mastra.ai/reference/datasets/startExperimentAsync)
|
|
141
|
+
- [.update()](https://mastra.ai/reference/datasets/update)
|
|
142
|
+
- [.updateItem()](https://mastra.ai/reference/datasets/updateItem)
|
|
143
|
+
- [PinoLogger](https://mastra.ai/reference/logging/pino-logger)
|
|
144
|
+
- [Configuration](https://mastra.ai/reference/observability/tracing/configuration)
|
|
145
|
+
- [Instances](https://mastra.ai/reference/observability/tracing/instances)
|
|
146
|
+
- [Interfaces](https://mastra.ai/reference/observability/tracing/interfaces)
|
|
147
|
+
- [Spans](https://mastra.ai/reference/observability/tracing/spans)
|
|
148
|
+
- [BatchPartsProcessor](https://mastra.ai/reference/processors/batch-parts-processor)
|
|
149
|
+
- [LanguageDetector](https://mastra.ai/reference/processors/language-detector)
|
|
150
|
+
- [MessageHistory](https://mastra.ai/reference/processors/message-history-processor)
|
|
151
|
+
- [ModerationProcessor](https://mastra.ai/reference/processors/moderation-processor)
|
|
152
|
+
- [PIIDetector](https://mastra.ai/reference/processors/pii-detector)
|
|
153
|
+
- [Processor Interface](https://mastra.ai/reference/processors/processor-interface)
|
|
154
|
+
- [PromptInjectionDetector](https://mastra.ai/reference/processors/prompt-injection-detector)
|
|
155
|
+
- [SemanticRecall](https://mastra.ai/reference/processors/semantic-recall-processor)
|
|
156
|
+
- [SystemPromptScrubber](https://mastra.ai/reference/processors/system-prompt-scrubber)
|
|
157
|
+
- [TokenLimiterProcessor](https://mastra.ai/reference/processors/token-limiter-processor)
|
|
158
|
+
- [ToolCallFilter](https://mastra.ai/reference/processors/tool-call-filter)
|
|
159
|
+
- [ToolSearchProcessor](https://mastra.ai/reference/processors/tool-search-processor)
|
|
160
|
+
- [UnicodeNormalizer](https://mastra.ai/reference/processors/unicode-normalizer)
|
|
161
|
+
- [WorkingMemory](https://mastra.ai/reference/processors/working-memory-processor)
|
|
162
|
+
- [DatabaseConfig](https://mastra.ai/reference/rag/database-config)
|
|
163
|
+
- [Embed](https://mastra.ai/reference/rag/embeddings)
|
|
164
|
+
- [ExtractParams](https://mastra.ai/reference/rag/extract-params)
|
|
165
|
+
- [GraphRAG](https://mastra.ai/reference/rag/graph-rag)
|
|
166
|
+
- [MDocument](https://mastra.ai/reference/rag/document)
|
|
167
|
+
- [Metadata Filters](https://mastra.ai/reference/rag/metadata-filters)
|
|
168
|
+
- [rerank()](https://mastra.ai/reference/rag/rerank)
|
|
169
|
+
- [rerankWithScorer()](https://mastra.ai/reference/rag/rerankWithScorer)
|
|
170
|
+
- [.chunk()](https://mastra.ai/reference/rag/chunk)
|
|
171
|
+
- [createRoute()](https://mastra.ai/reference/server/create-route)
|
|
172
|
+
- [Express Adapter](https://mastra.ai/reference/server/express-adapter)
|
|
173
|
+
- [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter)
|
|
174
|
+
- [Hono Adapter](https://mastra.ai/reference/server/hono-adapter)
|
|
175
|
+
- [Koa Adapter](https://mastra.ai/reference/server/koa-adapter)
|
|
176
|
+
- [MastraServer](https://mastra.ai/reference/server/mastra-server)
|
|
177
|
+
- [registerApiRoute()](https://mastra.ai/reference/server/register-api-route)
|
|
178
|
+
- [Server Routes](https://mastra.ai/reference/server/routes)
|
|
179
|
+
- [Overview](https://mastra.ai/reference/storage/overview)
|
|
180
|
+
- [Cloudflare D1 Storage](https://mastra.ai/reference/storage/cloudflare-d1)
|
|
181
|
+
- [Cloudflare KV Storage](https://mastra.ai/reference/storage/cloudflare)
|
|
182
|
+
- [Composite Storage](https://mastra.ai/reference/storage/composite)
|
|
183
|
+
- [Convex Storage](https://mastra.ai/reference/storage/convex)
|
|
184
|
+
- [DynamoDB Storage](https://mastra.ai/reference/storage/dynamodb)
|
|
185
|
+
- [LanceDB Storage](https://mastra.ai/reference/storage/lance)
|
|
186
|
+
- [libSQL Storage](https://mastra.ai/reference/storage/libsql)
|
|
187
|
+
- [MongoDB Storage](https://mastra.ai/reference/storage/mongodb)
|
|
188
|
+
- [MSSQL Storage](https://mastra.ai/reference/storage/mssql)
|
|
189
|
+
- [PostgreSQL Storage](https://mastra.ai/reference/storage/postgresql)
|
|
190
|
+
- [Upstash Storage](https://mastra.ai/reference/storage/upstash)
|
|
191
|
+
- [ChunkType](https://mastra.ai/reference/streaming/ChunkType)
|
|
192
|
+
- [MastraModelOutput](https://mastra.ai/reference/streaming/agents/MastraModelOutput)
|
|
193
|
+
- [.stream()](https://mastra.ai/reference/streaming/agents/stream)
|
|
194
|
+
- [.streamLegacy()](https://mastra.ai/reference/streaming/agents/streamLegacy)
|
|
195
|
+
- [.observeStream()](https://mastra.ai/reference/streaming/workflows/observeStream)
|
|
196
|
+
- [.resumeStream()](https://mastra.ai/reference/streaming/workflows/resumeStream)
|
|
197
|
+
- [.stream()](https://mastra.ai/reference/streaming/workflows/stream)
|
|
198
|
+
- [.timeTravelStream()](https://mastra.ai/reference/streaming/workflows/timeTravelStream)
|
|
199
|
+
- [Overview](https://mastra.ai/reference/templates/overview)
|
|
200
|
+
- [createDocumentChunkerTool()](https://mastra.ai/reference/tools/document-chunker-tool)
|
|
201
|
+
- [createGraphRAGTool()](https://mastra.ai/reference/tools/graph-rag-tool)
|
|
202
|
+
- [createTool()](https://mastra.ai/reference/tools/create-tool)
|
|
203
|
+
- [createVectorQueryTool()](https://mastra.ai/reference/tools/vector-query-tool)
|
|
204
|
+
- [MCPClient](https://mastra.ai/reference/tools/mcp-client)
|
|
205
|
+
- [MCPServer](https://mastra.ai/reference/tools/mcp-server)
|
|
206
|
+
- [Amazon S3 Vector Store](https://mastra.ai/reference/vectors/s3vectors)
|
|
207
|
+
- [Astra Vector Store](https://mastra.ai/reference/vectors/astra)
|
|
208
|
+
- [Chroma Vector Store](https://mastra.ai/reference/vectors/chroma)
|
|
209
|
+
- [Cloudflare Vector Store](https://mastra.ai/reference/vectors/vectorize)
|
|
210
|
+
- [Convex Vector Store](https://mastra.ai/reference/vectors/convex)
|
|
211
|
+
- [Couchbase Vector Store](https://mastra.ai/reference/vectors/couchbase)
|
|
212
|
+
- [DuckDB Vector Store](https://mastra.ai/reference/vectors/duckdb)
|
|
213
|
+
- [ElasticSearch Vector Store](https://mastra.ai/reference/vectors/elasticsearch)
|
|
214
|
+
- [Lance Vector Store](https://mastra.ai/reference/vectors/lance)
|
|
215
|
+
- [libSQL Vector Store](https://mastra.ai/reference/vectors/libsql)
|
|
216
|
+
- [MongoDB Vector Store](https://mastra.ai/reference/vectors/mongodb)
|
|
217
|
+
- [OpenSearch Vector Store](https://mastra.ai/reference/vectors/opensearch)
|
|
218
|
+
- [PG Vector Store](https://mastra.ai/reference/vectors/pg)
|
|
219
|
+
- [Pinecone Vector Store](https://mastra.ai/reference/vectors/pinecone)
|
|
220
|
+
- [Qdrant Vector Store](https://mastra.ai/reference/vectors/qdrant)
|
|
221
|
+
- [Turbopuffer Vector Store](https://mastra.ai/reference/vectors/turbopuffer)
|
|
222
|
+
- [Upstash Vector Store](https://mastra.ai/reference/vectors/upstash)
|
|
223
|
+
- [Azure](https://mastra.ai/reference/voice/azure)
|
|
224
|
+
- [Cloudflare](https://mastra.ai/reference/voice/cloudflare)
|
|
225
|
+
- [Composite Voice](https://mastra.ai/reference/voice/composite-voice)
|
|
226
|
+
- [Deepgram](https://mastra.ai/reference/voice/deepgram)
|
|
227
|
+
- [ElevenLabs](https://mastra.ai/reference/voice/elevenlabs)
|
|
228
|
+
- [Events](https://mastra.ai/reference/voice/voice.events)
|
|
229
|
+
- [Google](https://mastra.ai/reference/voice/google)
|
|
230
|
+
- [Google Gemini Live](https://mastra.ai/reference/voice/google-gemini-live)
|
|
231
|
+
- [Mastra Voice](https://mastra.ai/reference/voice/mastra-voice)
|
|
232
|
+
- [Murf](https://mastra.ai/reference/voice/murf)
|
|
233
|
+
- [OpenAI](https://mastra.ai/reference/voice/openai)
|
|
234
|
+
- [OpenAI Realtime](https://mastra.ai/reference/voice/openai-realtime)
|
|
235
|
+
- [PlayAI](https://mastra.ai/reference/voice/playai)
|
|
236
|
+
- [Sarvam](https://mastra.ai/reference/voice/sarvam)
|
|
237
|
+
- [Speechify](https://mastra.ai/reference/voice/speechify)
|
|
238
|
+
- [.addInstructions()](https://mastra.ai/reference/voice/voice.addInstructions)
|
|
239
|
+
- [.addTools()](https://mastra.ai/reference/voice/voice.addTools)
|
|
240
|
+
- [.answer()](https://mastra.ai/reference/voice/voice.answer)
|
|
241
|
+
- [.close()](https://mastra.ai/reference/voice/voice.close)
|
|
242
|
+
- [.connect()](https://mastra.ai/reference/voice/voice.connect)
|
|
243
|
+
- [.getSpeakers()](https://mastra.ai/reference/voice/voice.getSpeakers)
|
|
244
|
+
- [.listen()](https://mastra.ai/reference/voice/voice.listen)
|
|
245
|
+
- [.off()](https://mastra.ai/reference/voice/voice.off)
|
|
246
|
+
- [.on()](https://mastra.ai/reference/voice/voice.on)
|
|
247
|
+
- [.send()](https://mastra.ai/reference/voice/voice.send)
|
|
248
|
+
- [.speak()](https://mastra.ai/reference/voice/voice.speak)
|
|
249
|
+
- [.updateConfig()](https://mastra.ai/reference/voice/voice.updateConfig)
|
|
250
|
+
- [Run Class](https://mastra.ai/reference/workflows/run)
|
|
251
|
+
- [Step Class](https://mastra.ai/reference/workflows/step)
|
|
252
|
+
- [Workflow Class](https://mastra.ai/reference/workflows/workflow)
|
|
253
|
+
- [.branch()](https://mastra.ai/reference/workflows/workflow-methods/branch)
|
|
254
|
+
- [.commit()](https://mastra.ai/reference/workflows/workflow-methods/commit)
|
|
255
|
+
- [.createRun()](https://mastra.ai/reference/workflows/workflow-methods/create-run)
|
|
256
|
+
- [.dountil()](https://mastra.ai/reference/workflows/workflow-methods/dountil)
|
|
257
|
+
- [.dowhile()](https://mastra.ai/reference/workflows/workflow-methods/dowhile)
|
|
258
|
+
- [.foreach()](https://mastra.ai/reference/workflows/workflow-methods/foreach)
|
|
259
|
+
- [.map()](https://mastra.ai/reference/workflows/workflow-methods/map)
|
|
260
|
+
- [.parallel()](https://mastra.ai/reference/workflows/workflow-methods/parallel)
|
|
261
|
+
- [.sleep()](https://mastra.ai/reference/workflows/workflow-methods/sleep)
|
|
262
|
+
- [.sleepUntil()](https://mastra.ai/reference/workflows/workflow-methods/sleepUntil)
|
|
263
|
+
- [.then()](https://mastra.ai/reference/workflows/workflow-methods/then)
|
|
264
|
+
- [.cancel()](https://mastra.ai/reference/workflows/run-methods/cancel)
|
|
265
|
+
- [.restart()](https://mastra.ai/reference/workflows/run-methods/restart)
|
|
266
|
+
- [.resume()](https://mastra.ai/reference/workflows/run-methods/resume)
|
|
267
|
+
- [.start()](https://mastra.ai/reference/workflows/run-methods/start)
|
|
268
|
+
- [.startAsync()](https://mastra.ai/reference/workflows/run-methods/startAsync)
|
|
269
|
+
- [.timeTravel()](https://mastra.ai/reference/workflows/run-methods/timeTravel)
|
|
270
|
+
- [E2BSandbox](https://mastra.ai/reference/workspace/e2b-sandbox)
|
|
271
|
+
- [GCSFilesystem](https://mastra.ai/reference/workspace/gcs-filesystem)
|
|
272
|
+
- [LocalFilesystem](https://mastra.ai/reference/workspace/local-filesystem)
|
|
273
|
+
- [LocalSandbox](https://mastra.ai/reference/workspace/local-sandbox)
|
|
274
|
+
- [S3Filesystem](https://mastra.ai/reference/workspace/s3-filesystem)
|
|
275
|
+
- [Workspace Class](https://mastra.ai/reference/workspace/workspace-class)
|
|
276
|
+
- [WorkspaceFilesystem](https://mastra.ai/reference/workspace/filesystem)
|
|
277
|
+
- [WorkspaceSandbox](https://mastra.ai/reference/workspace/sandbox)
|