@mastra/mcp-docs-server 1.2.15-alpha.9 → 1.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agents/agent-approval.md +14 -0
- package/.docs/docs/agents/code-mode.md +17 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +8 -8
- package/.docs/docs/browser/recording.md +4 -4
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +70 -7
- package/.docs/docs/capabilities/subagents.md +6 -3
- package/.docs/docs/datasets/running-experiments.md +49 -0
- package/.docs/docs/deployment/cloud-providers.md +9 -9
- package/.docs/docs/deployment/overview.md +9 -9
- package/.docs/docs/deployment/sandbox.md +3 -3
- package/.docs/docs/deployment/web-framework.md +6 -6
- package/.docs/docs/deployment/workers.md +1 -1
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +45 -4
- package/.docs/docs/harness/overview.md +2 -4
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +3 -3
- package/.docs/docs/long-running-agents/goals.md +1 -1
- package/.docs/docs/long-running-agents/schedules.md +1 -1
- package/.docs/docs/long-running-agents/signal-providers.md +3 -16
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +27 -0
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/mcp/overview.md +42 -0
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +3 -3
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +2 -2
- package/.docs/docs/memory/semantic-recall.md +2 -1
- package/.docs/docs/memory/working-memory.md +1 -0
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +16 -15
- package/.docs/docs/observability/integrations/overview.md +3 -3
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +2 -0
- package/.docs/docs/server/auth.md +10 -8
- package/.docs/docs/server/custom-adapters.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/server/mastra-client.md +2 -2
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/storage/overview.md +14 -12
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/dynamic-workflows.md +1 -1
- package/.docs/docs/workflows/overview.md +2 -2
- package/.docs/docs/workflows/snapshots.md +12 -10
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +17 -17
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/agent-frameworks/ai-sdk.md +2 -2
- package/.docs/guides/deployment/mastra-workers.md +4 -2
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/guides/guide/signal-provider.md +1 -1
- package/.docs/guides/index.md +8 -8
- package/.docs/guides/voice/overview.md +55 -106
- package/.docs/guides/voice/speech-to-text.md +7 -7
- package/.docs/guides/voice/text-to-speech.md +9 -10
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +5 -5
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +1 -1
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +257 -4
- package/.docs/{docs/server → integrations}/auth/auth0.md +1 -1
- package/.docs/{docs/server → integrations}/auth/clerk.md +2 -2
- package/.docs/{docs/server → integrations}/auth/firebase.md +1 -1
- package/.docs/{docs/server → integrations}/auth/okta.md +24 -4
- package/.docs/{docs/server → integrations}/auth/supabase.md +2 -2
- package/.docs/{docs/server → integrations}/auth/workos.md +1 -1
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +12 -4
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/integrations/databases/oracledb.md +239 -0
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +3 -3
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +5 -5
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +3 -3
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +2 -2
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +5 -5
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +2 -2
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +5 -5
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +3 -3
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +278 -46
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +23 -2
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +1 -1
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +3 -3
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +2 -2
- package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +8 -0
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +141 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +437 -34
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +4 -0
- package/.docs/models/gateways/neon.md +1 -1
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +9 -3
- package/.docs/models/gateways/vercel.md +7 -4
- package/.docs/models/index.md +3 -3
- package/.docs/models/providers/302ai.md +1 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteration-ai.md +1 -1
- package/.docs/models/providers/agentrouter.md +1 -1
- package/.docs/models/providers/ai-router.md +1 -1
- package/.docs/models/providers/aiand.md +1 -1
- package/.docs/models/providers/aki-io.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-token-plan.md +1 -1
- package/.docs/models/providers/alibaba.md +7 -5
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/anyapi.md +1 -1
- package/.docs/models/providers/atomic-chat.md +1 -1
- package/.docs/models/providers/auriko.md +1 -1
- package/.docs/models/providers/bailing.md +1 -1
- package/.docs/models/providers/baseten.md +2 -2
- package/.docs/models/providers/berget.md +1 -1
- package/.docs/models/providers/blueclaw.md +1 -1
- package/.docs/models/providers/chutes.md +1 -1
- package/.docs/models/providers/clarifai.md +1 -1
- package/.docs/models/providers/claudinio.md +1 -1
- package/.docs/models/providers/cline-pass.md +1 -1
- package/.docs/models/providers/cloudferro-sherlock.md +1 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/cortecs.md +3 -5
- package/.docs/models/providers/crof.md +1 -1
- package/.docs/models/providers/crossmodel.md +2 -3
- package/.docs/models/providers/daoxe.md +1 -1
- package/.docs/models/providers/databricks.md +1 -1
- package/.docs/models/providers/deepinfra.md +6 -5
- package/.docs/models/providers/digitalocean.md +5 -5
- package/.docs/models/providers/dinference.md +1 -1
- package/.docs/models/providers/drun.md +1 -1
- package/.docs/models/providers/ebcloud.md +1 -1
- package/.docs/models/providers/empiriolabs.md +3 -2
- package/.docs/models/providers/evroc.md +3 -4
- package/.docs/models/providers/fastrouter.md +1 -1
- package/.docs/models/providers/firepass.md +1 -1
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/firmware.md +1 -1
- package/.docs/models/providers/freemodel.md +1 -1
- package/.docs/models/providers/friendli.md +1 -1
- package/.docs/models/providers/frogbot.md +1 -1
- package/.docs/models/providers/github-models.md +1 -1
- package/.docs/models/providers/gmicloud.md +1 -1
- package/.docs/models/providers/google.md +1 -1
- package/.docs/models/providers/greenpt.md +1 -1
- package/.docs/models/providers/helicone.md +1 -1
- package/.docs/models/providers/hetzner.md +8 -5
- package/.docs/models/providers/hpc-ai.md +1 -1
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/hyper.md +7 -7
- package/.docs/models/providers/iflowcn.md +1 -1
- package/.docs/models/providers/impossibl.md +1 -1
- package/.docs/models/providers/inception.md +1 -1
- package/.docs/models/providers/inceptron.md +1 -1
- package/.docs/models/providers/inference.md +1 -1
- package/.docs/models/providers/inferx.md +1 -1
- package/.docs/models/providers/infomaniak.md +1 -1
- package/.docs/models/providers/io-intelligence.md +1 -1
- package/.docs/models/providers/io-net.md +1 -1
- package/.docs/models/providers/jiekou.md +1 -1
- package/.docs/models/providers/kenari.md +1 -1
- package/.docs/models/providers/kilo.md +16 -11
- package/.docs/models/providers/kimi-for-coding.md +1 -1
- package/.docs/models/providers/kiro.md +1 -1
- package/.docs/models/providers/kuae-cloud-coding-plan.md +1 -1
- package/.docs/models/providers/lilac.md +1 -1
- package/.docs/models/providers/llama.md +1 -1
- package/.docs/models/providers/llmgateway.md +2 -7
- package/.docs/models/providers/llmtr.md +1 -1
- package/.docs/models/providers/lmstudio.md +1 -1
- package/.docs/models/providers/longcat.md +1 -1
- package/.docs/models/providers/lucidquery.md +1 -1
- package/.docs/models/providers/lynkr.md +1 -1
- package/.docs/models/providers/meganova.md +1 -1
- package/.docs/models/providers/meta.md +1 -1
- package/.docs/models/providers/minimax-cn-coding-plan.md +1 -1
- package/.docs/models/providers/minimax-cn.md +1 -1
- package/.docs/models/providers/minimax-coding-plan.md +1 -1
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mixlayer.md +1 -1
- package/.docs/models/providers/moark.md +1 -1
- package/.docs/models/providers/modal.md +1 -1
- package/.docs/models/providers/model-oracle-ai.md +1 -1
- package/.docs/models/providers/modelis.md +1 -1
- package/.docs/models/providers/modelscope.md +1 -1
- package/.docs/models/providers/moonshotai-cn.md +1 -1
- package/.docs/models/providers/moonshotai.md +1 -1
- package/.docs/models/providers/morph.md +1 -1
- package/.docs/models/providers/nano-gpt.md +8 -4
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -2
- package/.docs/models/providers/neuralwatt.md +1 -1
- package/.docs/models/providers/nova.md +1 -1
- package/.docs/models/providers/novita-ai.md +1 -1
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ofox.md +4 -3
- package/.docs/models/providers/ollama-cloud.md +1 -1
- package/.docs/models/providers/opencode-go.md +1 -1
- package/.docs/models/providers/opencode.md +65 -64
- package/.docs/models/providers/orcarouter.md +1 -1
- package/.docs/models/providers/ovhcloud.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +1 -1
- package/.docs/models/providers/pioneer.md +1 -1
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/poolside.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +12 -10
- package/.docs/models/providers/qihang-ai.md +1 -1
- package/.docs/models/providers/qiniu-ai.md +1 -1
- package/.docs/models/providers/regolo-ai.md +26 -21
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/routing-run.md +1 -1
- package/.docs/models/providers/sakana.md +1 -1
- package/.docs/models/providers/sarvam.md +1 -1
- package/.docs/models/providers/scaleway.md +1 -1
- package/.docs/models/providers/scx.md +1 -1
- package/.docs/models/providers/siliconflow-cn.md +1 -1
- package/.docs/models/providers/siliconflow.md +1 -1
- package/.docs/models/providers/snowflake-cortex.md +6 -2
- package/.docs/models/providers/stackit.md +1 -1
- package/.docs/models/providers/stepfun-ai-step-plan.md +1 -1
- package/.docs/models/providers/stepfun-ai.md +1 -1
- package/.docs/models/providers/stepfun-step-plan.md +1 -1
- package/.docs/models/providers/stepfun.md +1 -1
- package/.docs/models/providers/subconscious.md +1 -1
- package/.docs/models/providers/submodel.md +1 -1
- package/.docs/models/providers/synthetic.md +1 -1
- package/.docs/models/providers/tencent-coding-plan.md +1 -1
- package/.docs/models/providers/tencent-token-plan.md +1 -1
- package/.docs/models/providers/tencent-tokenhub.md +1 -1
- package/.docs/models/providers/tensorx.md +1 -1
- package/.docs/models/providers/the-grid-ai.md +1 -1
- package/.docs/models/providers/thinkingmachines.md +1 -1
- package/.docs/models/providers/tinfoil.md +2 -2
- package/.docs/models/providers/togetherai.md +1 -1
- package/.docs/models/providers/trustedrouter.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +1 -1
- package/.docs/models/providers/umans-ai.md +1 -1
- package/.docs/models/providers/unorouter.md +1 -1
- package/.docs/models/providers/upstage.md +1 -1
- package/.docs/models/providers/venice.md +1 -1
- package/.docs/models/providers/vivgrid.md +1 -1
- package/.docs/models/providers/vultr.md +1 -1
- package/.docs/models/providers/wafer.ai.md +1 -1
- package/.docs/models/providers/wandb.md +3 -2
- package/.docs/models/providers/xiaomi-token-plan-ams.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-cn.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +1 -1
- package/.docs/models/providers/xiaomi.md +1 -1
- package/.docs/models/providers/xpersona.md +1 -1
- package/.docs/models/providers/zai-coding-plan.md +1 -1
- package/.docs/models/providers/zai.md +1 -1
- package/.docs/models/providers/zeldoc.md +8 -8
- package/.docs/models/providers/zenifra.md +1 -1
- package/.docs/models/providers/zenmux.md +1 -16
- package/.docs/models/providers/zhipuai-coding-plan.md +1 -1
- package/.docs/models/providers/zhipuai.md +1 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +35 -4
- package/.docs/reference/agent-controller/session.md +5 -3
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/durable-agent.md +2 -0
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +3 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/okta.md +5 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +6 -6
- package/.docs/reference/client-js/agents.md +2 -1
- package/.docs/reference/client-js/workflows.md +3 -3
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/configuration.md +21 -27
- package/.docs/reference/core/addDynamicWorkflow.md +2 -2
- package/.docs/reference/core/addDynamicWorkflows.md +2 -2
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +8 -0
- package/.docs/reference/file-based-agents/config.md +2 -0
- package/.docs/reference/file-based-agents/instructions.md +2 -0
- package/.docs/reference/file-based-agents/logger.md +2 -0
- package/.docs/reference/file-based-agents/memory.md +2 -0
- package/.docs/reference/file-based-agents/observability.md +2 -0
- package/.docs/reference/file-based-agents/processors.md +2 -0
- package/.docs/reference/file-based-agents/schedules.md +2 -0
- package/.docs/reference/file-based-agents/scorers.md +2 -0
- package/.docs/reference/file-based-agents/server.md +2 -0
- package/.docs/reference/file-based-agents/skills.md +2 -0
- package/.docs/reference/file-based-agents/storage.md +3 -1
- package/.docs/reference/file-based-agents/studio.md +3 -1
- package/.docs/reference/file-based-agents/subagents.md +2 -0
- package/.docs/reference/file-based-agents/tools.md +2 -0
- package/.docs/reference/file-based-agents/workflows.md +2 -0
- package/.docs/reference/file-based-agents/workspace.md +2 -0
- package/.docs/reference/index.md +29 -54
- package/.docs/{guides/getting-started → reference}/manual-install.md +2 -2
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +2 -2
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +10 -10
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/processors/pii-detector.md +2 -0
- package/.docs/reference/processors/prompt-injection-detector.md +2 -0
- package/.docs/reference/processors/regex-filter-processor.md +20 -0
- package/.docs/reference/processors/response-cache.md +2 -0
- package/.docs/reference/processors/tool-search-processor.md +33 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/reference/rag/metadata-filters.md +13 -4
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +18 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +42 -1
- package/.docs/reference/schedules/overview.md +2 -0
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/server/register-api-route.md +2 -0
- package/.docs/reference/signals/create-notification-inbox-tool.md +2 -0
- package/.docs/reference/signals/signal-provider.md +2 -0
- package/.docs/reference/signals/task-signal-provider.md +2 -0
- package/.docs/reference/signals/webhook-signal-provider.md +2 -0
- package/.docs/reference/storage/composite.md +4 -4
- package/.docs/reference/storage/retention.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/tools/mcp-client.md +51 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/tools/quickjs-transport.md +92 -0
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +347 -0
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workflows/dynamic-workflow-definition.md +3 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workflows/workflow.md +18 -0
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +11 -3
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +90 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +6 -6
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +0 -0
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/inngest.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/temporal.md +0 -0
- /package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +0 -0
- /package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/express.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +0 -0
- /package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +0 -0
- /package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +0 -0
- /package/.docs/{guides/guide → integrations/tools}/firecrawl.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/network-to-supervisor.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md}
RENAMED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
[CopilotKit](https://www.copilotkit.ai/) provides React components to quickly integrate customizable AI copilots into your application. Combined with Mastra, you can build AI apps with bidirectional state synchronization and interactive UIs.
|
|
6
6
|
|
|
7
|
-
CopilotKit talks to Mastra through the [AG-UI protocol](https://docs.ag-ui.com/). The `@ag-ui/mastra` package exposes your Mastra agents as an AG-UI endpoint, and CopilotKit's React hooks and components consume it. This unlocks a spectrum of experiences on top of ordinary chat: [generative UI, human-in-the-loop, and frontend tools](
|
|
7
|
+
CopilotKit talks to Mastra through the [AG-UI protocol](https://docs.ag-ui.com/). The `@ag-ui/mastra` package exposes your Mastra agents as an AG-UI endpoint, and CopilotKit's React hooks and components consume it. This unlocks a spectrum of experiences on top of ordinary chat: [generative UI, human-in-the-loop, and frontend tools](#generative-ui), plus deploying the same agent to [messaging channels like Slack](#channels).
|
|
8
8
|
|
|
9
9
|
Visit the [CopilotKit documentation](https://docs.copilotkit.ai/) to learn more about CopilotKit concepts, components, and advanced usage patterns.
|
|
10
10
|
|
|
11
|
-
> **
|
|
11
|
+
> **Note:** 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.
|
|
12
12
|
|
|
13
13
|
Visit Mastra's ["UI Dojo"](https://ui-dojo.mastra.ai/) to see real-world examples of CopilotKit integrated with Mastra.
|
|
14
14
|
|
|
@@ -295,9 +295,175 @@ export default function Home() {
|
|
|
295
295
|
|
|
296
296
|
For fully custom chat UIs (bring your own components), see [CopilotKit's headless UI guide](https://docs.copilotkit.ai/).
|
|
297
297
|
|
|
298
|
+
## Generative UI
|
|
299
|
+
|
|
300
|
+
Generative UI describes interfaces that agents help create and that users can interact with. CopilotKit organizes these interfaces along a single axis, the **generative UI spectrum**, which runs from author-controlled (you decide every pixel) to agent-invented (the agent owns the rendered surface). Your position on the axis is a trade-off between predictability and breadth.
|
|
301
|
+
|
|
302
|
+
The spectrum has three tiers:
|
|
303
|
+
|
|
304
|
+
| Tier | Who controls the surface | Primitives |
|
|
305
|
+
| --------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- |
|
|
306
|
+
| **Controlled** | You wrote the component. The agent picks which one to use and what data to pass. | Tool call rendering, state rendering, reasoning, components as tools |
|
|
307
|
+
| **Declarative** | The agent emits a structured spec. The frontend composes it from a catalog you registered. | A2UI (fixed-schema and flexible variants) |
|
|
308
|
+
| **Open-ended** | The UI is invented elsewhere (an MCP server) and you sandbox it. | MCP Apps |
|
|
309
|
+
|
|
310
|
+
Each tier is a Mastra agent exposed through `registerCopilotKit()` plus the matching CopilotKit hook on the frontend. For the full concept, see CopilotKit's [generative UI spectrum](https://www.copilotkit.ai/generative-ui-spectrum) and [generative UI overview](https://docs.copilotkit.ai/concepts/generative-ui-overview).
|
|
311
|
+
|
|
312
|
+
> **Tip:** Mastra's [UI Dojo](https://ui-dojo.mastra.ai/) has working CopilotKit examples. Browse the source under `src/pages/copilot-kit`.
|
|
313
|
+
|
|
314
|
+
### Controlled
|
|
315
|
+
|
|
316
|
+
You provide a fixed set of components. The agent chooses which component to render and supplies its data. This predictable, brand-safe approach works well for high-traffic surfaces. The Controlled primitives use CopilotKit's v2 API, imported from `@copilotkit/react-core/v2`.
|
|
317
|
+
|
|
318
|
+
#### Tool call rendering
|
|
319
|
+
|
|
320
|
+
Render an agent's tool call as a React component. Define the agent and tool on the Mastra server as usual:
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
import { Agent } from '@mastra/core/agent'
|
|
324
|
+
import { weatherTool } from '../tools/weather-tool'
|
|
325
|
+
|
|
326
|
+
export const weatherAgent = new Agent({
|
|
327
|
+
id: 'weather-agent',
|
|
328
|
+
name: 'Weather Agent',
|
|
329
|
+
instructions: 'Use the weatherTool to fetch current weather data.',
|
|
330
|
+
model: 'openai/gpt-5.6-sol',
|
|
331
|
+
tools: { weatherTool },
|
|
332
|
+
})
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
On the frontend, register a renderer for the tool by name with `useRenderTool`. It's render-only (it doesn't execute the tool); the `render` function receives the tool call's `status` and, once the agent returns, its `result`:
|
|
336
|
+
|
|
337
|
+
```tsx
|
|
338
|
+
import { z } from 'zod'
|
|
339
|
+
import { CopilotChat } from '@copilotkit/react-ui'
|
|
340
|
+
import { CopilotKit, useRenderTool } from '@copilotkit/react-core/v2'
|
|
341
|
+
import { Weather } from '@/components/weather'
|
|
342
|
+
|
|
343
|
+
function Chat() {
|
|
344
|
+
useRenderTool(
|
|
345
|
+
{
|
|
346
|
+
name: 'weatherTool',
|
|
347
|
+
parameters: z.object({ location: z.string() }),
|
|
348
|
+
render: ({ status, result }) => {
|
|
349
|
+
if (status !== 'complete') {
|
|
350
|
+
return <div>Retrieving weather...</div>
|
|
351
|
+
}
|
|
352
|
+
return <Weather {...result} />
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
[],
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
return <CopilotChat labels={{ title: 'Weather Assistant' }} />
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export default function Page() {
|
|
362
|
+
return (
|
|
363
|
+
<CopilotKit runtimeUrl="http://localhost:4111/copilotkit" agent="weatherAgent">
|
|
364
|
+
<Chat />
|
|
365
|
+
</CopilotKit>
|
|
366
|
+
)
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Because Mastra streams tool-call arguments incrementally, the `render` function is called repeatedly as the arguments arrive, so the UI can paint progressively while the agent works.
|
|
371
|
+
|
|
372
|
+
#### Components as tools
|
|
373
|
+
|
|
374
|
+
Register a React component and let the agent call it as a tool. CopilotKit renders it inline with typed props (defined with a Zod schema):
|
|
375
|
+
|
|
376
|
+
```tsx
|
|
377
|
+
import { z } from 'zod'
|
|
378
|
+
import { useComponent } from '@copilotkit/react-core/v2'
|
|
379
|
+
|
|
380
|
+
const schema = z.object({ text: z.string() })
|
|
381
|
+
|
|
382
|
+
function Callout({ text }: z.infer<typeof schema>) {
|
|
383
|
+
return <div className="callout">{text}</div>
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function Chat() {
|
|
387
|
+
useComponent({ name: 'callout', render: Callout, parameters: schema }, [])
|
|
388
|
+
return <CopilotChat labels={{ title: 'Assistant' }} />
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
The agent invokes `callout` like any other tool, and CopilotKit renders `Callout` with the props it passed.
|
|
393
|
+
|
|
394
|
+
#### State rendering
|
|
395
|
+
|
|
396
|
+
Render UI from the agent's state and re-render as it streams. On Mastra, agent state is the agent's working memory, streamed to the client as it changes. Read it with `useAgent`; `agent.state` is reactive, so the component updates automatically:
|
|
397
|
+
|
|
398
|
+
```tsx
|
|
399
|
+
import { useAgent } from '@copilotkit/react-core/v2'
|
|
400
|
+
|
|
401
|
+
function TaskBoard() {
|
|
402
|
+
const { agent } = useAgent()
|
|
403
|
+
const tasks = (agent.state.tasks as any[]) ?? []
|
|
404
|
+
|
|
405
|
+
return (
|
|
406
|
+
<ul>
|
|
407
|
+
{tasks.map((task, i) => (
|
|
408
|
+
<li key={i}>
|
|
409
|
+
{task.title}: {task.status}
|
|
410
|
+
</li>
|
|
411
|
+
))}
|
|
412
|
+
</ul>
|
|
413
|
+
)
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
#### Reasoning
|
|
418
|
+
|
|
419
|
+
Reasoning is zero-config: when your Mastra agent runs a reasoning-capable model, `CopilotChat` renders the model's thinking inline as a dedicated message type, with no extra code. To restyle it, pass your own component to the `reasoningMessage` slot on `CopilotChat`. See CopilotKit's [generative UI guides](https://docs.copilotkit.ai/) for details.
|
|
420
|
+
|
|
421
|
+
### Declarative
|
|
422
|
+
|
|
423
|
+
Instead of a fixed component per tool, you register a catalog of typed building blocks and the agent assembles them into a UI tree per request. CopilotKit calls this **A2UI** (Agent-to-UI), which has fixed-schema and flexible variants. It suits the long tail of secondary interactions where breadth matters more than pixel-perfection.
|
|
424
|
+
|
|
425
|
+
The path of least resistance is to pass your catalog to the `<CopilotKit>` provider. That single prop enables A2UI rendering and injects the A2UI tool into your agent, so no backend change is needed:
|
|
426
|
+
|
|
427
|
+
```tsx
|
|
428
|
+
import { CopilotKit } from '@copilotkit/react-core/v2'
|
|
429
|
+
import { myCatalog } from './a2ui-catalog'
|
|
430
|
+
|
|
431
|
+
export default function Page() {
|
|
432
|
+
return (
|
|
433
|
+
<CopilotKit
|
|
434
|
+
runtimeUrl="http://localhost:4111/copilotkit"
|
|
435
|
+
agent="weatherAgent"
|
|
436
|
+
a2ui={{ catalog: myCatalog }}
|
|
437
|
+
>
|
|
438
|
+
{/* your app */}
|
|
439
|
+
</CopilotKit>
|
|
440
|
+
)
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
The catalog defines the primitives (their schemas) and the renderers (how each primitive displays). In the fixed-schema variant, the components are pre-authored and the agent's tool only supplies data. The flexible variant lets the agent compose the tree more freely. See CopilotKit's [A2UI documentation](https://docs.copilotkit.ai/a2a/generative-ui/a2ui).
|
|
445
|
+
|
|
446
|
+
### Open-ended
|
|
447
|
+
|
|
448
|
+
At the far end of the spectrum, the agent owns the entire surface: the UI is invented elsewhere and sandboxed in your app. CopilotKit supports this through **MCP Apps**, where an MCP server provides UI that renders inside your application. This tier trades determinism for novelty and is the most experimental point on the spectrum.
|
|
449
|
+
|
|
450
|
+
The path of least resistance keeps the frontend untouched: your existing `<CopilotKit>` provider is enough. On the backend, point `registerCopilotKit()` at one or more MCP servers with the `mcpApps` option (it's forwarded to the CopilotKit runtime):
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
registerCopilotKit({
|
|
454
|
+
path: '/copilotkit',
|
|
455
|
+
resourceId: 'weatherAgent',
|
|
456
|
+
mcpApps: {
|
|
457
|
+
servers: [{ type: 'http', url: 'http://localhost:3108/mcp', serverId: 'my-server' }],
|
|
458
|
+
},
|
|
459
|
+
})
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
When the agent calls an MCP App tool, CopilotKit fetches and renders that tool's UI in the chat with no additional frontend code. See CopilotKit's [MCP Apps documentation](https://docs.copilotkit.ai/agno/generative-ui/mcp-apps).
|
|
463
|
+
|
|
298
464
|
## App control and interactivity
|
|
299
465
|
|
|
300
|
-
|
|
466
|
+
Some capabilities sit next to the [generative UI](#generative-ui) spectrum rather than on it: they control your app or gate a run instead of rendering agent output. CopilotKit lets the agent act on your application and pause for the user. Both patterns run against the same Mastra setup.
|
|
301
467
|
|
|
302
468
|
### Frontend tools
|
|
303
469
|
|
|
@@ -333,6 +499,8 @@ export default function Page() {
|
|
|
333
499
|
|
|
334
500
|
The matching Mastra agent is a normal agent instructed to call `colorChangeTool` with the requested color.
|
|
335
501
|
|
|
502
|
+
CopilotKit treats frontend tools as part of its separate [App Control](https://docs.copilotkit.ai/) concept, alongside shared state and agent context.
|
|
503
|
+
|
|
336
504
|
### Human-in-the-loop
|
|
337
505
|
|
|
338
506
|
Pause the agent mid-run and wait for the user to approve, edit, or reject before continuing. Use `useHumanInTheLoop`: its `render` function receives a `respond` callback, and the agent's run stays suspended until you call it.
|
|
@@ -379,6 +547,91 @@ Inside `StepsFeedback`, let the user toggle steps and then call `respond({ accep
|
|
|
379
547
|
|
|
380
548
|
The example above uses a client tool: the agent calls `generate_task_steps` and the frontend fulfills it through `respond`. Mastra can also pause on the server, suspending a tool call before it executes so a human approves or supplies input. For that path, see Mastra's [Agent approval](https://mastra.ai/docs/agents/agent-approval) guide for the backend side and CopilotKit's [`useHumanInTheLoop`](https://docs.copilotkit.ai/reference/hooks/useHumanInTheLoop) reference for the frontend.
|
|
381
549
|
|
|
550
|
+
## Channels
|
|
551
|
+
|
|
552
|
+
The same Mastra agent that powers your in-app copilot can also run as a bot in messaging platforms. CopilotKit's Channels SDK connects your agent to Slack and other messaging platforms, with threads, tool calls, rich interactive messages, and human-in-the-loop approvals handled natively in the channel.
|
|
553
|
+
|
|
554
|
+
> **Note:** Full platform setup lives in the [CopilotKit Channels documentation](https://docs.copilotkit.ai/slack/mastra). This section shows how Channels fit together with a Mastra agent.
|
|
555
|
+
|
|
556
|
+
### How it fits together
|
|
557
|
+
|
|
558
|
+
Your Mastra agent stays where it's deployed, exposed over AG-UI through `registerCopilotKit()`. A channel is a separate long-running process built with `@copilotkit/channels`: you attach one or more platform adapters and point the channel at your agent. `createChannel` takes an array of adapters, so a single process can serve several platforms at once.
|
|
559
|
+
|
|
560
|
+
Install the SDK (batteries-included, every adapter):
|
|
561
|
+
|
|
562
|
+
**npm**:
|
|
563
|
+
|
|
564
|
+
```bash
|
|
565
|
+
npm install @copilotkit/channels
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
**pnpm**:
|
|
569
|
+
|
|
570
|
+
```bash
|
|
571
|
+
pnpm add @copilotkit/channels
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
**Yarn**:
|
|
575
|
+
|
|
576
|
+
```bash
|
|
577
|
+
yarn add @copilotkit/channels
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
**Bun**:
|
|
581
|
+
|
|
582
|
+
```bash
|
|
583
|
+
bun add @copilotkit/channels
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
```typescript
|
|
587
|
+
import { createChannel, Message, Section } from '@copilotkit/channels'
|
|
588
|
+
import { slack } from '@copilotkit/channels/slack'
|
|
589
|
+
import { mastraAgent } from './agent' // your AG-UI Mastra agent
|
|
590
|
+
|
|
591
|
+
const channel = createChannel({
|
|
592
|
+
// Point the channel at your Mastra agent (an AbstractAgent, or a per-thread factory).
|
|
593
|
+
agent: mastraAgent,
|
|
594
|
+
adapters: [
|
|
595
|
+
slack({
|
|
596
|
+
botToken: process.env.SLACK_BOT_TOKEN!,
|
|
597
|
+
appToken: process.env.SLACK_APP_TOKEN!,
|
|
598
|
+
}),
|
|
599
|
+
],
|
|
600
|
+
})
|
|
601
|
+
|
|
602
|
+
channel.onMention(async ({ thread }) => {
|
|
603
|
+
await thread.runAgent()
|
|
604
|
+
})
|
|
605
|
+
|
|
606
|
+
await channel.start()
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
The agent receives ordinary AG-UI input and emits ordinary AG-UI events; the platform mechanics stay behind the adapter, so the same Mastra agent runs unchanged across every channel. Rich messages are written as JSX and rendered to each platform's native format (Block Kit on Slack, for example), so an interactive card degrades gracefully where a platform has no equivalent.
|
|
610
|
+
|
|
611
|
+
### Slack
|
|
612
|
+
|
|
613
|
+
The [Slack quickstart](https://docs.copilotkit.ai/slack/mastra) takes you from zero to a bot you can `@`-mention in a channel, then adds an interactive button card. Slack runs over Socket Mode, which opens an outbound WebSocket to Slack, so no public URL or tunnel is required during development.
|
|
614
|
+
|
|
615
|
+
Set the Slack credentials in your environment:
|
|
616
|
+
|
|
617
|
+
- `SLACK_BOT_TOKEN`: Bot User OAuth token (`xoxb-...`)
|
|
618
|
+
- `SLACK_APP_TOKEN`: App-level token with the `connections:write` scope (`xapp-...`)
|
|
619
|
+
|
|
620
|
+
### Other platforms
|
|
621
|
+
|
|
622
|
+
The Channels SDK isn't limited to Slack. Other platforms like Microsoft Teams run through the same `@copilotkit/channels` API: add the matching adapter to the `adapters` array and the rest of your agent code stays the same. See the [CopilotKit Channels documentation](https://docs.copilotkit.ai/slack/mastra) for the current platform list and per-platform setup.
|
|
623
|
+
|
|
624
|
+
### Message pipeline and architecture
|
|
625
|
+
|
|
626
|
+
Managed channels keep a deliberate credential split, which matters when your Mastra agent uses separate model keys and tools:
|
|
627
|
+
|
|
628
|
+
- **You keep** the agent logic, model credentials, tools, and the channel process.
|
|
629
|
+
- **CopilotKit Intelligence holds** the platform credentials, message delivery, registration, health, and reconnects.
|
|
630
|
+
|
|
631
|
+
A turn begins when a user messages the app. Intelligence receives the platform event, and the gateway delivers the turn to your running channel process. Your Mastra agent runs and renders a reply. Intelligence then returns the reply as native platform content. Platform credentials never enter the agent process, and enterprise Intelligence can be self-hosted for data residency.
|
|
632
|
+
|
|
633
|
+
> **Note:** By default, interactive actions live in memory and reset on restart. Back the channel with a durable action and state store (Redis or Postgres) so buttons and per-thread state survive restarts and span multiple instances.
|
|
634
|
+
|
|
382
635
|
## Configuration options
|
|
383
636
|
|
|
384
637
|
Use these `registerCopilotKit()` options for the common integration points:
|
|
@@ -392,7 +645,7 @@ Use these `registerCopilotKit()` options for the common integration points:
|
|
|
392
645
|
| `agents` | Provide pre-constructed AG-UI agents instead of the agents registered on the Mastra instance. |
|
|
393
646
|
| `tracingOptions` | Forward Mastra tracing options to each agent run. |
|
|
394
647
|
|
|
395
|
-
By default, the endpoint exposes every agent registered on the Mastra instance, and the frontend chooses one with the `agent` prop. Other CopilotKit runtime options are forwarded to the underlying runtime. For example, see [Open-ended generative UI](
|
|
648
|
+
By default, the endpoint exposes every agent registered on the Mastra instance, and the frontend chooses one with the `agent` prop. Other CopilotKit runtime options are forwarded to the underlying runtime. For example, see [Open-ended generative UI](#open-ended) for `mcpApps`.
|
|
396
649
|
|
|
397
650
|
## Deployment
|
|
398
651
|
|
|
@@ -200,7 +200,7 @@ export const createMastraClient = (accessToken: string) => {
|
|
|
200
200
|
}
|
|
201
201
|
```
|
|
202
202
|
|
|
203
|
-
> **
|
|
203
|
+
> **Note:** The access token must be prefixed with `Bearer` in the Authorization header.
|
|
204
204
|
>
|
|
205
205
|
> Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
206
206
|
|
|
@@ -61,7 +61,7 @@ export const mastra = new Mastra({
|
|
|
61
61
|
})
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
> **
|
|
64
|
+
> **Note:** The default `authorizeUser` method allows all authenticated users. To customize user authorization, provide a custom `authorizeUser` function when constructing the provider.
|
|
65
65
|
>
|
|
66
66
|
> Visit [MastraAuthClerk](https://mastra.ai/reference/auth/clerk) for all available configuration options.
|
|
67
67
|
|
|
@@ -105,7 +105,7 @@ export const mastraClient = new MastraClient({
|
|
|
105
105
|
})
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
> **
|
|
108
|
+
> **Note:** The access token must be prefixed with `Bearer` in the Authorization header.
|
|
109
109
|
>
|
|
110
110
|
> Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
111
111
|
|
|
@@ -200,7 +200,7 @@ export const createMastraClient = (idToken: string) => {
|
|
|
200
200
|
}
|
|
201
201
|
```
|
|
202
202
|
|
|
203
|
-
> **
|
|
203
|
+
> **Note:** The ID token must be prefixed with `Bearer` in the Authorization header.
|
|
204
204
|
>
|
|
205
205
|
> Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
206
206
|
|
|
@@ -179,16 +179,35 @@ export const mastraClient = new MastraClient({
|
|
|
179
179
|
|
|
180
180
|
### Bearer token
|
|
181
181
|
|
|
182
|
-
You can also pass an Okta
|
|
182
|
+
You can also pass an Okta token as a Bearer token. The token is verified against Okta's JWKS endpoint, and its `aud` claim must match the configured audience. The audience defaults to your client ID, and you can override it with the `audience` option or `OKTA_AUDIENCE`.
|
|
183
|
+
|
|
184
|
+
Okta puts the client ID in the `aud` claim of **ID tokens**, so ID tokens work with the default. **Access tokens** carry the audience of the authorization server that issued them, so set the audience to match:
|
|
185
|
+
|
|
186
|
+
- **Org authorization server** (the default, issuer `https://{domain}`): set the audience to `https://{domain}`.
|
|
187
|
+
- **Custom authorization server** (issuer `https://{domain}/oauth2/{name}`): set the audience to the server's audience value from the Okta Admin Console, for example `api://default`.
|
|
188
|
+
|
|
189
|
+
```env
|
|
190
|
+
OKTA_AUDIENCE=https://dev-123456.okta.com
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Pass an array to accept more than one audience, for example ID tokens from browsers and access tokens from service callers against the same provider:
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
new MastraAuthOkta({
|
|
197
|
+
audience: ['your-client-id', 'https://dev-123456.okta.com'],
|
|
198
|
+
})
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
> **Note:** `audience` applies only to Bearer tokens. The ID token exchanged during the SSO login flow is always verified against your client ID.
|
|
183
202
|
|
|
184
203
|
```typescript
|
|
185
204
|
import { MastraClient } from '@mastra/client-js'
|
|
186
205
|
|
|
187
|
-
export const createMastraClient = (
|
|
206
|
+
export const createMastraClient = (token: string) => {
|
|
188
207
|
return new MastraClient({
|
|
189
208
|
baseUrl: 'http://localhost:4111',
|
|
190
209
|
headers: {
|
|
191
|
-
Authorization: `Bearer ${
|
|
210
|
+
Authorization: `Bearer ${token}`,
|
|
192
211
|
},
|
|
193
212
|
})
|
|
194
213
|
}
|
|
@@ -213,7 +232,7 @@ console.log(response)
|
|
|
213
232
|
```bash
|
|
214
233
|
curl -X POST http://localhost:4111/api/agents/weatherAgent/generate \
|
|
215
234
|
-H "Content-Type: application/json" \
|
|
216
|
-
-H "Authorization: Bearer <your-okta-
|
|
235
|
+
-H "Authorization: Bearer <your-okta-token>" \
|
|
217
236
|
-d '{
|
|
218
237
|
"messages": "Weather in London"
|
|
219
238
|
}'
|
|
@@ -222,6 +241,7 @@ curl -X POST http://localhost:4111/api/agents/weatherAgent/generate \
|
|
|
222
241
|
## Troubleshooting
|
|
223
242
|
|
|
224
243
|
- **401 on every request**: Verify your Okta domain, client ID, and client secret are correct. Check that the redirect URI in your Okta application matches `OKTA_REDIRECT_URI`.
|
|
244
|
+
- **401 with `unexpected "aud" claim value` in the server logs**: The Bearer token's audience doesn't match the configured audience. This usually means you sent an access token while the audience is still the default client ID. Set `OKTA_AUDIENCE` to the audience of the authorization server that issued the token. See [Bearer token](#bearer-token).
|
|
225
245
|
- **Cookies not sent cross-origin**: Set `credentials: "include"` in `MastraClient` and configure `server.cors` with your frontend origin and `credentials: true`.
|
|
226
246
|
- **Session lost on restart**: Set `OKTA_COOKIE_PASSWORD` to a stable value (at least 32 characters). Without it, an auto-generated key is used that changes on each restart.
|
|
227
247
|
- **RBAC returns empty permissions**: Verify `OKTA_API_TOKEN` is set and the token has permission to list user groups. Check that group names in `roleMapping` match your Okta group names exactly.
|
|
@@ -59,7 +59,7 @@ export const mastra = new Mastra({
|
|
|
59
59
|
})
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
> **
|
|
62
|
+
> **Note:** The default `authorizeUser` method checks the `isAdmin` column in the `users` table in the `public` schema. To customize user authorization, provide a custom `authorizeUser` function when constructing the provider.
|
|
63
63
|
>
|
|
64
64
|
> Visit [MastraAuthSupabase](https://mastra.ai/reference/auth/supabase) for all available configuration options.
|
|
65
65
|
|
|
@@ -101,7 +101,7 @@ export const mastraClient = new MastraClient({
|
|
|
101
101
|
})
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
> **
|
|
104
|
+
> **Note:** The access token must be prefixed with `Bearer` in the Authorization header.
|
|
105
105
|
>
|
|
106
106
|
> Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
107
107
|
|
|
@@ -221,7 +221,7 @@ export const createMastraClient = (accessToken: string) => {
|
|
|
221
221
|
}
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
> **
|
|
224
|
+
> **Note:** The access token must be prefixed with `Bearer` in the Authorization header.
|
|
225
225
|
>
|
|
226
226
|
> Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
227
227
|
|
|
@@ -104,7 +104,7 @@ This adds `browser_record` and `browser_record_caption` to the agent's toolset.
|
|
|
104
104
|
## Related
|
|
105
105
|
|
|
106
106
|
- [Browser overview](https://mastra.ai/docs/browser/overview)
|
|
107
|
-
- [Stagehand](https://mastra.ai/
|
|
108
|
-
- [Firecrawl](https://mastra.ai/
|
|
107
|
+
- [Stagehand](https://mastra.ai/integrations/browsers/stagehand)
|
|
108
|
+
- [Firecrawl](https://mastra.ai/integrations/browsers/firecrawl)
|
|
109
109
|
- [Browser recording (alpha)](https://mastra.ai/docs/browser/recording)
|
|
110
110
|
- [AgentBrowser reference](https://mastra.ai/reference/browser/agent-browser)
|
|
@@ -13,7 +13,7 @@ Use BrowserViewer when your agent drives a browser through a CLI tool rather tha
|
|
|
13
13
|
- Live screencast streaming to Studio
|
|
14
14
|
- Thread-scoped browser isolation
|
|
15
15
|
|
|
16
|
-
For SDK-based browser automation, use [AgentBrowser](https://mastra.ai/
|
|
16
|
+
For SDK-based browser automation, use [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser) or [Stagehand](https://mastra.ai/integrations/browsers/stagehand) instead.
|
|
17
17
|
|
|
18
18
|
## Quickstart
|
|
19
19
|
|
|
@@ -145,7 +145,7 @@ CDP flag: `--ws` See [BrowserViewer reference](https://mastra.ai/reference/brows
|
|
|
145
145
|
## Related
|
|
146
146
|
|
|
147
147
|
- [Browser overview](https://mastra.ai/docs/browser/overview)
|
|
148
|
-
- [AgentBrowser](https://mastra.ai/
|
|
149
|
-
- [Stagehand](https://mastra.ai/
|
|
148
|
+
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
149
|
+
- [Stagehand](https://mastra.ai/integrations/browsers/stagehand)
|
|
150
150
|
- [Workspace overview](https://mastra.ai/docs/workspace/overview)
|
|
151
151
|
- [Workspace skills](https://mastra.ai/docs/workspace/skills)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Firecrawl
|
|
4
4
|
|
|
5
|
-
The `@mastra/browser-firecrawl` package provides browser automation using the [Firecrawl Browser Sandbox](https://docs.firecrawl.dev/features/browser). It provisions remote browser sessions through the Firecrawl API and drives them with the same deterministic, accessibility-first tools as [AgentBrowser](https://mastra.ai/
|
|
5
|
+
The `@mastra/browser-firecrawl` package provides browser automation using the [Firecrawl Browser Sandbox](https://docs.firecrawl.dev/features/browser). It provisions remote browser sessions through the Firecrawl API and drives them with the same deterministic, accessibility-first tools as [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser).
|
|
6
6
|
|
|
7
7
|
`FirecrawlBrowser` extends `AgentBrowser`, so agents get the same toolset (`browser_goto`, `browser_snapshot`, `browser_click`, and so on) while the browser itself runs in Firecrawl's hosted infrastructure. No local Chromium install is needed.
|
|
8
8
|
|
|
@@ -124,6 +124,6 @@ const browser = new FirecrawlBrowser({
|
|
|
124
124
|
## Related
|
|
125
125
|
|
|
126
126
|
- [Browser overview](https://mastra.ai/docs/browser/overview)
|
|
127
|
-
- [AgentBrowser](https://mastra.ai/
|
|
127
|
+
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
128
128
|
- [Browser recording (alpha)](https://mastra.ai/docs/browser/recording)
|
|
129
129
|
- [FirecrawlBrowser reference](https://mastra.ai/reference/browser/firecrawl-browser)
|
|
@@ -167,6 +167,6 @@ This adds `browser_record` and `browser_record_caption` to the agent's toolset.
|
|
|
167
167
|
## Related
|
|
168
168
|
|
|
169
169
|
- [Browser overview](https://mastra.ai/docs/browser/overview)
|
|
170
|
-
- [AgentBrowser](https://mastra.ai/
|
|
170
|
+
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
171
171
|
- [Browser recording (alpha)](https://mastra.ai/docs/browser/recording)
|
|
172
172
|
- [StagehandBrowser reference](https://mastra.ai/reference/browser/stagehand-browser)
|
|
@@ -94,5 +94,5 @@ Use this URL anywhere the Discord adapter docs ask for the interactions endpoint
|
|
|
94
94
|
|
|
95
95
|
## Related
|
|
96
96
|
|
|
97
|
-
- [Channels overview](https://mastra.ai/docs/capabilities/channels
|
|
98
|
-
- [More](https://mastra.ai/docs/capabilities/channels
|
|
97
|
+
- [Channels overview](https://mastra.ai/docs/capabilities/channels)
|
|
98
|
+
- [More](https://mastra.ai/docs/capabilities/channels)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# GitHub
|
|
4
|
+
|
|
5
|
+
The `@mastra/github-signals` provider lets an agent follow pull requests (PRs). It polls subscribed PRs and sends [notification signals](https://mastra.ai/docs/long-running-agents/signals) to the agent thread when relevant activity occurs.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install GitHub Signals and the memory packages used in this example:
|
|
10
|
+
|
|
11
|
+
**npm**:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @mastra/github-signals @mastra/libsql @mastra/memory
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**pnpm**:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Yarn**:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Bun**:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
GitHub Signals requires:
|
|
38
|
+
|
|
39
|
+
- A Mastra storage adapter with memory and notification support. The provider stores each subscription in the thread's metadata, so the thread must already exist.
|
|
40
|
+
- The `gitcrawl` command on `PATH`, configured to access the repositories you want to monitor. The provider runs `gitcrawl sync` and reads its SQLite database.
|
|
41
|
+
- The `sqlite3` command on `PATH`.
|
|
42
|
+
- The [GitHub CLI](https://cli.github.com/) installed and authenticated. The provider uses `gh api` to check whether comment authors have access to the repository before notifying the agent.
|
|
43
|
+
|
|
44
|
+
By default, comments from users with `admin`, `maintain`, or `write` access can trigger notifications. CodeRabbit and Devin bot comments are also allowed. Configure `authorizedPermissions`, `authorizedBots`, or `ignoredBots` when you need different rules.
|
|
45
|
+
|
|
46
|
+
## Agent and subscription
|
|
47
|
+
|
|
48
|
+
Create one `GithubSignals` instance and register it on the agent. Register the agent and a storage adapter on the Mastra instance:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { Agent } from '@mastra/core/agent'
|
|
52
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
53
|
+
import { Memory } from '@mastra/memory'
|
|
54
|
+
import { GithubSignals } from '@mastra/github-signals'
|
|
55
|
+
import { LibSQLStore } from '@mastra/libsql'
|
|
56
|
+
|
|
57
|
+
export const githubSignals = new GithubSignals()
|
|
58
|
+
|
|
59
|
+
export const devAgent = new Agent({
|
|
60
|
+
id: 'dev-agent',
|
|
61
|
+
name: 'Development Agent',
|
|
62
|
+
instructions: 'Triage pull request activity and help resolve issues.',
|
|
63
|
+
model: 'openai/gpt-5.6-sol',
|
|
64
|
+
memory: new Memory(),
|
|
65
|
+
signals: [githubSignals],
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
export const mastra = new Mastra({
|
|
69
|
+
agents: { devAgent },
|
|
70
|
+
storage: new LibSQLStore({
|
|
71
|
+
id: 'mastra-storage',
|
|
72
|
+
url: 'file:./mastra.db',
|
|
73
|
+
}),
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
After the agent has created a memory thread, subscribe that thread to a PR. Passing `owner` and `repo` works from any directory:
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
await githubSignals.subscribeThreadToPR({
|
|
81
|
+
threadId: 'thread-123',
|
|
82
|
+
resourceId: 'user-123',
|
|
83
|
+
pr: {
|
|
84
|
+
owner: 'acme',
|
|
85
|
+
repo: 'web-app',
|
|
86
|
+
number: 42,
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The provider syncs the PR immediately, stores the subscription, and starts polling every five minutes. Set `pollIntervalMs` in the `GithubSignals` constructor to change the interval. If the process restarts, call `startPollingForThread()` for each persisted thread subscription to resume polling.
|
|
92
|
+
|
|
93
|
+
## Pull request notifications
|
|
94
|
+
|
|
95
|
+
GitHub Signals notifies the agent when a subscribed PR has:
|
|
96
|
+
|
|
97
|
+
- A new authorized comment, commit, or other pull request activity.
|
|
98
|
+
- A change in unresolved review threads.
|
|
99
|
+
- Continuous integration (CI) checks that start, fail, or recover.
|
|
100
|
+
- Merge conflicts that appear or are resolved.
|
|
101
|
+
- A state change to closed, reopened, or merged.
|
|
102
|
+
|
|
103
|
+
The initial sync sends a baseline notification with the current PR state. A merge automatically removes the thread's subscription to that PR.
|
|
@@ -110,6 +110,10 @@ https://your-app.example.com/api/agents/imessage-agent/channels/imessage/webhook
|
|
|
110
110
|
|
|
111
111
|
Register this URL in the [Photon dashboard](https://app.photon.codes), then set the signing secret it returns as `IMESSAGE_WEBHOOK_SECRET`. The secret is shown once at registration. The adapter verifies the signature on every delivery and rejects requests that don't match. Webhooks are available in hosted mode only.
|
|
112
112
|
|
|
113
|
+
> **Note:** Photon delivers to public HTTPS endpoints only. It won't deliver to `http://`, to private addresses like `localhost`, or through a redirect. For local development, use a tunnel as described in the [Channels overview](https://mastra.ai/docs/capabilities/channels).
|
|
114
|
+
|
|
115
|
+
## Duplicate deliveries
|
|
116
|
+
|
|
113
117
|
Photon retries failed deliveries with backoff and delivers at least once, so the same message can arrive twice. Chat SDK drops the repeat using the channel state adapter, and Mastra's default keeps those dedup keys in memory. That covers a single long-running server.
|
|
114
118
|
|
|
115
119
|
A repeat can still reach the agent after a restart, or on serverless where the retry is routed to a different instance. Pass a shared state adapter on `channels.state` so dedup keys are visible everywhere. Install one alongside the adapter:
|
|
@@ -157,7 +161,11 @@ channels: {
|
|
|
157
161
|
|
|
158
162
|
This matters most for tools with side effects, where handling the same message twice is visible to the user.
|
|
159
163
|
|
|
160
|
-
|
|
164
|
+
## Read receipts
|
|
165
|
+
|
|
166
|
+
iPhone Messages sends a read receipt for every message the agent posts, and the adapter delivers those receipts as inbound messages with no text and no attachments. Mastra skips them, so the agent doesn't answer its own reply in a loop. Their message IDs carry a `:read:` suffix, and they show up as skipped messages at `debug` log level.
|
|
167
|
+
|
|
168
|
+
The same rule applies to every adapter: an inbound message with neither text nor attachments never starts an agent run. A custom `onDirectMessage`, `onMention`, or `onSubscribedMessage` handler still receives it and can act on it before calling `defaultHandler`.
|
|
161
169
|
|
|
162
170
|
## Gateway listener
|
|
163
171
|
|
|
@@ -173,9 +181,9 @@ imessage: {
|
|
|
173
181
|
},
|
|
174
182
|
```
|
|
175
183
|
|
|
176
|
-
On serverless platforms, prefer webhooks. A gateway listener needs a process that stays alive. See [Serverless deployment](https://mastra.ai/docs/capabilities/channels
|
|
184
|
+
On serverless platforms, prefer webhooks. A gateway listener needs a process that stays alive. See [Serverless deployment](https://mastra.ai/docs/capabilities/channels).
|
|
177
185
|
|
|
178
186
|
## Related
|
|
179
187
|
|
|
180
|
-
- [Channels overview](https://mastra.ai/docs/capabilities/channels
|
|
181
|
-
- [More](https://mastra.ai/docs/capabilities/channels
|
|
188
|
+
- [Channels overview](https://mastra.ai/docs/capabilities/channels)
|
|
189
|
+
- [More](https://mastra.ai/docs/capabilities/channels)
|