@mastra/mcp-docs-server 1.0.0-beta.11 → 1.0.0-beta.14
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/%40mastra%2Fagent-builder.md +29 -29
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +51 -51
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +180 -180
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +68 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +331 -331
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +31 -31
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +96 -96
- package/.docs/organized/changelogs/%40mastra%2Frag.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Freact.md +49 -2
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +122 -122
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +39 -39
- package/.docs/organized/changelogs/create-mastra.md +31 -31
- package/.docs/organized/changelogs/mastra.md +51 -51
- package/.docs/organized/code-examples/agent-v6.md +151 -0
- package/.docs/organized/code-examples/ai-elements.md +1 -1
- package/.docs/organized/code-examples/quick-start.md +0 -4
- package/.docs/organized/code-examples/stock-price-tool.md +21 -2
- package/.docs/raw/agents/adding-voice.mdx +2 -3
- package/.docs/raw/agents/agent-approval.mdx +139 -6
- package/.docs/raw/agents/agent-memory.mdx +24 -32
- package/.docs/raw/agents/guardrails.mdx +61 -51
- package/.docs/raw/agents/networks.mdx +9 -13
- package/.docs/raw/agents/overview.mdx +40 -24
- package/.docs/raw/agents/processors.mdx +20 -19
- package/.docs/raw/agents/structured-output.mdx +11 -7
- package/.docs/raw/agents/using-tools.mdx +5 -6
- package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
- package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
- package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +1 -2
- package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +2 -2
- package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -2
- package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
- package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +3 -4
- package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +2 -3
- package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +2 -3
- package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +1 -2
- package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +2 -3
- package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
- package/.docs/raw/deployment/cloud-providers.mdx +20 -0
- package/.docs/raw/deployment/{building-mastra.mdx → mastra-server.mdx} +5 -5
- package/.docs/raw/deployment/monorepo.mdx +23 -44
- package/.docs/raw/deployment/overview.mdx +32 -50
- package/.docs/raw/deployment/web-framework.mdx +15 -19
- package/.docs/raw/evals/custom-scorers.mdx +9 -6
- package/.docs/raw/evals/overview.mdx +3 -6
- package/.docs/raw/evals/running-in-ci.mdx +2 -2
- package/.docs/raw/getting-started/manual-install.mdx +20 -20
- package/.docs/raw/getting-started/mcp-docs-server.mdx +2 -2
- package/.docs/raw/getting-started/start.mdx +10 -1
- package/.docs/raw/getting-started/studio.mdx +1 -1
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +4 -4
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1033 -79
- package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +11 -11
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +9 -9
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +13 -16
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +5 -7
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/cloudflare-deployer.mdx +8 -5
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +12 -15
- package/.docs/raw/guides/deployment/index.mdx +32 -0
- package/.docs/raw/guides/deployment/inngest.mdx +386 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/netlify-deployer.mdx +7 -3
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/vercel-deployer.mdx +8 -5
- package/.docs/raw/guides/getting-started/astro.mdx +292 -451
- package/.docs/raw/guides/getting-started/express.mdx +72 -153
- package/.docs/raw/guides/getting-started/hono.mdx +227 -0
- package/.docs/raw/guides/getting-started/next-js.mdx +170 -61
- package/.docs/raw/guides/getting-started/quickstart.mdx +4 -4
- package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
- package/.docs/raw/guides/getting-started/vite-react.mdx +317 -147
- package/.docs/raw/guides/guide/ai-recruiter.mdx +10 -10
- package/.docs/raw/guides/guide/chef-michel.mdx +9 -11
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +15 -15
- package/.docs/raw/guides/guide/research-assistant.mdx +17 -17
- package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
- package/.docs/raw/guides/guide/web-search.mdx +8 -8
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +17 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +6 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +0 -2
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +21 -23
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/dashboard.mdx +2 -6
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/observability.mdx +1 -5
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/overview.mdx +2 -6
- package/.docs/raw/{deployment/mastra-cloud → mastra-cloud}/setting-up.mdx +8 -7
- package/.docs/raw/mcp/overview.mdx +31 -13
- package/.docs/raw/mcp/publishing-mcp-server.mdx +2 -2
- package/.docs/raw/memory/memory-processors.mdx +9 -9
- package/.docs/raw/memory/message-history.mdx +69 -0
- package/.docs/raw/memory/overview.mdx +34 -76
- package/.docs/raw/memory/semantic-recall.mdx +58 -49
- package/.docs/raw/memory/storage.mdx +188 -0
- package/.docs/raw/memory/working-memory.mdx +7 -7
- package/.docs/raw/observability/logging.mdx +10 -11
- package/.docs/raw/observability/overview.mdx +0 -1
- package/.docs/raw/observability/tracing/bridges/otel.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +1 -1
- package/.docs/raw/observability/tracing/exporters/default.mdx +3 -3
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +1 -2
- package/.docs/raw/observability/tracing/overview.mdx +23 -25
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +3 -3
- package/.docs/raw/rag/chunking-and-embedding.mdx +18 -31
- package/.docs/raw/rag/graph-rag.mdx +220 -0
- package/.docs/raw/rag/overview.mdx +2 -3
- package/.docs/raw/rag/retrieval.mdx +34 -51
- package/.docs/raw/rag/vector-databases.mdx +29 -25
- package/.docs/raw/reference/agents/agent.mdx +3 -3
- package/.docs/raw/reference/agents/generate.mdx +1 -1
- package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +3 -3
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +3 -3
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +3 -3
- package/.docs/raw/reference/agents/getDescription.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +3 -3
- package/.docs/raw/reference/agents/getLLM.mdx +3 -3
- package/.docs/raw/reference/agents/getMemory.mdx +3 -3
- package/.docs/raw/reference/agents/getModel.mdx +3 -3
- package/.docs/raw/reference/agents/getTools.mdx +2 -2
- package/.docs/raw/reference/agents/getVoice.mdx +2 -2
- package/.docs/raw/reference/agents/listAgents.mdx +2 -2
- package/.docs/raw/reference/agents/listScorers.mdx +3 -3
- package/.docs/raw/reference/agents/listTools.mdx +2 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +2 -2
- package/.docs/raw/reference/agents/network.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +3 -3
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +2 -2
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +2 -2
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +2 -2
- package/.docs/raw/reference/ai-sdk/network-route.mdx +3 -3
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +6 -6
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +127 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +107 -0
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +3 -3
- package/.docs/raw/reference/auth/auth0.mdx +2 -3
- package/.docs/raw/reference/auth/clerk.mdx +2 -3
- package/.docs/raw/reference/auth/firebase.mdx +3 -5
- package/.docs/raw/reference/auth/jwt.mdx +2 -3
- package/.docs/raw/reference/auth/supabase.mdx +2 -3
- package/.docs/raw/reference/auth/workos.mdx +2 -3
- package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
- package/.docs/raw/reference/cli/mastra.mdx +10 -10
- package/.docs/raw/reference/client-js/agents.mdx +1 -2
- package/.docs/raw/reference/client-js/mastra-client.mdx +2 -2
- package/.docs/raw/reference/client-js/workflows.mdx +20 -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/getLogger.mdx +1 -1
- package/.docs/raw/reference/core/getMCPServer.mdx +1 -1
- package/.docs/raw/reference/core/getMCPServerById.mdx +1 -1
- package/.docs/raw/reference/core/getMemory.mdx +2 -2
- package/.docs/raw/reference/core/getServer.mdx +3 -3
- package/.docs/raw/reference/core/getStorage.mdx +2 -2
- package/.docs/raw/reference/core/getStoredAgentById.mdx +3 -3
- 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/listLogs.mdx +1 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
- package/.docs/raw/reference/core/listMCPServers.mdx +1 -1
- package/.docs/raw/reference/core/listMemory.mdx +2 -2
- package/.docs/raw/reference/core/listStoredAgents.mdx +4 -4
- package/.docs/raw/reference/core/listVectors.mdx +1 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/core/setLogger.mdx +1 -1
- package/.docs/raw/reference/core/setStorage.mdx +2 -2
- package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
- package/.docs/raw/reference/deployer/cloudflare.mdx +1 -2
- package/.docs/raw/reference/deployer/deployer.mdx +0 -1
- package/.docs/raw/reference/deployer/netlify.mdx +1 -1
- package/.docs/raw/reference/deployer/vercel.mdx +2 -4
- package/.docs/raw/reference/evals/answer-relevancy.mdx +1 -1
- package/.docs/raw/reference/evals/answer-similarity.mdx +1 -1
- package/.docs/raw/reference/evals/bias.mdx +1 -1
- package/.docs/raw/reference/evals/completeness.mdx +1 -1
- package/.docs/raw/reference/evals/content-similarity.mdx +1 -1
- package/.docs/raw/reference/evals/context-precision.mdx +1 -1
- package/.docs/raw/reference/evals/faithfulness.mdx +1 -1
- package/.docs/raw/reference/evals/hallucination.mdx +1 -1
- package/.docs/raw/reference/evals/keyword-coverage.mdx +1 -1
- package/.docs/raw/reference/evals/prompt-alignment.mdx +7 -7
- package/.docs/raw/reference/evals/textual-difference.mdx +1 -1
- package/.docs/raw/reference/evals/tone-consistency.mdx +1 -1
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +10 -10
- package/.docs/raw/reference/evals/toxicity.mdx +1 -1
- package/.docs/raw/reference/logging/pino-logger.mdx +7 -8
- package/.docs/raw/reference/memory/createThread.mdx +2 -2
- package/.docs/raw/reference/memory/deleteMessages.mdx +2 -2
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +2 -2
- package/.docs/raw/reference/memory/memory-class.mdx +3 -3
- package/.docs/raw/reference/memory/query.mdx +2 -2
- package/.docs/raw/reference/memory/recall.mdx +2 -2
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +1 -1
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +2 -2
- package/.docs/raw/reference/processors/language-detector.mdx +2 -2
- package/.docs/raw/reference/processors/message-history-processor.mdx +2 -2
- package/.docs/raw/reference/processors/moderation-processor.mdx +3 -3
- package/.docs/raw/reference/processors/pii-detector.mdx +3 -3
- package/.docs/raw/reference/processors/processor-interface.mdx +13 -13
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +2 -2
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +2 -2
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +2 -2
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +2 -2
- package/.docs/raw/reference/processors/tool-call-filter.mdx +3 -3
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +2 -2
- package/.docs/raw/reference/processors/working-memory-processor.mdx +3 -3
- package/.docs/raw/reference/rag/chunk.mdx +1 -1
- package/.docs/raw/reference/rag/database-config.mdx +1 -1
- package/.docs/raw/reference/rag/extract-params.mdx +2 -2
- package/.docs/raw/reference/rag/metadata-filters.mdx +7 -7
- package/.docs/raw/reference/server/create-route.mdx +14 -14
- package/.docs/raw/reference/server/express-adapter.mdx +10 -11
- package/.docs/raw/reference/server/hono-adapter.mdx +10 -11
- package/.docs/raw/reference/server/mastra-server.mdx +22 -22
- package/.docs/raw/reference/server/routes.mdx +28 -1
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +3 -3
- package/.docs/raw/reference/storage/cloudflare.mdx +2 -2
- package/.docs/raw/reference/storage/convex.mdx +6 -6
- package/.docs/raw/reference/storage/dynamodb.mdx +4 -4
- package/.docs/raw/reference/storage/lance.mdx +3 -3
- package/.docs/raw/reference/storage/libsql.mdx +69 -54
- package/.docs/raw/reference/storage/mongodb.mdx +80 -7
- package/.docs/raw/reference/storage/mssql.mdx +4 -4
- package/.docs/raw/{server-db/storage.mdx → reference/storage/overview.mdx} +13 -111
- package/.docs/raw/reference/storage/postgresql.mdx +78 -7
- package/.docs/raw/reference/storage/upstash.mdx +74 -2
- package/.docs/raw/reference/streaming/agents/stream.mdx +27 -5
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +2 -2
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/stream.mdx +35 -22
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +4 -4
- package/.docs/raw/reference/templates/overview.mdx +1 -2
- package/.docs/raw/reference/tools/create-tool.mdx +24 -5
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +3 -3
- package/.docs/raw/reference/tools/vector-query-tool.mdx +4 -4
- package/.docs/raw/reference/vectors/astra.mdx +3 -3
- package/.docs/raw/reference/vectors/chroma.mdx +3 -3
- package/.docs/raw/reference/vectors/convex.mdx +12 -12
- package/.docs/raw/reference/vectors/couchbase.mdx +5 -5
- package/.docs/raw/reference/vectors/duckdb.mdx +10 -10
- package/.docs/raw/reference/vectors/elasticsearch.mdx +4 -4
- package/.docs/raw/reference/vectors/lance.mdx +4 -4
- package/.docs/raw/reference/vectors/libsql.mdx +61 -11
- package/.docs/raw/reference/vectors/mongodb.mdx +58 -5
- package/.docs/raw/reference/vectors/pg.mdx +53 -6
- package/.docs/raw/reference/vectors/pinecone.mdx +3 -3
- package/.docs/raw/reference/vectors/qdrant.mdx +3 -3
- package/.docs/raw/reference/vectors/s3vectors.mdx +6 -6
- package/.docs/raw/reference/vectors/turbopuffer.mdx +4 -4
- package/.docs/raw/reference/vectors/upstash.mdx +55 -6
- package/.docs/raw/reference/vectors/vectorize.mdx +3 -3
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +1 -3
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/start.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +143 -0
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +5 -5
- package/.docs/raw/reference/workflows/run.mdx +1 -1
- package/.docs/raw/reference/workflows/step.mdx +3 -3
- 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 +37 -2
- 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 +6 -6
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +7 -7
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow.mdx +17 -3
- package/.docs/raw/{auth → server/auth}/auth0.mdx +20 -14
- package/.docs/raw/{auth → server/auth}/clerk.mdx +16 -9
- package/.docs/raw/{auth → server/auth}/firebase.mdx +21 -15
- package/.docs/raw/{auth → server/auth}/index.mdx +6 -6
- package/.docs/raw/{auth → server/auth}/jwt.mdx +14 -7
- package/.docs/raw/{auth → server/auth}/supabase.mdx +16 -9
- package/.docs/raw/{auth → server/auth}/workos.mdx +19 -13
- package/.docs/raw/{server-db → server}/custom-adapters.mdx +13 -13
- package/.docs/raw/{server-db → server}/custom-api-routes.mdx +3 -5
- package/.docs/raw/{server-db → server}/mastra-client.mdx +26 -15
- package/.docs/raw/{server-db → server}/mastra-server.mdx +8 -8
- package/.docs/raw/{server-db → server}/middleware.mdx +9 -9
- package/.docs/raw/{server-db → server}/request-context.mdx +33 -32
- package/.docs/raw/{server-db → server}/server-adapters.mdx +12 -12
- package/.docs/raw/streaming/events.mdx +14 -7
- package/.docs/raw/streaming/overview.mdx +21 -10
- package/.docs/raw/streaming/tool-streaming.mdx +6 -6
- package/.docs/raw/streaming/workflow-streaming.mdx +6 -8
- package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +31 -12
- package/.docs/raw/tools-mcp/overview.mdx +10 -11
- package/.docs/raw/voice/overview.mdx +1 -1
- package/.docs/raw/workflows/agents-and-tools.mdx +28 -19
- package/.docs/raw/workflows/control-flow.mdx +27 -40
- package/.docs/raw/workflows/error-handling.mdx +172 -18
- package/.docs/raw/workflows/human-in-the-loop.mdx +6 -7
- package/.docs/raw/workflows/inngest-workflow.mdx +8 -9
- package/.docs/raw/workflows/input-data-mapping.mdx +7 -7
- package/.docs/raw/workflows/overview.mdx +34 -23
- package/.docs/raw/workflows/snapshots.mdx +14 -44
- package/.docs/raw/workflows/suspend-and-resume.mdx +7 -7
- package/.docs/raw/workflows/time-travel.mdx +16 -16
- package/.docs/raw/workflows/workflow-state.mdx +5 -8
- package/CHANGELOG.md +23 -0
- package/dist/logger.d.ts +3 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/stdio.js +53 -0
- package/package.json +4 -4
- package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +0 -1
- package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
- package/.docs/raw/memory/conversation-history.mdx +0 -24
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -150
- package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
- package/.docs/raw/memory/threads-and-resources.mdx +0 -95
|
@@ -1,209 +1,128 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
description:
|
|
2
|
+
title: "Express | Frameworks"
|
|
3
|
+
description: "Get started with Mastra and Express"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import Tabs from "@theme/Tabs";
|
|
7
|
+
import TabItem from "@theme/TabItem";
|
|
7
8
|
|
|
8
|
-
Mastra
|
|
9
|
+
# Integrate Mastra in your Express project
|
|
9
10
|
|
|
10
|
-
-
|
|
11
|
-
- Maintain full control over your server logic and routing
|
|
12
|
-
- Scale your backend independently of your frontend
|
|
11
|
+
In this guide, you'll build a tool-calling AI agent using Mastra and Express. Using the [Express server adapter](/reference/v1/server/express-adapter), you can expose your agents as HTTP endpoints without writing the routing yourself or running a separate Mastra server.
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
## Before you begin
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
- 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).
|
|
16
|
+
- Install Node.js `v22.13.0` or later
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Create a new Express app (optional)
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- Node.js `v22.13.0` or later
|
|
22
|
-
- An API key from a supported [Model Provider](/models/v1)
|
|
20
|
+
If you already have an Express app, skip to the next step.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
Clone this [boilerplate repository](https://github.com/mastra-ai/express-ts-boilerplate) and install dependencies:
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
<Tabs>
|
|
25
|
+
<TabItem value="https" label="HTTPS">
|
|
27
26
|
|
|
28
|
-
```bash
|
|
29
|
-
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/mastra-ai/express-ts-boilerplate.git
|
|
29
|
+
cd express-ts-boilerplate
|
|
30
|
+
npm install
|
|
30
31
|
```
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```bash title=".env" copy
|
|
35
|
-
OPENAI_API_KEY=<your-api-key>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
:::note
|
|
39
|
-
|
|
40
|
-
Each LLM provider uses a different env var. See [Model Providers](/models/v1/providers/) for more information.
|
|
41
|
-
|
|
42
|
-
:::
|
|
33
|
+
</TabItem>
|
|
34
|
+
<TabItem value="ssh" label="SSH">
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export const mastra = new Mastra({});
|
|
36
|
+
```bash
|
|
37
|
+
git clone git@github.com:mastra-ai/express-ts-boilerplate.git
|
|
38
|
+
cd express-ts-boilerplate
|
|
39
|
+
npm install
|
|
50
40
|
```
|
|
51
41
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```ts title="src/mastra/tools/weather-tool.ts" copy
|
|
55
|
-
import { createTool } from "@mastra/core/tools";
|
|
56
|
-
import { z } from "zod";
|
|
57
|
-
|
|
58
|
-
export const weatherTool = createTool({
|
|
59
|
-
id: "get-weather",
|
|
60
|
-
description: "Get current weather for a location",
|
|
61
|
-
inputSchema: z.object({
|
|
62
|
-
location: z.string().describe("City name"),
|
|
63
|
-
}),
|
|
64
|
-
outputSchema: z.object({
|
|
65
|
-
output: z.string(),
|
|
66
|
-
}),
|
|
67
|
-
execute: async () => {
|
|
68
|
-
return {
|
|
69
|
-
output: "The weather is sunny",
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
```
|
|
42
|
+
</TabItem>
|
|
43
|
+
</Tabs>
|
|
74
44
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```ts title="src/mastra/agents/weather-agent.ts" copy
|
|
78
|
-
import { Agent } from "@mastra/core/agent";
|
|
79
|
-
import { weatherTool } from "../tools/weather-tool";
|
|
80
|
-
|
|
81
|
-
export const weatherAgent = new Agent({
|
|
82
|
-
id: "weather-agent",
|
|
83
|
-
name: "Weather Agent",
|
|
84
|
-
instructions: `
|
|
85
|
-
You are a helpful weather assistant that provides accurate weather information.
|
|
86
|
-
|
|
87
|
-
Your primary function is to help users get weather details for specific locations. When responding:
|
|
88
|
-
- Always ask for a location if none is provided
|
|
89
|
-
- If the location name isn't in English, please translate it
|
|
90
|
-
- If giving a location with multiple parts (e.g. "New York, NY"), use the most relevant part (e.g. "New York")
|
|
91
|
-
- Include relevant details like humidity, wind conditions, and precipitation
|
|
92
|
-
- Keep responses concise but informative
|
|
93
|
-
|
|
94
|
-
Use the weatherTool to fetch current weather data.
|
|
95
|
-
`,
|
|
96
|
-
model: "openai/gpt-5.1",
|
|
97
|
-
tools: { weatherTool },
|
|
98
|
-
});
|
|
99
|
-
```
|
|
45
|
+
## Initialize Mastra
|
|
100
46
|
|
|
101
|
-
|
|
47
|
+
Inside your Express project directory, run [`mastra init`](/reference/v1/cli/mastra#mastra-init).
|
|
102
48
|
|
|
103
|
-
|
|
104
|
-
import { Mastra } from "@mastra/core";
|
|
105
|
-
import { weatherAgent } from "./agents/weather-agent";
|
|
49
|
+
When prompted, choose a provider (e.g. OpenAI) and enter your key:
|
|
106
50
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
});
|
|
51
|
+
```bash
|
|
52
|
+
npx mastra@beta init
|
|
110
53
|
```
|
|
111
54
|
|
|
112
|
-
|
|
55
|
+
This creates a `src/mastra` folder with an example weather agent and the following files:
|
|
113
56
|
|
|
114
|
-
|
|
57
|
+
- `index.ts` - Mastra config, including memory
|
|
58
|
+
- `tools/weather-tool.ts` - a tool to fetch weather for a given location
|
|
59
|
+
- `agents/weather-agent.ts`- a weather agent with a prompt that uses the tool
|
|
115
60
|
|
|
116
|
-
|
|
61
|
+
You'll pass the `src/mastra/index.ts` file to the Express server adapter later.
|
|
117
62
|
|
|
118
|
-
|
|
63
|
+
## Add server adapter
|
|
119
64
|
|
|
120
|
-
|
|
121
|
-
import express, { Request, Response } from "express";
|
|
65
|
+
Install the Express server adapter package:
|
|
122
66
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
app.get("/", (req: Request, res: Response) => {
|
|
127
|
-
res.send("Hello, world!");
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
app.listen(port, () => {
|
|
131
|
-
console.log(`Server is running at http://localhost:${port}`);
|
|
132
|
-
});
|
|
67
|
+
```bash
|
|
68
|
+
npm install @mastra/express@beta
|
|
133
69
|
```
|
|
134
70
|
|
|
135
|
-
|
|
71
|
+
Open the Express entry file at `src/index.ts` and add the required import and initialization code:
|
|
136
72
|
|
|
137
|
-
```
|
|
138
|
-
import express, { Request, Response } from "express";
|
|
73
|
+
```typescript {2-3,11-12} title="src/index.ts"
|
|
74
|
+
import express, { type Request, type Response } from "express";
|
|
75
|
+
import { MastraServer } from "@mastra/express";
|
|
139
76
|
import { mastra } from "./mastra";
|
|
140
77
|
|
|
141
78
|
const app = express();
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
app.get("/", (req: Request, res: Response) => {
|
|
145
|
-
res.send("Hello, world!");
|
|
146
|
-
});
|
|
79
|
+
const PORT = process.env.PORT || 3000;
|
|
147
80
|
|
|
148
|
-
|
|
149
|
-
|
|
81
|
+
// Middleware
|
|
82
|
+
app.use(express.json());
|
|
150
83
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
84
|
+
const server = new MastraServer({ app, mastra });
|
|
85
|
+
await server.init();
|
|
154
86
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const result = await agent.generate(`What's the weather like in ${city}?`);
|
|
159
|
-
res.send(result.text);
|
|
160
|
-
} catch (error) {
|
|
161
|
-
console.error("Agent error:", error);
|
|
162
|
-
res.status(500).send("An error occurred while processing your request");
|
|
163
|
-
}
|
|
87
|
+
// Routes
|
|
88
|
+
app.get("/", (_req: Request, res: Response) => {
|
|
89
|
+
res.json({ message: "Hello, World!" });
|
|
164
90
|
});
|
|
165
91
|
|
|
166
|
-
|
|
167
|
-
|
|
92
|
+
// Start server
|
|
93
|
+
app.listen(PORT, () => {
|
|
94
|
+
console.log(`Server is running on http://localhost:${PORT}`);
|
|
168
95
|
});
|
|
169
96
|
```
|
|
170
97
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
:::note
|
|
98
|
+
The `MastraServer` is initialized with the existing Express `app` and the root `mastra` instance. Calling `init()` registers the Mastra middleware and exposes all available Mastra endpoints.
|
|
174
99
|
|
|
175
|
-
|
|
100
|
+
## Test your agent
|
|
176
101
|
|
|
177
|
-
|
|
102
|
+
By default, Mastra's endpoints are added under the `/api` subpath and use your agent/workflow IDs. The default `weather-agent` created by `mastra init` is available at `/api/agents/weather-agent`.
|
|
178
103
|
|
|
179
|
-
Start your Express server
|
|
104
|
+
Start your Express server:
|
|
180
105
|
|
|
181
|
-
```
|
|
182
|
-
|
|
106
|
+
```bash
|
|
107
|
+
npm run start
|
|
183
108
|
```
|
|
184
109
|
|
|
185
|
-
|
|
110
|
+
In a separate terminal window, use `curl` to ask the weather agent:
|
|
186
111
|
|
|
187
|
-
```
|
|
188
|
-
|
|
112
|
+
```bash
|
|
113
|
+
curl -X POST http://localhost:3000/api/agents/weather-agent/generate -H "Content-Type: application/json" -d "{\"messages\":[{\"role\":\"user\",\"content\":\"What is the weather like in Seoul?\"}]}"
|
|
189
114
|
```
|
|
190
115
|
|
|
191
|
-
##
|
|
116
|
+
## Next steps
|
|
192
117
|
|
|
193
|
-
|
|
118
|
+
Congratulations on building your Mastra agent with Express! 🎉
|
|
194
119
|
|
|
195
|
-
|
|
120
|
+
From here, you can extend the project with your own tools and logic:
|
|
196
121
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
"mastra:dev": "mastra dev"
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
122
|
+
- Learn more about [agents](/docs/v1/agents/overview)
|
|
123
|
+
- Give your agent its own [tools](/docs/v1/agents/using-tools)
|
|
124
|
+
- Add human-like [memory](/docs/v1/agents/agent-memory) to your agent
|
|
204
125
|
|
|
205
|
-
|
|
126
|
+
When you're ready, read more about how Mastra integrates with Express:
|
|
206
127
|
|
|
207
|
-
|
|
208
|
-
npm run mastra:dev
|
|
209
|
-
```
|
|
128
|
+
- [Server Adapters](/docs/v1/server/server-adapters)
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Hono | Frameworks"
|
|
3
|
+
description: "Get started with Mastra and Hono"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import Tabs from "@theme/Tabs";
|
|
7
|
+
import TabItem from "@theme/TabItem";
|
|
8
|
+
|
|
9
|
+
# Integrate Mastra in your Hono project
|
|
10
|
+
|
|
11
|
+
In this guide, you'll build a tool-calling AI agent using Mastra and Hono. Using the [Hono server adapter](/reference/v1/server/hono-adapter), you can expose your agents as HTTP endpoints without writing the routing yourself or running a separate Mastra server.
|
|
12
|
+
|
|
13
|
+
## Before you begin
|
|
14
|
+
|
|
15
|
+
- 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).
|
|
16
|
+
- Install Node.js `v22.13.0` or later
|
|
17
|
+
|
|
18
|
+
## Create a new Hono app (optional)
|
|
19
|
+
|
|
20
|
+
If you already have a Hono app, skip to the next step.
|
|
21
|
+
|
|
22
|
+
Run the following command to [create a new Hono app](https://hono.dev/docs/getting-started/basic):
|
|
23
|
+
|
|
24
|
+
<Tabs groupId="pm">
|
|
25
|
+
<TabItem value="npm" label="npm">
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm create hono@latest mastra-hono -- --template nodejs --install --pm npm
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
</TabItem>
|
|
32
|
+
<TabItem value="pnpm" label="pnpm">
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm create hono@latest mastra-hono --template nodejs --install --pm pnpm
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
</TabItem>
|
|
39
|
+
<TabItem value="yarn" label="yarn">
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
yarn create hono@latest mastra-hono --template nodejs --install --pm yarn
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="bun" label="bun">
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
bun create hono@latest mastra-hono --template nodejs --install --pm bun
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
55
|
+
This creates a project called `mastra-hono`, but you can replace it with any name you want.
|
|
56
|
+
|
|
57
|
+
## Initialize Mastra
|
|
58
|
+
|
|
59
|
+
Inside your Hono project directory, run [`mastra init`](/reference/v1/cli/mastra#mastra-init).
|
|
60
|
+
|
|
61
|
+
When prompted, choose a provider (e.g. OpenAI) and enter your key:
|
|
62
|
+
|
|
63
|
+
<Tabs groupId="pm">
|
|
64
|
+
<TabItem value="npm" label="npm">
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cd mastra-hono
|
|
68
|
+
npx mastra@beta init
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
</TabItem>
|
|
72
|
+
<TabItem value="pnpm" label="pnpm">
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
cd mastra-hono
|
|
76
|
+
pnpm dlx mastra@beta init
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
</TabItem>
|
|
80
|
+
<TabItem value="yarn" label="yarn">
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd mastra-hono
|
|
84
|
+
yarn dlx mastra@beta init
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
</TabItem>
|
|
88
|
+
<TabItem value="bun" label="bun">
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
cd mastra-hono
|
|
92
|
+
bunx mastra@beta init
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
</TabItem>
|
|
96
|
+
</Tabs>
|
|
97
|
+
|
|
98
|
+
This creates a `src/mastra` folder with an example weather agent and the following files:
|
|
99
|
+
|
|
100
|
+
- `index.ts` - Mastra config, including memory
|
|
101
|
+
- `tools/weather-tool.ts` - a tool to fetch weather for a given location
|
|
102
|
+
- `agents/weather-agent.ts`- a weather agent with a prompt that uses the tool
|
|
103
|
+
|
|
104
|
+
You'll pass the `src/mastra/index.ts` file to the Hono server adapter later.
|
|
105
|
+
|
|
106
|
+
## Add server adapter
|
|
107
|
+
|
|
108
|
+
Install the Hono server adapter package:
|
|
109
|
+
|
|
110
|
+
<Tabs groupId="pm">
|
|
111
|
+
<TabItem value="npm" label="npm">
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm install @mastra/hono@beta
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
</TabItem>
|
|
118
|
+
<TabItem value="pnpm" label="pnpm">
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pnpm add @mastra/hono@beta
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
</TabItem>
|
|
125
|
+
<TabItem value="yarn" label="yarn">
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
yarn add @mastra/hono@beta
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
</TabItem>
|
|
132
|
+
<TabItem value="bun" label="bun">
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
bun add @mastra/hono@beta
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
</TabItem>
|
|
139
|
+
</Tabs>
|
|
140
|
+
|
|
141
|
+
Open the Hono entry file at `src/index.ts` and add the required import and initialization code:
|
|
142
|
+
|
|
143
|
+
```typescript title="src/index.ts" {3-8,10-11,13}
|
|
144
|
+
import { serve } from '@hono/node-server'
|
|
145
|
+
import { Hono } from 'hono'
|
|
146
|
+
import {
|
|
147
|
+
type HonoBindings,
|
|
148
|
+
type HonoVariables,
|
|
149
|
+
MastraServer
|
|
150
|
+
} from '@mastra/hono';
|
|
151
|
+
import { mastra } from './mastra/index.js';
|
|
152
|
+
|
|
153
|
+
const app = new Hono<{ Bindings: HonoBindings; Variables: HonoVariables }>();
|
|
154
|
+
const server = new MastraServer({ app, mastra });
|
|
155
|
+
|
|
156
|
+
await server.init();
|
|
157
|
+
|
|
158
|
+
app.get('/', (c) => {
|
|
159
|
+
return c.text('Hello Hono!')
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
serve({
|
|
163
|
+
fetch: app.fetch,
|
|
164
|
+
port: 3000
|
|
165
|
+
}, (info) => {
|
|
166
|
+
console.log(`Server is running on http://localhost:${info.port}`)
|
|
167
|
+
})
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The `MastraServer` is initialized with the existing Hono `app` and the root `mastra` instance. Calling `init()` registers the Mastra middleware and exposes all available Mastra endpoints.
|
|
171
|
+
|
|
172
|
+
## Test your agent
|
|
173
|
+
|
|
174
|
+
By default, Mastra's endpoints are added under the `/api` subpath and use your agent/workflow IDs. The default `weather-agent` created by `mastra init` is available at `/api/agents/weather-agent`.
|
|
175
|
+
|
|
176
|
+
Start your Hono server:
|
|
177
|
+
|
|
178
|
+
<Tabs groupId="pm">
|
|
179
|
+
<TabItem value="npm" label="npm">
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npm run dev
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
</TabItem>
|
|
186
|
+
<TabItem value="pnpm" label="pnpm">
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
pnpm run dev
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
</TabItem>
|
|
193
|
+
<TabItem value="yarn" label="yarn">
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
yarn run dev
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
</TabItem>
|
|
200
|
+
<TabItem value="bun" label="bun">
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
bun run dev
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
</TabItem>
|
|
207
|
+
</Tabs>
|
|
208
|
+
|
|
209
|
+
In a separate terminal window, use `curl` to ask the weather agent:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
curl -X POST http://localhost:3000/api/agents/weather-agent/generate -H "Content-Type: application/json" -d "{\"messages\":[{\"role\":\"user\",\"content\":\"What is the weather like in Seoul?\"}]}"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Next steps
|
|
216
|
+
|
|
217
|
+
Congratulations on building your Mastra agent with Hono! 🎉
|
|
218
|
+
|
|
219
|
+
From here, you can extend the project with your own tools and logic:
|
|
220
|
+
|
|
221
|
+
- Learn more about [agents](/docs/v1/agents/overview)
|
|
222
|
+
- Give your agent its own [tools](/docs/v1/agents/using-tools)
|
|
223
|
+
- Add human-like [memory](/docs/v1/agents/agent-memory) to your agent
|
|
224
|
+
|
|
225
|
+
When you're ready, read more about how Mastra integrates with Hono:
|
|
226
|
+
|
|
227
|
+
- [Server Adapters](/docs/v1/server/server-adapters)
|