@mastra/mcp-docs-server 1.0.0-beta.1 → 1.0.0-beta.11
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 -15
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +1 -7
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +1 -55
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +276 -76
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +200 -0
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +26 -0
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +89 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +392 -192
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +200 -0
- package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +42 -0
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +61 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +263 -63
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Freact.md +154 -1
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +42 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +274 -74
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +92 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +67 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
- package/.docs/organized/changelogs/create-mastra.md +201 -1
- package/.docs/organized/changelogs/mastra.md +201 -1
- package/.docs/organized/code-examples/agui.md +1 -0
- package/.docs/organized/code-examples/ai-elements.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-v5.md +3 -2
- package/.docs/organized/code-examples/assistant-ui.md +2 -2
- 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 +2 -2
- package/.docs/organized/code-examples/client-side-tools.md +1 -1
- package/.docs/organized/code-examples/crypto-chatbot.md +2 -2
- package/.docs/organized/code-examples/fireworks-r1.md +1 -1
- package/.docs/organized/code-examples/heads-up-game.md +1 -1
- package/.docs/organized/code-examples/mcp-configuration.md +0 -3
- package/.docs/organized/code-examples/mcp-server-adapters.md +720 -0
- package/.docs/organized/code-examples/memory-per-resource-example.md +1 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/openapi-spec-writer.md +1 -1
- package/.docs/organized/code-examples/processors-with-ai-sdk.md +14 -0
- package/.docs/organized/code-examples/quick-start.md +2 -2
- package/.docs/organized/code-examples/server-app-access.md +342 -0
- package/.docs/organized/code-examples/server-express-adapter.md +87 -0
- package/.docs/organized/code-examples/server-hono-adapter.md +85 -0
- package/.docs/organized/code-examples/stock-price-tool.md +1 -21
- 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 +56 -10
- package/.docs/raw/agents/agent-approval.mdx +189 -0
- package/.docs/raw/agents/agent-memory.mdx +1 -1
- package/.docs/raw/agents/guardrails.mdx +70 -30
- package/.docs/raw/agents/networks.mdx +3 -3
- package/.docs/raw/agents/overview.mdx +18 -167
- package/.docs/raw/agents/processors.mdx +430 -0
- package/.docs/raw/agents/structured-output.mdx +224 -0
- package/.docs/raw/agents/using-tools.mdx +14 -14
- package/.docs/raw/auth/auth0.mdx +1 -1
- package/.docs/raw/auth/clerk.mdx +1 -1
- package/.docs/raw/auth/firebase.mdx +1 -1
- package/.docs/raw/auth/index.mdx +1 -1
- package/.docs/raw/auth/jwt.mdx +1 -1
- package/.docs/raw/auth/supabase.mdx +1 -1
- package/.docs/raw/auth/workos.mdx +1 -1
- package/.docs/raw/community/contributing-templates.mdx +1 -1
- package/.docs/raw/community/discord.mdx +2 -2
- package/.docs/raw/community/licensing.mdx +1 -1
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/deployment/{server-deployment.mdx → building-mastra.mdx} +4 -4
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +2 -2
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +3 -3
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +2 -2
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/cloudflare-deployer.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +2 -2
- package/.docs/raw/deployment/cloud-providers/index.mdx +26 -29
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/netlify-deployer.mdx +45 -14
- package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/vercel-deployer.mdx +1 -1
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/dashboard.mdx +3 -3
- package/.docs/raw/deployment/mastra-cloud/observability.mdx +53 -0
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/overview.mdx +3 -3
- package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/setting-up.mdx +4 -4
- package/.docs/raw/deployment/monorepo.mdx +3 -3
- package/.docs/raw/deployment/overview.mdx +7 -7
- package/.docs/raw/deployment/web-framework.mdx +6 -6
- package/.docs/raw/evals/{off-the-shelf-scorers.mdx → built-in-scorers.mdx} +17 -15
- package/.docs/raw/evals/custom-scorers.mdx +4 -6
- package/.docs/raw/evals/overview.mdx +5 -6
- package/.docs/raw/evals/running-in-ci.mdx +2 -4
- package/.docs/raw/getting-started/{installation.mdx → manual-install.mdx} +6 -80
- package/.docs/raw/getting-started/mcp-docs-server.mdx +63 -6
- package/.docs/raw/getting-started/project-structure.mdx +2 -2
- package/.docs/raw/getting-started/start.mdx +72 -0
- package/.docs/raw/getting-started/studio.mdx +32 -7
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +147 -0
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +627 -0
- package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +71 -19
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +206 -0
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/astro.mdx +24 -26
- package/.docs/raw/{frameworks/servers → guides/getting-started}/express.mdx +4 -5
- package/.docs/raw/guides/{quickstarts/nextjs.mdx → getting-started/next-js.mdx} +26 -25
- package/.docs/raw/guides/getting-started/quickstart.mdx +97 -0
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/sveltekit.mdx +24 -26
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/vite-react.mdx +7 -7
- package/.docs/raw/guides/guide/ai-recruiter.mdx +2 -3
- package/.docs/raw/guides/guide/chef-michel.mdx +2 -3
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +2 -2
- package/.docs/raw/guides/guide/research-assistant.mdx +7 -8
- package/.docs/raw/guides/guide/stock-agent.mdx +4 -6
- package/.docs/raw/guides/guide/web-search.mdx +12 -10
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +421 -0
- package/.docs/raw/guides/index.mdx +3 -35
- package/.docs/raw/guides/migrations/agentnetwork.mdx +4 -4
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +119 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +121 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +27 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +25 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +68 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +174 -1
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +2 -2
- package/.docs/raw/index.mdx +3 -3
- package/.docs/raw/mcp/overview.mdx +358 -0
- package/.docs/raw/mcp/publishing-mcp-server.mdx +139 -0
- package/.docs/raw/memory/conversation-history.mdx +1 -1
- package/.docs/raw/memory/memory-processors.mdx +265 -80
- package/.docs/raw/memory/overview.mdx +2 -2
- package/.docs/raw/memory/semantic-recall.mdx +9 -9
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +3 -8
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +150 -0
- package/.docs/raw/memory/storage/memory-with-pg.mdx +3 -8
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +3 -8
- package/.docs/raw/memory/threads-and-resources.mdx +4 -4
- package/.docs/raw/memory/working-memory.mdx +16 -8
- package/.docs/raw/{logging.mdx → observability/logging.mdx} +7 -7
- package/.docs/raw/observability/overview.mdx +3 -4
- package/.docs/raw/observability/tracing/bridges/otel.mdx +200 -0
- package/.docs/raw/observability/tracing/exporters/arize.mdx +37 -1
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +20 -1
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/default.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +84 -1
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +13 -1
- package/.docs/raw/observability/tracing/exporters/otel.mdx +123 -25
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +127 -0
- package/.docs/raw/observability/tracing/overview.mdx +80 -9
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +1 -2
- package/.docs/raw/rag/chunking-and-embedding.mdx +16 -17
- package/.docs/raw/rag/overview.mdx +4 -3
- package/.docs/raw/rag/retrieval.mdx +44 -39
- package/.docs/raw/rag/vector-databases.mdx +94 -3
- package/.docs/raw/reference/agents/agent.mdx +19 -16
- package/.docs/raw/reference/agents/generate.mdx +67 -99
- package/.docs/raw/reference/agents/generateLegacy.mdx +3 -3
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +1 -1
- package/.docs/raw/reference/agents/getDescription.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +1 -1
- package/.docs/raw/reference/agents/getLLM.mdx +2 -2
- package/.docs/raw/reference/agents/getMemory.mdx +1 -1
- package/.docs/raw/reference/agents/getModel.mdx +1 -1
- package/.docs/raw/reference/agents/getTools.mdx +69 -0
- package/.docs/raw/reference/agents/getVoice.mdx +1 -1
- package/.docs/raw/reference/agents/listAgents.mdx +1 -1
- package/.docs/raw/reference/agents/listScorers.mdx +1 -1
- package/.docs/raw/reference/agents/listTools.mdx +2 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/agents/network.mdx +33 -72
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +127 -0
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +117 -0
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +64 -0
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +116 -0
- package/.docs/raw/reference/ai-sdk/network-route.mdx +99 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +289 -0
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +119 -0
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +110 -0
- package/.docs/raw/reference/auth/auth0.mdx +1 -1
- package/.docs/raw/reference/auth/clerk.mdx +1 -1
- package/.docs/raw/reference/auth/firebase.mdx +1 -1
- package/.docs/raw/reference/auth/jwt.mdx +1 -1
- package/.docs/raw/reference/auth/supabase.mdx +1 -1
- package/.docs/raw/reference/auth/workos.mdx +1 -1
- package/.docs/raw/reference/cli/create-mastra.mdx +1 -1
- package/.docs/raw/reference/cli/mastra.mdx +19 -6
- package/.docs/raw/reference/client-js/agents.mdx +252 -68
- package/.docs/raw/reference/client-js/error-handling.mdx +1 -1
- package/.docs/raw/reference/client-js/logs.mdx +1 -1
- package/.docs/raw/reference/client-js/mastra-client.mdx +4 -4
- package/.docs/raw/reference/client-js/memory.mdx +48 -2
- package/.docs/raw/reference/client-js/observability.mdx +1 -1
- package/.docs/raw/reference/client-js/telemetry.mdx +1 -1
- package/.docs/raw/reference/client-js/tools.mdx +1 -1
- package/.docs/raw/reference/client-js/vectors.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows.mdx +93 -64
- package/.docs/raw/reference/core/addGateway.mdx +59 -0
- package/.docs/raw/reference/core/getAgent.mdx +1 -1
- package/.docs/raw/reference/core/getAgentById.mdx +1 -1
- package/.docs/raw/reference/core/getDeployer.mdx +1 -1
- package/.docs/raw/reference/core/getGateway.mdx +59 -0
- package/.docs/raw/reference/core/getGatewayById.mdx +62 -0
- package/.docs/raw/reference/core/getLogger.mdx +2 -2
- package/.docs/raw/reference/core/getMCPServer.mdx +2 -2
- package/.docs/raw/reference/core/getMCPServerById.mdx +2 -2
- package/.docs/raw/reference/core/getMemory.mdx +73 -0
- package/.docs/raw/reference/core/getScorer.mdx +1 -1
- package/.docs/raw/reference/core/getScorerById.mdx +1 -1
- package/.docs/raw/reference/core/getServer.mdx +3 -3
- package/.docs/raw/reference/core/getStorage.mdx +1 -1
- package/.docs/raw/reference/core/getStoredAgentById.mdx +183 -0
- package/.docs/raw/reference/core/getTelemetry.mdx +1 -1
- package/.docs/raw/reference/core/getVector.mdx +1 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
- package/.docs/raw/reference/core/listAgents.mdx +1 -1
- package/.docs/raw/reference/core/listGateways.mdx +53 -0
- package/.docs/raw/reference/core/listLogs.mdx +2 -2
- package/.docs/raw/reference/core/listLogsByRunId.mdx +2 -2
- package/.docs/raw/reference/core/listMCPServers.mdx +2 -2
- package/.docs/raw/reference/core/listMemory.mdx +70 -0
- package/.docs/raw/reference/core/listScorers.mdx +1 -1
- package/.docs/raw/reference/core/listStoredAgents.mdx +151 -0
- package/.docs/raw/reference/core/listVectors.mdx +1 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/core/mastra-class.mdx +17 -1
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +227 -0
- package/.docs/raw/reference/core/setLogger.mdx +2 -2
- package/.docs/raw/reference/core/setStorage.mdx +1 -1
- package/.docs/raw/reference/core/setTelemetry.mdx +2 -2
- package/.docs/raw/reference/deployer/cloudflare.mdx +1 -1
- package/.docs/raw/reference/deployer/deployer.mdx +1 -1
- package/.docs/raw/reference/deployer/netlify.mdx +2 -3
- package/.docs/raw/reference/deployer/vercel.mdx +1 -1
- package/.docs/raw/reference/evals/answer-relevancy.mdx +29 -99
- package/.docs/raw/reference/evals/answer-similarity.mdx +13 -259
- package/.docs/raw/reference/evals/bias.mdx +30 -88
- package/.docs/raw/reference/evals/completeness.mdx +32 -91
- package/.docs/raw/reference/evals/content-similarity.mdx +29 -89
- package/.docs/raw/reference/evals/context-precision.mdx +29 -131
- package/.docs/raw/reference/evals/context-relevance.mdx +12 -12
- package/.docs/raw/reference/evals/create-scorer.mdx +1 -1
- package/.docs/raw/reference/evals/faithfulness.mdx +29 -102
- package/.docs/raw/reference/evals/hallucination.mdx +29 -104
- package/.docs/raw/reference/evals/keyword-coverage.mdx +29 -108
- package/.docs/raw/reference/evals/mastra-scorer.mdx +1 -1
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +12 -12
- package/.docs/raw/reference/evals/prompt-alignment.mdx +16 -16
- package/.docs/raw/reference/evals/run-evals.mdx +1 -1
- package/.docs/raw/reference/evals/scorer-utils.mdx +362 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +28 -101
- package/.docs/raw/reference/evals/tone-consistency.mdx +26 -99
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +8 -8
- package/.docs/raw/reference/evals/toxicity.mdx +30 -93
- package/.docs/raw/reference/index.mdx +1 -0
- package/.docs/raw/reference/logging/pino-logger.mdx +2 -2
- package/.docs/raw/reference/memory/createThread.mdx +1 -1
- package/.docs/raw/reference/memory/deleteMessages.mdx +1 -1
- package/.docs/raw/reference/memory/getThreadById.mdx +1 -1
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +1 -1
- package/.docs/raw/reference/memory/memory-class.mdx +6 -8
- package/.docs/raw/reference/memory/query.mdx +1 -1
- package/.docs/raw/reference/memory/recall.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +177 -0
- package/.docs/raw/reference/observability/tracing/configuration.mdx +1 -5
- package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +30 -1
- package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +44 -1
- package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +18 -2
- package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +34 -44
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +132 -0
- package/.docs/raw/reference/observability/tracing/instances.mdx +1 -5
- package/.docs/raw/reference/observability/tracing/interfaces.mdx +30 -5
- package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +1 -1
- package/.docs/raw/reference/observability/tracing/spans.mdx +1 -5
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +2 -2
- package/.docs/raw/reference/processors/language-detector.mdx +11 -4
- package/.docs/raw/reference/processors/message-history-processor.mdx +131 -0
- package/.docs/raw/reference/processors/moderation-processor.mdx +13 -6
- package/.docs/raw/reference/processors/pii-detector.mdx +13 -6
- package/.docs/raw/reference/processors/processor-interface.mdx +803 -0
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +11 -4
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +197 -0
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +4 -5
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +3 -3
- package/.docs/raw/reference/processors/tool-call-filter.mdx +125 -0
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +2 -2
- package/.docs/raw/reference/processors/working-memory-processor.mdx +221 -0
- package/.docs/raw/reference/rag/chunk.mdx +1 -1
- package/.docs/raw/reference/rag/database-config.mdx +1 -1
- package/.docs/raw/reference/rag/document.mdx +1 -1
- package/.docs/raw/reference/rag/embeddings.mdx +6 -6
- package/.docs/raw/reference/rag/extract-params.mdx +1 -1
- package/.docs/raw/reference/rag/graph-rag.mdx +1 -1
- package/.docs/raw/reference/rag/metadata-filters.mdx +1 -1
- package/.docs/raw/reference/rag/rerank.mdx +2 -3
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +1 -2
- package/.docs/raw/reference/server/create-route.mdx +328 -0
- package/.docs/raw/reference/server/express-adapter.mdx +260 -0
- package/.docs/raw/reference/server/hono-adapter.mdx +242 -0
- package/.docs/raw/reference/server/mastra-server.mdx +345 -0
- package/.docs/raw/reference/server/routes.mdx +250 -0
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +38 -1
- package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
- package/.docs/raw/reference/storage/convex.mdx +164 -0
- package/.docs/raw/reference/storage/dynamodb.mdx +1 -1
- package/.docs/raw/reference/storage/lance.mdx +34 -1
- package/.docs/raw/reference/storage/libsql.mdx +38 -1
- package/.docs/raw/reference/storage/mongodb.mdx +40 -1
- package/.docs/raw/reference/storage/mssql.mdx +38 -1
- package/.docs/raw/reference/storage/postgresql.mdx +38 -1
- package/.docs/raw/reference/storage/upstash.mdx +1 -1
- package/.docs/raw/reference/streaming/ChunkType.mdx +25 -4
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -1
- package/.docs/raw/reference/streaming/agents/stream.mdx +84 -124
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +8 -10
- package/.docs/raw/reference/streaming/workflows/{resumeStreamVNext.mdx → resumeStream.mdx} +51 -11
- package/.docs/raw/reference/streaming/workflows/stream.mdx +84 -25
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +170 -0
- package/.docs/raw/reference/templates/overview.mdx +2 -5
- package/.docs/raw/reference/tools/client.mdx +2 -3
- package/.docs/raw/reference/tools/create-tool.mdx +135 -4
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +1 -1
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +7 -7
- package/.docs/raw/reference/tools/mcp-client.mdx +131 -23
- package/.docs/raw/reference/tools/mcp-server.mdx +56 -8
- package/.docs/raw/reference/tools/vector-query-tool.mdx +16 -17
- package/.docs/raw/reference/vectors/astra.mdx +1 -1
- package/.docs/raw/reference/vectors/chroma.mdx +82 -2
- package/.docs/raw/reference/vectors/convex.mdx +429 -0
- package/.docs/raw/reference/vectors/couchbase.mdx +25 -18
- package/.docs/raw/reference/vectors/duckdb.mdx +462 -0
- package/.docs/raw/reference/vectors/elasticsearch.mdx +310 -0
- package/.docs/raw/reference/vectors/lance.mdx +39 -23
- package/.docs/raw/reference/vectors/libsql.mdx +36 -3
- package/.docs/raw/reference/vectors/mongodb.mdx +36 -3
- package/.docs/raw/reference/vectors/opensearch.mdx +38 -17
- package/.docs/raw/reference/vectors/pg.mdx +44 -37
- package/.docs/raw/reference/vectors/pinecone.mdx +70 -3
- package/.docs/raw/reference/vectors/qdrant.mdx +37 -2
- package/.docs/raw/reference/vectors/s3vectors.mdx +1 -1
- package/.docs/raw/reference/vectors/turbopuffer.mdx +75 -1
- package/.docs/raw/reference/vectors/upstash.mdx +1 -1
- package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
- package/.docs/raw/reference/voice/azure.mdx +96 -81
- package/.docs/raw/reference/voice/cloudflare.mdx +1 -1
- package/.docs/raw/reference/voice/composite-voice.mdx +72 -29
- package/.docs/raw/reference/voice/deepgram.mdx +1 -1
- package/.docs/raw/reference/voice/elevenlabs.mdx +1 -1
- package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
- package/.docs/raw/reference/voice/google.mdx +160 -21
- package/.docs/raw/reference/voice/mastra-voice.mdx +1 -1
- package/.docs/raw/reference/voice/murf.mdx +1 -1
- package/.docs/raw/reference/voice/openai-realtime.mdx +3 -3
- package/.docs/raw/reference/voice/openai.mdx +1 -1
- package/.docs/raw/reference/voice/playai.mdx +1 -1
- package/.docs/raw/reference/voice/sarvam.mdx +1 -1
- package/.docs/raw/reference/voice/speechify.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +3 -4
- package/.docs/raw/reference/voice/voice.addTools.mdx +2 -2
- package/.docs/raw/reference/voice/voice.answer.mdx +2 -2
- package/.docs/raw/reference/voice/voice.close.mdx +2 -2
- package/.docs/raw/reference/voice/voice.connect.mdx +2 -2
- package/.docs/raw/reference/voice/voice.events.mdx +1 -1
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +1 -1
- package/.docs/raw/reference/voice/voice.listen.mdx +87 -53
- package/.docs/raw/reference/voice/voice.off.mdx +2 -2
- package/.docs/raw/reference/voice/voice.on.mdx +2 -2
- package/.docs/raw/reference/voice/voice.send.mdx +2 -2
- package/.docs/raw/reference/voice/voice.speak.mdx +76 -41
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +1 -1
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +142 -0
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +45 -1
- package/.docs/raw/reference/workflows/run-methods/start.mdx +48 -4
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +310 -0
- package/.docs/raw/reference/workflows/run.mdx +28 -6
- package/.docs/raw/reference/workflows/step.mdx +65 -1
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +69 -4
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow.mdx +44 -2
- package/.docs/raw/server-db/custom-adapters.mdx +386 -0
- package/.docs/raw/server-db/custom-api-routes.mdx +6 -6
- package/.docs/raw/server-db/mastra-client.mdx +3 -4
- package/.docs/raw/server-db/{production-server.mdx → mastra-server.mdx} +22 -12
- package/.docs/raw/server-db/middleware.mdx +31 -31
- package/.docs/raw/server-db/request-context.mdx +3 -4
- package/.docs/raw/server-db/server-adapters.mdx +312 -0
- package/.docs/raw/server-db/storage.mdx +12 -1
- package/.docs/raw/streaming/events.mdx +1 -1
- package/.docs/raw/streaming/overview.mdx +27 -16
- package/.docs/raw/streaming/tool-streaming.mdx +58 -19
- package/.docs/raw/streaming/workflow-streaming.mdx +6 -12
- package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -3
- package/.docs/raw/tools-mcp/mcp-overview.mdx +4 -6
- package/.docs/raw/tools-mcp/overview.mdx +1 -1
- package/.docs/raw/voice/overview.mdx +88 -41
- package/.docs/raw/voice/speech-to-speech.mdx +5 -5
- package/.docs/raw/voice/speech-to-text.mdx +2 -3
- package/.docs/raw/voice/text-to-speech.mdx +2 -3
- package/.docs/raw/workflows/agents-and-tools.mdx +43 -5
- package/.docs/raw/workflows/control-flow.mdx +534 -3
- package/.docs/raw/workflows/error-handling.mdx +5 -4
- package/.docs/raw/workflows/human-in-the-loop.mdx +160 -213
- package/.docs/raw/workflows/inngest-workflow.mdx +1 -1
- package/.docs/raw/workflows/input-data-mapping.mdx +1 -1
- package/.docs/raw/workflows/overview.mdx +67 -47
- package/.docs/raw/workflows/snapshots.mdx +5 -3
- package/.docs/raw/workflows/suspend-and-resume.mdx +121 -204
- package/.docs/raw/workflows/time-travel.mdx +313 -0
- package/.docs/raw/workflows/workflow-state.mdx +190 -0
- package/CHANGELOG.md +88 -0
- package/dist/{chunk-5NJC7NRO.js → chunk-4CM2BQNP.js} +24 -4
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/stdio.js +17 -19
- package/package.json +10 -14
- package/.docs/raw/deployment/serverless-platforms/index.mdx +0 -58
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +0 -688
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +0 -123
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +0 -382
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +0 -179
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
- package/.docs/raw/getting-started/templates.mdx +0 -73
- package/.docs/raw/mastra-cloud/observability.mdx +0 -51
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +0 -47
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +0 -153
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Using
|
|
2
|
+
title: "Using Assistant UI | Frameworks"
|
|
3
3
|
description: "Learn how to integrate Assistant UI with Mastra"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import Steps from "@site/src/components/Steps";
|
|
7
7
|
import StepItem from "@site/src/components/StepItem";
|
|
8
8
|
|
|
9
|
-
# Using
|
|
9
|
+
# Using Assistant UI
|
|
10
10
|
|
|
11
|
-
[Assistant UI](https://assistant-ui.com) is the TypeScript/React library for AI Chat.
|
|
12
|
-
Built on shadcn/ui and Tailwind CSS, it enables developers to create beautiful, enterprise-grade chat experiences in minutes.
|
|
11
|
+
[Assistant UI](https://assistant-ui.com) is the TypeScript/React library for AI Chat. Built on shadcn/ui and Tailwind CSS, it enables developers to create beautiful, enterprise-grade chat experiences in minutes.
|
|
13
12
|
|
|
14
13
|
:::info
|
|
15
14
|
|
|
@@ -17,6 +16,12 @@ For a full-stack integration approach where Mastra runs directly in your Next.js
|
|
|
17
16
|
|
|
18
17
|
:::
|
|
19
18
|
|
|
19
|
+
:::tip
|
|
20
|
+
|
|
21
|
+
Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of Assistant UI integrated with Mastra.
|
|
22
|
+
|
|
23
|
+
:::
|
|
24
|
+
|
|
20
25
|
## Integration Guide
|
|
21
26
|
|
|
22
27
|
Run Mastra as a standalone server and connect your Next.js frontend (with Assistant UI) to its API endpoints.
|
|
@@ -33,7 +38,7 @@ project-root
|
|
|
33
38
|
│ ├── src
|
|
34
39
|
│ │ └── mastra
|
|
35
40
|
│ └── package.json
|
|
36
|
-
└──
|
|
41
|
+
└── my-app
|
|
37
42
|
└── package.json
|
|
38
43
|
```
|
|
39
44
|
|
|
@@ -43,8 +48,13 @@ Bootstrap your Mastra server:
|
|
|
43
48
|
npx create-mastra@beta
|
|
44
49
|
```
|
|
45
50
|
|
|
46
|
-
This command will launch an interactive wizard to help you scaffold a new Mastra project, including prompting you for a project name and setting up basic configurations.
|
|
47
|
-
|
|
51
|
+
This command will launch an interactive wizard to help you scaffold a new Mastra project, including prompting you for a project name and setting up basic configurations. Follow the prompts to create your server project.
|
|
52
|
+
|
|
53
|
+
Navigate to your newly created Mastra server directory:
|
|
54
|
+
|
|
55
|
+
```bash copy
|
|
56
|
+
cd mastra-server # Replace with the actual directory name you provided
|
|
57
|
+
```
|
|
48
58
|
|
|
49
59
|
You now have a basic Mastra server project ready. You should have the following files and folders:
|
|
50
60
|
|
|
@@ -53,6 +63,8 @@ src
|
|
|
53
63
|
└── mastra
|
|
54
64
|
├── agents
|
|
55
65
|
│ └── weather-agent.ts
|
|
66
|
+
├── scorers
|
|
67
|
+
│ └── weather-scorer.ts
|
|
56
68
|
├── tools
|
|
57
69
|
│ └── weather-tool.ts
|
|
58
70
|
├── workflows
|
|
@@ -70,18 +82,55 @@ Ensure that you have set the appropriate environment variables for your LLM prov
|
|
|
70
82
|
|
|
71
83
|
<StepItem>
|
|
72
84
|
|
|
85
|
+
Create a chat route for the Assistant UI frontend by using the `chatRoute()` helper from `@mastra/ai-sdk`. Add it to your Mastra project:
|
|
86
|
+
|
|
87
|
+
```bash copy
|
|
88
|
+
npm install @mastra/ai-sdk@beta
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
In your `src/mastra/index.ts` file, register the chat route:
|
|
92
|
+
|
|
93
|
+
```typescript copy title="src/mastra/index.ts" {2,7-13}
|
|
94
|
+
import { Mastra } from '@mastra/core/mastra';
|
|
95
|
+
import { chatRoute } from '@mastra/ai-sdk';
|
|
96
|
+
// Rest of the imports...
|
|
97
|
+
|
|
98
|
+
export const mastra = new Mastra({
|
|
99
|
+
// Rest of the configuration...
|
|
100
|
+
server: {
|
|
101
|
+
apiRoutes: [
|
|
102
|
+
chatRoute({
|
|
103
|
+
path: '/chat/:agentId'
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This will make all agents available in AI SDK-compatible formats, including the `weatherAgent` at the endpoint `/chat/weatherAgent`.
|
|
111
|
+
|
|
112
|
+
</StepItem>
|
|
113
|
+
|
|
114
|
+
<StepItem>
|
|
115
|
+
|
|
73
116
|
Run the Mastra server using the following command:
|
|
74
117
|
|
|
75
118
|
```bash copy
|
|
76
119
|
npm run dev
|
|
77
120
|
```
|
|
78
121
|
|
|
79
|
-
By default, the Mastra server will run on `http://localhost:4111`.
|
|
122
|
+
By default, the Mastra server will run on `http://localhost:4111`. Keep this server running for the next steps where we'll set up the Assistant UI frontend to connect to it.
|
|
80
123
|
|
|
81
124
|
</StepItem>
|
|
82
125
|
|
|
83
126
|
<StepItem>
|
|
84
127
|
|
|
128
|
+
Go up one directory to your project root.
|
|
129
|
+
|
|
130
|
+
```bash copy
|
|
131
|
+
cd ..
|
|
132
|
+
```
|
|
133
|
+
|
|
85
134
|
Create a new `assistant-ui` project with the following command.
|
|
86
135
|
|
|
87
136
|
```bash copy
|
|
@@ -100,19 +149,22 @@ For detailed setup instructions, including adding API keys, basic configuration,
|
|
|
100
149
|
|
|
101
150
|
The default Assistant UI setup configures the chat runtime to use a local API route (`/api/chat`) within the Next.js project. Since our Mastra agent is running on a separate server, we need to update the frontend to point to that server's endpoint.
|
|
102
151
|
|
|
103
|
-
|
|
152
|
+
Open the file in your assistant-ui frontend project that contains the `useChatRuntime` hook (usually `app/assistant.tsx` or `src/app/assistant.tsx`). Find the `useChatRuntime` hook and change the `api` property to the full URL of your Mastra agent's stream endpoint:
|
|
104
153
|
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
useChatRuntime,
|
|
108
|
-
AssistantChatTransport,
|
|
109
|
-
} from "@assistant-ui/react-ai-sdk";
|
|
154
|
+
```tsx {8} title="app/assistant.tsx"
|
|
155
|
+
"use client";
|
|
110
156
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
157
|
+
// Rest of the imports...
|
|
158
|
+
|
|
159
|
+
export const Assistant = () => {
|
|
160
|
+
const runtime = useChatRuntime({
|
|
161
|
+
transport: new AssistantChatTransport({
|
|
162
|
+
api: "http://localhost:4111/chat/weatherAgent",
|
|
163
|
+
}),
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Rest of the component...
|
|
167
|
+
};
|
|
116
168
|
```
|
|
117
169
|
|
|
118
170
|
Now, the Assistant UI frontend will send chat requests directly to your running Mastra server.
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Using CopilotKit | Frameworks"
|
|
3
|
+
description: "Learn how to integrate CopilotKit with Mastra"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import Tabs from "@theme/Tabs";
|
|
7
|
+
import TabItem from "@theme/TabItem";
|
|
8
|
+
import Steps from "@site/src/components/Steps";
|
|
9
|
+
import StepItem from "@site/src/components/StepItem";
|
|
10
|
+
|
|
11
|
+
# Using CopilotKit
|
|
12
|
+
|
|
13
|
+
[CopilotKit](https://www.copilotkit.ai/) provides React components to quickly integrate customizable AI copilots into your application. Combined with Mastra, you can build sophisticated AI apps featuring bidirectional state synchronization and interactive UIs.
|
|
14
|
+
|
|
15
|
+
Visit the [CopilotKit documentation](https://docs.copilotkit.ai/) to learn more about CopilotKit concepts, components, and advanced usage patterns.
|
|
16
|
+
|
|
17
|
+
:::info
|
|
18
|
+
|
|
19
|
+
For a full-stack integration approach where Mastra runs directly in your Next.js API routes, see the [CopilotKit Quickstart](https://docs.copilotkit.ai/mastra/quickstart) guide.
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
:::tip
|
|
24
|
+
|
|
25
|
+
Visit Mastra's [**"UI Dojo"**](https://ui-dojo.mastra.ai/) to see real-world examples of CopilotKit integrated with Mastra.
|
|
26
|
+
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
## Integration Guide
|
|
30
|
+
|
|
31
|
+
Run Mastra as a standalone server and connect your Next.js frontend (with CopilotKit) to its API endpoints.
|
|
32
|
+
|
|
33
|
+
<Steps>
|
|
34
|
+
|
|
35
|
+
<StepItem>
|
|
36
|
+
|
|
37
|
+
Set up your directory structure. A possible directory structure could look like this:
|
|
38
|
+
|
|
39
|
+
```shell
|
|
40
|
+
project-root
|
|
41
|
+
├── mastra-server
|
|
42
|
+
│ ├── src
|
|
43
|
+
│ │ └── mastra
|
|
44
|
+
│ └── package.json
|
|
45
|
+
└── my-copilot-app
|
|
46
|
+
└── package.json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Bootstrap your Mastra server:
|
|
50
|
+
|
|
51
|
+
```bash copy
|
|
52
|
+
npx create-mastra@latest
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This command will launch an interactive wizard to help you scaffold a new Mastra project, including prompting you for a project name and setting up basic configurations. Follow the prompts to create your server project.
|
|
56
|
+
|
|
57
|
+
Navigate to your newly created Mastra server directory:
|
|
58
|
+
|
|
59
|
+
```bash copy
|
|
60
|
+
cd mastra-server # Replace with the actual directory name you provided
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
You now have a basic Mastra server project ready. You should have the following files and folders:
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
src
|
|
67
|
+
└── mastra
|
|
68
|
+
├── agents
|
|
69
|
+
│ └── weather-agent.ts
|
|
70
|
+
├── scorers
|
|
71
|
+
│ └── weather-scorer.ts
|
|
72
|
+
├── tools
|
|
73
|
+
│ └── weather-tool.ts
|
|
74
|
+
├── workflows
|
|
75
|
+
│ └── weather-workflow.ts
|
|
76
|
+
└── index.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
:::note
|
|
80
|
+
|
|
81
|
+
Ensure that you have set the appropriate environment variables for your LLM provider in the `.env` file.
|
|
82
|
+
|
|
83
|
+
:::
|
|
84
|
+
|
|
85
|
+
</StepItem>
|
|
86
|
+
|
|
87
|
+
<StepItem>
|
|
88
|
+
|
|
89
|
+
Create a chat route for the CopilotKit frontend by using the `registerCopilotKit()` helper from `@ag-ui/mastra`. Add it to your Mastra project (and its peer dependencies):
|
|
90
|
+
|
|
91
|
+
```bash copy
|
|
92
|
+
npm install --legacy-peer-deps @ag-ui/mastra @copilotkit/runtime @ag-ui/core @ag-ui/client @ag-ui/encoder @ag-ui/langgraph @ag-ui/proto
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
In your `src/mastra/index.ts` file, register the chat route:
|
|
96
|
+
|
|
97
|
+
```typescript copy title="src/mastra/index.ts" {2,7-19}
|
|
98
|
+
import { Mastra } from '@mastra/core/mastra';
|
|
99
|
+
import { registerCopilotKit } from '@ag-ui/mastra/copilotkit';
|
|
100
|
+
// Rest of the imports...
|
|
101
|
+
|
|
102
|
+
export const mastra = new Mastra({
|
|
103
|
+
// Rest of the configuration...
|
|
104
|
+
server: {
|
|
105
|
+
cors: {
|
|
106
|
+
origin: "*",
|
|
107
|
+
allowMethods: ["*"],
|
|
108
|
+
allowHeaders: ["*"],
|
|
109
|
+
},
|
|
110
|
+
apiRoutes: [
|
|
111
|
+
registerCopilotKit({
|
|
112
|
+
path: '/chat',
|
|
113
|
+
resourceId: 'weatherAgent'
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This will make the `weatherAgent` available at `/chat` in a CopilotKit-compatible format. You have to add the CORS configuration to allow the CopilotKit frontend to access the Mastra server. For production deployments, make sure to restrict the CORS origins to only your frontend domain.
|
|
121
|
+
|
|
122
|
+
</StepItem>
|
|
123
|
+
|
|
124
|
+
<StepItem>
|
|
125
|
+
|
|
126
|
+
Run the Mastra server using the following command:
|
|
127
|
+
|
|
128
|
+
```bash copy
|
|
129
|
+
npm run dev
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
By default, the Mastra server will run on `http://localhost:4111`. Keep this server running for the next steps where we'll set up the CopilotKit frontend to connect to it.
|
|
133
|
+
|
|
134
|
+
</StepItem>
|
|
135
|
+
|
|
136
|
+
<StepItem>
|
|
137
|
+
|
|
138
|
+
Go up one directory to your project root.
|
|
139
|
+
|
|
140
|
+
```bash copy
|
|
141
|
+
cd ..
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Create a new Next.js project with the name `my-copilot-app`:
|
|
145
|
+
|
|
146
|
+
```bash copy
|
|
147
|
+
npx create-next-app@latest my-copilot-app
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Navigate to your newly created Next.js project directory:
|
|
151
|
+
|
|
152
|
+
```bash copy
|
|
153
|
+
cd my-copilot-app
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
</StepItem>
|
|
157
|
+
|
|
158
|
+
<StepItem>
|
|
159
|
+
|
|
160
|
+
Install the CopilotKit UI packages which you'll use to display a chat interface:
|
|
161
|
+
|
|
162
|
+
```bash copy
|
|
163
|
+
npm install @copilotkit/react-ui @copilotkit/react-core
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Open the home route of the Next.js app (usually `app/page.tsx` or `src/app/page.tsx`) and replace the existing contents with the following code to set up a basic CopilotKit chat interface:
|
|
167
|
+
|
|
168
|
+
```typescript copy title="app/page.tsx"
|
|
169
|
+
import { CopilotChat } from "@copilotkit/react-ui";
|
|
170
|
+
import { CopilotKit } from "@copilotkit/react-core";
|
|
171
|
+
import "@copilotkit/react-ui/styles.css";
|
|
172
|
+
|
|
173
|
+
export default function Home() {
|
|
174
|
+
return (
|
|
175
|
+
<CopilotKit
|
|
176
|
+
runtimeUrl="http://localhost:4111/chat"
|
|
177
|
+
agent="weatherAgent"
|
|
178
|
+
>
|
|
179
|
+
<CopilotChat
|
|
180
|
+
labels={{
|
|
181
|
+
title: "Weather Agent",
|
|
182
|
+
initial: "Hi! 👋 Ask me about the weather, forecasts, and climate.",
|
|
183
|
+
}}
|
|
184
|
+
/>
|
|
185
|
+
</CopilotKit>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
</StepItem>
|
|
191
|
+
|
|
192
|
+
<StepItem>
|
|
193
|
+
|
|
194
|
+
You're ready to connect the pieces! Make sure both the Mastra server and the CopilotKit frontend are running. Start the Next.js development server:
|
|
195
|
+
|
|
196
|
+
```bash copy
|
|
197
|
+
npm run dev
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
You should now be able to chat with your agent in the browser.
|
|
201
|
+
|
|
202
|
+
</StepItem>
|
|
203
|
+
|
|
204
|
+
</Steps>
|
|
205
|
+
|
|
206
|
+
Congratulations! You have successfully integrated Mastra with CopilotKit using a separate server approach. Your CopilotKit frontend now communicates with a standalone Mastra agent server.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Integrate Mastra in your Astro project | Frameworks
|
|
2
|
+
title: "Integrate Mastra in your Astro project | Frameworks"
|
|
3
3
|
description: A step-by-step guide to integrating Mastra with Astro.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -31,34 +31,34 @@ This guide assumes you're using Astro's Actions with React and the Vercel adapte
|
|
|
31
31
|
|
|
32
32
|
<StepItem>
|
|
33
33
|
|
|
34
|
-
Install the required
|
|
34
|
+
Install the required packages:
|
|
35
35
|
|
|
36
36
|
<Tabs>
|
|
37
37
|
<TabItem value="npm" label="npm">
|
|
38
38
|
|
|
39
39
|
```bash copy
|
|
40
|
-
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
40
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
</TabItem>
|
|
44
44
|
<TabItem value="yarn" label="yarn">
|
|
45
45
|
|
|
46
46
|
```bash copy
|
|
47
|
-
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
47
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
</TabItem>
|
|
51
51
|
<TabItem value="pnpm" label="pnpm">
|
|
52
52
|
|
|
53
53
|
```bash copy
|
|
54
|
-
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
54
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
</TabItem>
|
|
58
58
|
<TabItem value="bun" label="bun">
|
|
59
59
|
|
|
60
60
|
```bash copy
|
|
61
|
-
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
61
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
</TabItem>
|
|
@@ -140,14 +140,13 @@ Add `.mastra` and `.vercel` to your `.gitignore` file:
|
|
|
140
140
|
|
|
141
141
|
Astro uses Vite, which accesses environment variables via `import.meta.env` rather than `process.env`. As a result, the model constructor must explicitly receive the `apiKey` from the Vite environment like this:
|
|
142
142
|
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
+ import { createOpenAI } from "@ai-sdk/openai";
|
|
143
|
+
```typescript title="src/mastra/agents/weather-agent.ts"
|
|
144
|
+
import { createOpenAI } from "@ai-sdk/openai";
|
|
146
145
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
const openai = createOpenAI({
|
|
147
|
+
apiKey: import.meta.env?.OPENAI_API_KEY,
|
|
148
|
+
compatibility: "strict"
|
|
149
|
+
});
|
|
151
150
|
```
|
|
152
151
|
|
|
153
152
|
> More configuration details are available in the AI SDK docs. See [Provider Instance](https://ai-sdk.dev/providers/ai-sdk-providers/openai#provider-instance) for more information.
|
|
@@ -324,34 +323,34 @@ Before proceeding, ensure your Astro project is configured as follows:
|
|
|
324
323
|
|
|
325
324
|
<StepItem>
|
|
326
325
|
|
|
327
|
-
Install the required
|
|
326
|
+
Install the required packages:
|
|
328
327
|
|
|
329
328
|
<Tabs>
|
|
330
329
|
<TabItem value="npm" label="npm">
|
|
331
330
|
|
|
332
331
|
```bash copy
|
|
333
|
-
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
332
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
334
333
|
```
|
|
335
334
|
|
|
336
335
|
</TabItem>
|
|
337
336
|
<TabItem value="yarn" label="yarn">
|
|
338
337
|
|
|
339
338
|
```bash copy
|
|
340
|
-
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
339
|
+
yarn add mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
341
340
|
```
|
|
342
341
|
|
|
343
342
|
</TabItem>
|
|
344
343
|
<TabItem value="pnpm" label="pnpm">
|
|
345
344
|
|
|
346
345
|
```bash copy
|
|
347
|
-
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
346
|
+
pnpm add mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
348
347
|
```
|
|
349
348
|
|
|
350
349
|
</TabItem>
|
|
351
350
|
<TabItem value="bun" label="bun">
|
|
352
351
|
|
|
353
352
|
```bash copy
|
|
354
|
-
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta
|
|
353
|
+
bun add mastra@beta @mastra/core@beta @mastra/libsql@beta @ai-sdk/openai
|
|
355
354
|
```
|
|
356
355
|
|
|
357
356
|
</TabItem>
|
|
@@ -433,14 +432,13 @@ Add `.mastra` to your `.gitignore` file:
|
|
|
433
432
|
|
|
434
433
|
Astro uses Vite, which accesses environment variables via `import.meta.env` rather than `process.env`. As a result, the model constructor must explicitly receive the `apiKey` from the Vite environment like this:
|
|
435
434
|
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
+ import { createOpenAI } from "@ai-sdk/openai";
|
|
435
|
+
```typescript title="src/mastra/agents/weather-agent.ts"
|
|
436
|
+
import { createOpenAI } from "@ai-sdk/openai";
|
|
439
437
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
438
|
+
const openai = createOpenAI({
|
|
439
|
+
apiKey: import.meta.env?.OPENAI_API_KEY,
|
|
440
|
+
compatibility: "strict"
|
|
441
|
+
});
|
|
444
442
|
```
|
|
445
443
|
|
|
446
444
|
> More configuration details are available in the AI SDK docs. See [Provider Instance](https://ai-sdk.dev/providers/ai-sdk-providers/openai#provider-instance) for more information.
|
|
@@ -599,4 +597,4 @@ Let me know if you need more information!
|
|
|
599
597
|
## Next Steps
|
|
600
598
|
|
|
601
599
|
- [Deployment | With Astro on Vercel](/docs/v1/deployment/web-framework#with-astro-on-vercel)
|
|
602
|
-
- [Monorepo Deployment](
|
|
600
|
+
- [Monorepo Deployment](/docs/v1/deployment/monorepo)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Integrate Mastra in your Express project | Frameworks
|
|
2
|
+
title: "Integrate Mastra in your Express project | Frameworks"
|
|
3
3
|
description: A step-by-step guide to integrating Mastra with an Express backend.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ In this guide you'll learn how to install the necessary Mastra dependencies, cre
|
|
|
26
26
|
First, install the necessary Mastra dependencies to run an Agent. This guide uses OpenAI as its model but you can use any supported [model provider](/models/v1).
|
|
27
27
|
|
|
28
28
|
```bash copy
|
|
29
|
-
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta zod@^3.0.0
|
|
29
|
+
npm install mastra@beta @mastra/core@beta @mastra/libsql@beta zod@^3.0.0
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
If not existent yet, create an `.env` file and add your OpenAI API key:
|
|
@@ -37,7 +37,7 @@ OPENAI_API_KEY=<your-api-key>
|
|
|
37
37
|
|
|
38
38
|
:::note
|
|
39
39
|
|
|
40
|
-
Each LLM provider uses a different env var. See [Model
|
|
40
|
+
Each LLM provider uses a different env var. See [Model Providers](/models/v1/providers/) for more information.
|
|
41
41
|
|
|
42
42
|
:::
|
|
43
43
|
|
|
@@ -75,7 +75,6 @@ export const weatherTool = createTool({
|
|
|
75
75
|
Add a `weatherAgent` at `src/mastra/agents/weather-agent.ts`:
|
|
76
76
|
|
|
77
77
|
```ts title="src/mastra/agents/weather-agent.ts" copy
|
|
78
|
-
import { openai } from "@ai-sdk/openai";
|
|
79
78
|
import { Agent } from "@mastra/core/agent";
|
|
80
79
|
import { weatherTool } from "../tools/weather-tool";
|
|
81
80
|
|
|
@@ -94,7 +93,7 @@ export const weatherAgent = new Agent({
|
|
|
94
93
|
|
|
95
94
|
Use the weatherTool to fetch current weather data.
|
|
96
95
|
`,
|
|
97
|
-
model: openai
|
|
96
|
+
model: "openai/gpt-5.1",
|
|
98
97
|
tools: { weatherTool },
|
|
99
98
|
});
|
|
100
99
|
```
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Next.js
|
|
3
|
-
description: "Get started with Mastra
|
|
2
|
+
title: "Next.js | Frameworks"
|
|
3
|
+
description: "Get started with Mastra and Next.js"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Next.js
|
|
6
|
+
# Integrate Mastra in your Next.js project
|
|
7
7
|
|
|
8
|
-
In this
|
|
8
|
+
In this guide, you'll build a tool-calling AI agent using Mastra, then connect it to Next.js by importing and calling the agent directly from your routes.
|
|
9
9
|
|
|
10
|
-
You'll use [AI SDK UI](https://ai-sdk.dev/docs/ai-sdk-ui/overview) and [AI Elements](https://ai-sdk.dev/elements) to create a beautiful, interactive chat experience.
|
|
11
|
-
|
|
12
|
-
In ~5 minutes, you'll have a functional AI-powered app ready to extend with your own tools and logic.
|
|
10
|
+
You'll use [AI SDK UI](https://ai-sdk.dev/docs/ai-sdk-ui/overview) and [AI Elements](https://ai-sdk.dev/elements) to create a beautiful, interactive chat experience.
|
|
13
11
|
|
|
14
12
|
<figure>
|
|
15
13
|

|
|
@@ -18,9 +16,11 @@ In ~5 minutes, you'll have a functional AI-powered app ready to extend with your
|
|
|
18
16
|
|
|
19
17
|
## Before you begin
|
|
20
18
|
|
|
21
|
-
* You'll need an API key from a supported [model provider](/models/v1). If you don't have a preference, use [OpenAI](
|
|
19
|
+
* You'll need an API key from a supported [model provider](/models/v1). If you don't have a preference, use [OpenAI](/models/v1/providers/openai).
|
|
20
|
+
|
|
21
|
+
## Create a new Next.js app (optional)
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
If you already have a Next.js app, skip to the next step.
|
|
24
24
|
|
|
25
25
|
Run the following command to [create a new Next.js app](https://nextjs.org/docs/app/getting-started/installation):
|
|
26
26
|
|
|
@@ -41,7 +41,7 @@ npx create-next-app \
|
|
|
41
41
|
This creates a project called `my-nextjs-agent`, but you can replace it with any name you want.
|
|
42
42
|
|
|
43
43
|
## Initialize Mastra
|
|
44
|
-
`cd` and run [`mastra init`](/reference/v1/cli/create-mastra).
|
|
44
|
+
`cd` into your Next.js project and run [`mastra init`](/reference/v1/cli/create-mastra).
|
|
45
45
|
|
|
46
46
|
When prompted, choose a provider (e.g. OpenAI) and enter your key:
|
|
47
47
|
|
|
@@ -58,14 +58,15 @@ This creates a `src/mastra` folder with an example weather agent and the followi
|
|
|
58
58
|
You'll call `weather-agent.ts` from your Next.js routes in the next steps.
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
## Install AI SDK
|
|
61
|
+
## Install AI SDK and AI Elements
|
|
62
62
|
|
|
63
|
-
Install AI SDK
|
|
63
|
+
Install AI SDK along with the Mastra adapter:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
npm install \
|
|
67
67
|
@mastra/ai-sdk \
|
|
68
|
-
@ai-sdk/react
|
|
68
|
+
@ai-sdk/react \
|
|
69
|
+
ai
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
Next, initialize AI Elements. When prompted, choose the default options:
|
|
@@ -84,7 +85,7 @@ Create `src/app/api/chat/route.ts`:
|
|
|
84
85
|
```ts title="src/app/api/chat/route.ts"
|
|
85
86
|
import { mastra } from "@/mastra";
|
|
86
87
|
import { NextResponse } from "next/server";
|
|
87
|
-
import {
|
|
88
|
+
import { toAISdkStream } from "@mastra/ai-sdk";
|
|
88
89
|
import { convertMessages } from "@mastra/core/agent";
|
|
89
90
|
import { createUIMessageStreamResponse } from "ai";
|
|
90
91
|
|
|
@@ -101,7 +102,7 @@ export async function POST(req: Request) {
|
|
|
101
102
|
});
|
|
102
103
|
|
|
103
104
|
return createUIMessageStreamResponse({
|
|
104
|
-
stream:
|
|
105
|
+
stream: toAISdkStream(stream, { from: "agent" }),
|
|
105
106
|
})
|
|
106
107
|
}
|
|
107
108
|
|
|
@@ -112,7 +113,7 @@ export async function GET() {
|
|
|
112
113
|
resourceId: "weather-chat",
|
|
113
114
|
});
|
|
114
115
|
|
|
115
|
-
const uiMessages =
|
|
116
|
+
const uiMessages =
|
|
116
117
|
convertMessages(response?.uiMessages ?? []).to("AIV5.UI");
|
|
117
118
|
return NextResponse.json(uiMessages);
|
|
118
119
|
}
|
|
@@ -190,8 +191,8 @@ function Chat() {
|
|
|
190
191
|
{message.parts?.map((part: any, i: number) => {
|
|
191
192
|
if (part.type === 'text') {
|
|
192
193
|
return (
|
|
193
|
-
<Message
|
|
194
|
-
key={`${message.id}-${i}`}
|
|
194
|
+
<Message
|
|
195
|
+
key={`${message.id}-${i}`}
|
|
195
196
|
from={message.role}>
|
|
196
197
|
<MessageContent>
|
|
197
198
|
<MessageResponse>{part.text}</MessageResponse>
|
|
@@ -251,16 +252,16 @@ This component connects [`useChat()`](https://ai-sdk.dev/docs/reference/ai-sdk-u
|
|
|
251
252
|
It renders the response text using the [`<MessageResponse>`](https://ai-sdk.dev/elements/components/message#messageresponse-) component, and shows any tool invocations with the [`<Tool>`](https://ai-sdk.dev/elements/components/tool) component.
|
|
252
253
|
|
|
253
254
|
|
|
254
|
-
## Test your agent
|
|
255
|
+
## Test your agent
|
|
255
256
|
1. Run your Next.js app with `npm run dev`
|
|
256
257
|
|
|
257
258
|
2. Open the chat at http://localhost:3000/chat
|
|
258
259
|
|
|
259
|
-
3. Try asking about the weather. If your API key is set up correctly, you'll get a response
|
|
260
|
+
3. Try asking about the weather. If your API key is set up correctly, you'll get a response
|
|
260
261
|
|
|
261
262
|
## Next steps
|
|
262
263
|
|
|
263
|
-
Congratulations on building your Mastra agent with Next.js! 🎉
|
|
264
|
+
Congratulations on building your Mastra agent with Next.js! 🎉
|
|
264
265
|
|
|
265
266
|
From here, you can extend the project with your own tools and logic:
|
|
266
267
|
|
|
@@ -268,8 +269,8 @@ From here, you can extend the project with your own tools and logic:
|
|
|
268
269
|
- Give your agent its own [tools](/docs/v1/agents/using-tools)
|
|
269
270
|
- Add human-like [memory](/docs/v1/agents/agent-memory) to your agent
|
|
270
271
|
|
|
271
|
-
When you're ready, read more about how Mastra integrates with AI SDK and Next.js, and how to deploy
|
|
272
|
+
When you're ready, read more about how Mastra integrates with AI SDK and Next.js, and how to deploy your agent anywhere, including Vercel:
|
|
272
273
|
|
|
273
|
-
- Integrate Mastra with [AI SDK](/
|
|
274
|
-
-
|
|
275
|
-
- Deploy your agent
|
|
274
|
+
- Integrate Mastra with [AI SDK](/guides/v1/build-your-ui/ai-sdk-ui)
|
|
275
|
+
- Deploy your agent to [Vercel](/docs/v1/deployment/cloud-providers/vercel-deployer)
|
|
276
|
+
- Deploy your agent [anywhere](/docs/v1/deployment/overview)
|