@mastra/mcp-docs-server 1.2.7-alpha.12 → 1.2.7-alpha.3
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/agent-builder/integrations.md +2 -44
- package/.docs/docs/agent-builder/overview.md +3 -4
- package/.docs/docs/agent-builder/skill-registries.md +3 -1
- package/.docs/docs/agent-controller/overview.md +2 -3
- package/.docs/docs/agent-controller/session.md +3 -1
- package/.docs/docs/agents/a2a.md +1 -2
- package/.docs/docs/agents/channels.md +225 -0
- package/.docs/docs/agents/code-mode.md +1 -1
- package/.docs/docs/agents/file-based-agents.md +297 -0
- package/.docs/docs/agents/guardrails.md +9 -10
- package/.docs/docs/agents/overview.md +4 -4
- package/.docs/docs/agents/skills.md +5 -3
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +4 -3
- package/.docs/docs/agents/using-tools.md +4 -2
- package/.docs/docs/browser/agent-browser.md +3 -1
- package/.docs/docs/browser/browser-viewer.md +3 -1
- package/.docs/docs/browser/overview.md +1 -2
- package/.docs/docs/browser/stagehand.md +1 -1
- package/.docs/docs/deployment/mastra-server.md +4 -2
- package/.docs/docs/editor/overview.md +6 -2
- package/.docs/docs/editor/prompts.md +1 -1
- package/.docs/docs/editor/tools.md +5 -3
- package/.docs/docs/evals/custom-scorers.md +3 -1
- package/.docs/docs/evals/datasets/overview.md +5 -4
- package/.docs/docs/evals/datasets/running-experiments.md +2 -4
- package/.docs/docs/evals/evals-with-memory.md +3 -1
- package/.docs/docs/evals/gates-and-verdicts.md +3 -1
- package/.docs/docs/evals/overview.md +1 -4
- package/.docs/docs/evals/quick-checks.md +3 -1
- package/.docs/docs/long-running-agents/background-tasks.md +1 -1
- package/.docs/docs/long-running-agents/durable-agents.md +5 -3
- package/.docs/docs/long-running-agents/goals.md +3 -1
- package/.docs/docs/long-running-agents/signal-providers.md +3 -1
- package/.docs/docs/long-running-agents/signals.md +22 -11
- package/.docs/docs/mastra-platform/observability.md +1 -5
- package/.docs/docs/mcp/mcp-apps.md +3 -3
- package/.docs/docs/mcp/overview.md +10 -6
- package/.docs/docs/memory/observational-memory.md +1 -2
- package/.docs/docs/memory/overview.md +4 -6
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/memory/working-memory.md +3 -3
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +3 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +1 -1
- package/.docs/docs/server/auth/auth0.md +1 -1
- package/.docs/docs/server/auth/better-auth.md +2 -2
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/firebase.md +1 -1
- package/.docs/docs/server/auth/google.md +2 -2
- package/.docs/docs/server/auth/jwt.md +2 -2
- package/.docs/docs/server/auth/okta.md +2 -2
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/pubsub.md +1 -1
- package/.docs/docs/server/request-context.md +4 -4
- package/.docs/docs/server/server-adapters.md +8 -8
- package/.docs/docs/studio/auth.md +3 -1
- package/.docs/docs/studio/overview.md +1 -1
- package/.docs/docs/voice/livekit.md +3 -100
- package/.docs/docs/workflows/agents-and-tools.md +5 -3
- package/.docs/docs/workflows/control-flow.md +3 -1
- package/.docs/docs/workflows/overview.md +7 -6
- package/.docs/docs/workspace/overview.md +1 -2
- package/.docs/docs/workspace/sandbox.md +0 -2
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit/overview.md +1 -1
- package/.docs/guides/concepts/streaming.md +3 -3
- package/.docs/guides/getting-started/quickstart.md +1 -3
- package/.docs/guides/guide/chef-michel.md +2 -0
- package/.docs/guides/guide/slack-assistant.md +2 -2
- package/.docs/guides/guide/stock-agent.md +2 -0
- package/.docs/models/environment-variables.md +0 -7
- package/.docs/models/gateways/netlify.md +1 -4
- package/.docs/models/gateways/openrouter.md +7 -10
- package/.docs/models/gateways/vercel.md +1 -8
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/abacus.md +14 -44
- package/.docs/models/providers/google.md +1 -2
- package/.docs/models/providers/llmgateway.md +181 -185
- package/.docs/models/providers/nano-gpt.md +2 -2
- package/.docs/models/providers/neon.md +29 -40
- package/.docs/models/providers/nvidia.md +3 -1
- package/.docs/models/providers/openai.md +1 -6
- package/.docs/models/providers/opencode.md +2 -6
- package/.docs/models/providers/poolside.md +5 -6
- package/.docs/models/providers/routing-run.md +34 -23
- package/.docs/models/providers/the-grid-ai.md +3 -3
- package/.docs/models/providers/wandb.md +14 -21
- package/.docs/models/providers/xai.md +1 -2
- package/.docs/models/providers.md +0 -7
- package/.docs/reference/agents/channels.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 +10 -117
- package/.docs/reference/evals/create-scorer.md +0 -8
- package/.docs/reference/index.md +0 -17
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/serialized-memory-config.md +1 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/reference/server/express-adapter.md +3 -1
- package/.docs/reference/server/fastify-adapter.md +3 -1
- package/.docs/reference/server/hono-adapter.md +3 -1
- package/.docs/reference/server/koa-adapter.md +3 -1
- package/.docs/reference/server/nestjs-adapter.md +3 -1
- package/.docs/reference/storage/clickhouse.md +0 -32
- package/.docs/reference/storage/composite.md +1 -27
- package/.docs/reference/storage/retention.md +0 -11
- package/.docs/reference/tools/mcp-client.md +0 -22
- package/.docs/reference/tools/mcp-server.md +4 -161
- package/.docs/reference/voice/livekit.md +8 -272
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +3 -1
- package/.docs/reference/workspace/agentfs-filesystem.md +3 -1
- package/.docs/reference/workspace/apple-container-sandbox.md +3 -1
- package/.docs/reference/workspace/archil-filesystem.md +3 -1
- package/.docs/reference/workspace/azure-blob-filesystem.md +3 -1
- package/.docs/reference/workspace/blaxel-sandbox.md +3 -1
- package/.docs/reference/workspace/daytona-sandbox.md +3 -1
- package/.docs/reference/workspace/docker-sandbox.md +3 -1
- package/.docs/reference/workspace/e2b-sandbox.md +3 -1
- package/.docs/reference/workspace/files-sdk-filesystem.md +3 -1
- package/.docs/reference/workspace/gcs-filesystem.md +3 -1
- package/.docs/reference/workspace/google-drive-filesystem.md +3 -1
- package/.docs/reference/workspace/local-filesystem.md +3 -1
- package/.docs/reference/workspace/local-sandbox.md +3 -1
- package/.docs/reference/workspace/modal-sandbox.md +3 -1
- package/.docs/reference/workspace/railway-sandbox.md +3 -1
- package/.docs/reference/workspace/s3-filesystem.md +3 -1
- package/.docs/reference/workspace/vercel-sandbox.md +7 -5
- package/.docs/reference/workspace/vercel-serverless.md +3 -1
- package/CHANGELOG.md +0 -29
- package/package.json +5 -5
- package/.docs/docs/capabilities/channels/discord.md +0 -98
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/capabilities/channels/overview.md +0 -255
- package/.docs/docs/capabilities/channels/slack.md +0 -225
- package/.docs/docs/capabilities/channels/teams.md +0 -100
- package/.docs/docs/capabilities/channels/telegram.md +0 -98
- package/.docs/docs/capabilities/channels/whatsapp.md +0 -99
- package/.docs/docs/getting-started/file-based-agents.md +0 -116
- package/.docs/models/providers/crossmodel.md +0 -109
- package/.docs/models/providers/empiriolabs.md +0 -106
- package/.docs/models/providers/meta.md +0 -101
- package/.docs/models/providers/model-oracle-ai.md +0 -87
- package/.docs/models/providers/pioneer.md +0 -148
- package/.docs/models/providers/unorouter.md +0 -95
- package/.docs/models/providers/zenifra.md +0 -73
- package/.docs/reference/file-based-agents/config.md +0 -97
- package/.docs/reference/file-based-agents/instructions.md +0 -54
- package/.docs/reference/file-based-agents/logger.md +0 -26
- package/.docs/reference/file-based-agents/memory.md +0 -58
- package/.docs/reference/file-based-agents/observability.md +0 -32
- package/.docs/reference/file-based-agents/processors.md +0 -56
- package/.docs/reference/file-based-agents/scorers.md +0 -54
- package/.docs/reference/file-based-agents/server.md +0 -37
- package/.docs/reference/file-based-agents/skills.md +0 -56
- package/.docs/reference/file-based-agents/storage.md +0 -30
- package/.docs/reference/file-based-agents/studio.md +0 -56
- package/.docs/reference/file-based-agents/subagents.md +0 -123
- package/.docs/reference/file-based-agents/tools.md +0 -63
- package/.docs/reference/file-based-agents/workflows.md +0 -52
- package/.docs/reference/file-based-agents/workspace.md +0 -74
- package/.docs/reference/memory/summarizeConversation.md +0 -99
- package/.docs/reference/memory/summarizeThread.md +0 -93
|
@@ -41,7 +41,7 @@ const existing = await datasets.get({ id: 'dataset-id' })
|
|
|
41
41
|
const { datasets: all } = await datasets.list()
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Visit the [`DatasetsManager` reference](https://mastra.ai/reference/datasets/datasets-manager) for the full list of methods.
|
|
44
|
+
> **Info:** Visit the [`DatasetsManager` reference](https://mastra.ai/reference/datasets/datasets-manager) for the full list of methods.
|
|
45
45
|
|
|
46
46
|
## Studio
|
|
47
47
|
|
|
@@ -196,12 +196,13 @@ Fetch the exact items that existed at a past version:
|
|
|
196
196
|
const items = await dataset.listItems({ version: 2 })
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
You can also pin experiments to a version, see [running experiments](https://mastra.ai/docs/evals/datasets/running-experiments).
|
|
199
|
+
You can also pin experiments to a version, see [running experiments](https://mastra.ai/docs/evals/datasets/running-experiments).
|
|
200
|
+
|
|
201
|
+
> **Info:** Visit the [`Dataset` reference](https://mastra.ai/reference/datasets/dataset) for the full list of methods and parameters.
|
|
200
202
|
|
|
201
203
|
## Related
|
|
202
204
|
|
|
203
205
|
- [Running experiments](https://mastra.ai/docs/evals/datasets/running-experiments)
|
|
204
206
|
- [Scorers overview](https://mastra.ai/docs/evals/overview)
|
|
205
207
|
- [DatasetsManager reference](https://mastra.ai/reference/datasets/datasets-manager)
|
|
206
|
-
- [Dataset reference](https://mastra.ai/reference/datasets/dataset)
|
|
207
|
-
- 📹 [Mastra evals, datasets, and experiments workshop](https://www.youtube.com/watch?v=Vla5LfmOOrM)
|
|
208
|
+
- [Dataset reference](https://mastra.ai/reference/datasets/dataset)
|
|
@@ -127,7 +127,7 @@ for (const item of summary.results) {
|
|
|
127
127
|
}
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
Visit the [Scorers overview](https://mastra.ai/docs/evals/overview) for details on available and custom scorers.
|
|
130
|
+
> **Info:** Visit the [Scorers overview](https://mastra.ai/docs/evals/overview) for details on available and custom scorers.
|
|
131
131
|
|
|
132
132
|
## Tool mocks
|
|
133
133
|
|
|
@@ -321,8 +321,6 @@ console.log(experiment.startedAt)
|
|
|
321
321
|
console.log(experiment.completedAt)
|
|
322
322
|
```
|
|
323
323
|
|
|
324
|
-
> **📹 Watch:** Watch [Mastra datasets and experiments workflow](https://www.youtube.com/watch?v=R6pjAdGhxhQ) to see how datasets and experiments help improve reliability.
|
|
325
|
-
|
|
326
324
|
### Item-level results
|
|
327
325
|
|
|
328
326
|
```typescript
|
|
@@ -344,7 +342,7 @@ for (const result of results) {
|
|
|
344
342
|
- `completedWithErrors` is `true` when the experiment finished but some items failed.
|
|
345
343
|
- Items cancelled via `signal` appear in `skippedCount`.
|
|
346
344
|
|
|
347
|
-
Visit the [`startExperiment` reference](https://mastra.ai/reference/datasets/startExperiment) for the full parameter and return type documentation.
|
|
345
|
+
> **Info:** Visit the [`startExperiment` reference](https://mastra.ai/reference/datasets/startExperiment) for the full parameter and return type documentation.
|
|
348
346
|
|
|
349
347
|
## Related
|
|
350
348
|
|
|
@@ -136,7 +136,9 @@ const summary = await dataset.startExperiment({
|
|
|
136
136
|
})
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
The inline `task` receives the item's `metadata`, so each row can drive its own thread without changing the agent or any scorer.
|
|
139
|
+
The inline `task` receives the item's `metadata`, so each row can drive its own thread without changing the agent or any scorer.
|
|
140
|
+
|
|
141
|
+
> **Note:** Visit [runEvals reference](https://mastra.ai/reference/evals/run-evals) and [Dataset reference](https://mastra.ai/reference/datasets/dataset) for full configuration.
|
|
140
142
|
|
|
141
143
|
## Related
|
|
142
144
|
|
|
@@ -64,7 +64,9 @@ const result = await runEvals({
|
|
|
64
64
|
// result.gateResults: [{ id: 'check-called-tool', passed: true, score: 1 }]
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Any scorer works as a gate. Quick Checks are a natural fit because they return binary 1/0 scores.
|
|
67
|
+
Any scorer works as a gate. Quick Checks are a natural fit because they return binary 1/0 scores.
|
|
68
|
+
|
|
69
|
+
> **Note:** Visit [runEvals() reference](https://mastra.ai/reference/evals/run-evals) for the full parameter and return type documentation.
|
|
68
70
|
|
|
69
71
|
## Thresholds
|
|
70
72
|
|
|
@@ -8,8 +8,6 @@ Scorers are automated tests that evaluate Agents outputs using model-graded, rul
|
|
|
8
8
|
|
|
9
9
|
Scorers can be run in the cloud, capturing real-time results. But scorers can also be part of your CI/CD pipeline, allowing you to test and monitor your agents over time.
|
|
10
10
|
|
|
11
|
-
> **📹 Watch:** Watch [Mastra evals overview](https://www.youtube.com/watch?v=12WN6u2DrBk) for an introduction to evals and how to reason about agent quality.
|
|
12
|
-
|
|
13
11
|
## Types of scorers
|
|
14
12
|
|
|
15
13
|
Mastra provides different kinds of scorers, each serving a specific purpose. Here are some common types:
|
|
@@ -144,5 +142,4 @@ Once registered, you can score traces interactively within Studio under the **Ob
|
|
|
144
142
|
- Add [gates and verdicts](https://mastra.ai/docs/evals/gates-and-verdicts) to enforce hard requirements and quality thresholds
|
|
145
143
|
- Learn how to create your own scorers in the [Creating Custom Scorers](https://mastra.ai/docs/evals/custom-scorers) guide
|
|
146
144
|
- Explore built-in scorers in the [Built-in Scorers](https://mastra.ai/docs/evals/built-in-scorers) section
|
|
147
|
-
- Test scorers with [Studio](https://mastra.ai/docs/studio/overview)
|
|
148
|
-
- 📹 [Mastra evals workshop](https://www.youtube.com/watch?v=OHOZ5PgPj5M\&t=3578s)
|
|
145
|
+
- Test scorers with [Studio](https://mastra.ai/docs/studio/overview)
|
|
@@ -127,7 +127,9 @@ Each check is a standard `createScorer()` instance with a `preprocess` step and
|
|
|
127
127
|
1. **preprocess**: Extracts and normalizes relevant data from the agent run (text content, tool calls)
|
|
128
128
|
2. **generateScore**: Converts the preprocessed result into a score (typically binary 1 or 0)
|
|
129
129
|
|
|
130
|
-
Because checks skip the `analyze` and `generateReason` steps and make no LLM calls, they run in microseconds.
|
|
130
|
+
Because checks skip the `analyze` and `generateReason` steps and make no LLM calls, they run in microseconds.
|
|
131
|
+
|
|
132
|
+
> **Note:** Visit the [Quick Checks reference](https://mastra.ai/reference/evals/checks) for the full API, including all parameters and options for each check.
|
|
131
133
|
|
|
132
134
|
## Related
|
|
133
135
|
|
|
@@ -168,7 +168,7 @@ const stream = await agent.stream('Research solana for me', {
|
|
|
168
168
|
})
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
Visit [`Agent.stream()`](https://mastra.ai/reference/streaming/agents/stream) for the full API.
|
|
171
|
+
> **Note:** Visit [`Agent.stream()`](https://mastra.ai/reference/streaming/agents/stream) for the full API.
|
|
172
172
|
|
|
173
173
|
### Aggregate properties
|
|
174
174
|
|
|
@@ -60,7 +60,9 @@ for await (const chunk of output.fullStream) {
|
|
|
60
60
|
cleanup()
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
The returned `runId` identifies the execution. Pass it to `observe()` to reconnect from a different client.
|
|
63
|
+
The returned `runId` identifies the execution. Pass it to `observe()` to reconnect from a different client.
|
|
64
|
+
|
|
65
|
+
> **Note:** Visit the [DurableAgent reference](https://mastra.ai/reference/agents/durable-agent) for the full configuration and method API.
|
|
64
66
|
|
|
65
67
|
## How it works
|
|
66
68
|
|
|
@@ -138,7 +140,7 @@ const agent = new Agent({
|
|
|
138
140
|
export const inngestAnalyst = createInngestAgent({ agent, inngest })
|
|
139
141
|
```
|
|
140
142
|
|
|
141
|
-
Visit the [`createInngestAgent()` reference](https://mastra.ai/reference/agents/inngest-agent) for the full API, including Inngest-specific options like PubSub and cache configuration.
|
|
143
|
+
> **Note:** Visit the [`createInngestAgent()` reference](https://mastra.ai/reference/agents/inngest-agent) for the full API, including Inngest-specific options like PubSub and cache configuration.
|
|
142
144
|
|
|
143
145
|
## Resumable streams
|
|
144
146
|
|
|
@@ -197,7 +199,7 @@ await durableAgent.stream('Research topic', {
|
|
|
197
199
|
})
|
|
198
200
|
```
|
|
199
201
|
|
|
200
|
-
Visit [Background tasks](https://mastra.ai/docs/long-running-agents/background-tasks) for the full background task guide, including configuration, subagents, and suspend/resume.
|
|
202
|
+
> **Note:** Visit [Background tasks](https://mastra.ai/docs/long-running-agents/background-tasks) for the full background task guide, including configuration, subagents, and suspend/resume.
|
|
201
203
|
|
|
202
204
|
## Cleanup
|
|
203
205
|
|
|
@@ -103,7 +103,9 @@ await worker.updateObjectiveOptions({ threadId, maxRuns: 100 })
|
|
|
103
103
|
await worker.clearObjective({ threadId })
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
Per-objective values written by `setObjective` / `updateObjectiveOptions` take precedence over the agent's `goal` config, and that precedence is remembered in thread state.
|
|
106
|
+
Per-objective values written by `setObjective` / `updateObjectiveOptions` take precedence over the agent's `goal` config, and that precedence is remembered in thread state.
|
|
107
|
+
|
|
108
|
+
> **Note:** See the [`GoalEvaluationPayload` in the ChunkType reference](https://mastra.ai/reference/streaming/ChunkType) for the full goal chunk shape.
|
|
107
109
|
|
|
108
110
|
## Related
|
|
109
111
|
|
|
@@ -157,7 +157,9 @@ export class CiSignals extends SignalProvider<'ci-signals'> {
|
|
|
157
157
|
}
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
`handleWebhook()` is a provider method, not an auto-mounted HTTP route. Invoke it from your own endpoint, passing the request body, headers, and any route params.
|
|
160
|
+
`handleWebhook()` is a provider method, not an auto-mounted HTTP route. Invoke it from your own endpoint, passing the request body, headers, and any route params.
|
|
161
|
+
|
|
162
|
+
> **Note:** Visit [`SignalProvider` reference](https://mastra.ai/reference/signals/signal-provider) for subscription, polling, lifecycle, and `notify()` details. For the complete notification payload shape, including deduplication and coalescing fields, visit [`Agent.sendNotificationSignal()` reference](https://mastra.ai/reference/agents/agent).
|
|
161
163
|
|
|
162
164
|
## Built-in webhook provider
|
|
163
165
|
|
|
@@ -10,8 +10,6 @@ Signals are a way to interact with an agent through a thread. Instead of startin
|
|
|
10
10
|
|
|
11
11
|
Use message APIs for user-authored input. Use `sendSignal()` for lower-level system context, such as background task notifications, policy reminders, or processor-generated context.
|
|
12
12
|
|
|
13
|
-
> **📹 Watch:** Watch [Mastra signals overview](https://www.youtube.com/watch?v=7It2y89TVP4) to see how signals wake and steer long-running agents.
|
|
14
|
-
|
|
15
13
|
## When to use signals
|
|
16
14
|
|
|
17
15
|
Use signals when an agent thread needs new input or context outside the original `stream()` call. Signals are useful when users send follow-up messages while a run is active, when background systems need to add context to a thread, or when external events should wake, update, or notify the agent.
|
|
@@ -112,7 +110,9 @@ const result = agent.sendSignal(
|
|
|
112
110
|
await result.persisted
|
|
113
111
|
```
|
|
114
112
|
|
|
115
|
-
Pass `ifIdle.streamOptions` when the idle wake-up stream needs options such as model settings, tools, or runtime context.
|
|
113
|
+
Pass `ifIdle.streamOptions` when the idle wake-up stream needs options such as model settings, tools, or runtime context.
|
|
114
|
+
|
|
115
|
+
> **Note:** Visit [`Agent.sendSignal()` reference](https://mastra.ai/reference/agents/agent) for `ifActive`, `ifIdle`, branch attributes, and `streamOptions`.
|
|
116
116
|
|
|
117
117
|
### Send notification context
|
|
118
118
|
|
|
@@ -197,7 +197,9 @@ Awaiting `sendSignal()` preserves stream echo ordering when a subscribed thread
|
|
|
197
197
|
|
|
198
198
|
### Conditional attributes
|
|
199
199
|
|
|
200
|
-
Use `ifActive.attributes` and `ifIdle.attributes` to tag input with context that depends on whether the agent is active or idle at delivery time. Top-level `attributes` always apply, and Mastra merges the selected branch's `attributes` into them when the input is accepted.
|
|
200
|
+
Use `ifActive.attributes` and `ifIdle.attributes` to tag input with context that depends on whether the agent is active or idle at delivery time. Top-level `attributes` always apply, and Mastra merges the selected branch's `attributes` into them when the input is accepted.
|
|
201
|
+
|
|
202
|
+
> **Note:** Visit [`Agent.sendMessage()` reference](https://mastra.ai/reference/agents/agent) and [`Agent.sendSignal()` reference](https://mastra.ai/reference/agents/agent) for branch-specific attributes.
|
|
201
203
|
|
|
202
204
|
## State and notification signals
|
|
203
205
|
|
|
@@ -272,7 +274,9 @@ Notification signals represent external events such as GitHub activity, email, S
|
|
|
272
274
|
|
|
273
275
|
Notification delivery has two phases. During ingress, `agent.sendNotificationSignal()` stores a notification record and resolves the agent's delivery policy. During dispatch, Mastra consumes due records and emits full notification or summary signals.
|
|
274
276
|
|
|
275
|
-
The default delivery policy is priority-aware. Urgent notifications deliver immediately, while lower-priority notifications may be batched into summaries or wait until the thread is idle.
|
|
277
|
+
The default delivery policy is priority-aware. Urgent notifications deliver immediately, while lower-priority notifications may be batched into summaries or wait until the thread is idle.
|
|
278
|
+
|
|
279
|
+
> **Note:** Visit [`Agent.sendNotificationSignal()` reference](https://mastra.ai/reference/agents/agent) for notification fields, [`Agent` constructor reference](https://mastra.ai/reference/agents/agent) for `notifications.deliveryPolicy` configuration, and [`createNotificationInboxTool()` reference](https://mastra.ai/reference/signals/create-notification-inbox-tool) for inbox tool actions.
|
|
276
280
|
|
|
277
281
|
```typescript
|
|
278
282
|
await agent.sendNotificationSignal(
|
|
@@ -308,11 +312,15 @@ Notification summaries tell the model that inbox records are waiting:
|
|
|
308
312
|
|
|
309
313
|
When Mastra emits a summary, it clears `summaryAt` and sets `summarySignalId` on each summarized record. The records stay pending and readable. When Mastra emits a full notification, it sets `deliveredSignalId` and marks the record `delivered`. If the inbox tool reads a notification first, it can inject the full notification signal and mark the record `seen`, which prevents duplicate full delivery.
|
|
310
314
|
|
|
311
|
-
Configure a delivery policy on the agent when some notifications should wait for a different dispatch window or summary rollup. Enable scheduled dispatch at the Mastra level when deferred notifications and summary rollups should be delivered automatically.
|
|
315
|
+
Configure a delivery policy on the agent when some notifications should wait for a different dispatch window or summary rollup. Enable scheduled dispatch at the Mastra level when deferred notifications and summary rollups should be delivered automatically.
|
|
316
|
+
|
|
317
|
+
> **Note:** Visit [`Agent` constructor reference](https://mastra.ai/reference/agents/agent) for `notifications.deliveryPolicy` and [`Mastra` class reference](https://mastra.ai/reference/core/mastra-class) for runtime notification dispatch configuration.
|
|
312
318
|
|
|
313
319
|
#### Notification inbox tool
|
|
314
320
|
|
|
315
|
-
Use `createNotificationInboxTool()` to give agents one tool for inbox actions instead of many CRUD tools. Use `read` after a `<notification-summary>` signal when the agent needs the full records behind the summary. The notification contents are delivered as signals, not as normal tool output.
|
|
321
|
+
Use `createNotificationInboxTool()` to give agents one tool for inbox actions instead of many CRUD tools. Use `read` after a `<notification-summary>` signal when the agent needs the full records behind the summary. The notification contents are delivered as signals, not as normal tool output.
|
|
322
|
+
|
|
323
|
+
> **Note:** Visit [`createNotificationInboxTool()` reference](https://mastra.ai/reference/signals/create-notification-inbox-tool) for the setup example, input schema, and action behavior.
|
|
316
324
|
|
|
317
325
|
`sendNotificationSignal()` requires a storage domain with `notifications` support. Use `sendSignal({ type: 'notification' })` only for lower-level notification-shaped context that should bypass inbox storage.
|
|
318
326
|
|
|
@@ -348,11 +356,15 @@ Mastra still accepts legacy signal payloads such as `type: 'user-message'` and `
|
|
|
348
356
|
- `type: 'user-message'`: Normalizes to `type: 'user'` and `tagName: 'user'`
|
|
349
357
|
- `type: 'system-reminder'`: Normalizes to `type: 'reactive'` and `tagName: 'system-reminder'`
|
|
350
358
|
|
|
351
|
-
Existing stored signal rows and older clients continue to load through the compatibility layer. New clients call the message routes when the server supports them; React's thread signal path falls back to the legacy `/signals` route when it detects an older server.
|
|
359
|
+
Existing stored signal rows and older clients continue to load through the compatibility layer. New clients call the message routes when the server supports them; React's thread signal path falls back to the legacy `/signals` route when it detects an older server.
|
|
360
|
+
|
|
361
|
+
> **Note:** Visit [Agent signals reference](https://mastra.ai/reference/agents/agent) for the full message, signal, and subscription types.
|
|
352
362
|
|
|
353
363
|
### Approve tool calls
|
|
354
364
|
|
|
355
|
-
When a subscribed run pauses for tool approval, approve or decline the tool call with the subscription-native methods. The resumed chunks arrive through the existing thread subscription.
|
|
365
|
+
When a subscribed run pauses for tool approval, approve or decline the tool call with the subscription-native methods. The resumed chunks arrive through the existing thread subscription.
|
|
366
|
+
|
|
367
|
+
> **Note:** Visit [`client.getAgent().sendToolApproval()` reference](https://mastra.ai/reference/client-js/agents) and [server agent routes](https://mastra.ai/reference/server/routes) for request and response shapes.
|
|
356
368
|
|
|
357
369
|
### Use HTTP routes
|
|
358
370
|
|
|
@@ -418,5 +430,4 @@ Use heartbeats together with client-side reconnect logic. Heartbeats reduce idle
|
|
|
418
430
|
- [Server agent routes](https://mastra.ai/reference/server/routes)
|
|
419
431
|
- [`client.getAgent().subscribeToThread()`](https://mastra.ai/reference/client-js/agents)
|
|
420
432
|
- [`client.getAgent().sendToolApproval()`](https://mastra.ai/reference/client-js/agents)
|
|
421
|
-
- [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams)
|
|
422
|
-
- 📹 [Mastra signals workshop](https://www.youtube.com/watch?v=KLg6uFKz9aw\&t=3020s)
|
|
433
|
+
- [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams)
|
|
@@ -128,8 +128,4 @@ yarn dlx mastra api trace list
|
|
|
128
128
|
bun x mastra api trace list
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
For observability commands, the CLI targets the hosted observability API and can infer credentials from your project environment. See the [`mastra api` CLI reference](https://mastra.ai/reference/cli/mastra) for available observability commands, filtering, pagination, credential resolution, and direct `curl` examples.
|
|
132
|
-
|
|
133
|
-
## Related
|
|
134
|
-
|
|
135
|
-
- 📹 [Mastra observability and Studio workshop](https://www.youtube.com/watch?v=dKO_a3RPra0)
|
|
131
|
+
For observability commands, the CLI targets the hosted observability API and can infer credentials from your project environment. See the [`mastra api` CLI reference](https://mastra.ai/reference/cli/mastra) for available observability commands, filtering, pagination, credential resolution, and direct `curl` examples.
|
|
@@ -81,7 +81,7 @@ calculatorTool._meta = {
|
|
|
81
81
|
}
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
Visit [MCPServer reference](https://mastra.ai/reference/tools/mcp-server) for the full `appResources` configuration.
|
|
84
|
+
> **Note:** Visit [MCPServer reference](https://mastra.ai/reference/tools/mcp-server) for the full `appResources` configuration.
|
|
85
85
|
|
|
86
86
|
## Connecting MCP Apps to agents
|
|
87
87
|
|
|
@@ -249,7 +249,7 @@ Establishes the connection to the host. Call this after registering all event ha
|
|
|
249
249
|
await app.connect()
|
|
250
250
|
```
|
|
251
251
|
|
|
252
|
-
See the [`App` class API reference](https://apps.extensions.modelcontextprotocol.io/api/classes/app.App.html) for the full list of methods, callbacks, and lifecycle hooks.
|
|
252
|
+
> **Note:** See the [`App` class API reference](https://apps.extensions.modelcontextprotocol.io/api/classes/app.App.html) for the full list of methods, callbacks, and lifecycle hooks.
|
|
253
253
|
|
|
254
254
|
## Using external MCP servers with apps
|
|
255
255
|
|
|
@@ -284,7 +284,7 @@ export const mastra = new Mastra({
|
|
|
284
284
|
})
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
Visit [MCPClient reference](https://mastra.ai/reference/tools/mcp-client) for more details on proxying external servers.
|
|
287
|
+
> **Note:** Visit [MCPClient reference](https://mastra.ai/reference/tools/mcp-client) for more details on proxying external servers.
|
|
288
288
|
|
|
289
289
|
## Sandbox security
|
|
290
290
|
|
|
@@ -62,7 +62,7 @@ export const testMcpClient = new MCPClient({
|
|
|
62
62
|
})
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Visit [MCPClient](https://mastra.ai/reference/tools/mcp-client) for a full list of configuration options.
|
|
65
|
+
> **Info:** Visit [MCPClient](https://mastra.ai/reference/tools/mcp-client) for a full list of configuration options.
|
|
66
66
|
|
|
67
67
|
> **Authentication:** For connecting to OAuth-protected MCP servers, see the [OAuth Authentication](https://mastra.ai/reference/tools/mcp-client) section.
|
|
68
68
|
|
|
@@ -89,7 +89,7 @@ export const testAgent = new Agent({
|
|
|
89
89
|
})
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
Visit [Agent Class](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
|
|
92
|
+
> **Info:** Visit [Agent Class](https://mastra.ai/reference/agents/agent) for a full list of configuration options.
|
|
93
93
|
|
|
94
94
|
## Tool approval
|
|
95
95
|
|
|
@@ -129,7 +129,7 @@ export const testMcpServer = new MCPServer({
|
|
|
129
129
|
})
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
Visit [MCPServer](https://mastra.ai/reference/tools/mcp-server) for a full list of configuration options.
|
|
132
|
+
> **Info:** Visit [MCPServer](https://mastra.ai/reference/tools/mcp-server) for a full list of configuration options.
|
|
133
133
|
|
|
134
134
|
> **Authentication:** To protect your MCP server with OAuth, see the [OAuth Protection](https://mastra.ai/reference/tools/mcp-server) section.
|
|
135
135
|
|
|
@@ -160,7 +160,9 @@ export const mastra = new Mastra({
|
|
|
160
160
|
|
|
161
161
|
### Static tools
|
|
162
162
|
|
|
163
|
-
Use the `.listTools()` method to fetch tools from all configured MCP servers. This is suitable when configuration (such as API keys) is static and consistent across users or requests. Call it once and pass the result to the `tools` property when defining your agent.
|
|
163
|
+
Use the `.listTools()` method to fetch tools from all configured MCP servers. This is suitable when configuration (such as API keys) is static and consistent across users or requests. Call it once and pass the result to the `tools` property when defining your agent.
|
|
164
|
+
|
|
165
|
+
> **Info:** Visit [listTools()](https://mastra.ai/reference/tools/mcp-client) for more information.
|
|
164
166
|
|
|
165
167
|
```typescript
|
|
166
168
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -209,7 +211,7 @@ async function handleRequest(userPrompt: string, userApiKey: string) {
|
|
|
209
211
|
}
|
|
210
212
|
```
|
|
211
213
|
|
|
212
|
-
Visit [listToolsets()](https://mastra.ai/reference/tools/mcp-client) for more information.
|
|
214
|
+
> **Info:** Visit [listToolsets()](https://mastra.ai/reference/tools/mcp-client) for more information.
|
|
213
215
|
|
|
214
216
|
## Connecting to an MCP registry
|
|
215
217
|
|
|
@@ -410,7 +412,9 @@ As an alternative to MCP, Ampersand's AI SDK also has an adapter for Mastra, so
|
|
|
410
412
|
|
|
411
413
|
## MCP Apps
|
|
412
414
|
|
|
413
|
-
MCP servers can serve interactive HTML UIs via the MCP Apps extension. Tools with associated `ui://` resources render sandboxed iframes in Studio — both on tool detail pages and inline in agent chat. The app iframe can call server tools and inject messages into the conversation.
|
|
415
|
+
MCP servers can serve interactive HTML UIs via the MCP Apps extension. Tools with associated `ui://` resources render sandboxed iframes in Studio — both on tool detail pages and inline in agent chat. The app iframe can call server tools and inject messages into the conversation.
|
|
416
|
+
|
|
417
|
+
> **Note:** Visit [MCP Apps](https://mastra.ai/docs/mcp/mcp-apps) for setup instructions and the app bridge API.
|
|
414
418
|
|
|
415
419
|
## Related
|
|
416
420
|
|
|
@@ -714,5 +714,4 @@ In practical terms, OM replaces both working memory and message history, and has
|
|
|
714
714
|
- [Memory Overview](https://mastra.ai/docs/memory/overview)
|
|
715
715
|
- [Message History](https://mastra.ai/docs/memory/message-history)
|
|
716
716
|
- [Memory Processors](https://mastra.ai/docs/memory/memory-processors)
|
|
717
|
-
- [Mastra Code](https://code.mastra.ai/): A coding agent using Observational Memory
|
|
718
|
-
- 📹 [Mastra processors and Observational Memory workshop](https://www.youtube.com/watch?v=4Vpp7xQYvl0)
|
|
717
|
+
- [Mastra Code](https://code.mastra.ai/): A coding agent using Observational Memory
|
|
@@ -15,8 +15,6 @@ If the combined memory exceeds the model's context limit, [memory processors](ht
|
|
|
15
15
|
|
|
16
16
|
Memory results will be stored in one or more of your configured [storage providers](https://mastra.ai/docs/storage/overview).
|
|
17
17
|
|
|
18
|
-
> **📹 Watch:** Watch [Mastra memory concepts](https://www.youtube.com/watch?v=18iIHQtIPmc) for a conceptual overview of the memory layers agents can use.
|
|
19
|
-
|
|
20
18
|
## When to use memory
|
|
21
19
|
|
|
22
20
|
Use memory when your agent needs to maintain multi-turn conversations that reference prior exchanges, recall user preferences or facts from earlier in a session, or build context over time within a conversation thread. Skip memory for single-turn requests where each interaction is independent.
|
|
@@ -77,7 +75,7 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
|
|
|
77
75
|
bun add @mastra/libsql@latest
|
|
78
76
|
```
|
|
79
77
|
|
|
80
|
-
For more details on available providers and how storage works in Mastra, visit the [storage](https://mastra.ai/docs/storage/overview) documentation.
|
|
78
|
+
> **Note:** For more details on available providers and how storage works in Mastra, visit the [storage](https://mastra.ai/docs/storage/overview) documentation.
|
|
81
79
|
|
|
82
80
|
3. Add the storage provider to your main Mastra instance to enable memory across all configured agents.
|
|
83
81
|
|
|
@@ -110,7 +108,7 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
|
|
|
110
108
|
})
|
|
111
109
|
```
|
|
112
110
|
|
|
113
|
-
Visit [Memory Class](https://mastra.ai/reference/memory/memory-class) for a full list of configuration options.
|
|
111
|
+
> **Note:** Visit [Memory Class](https://mastra.ai/reference/memory/memory-class) for a full list of configuration options.
|
|
114
112
|
|
|
115
113
|
5. Call your agent, for example in [Studio](https://mastra.ai/docs/studio/overview). Inside Studio, start a new chat with your agent and take a look at the right sidebar. It'll now display various memory-related information.
|
|
116
114
|
|
|
@@ -166,7 +164,7 @@ export const memoryAgent = new Agent({
|
|
|
166
164
|
})
|
|
167
165
|
```
|
|
168
166
|
|
|
169
|
-
See [Observational Memory](https://mastra.ai/docs/memory/observational-memory) for details on how observations and reflections work, and [the reference](https://mastra.ai/reference/memory/observational-memory) for all configuration options.
|
|
167
|
+
> **Note:** See [Observational Memory](https://mastra.ai/docs/memory/observational-memory) for details on how observations and reflections work, and [the reference](https://mastra.ai/reference/memory/observational-memory) for all configuration options.
|
|
170
168
|
|
|
171
169
|
## Memory in multi-agent systems
|
|
172
170
|
|
|
@@ -238,7 +236,7 @@ export const memoryAgent = new Agent({
|
|
|
238
236
|
})
|
|
239
237
|
```
|
|
240
238
|
|
|
241
|
-
Visit [Request Context](https://mastra.ai/docs/server/request-context) for more information.
|
|
239
|
+
> **Note:** Visit [Request Context](https://mastra.ai/docs/server/request-context) for more information.
|
|
242
240
|
|
|
243
241
|
## Related
|
|
244
242
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
If you ask your friend what they did last weekend, they will search in their memory for events associated with "last weekend" and then tell you what they did. That's sort of like how semantic recall works in Mastra.
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> **Watch 📹:** What semantic recall is, how it works, and how to configure it in Mastra → [YouTube (5 minutes)](https://youtu.be/UVZtK8cK8xQ)
|
|
8
8
|
|
|
9
9
|
## How semantic recall works
|
|
10
10
|
|
|
@@ -10,8 +10,6 @@ This is useful for maintaining ongoing state that's always relevant and should a
|
|
|
10
10
|
|
|
11
11
|
If you use [Observational Memory](https://mastra.ai/docs/memory/observational-memory), `observationalMemory.observation.manageWorkingMemory` lets OM update working memory for the agent.
|
|
12
12
|
|
|
13
|
-
> **📹 Watch:** Watch [Mastra working memory](https://www.youtube.com/watch?v=UMy_JHLf1n8\&pp=ygUVbWFzdHJhIHdvcmtpbmcgbWVtb3J5) to see how agents keep persistent user context available across interactions.
|
|
14
|
-
|
|
15
13
|
Working memory can persist at two different scopes:
|
|
16
14
|
|
|
17
15
|
- **Resource-scoped** (default): Memory persists across all conversation threads for the same user
|
|
@@ -45,7 +43,9 @@ const agent = new Agent({
|
|
|
45
43
|
|
|
46
44
|
## How it works
|
|
47
45
|
|
|
48
|
-
Working memory is a block of Markdown text that the agent is able to update over time to store continuously relevant information
|
|
46
|
+
Working memory is a block of Markdown text that the agent is able to update over time to store continuously relevant information:
|
|
47
|
+
|
|
48
|
+
[YouTube video player](https://www.youtube-nocookie.com/embed/UMy_JHLf1n8)
|
|
49
49
|
|
|
50
50
|
## Memory persistence scopes
|
|
51
51
|
|
|
@@ -126,7 +126,9 @@ If you prefer, rely entirely on environment variables:
|
|
|
126
126
|
new MastraPlatformExporter()
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
With `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `MastraPlatformExporter` sends data to the Mastra platform project you configured. If you also set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`, it sends data to that collector instead.
|
|
129
|
+
With `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` set, `MastraPlatformExporter` sends data to the Mastra platform project you configured. If you also set `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`, it sends data to that collector instead.
|
|
130
|
+
|
|
131
|
+
> **Note:** Visit [MastraPlatformExporter reference](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter) for the full list of configuration options.
|
|
130
132
|
|
|
131
133
|
## Recommended configuration
|
|
132
134
|
|
|
@@ -22,7 +22,7 @@ export const mastra = new Mastra({
|
|
|
22
22
|
})
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Visit [PinoLogger](https://mastra.ai/reference/logging/pino-logger) for all available configuration options.
|
|
25
|
+
> **Info:** Visit [PinoLogger](https://mastra.ai/reference/logging/pino-logger) for all available configuration options.
|
|
26
26
|
|
|
27
27
|
## Logging to observability storage
|
|
28
28
|
|
|
@@ -325,7 +325,7 @@ const result = await agent.generate([{ role: 'user', content: 'Sensitive operati
|
|
|
325
325
|
})
|
|
326
326
|
```
|
|
327
327
|
|
|
328
|
-
For more granular control over sensitive data, consider using the [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter) processor, which can redact specific fields (like passwords, tokens, and keys) while preserving the rest of the input/output.
|
|
328
|
+
> **Tip:** For more granular control over sensitive data, consider using the [Sensitive Data Filter](https://mastra.ai/docs/observability/integrations/processors/sensitive-data-filter) processor, which can redact specific fields (like passwords, tokens, and keys) while preserving the rest of the input/output.
|
|
329
329
|
|
|
330
330
|
#### Child spans and metadata extraction
|
|
331
331
|
|
|
@@ -105,7 +105,7 @@ const auth0Provider = new MastraAuthAuth0({
|
|
|
105
105
|
})
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
Visit [MastraAuthAuth0](https://mastra.ai/reference/auth/auth0) for all available configuration options.
|
|
108
|
+
> **Info:** Visit [MastraAuthAuth0](https://mastra.ai/reference/auth/auth0) for all available configuration options.
|
|
109
109
|
|
|
110
110
|
## Client-side setup
|
|
111
111
|
|
|
@@ -87,7 +87,7 @@ export const mastra = new Mastra({
|
|
|
87
87
|
})
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Visit [MastraAuthBetterAuth](https://mastra.ai/reference/auth/better-auth) for all available configuration options.
|
|
90
|
+
> **Info:** Visit [MastraAuthBetterAuth](https://mastra.ai/reference/auth/better-auth) for all available configuration options.
|
|
91
91
|
|
|
92
92
|
## Custom authorization
|
|
93
93
|
|
|
@@ -180,7 +180,7 @@ export const mastraClient = new MastraClient({
|
|
|
180
180
|
})
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
183
|
+
> **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
184
184
|
|
|
185
185
|
### Making authenticated requests
|
|
186
186
|
|
|
@@ -88,7 +88,7 @@ export const useClerkAuth = () => {
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
Refer to the [Clerk documentation](https://clerk.com/docs) for more information.
|
|
91
|
+
> **Info:** Refer to the [Clerk documentation](https://clerk.com/docs) for more information.
|
|
92
92
|
|
|
93
93
|
## Configuring `MastraClient`
|
|
94
94
|
|
|
@@ -118,7 +118,7 @@ const firebaseAuth = new MastraAuthFirebase({
|
|
|
118
118
|
})
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
Visit [MastraAuthFirebase](https://mastra.ai/reference/auth/firebase) for all available configuration options.
|
|
121
|
+
> **Info:** Visit [MastraAuthFirebase](https://mastra.ai/reference/auth/firebase) for all available configuration options.
|
|
122
122
|
|
|
123
123
|
## Client-side setup
|
|
124
124
|
|
|
@@ -168,7 +168,7 @@ export const mastra = new Mastra({
|
|
|
168
168
|
})
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
Visit [MastraAuthGoogle](https://mastra.ai/reference/auth/google) for all available configuration options.
|
|
171
|
+
> **Info:** Visit [MastraAuthGoogle](https://mastra.ai/reference/auth/google) for all available configuration options.
|
|
172
172
|
|
|
173
173
|
## Role mapping
|
|
174
174
|
|
|
@@ -242,7 +242,7 @@ export const createMastraClient = (idToken: string) => {
|
|
|
242
242
|
}
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
245
|
+
> **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
246
246
|
|
|
247
247
|
### Making authenticated requests
|
|
248
248
|
|
|
@@ -61,7 +61,7 @@ export const mastra = new Mastra({
|
|
|
61
61
|
})
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Visit [MastraJwtAuth](https://mastra.ai/reference/auth/jwt) for all available configuration options.
|
|
64
|
+
> **Info:** Visit [MastraJwtAuth](https://mastra.ai/reference/auth/jwt) for all available configuration options.
|
|
65
65
|
|
|
66
66
|
Inside [Studio](https://mastra.ai/docs/studio/overview), go to **Settings** and under **Headers** select the **"Add Header"** button. Enter `Authorization` as the header name and `Bearer <your-jwt>` as the value.
|
|
67
67
|
|
|
@@ -80,7 +80,7 @@ export const mastraClient = new MastraClient({
|
|
|
80
80
|
})
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
83
|
+
> **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
84
84
|
|
|
85
85
|
### Making authenticated requests
|
|
86
86
|
|
|
@@ -120,7 +120,7 @@ export const mastra = new Mastra({
|
|
|
120
120
|
|
|
121
121
|
> **Note:** To link users between providers, store the Okta user ID in the other provider's user metadata. Mastra uses this ID to fetch groups from Okta.
|
|
122
122
|
|
|
123
|
-
Visit [MastraAuthOkta](https://mastra.ai/reference/auth/okta) for all available configuration options.
|
|
123
|
+
> **Info:** Visit [MastraAuthOkta](https://mastra.ai/reference/auth/okta) for all available configuration options.
|
|
124
124
|
|
|
125
125
|
## Role mapping
|
|
126
126
|
|
|
@@ -194,7 +194,7 @@ export const createMastraClient = (accessToken: string) => {
|
|
|
194
194
|
}
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
197
|
+
> **Info:** Visit [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) for more configuration options.
|
|
198
198
|
|
|
199
199
|
### Making authenticated requests
|
|
200
200
|
|
|
@@ -149,7 +149,7 @@ const workosAuth = new AdminOnlyWorkosAuth({
|
|
|
149
149
|
})
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
Visit [MastraAuthWorkos](https://mastra.ai/reference/auth/workos) for all available configuration options.
|
|
152
|
+
> **Info:** Visit [MastraAuthWorkos](https://mastra.ai/reference/auth/workos) for all available configuration options.
|
|
153
153
|
|
|
154
154
|
## Client-side setup
|
|
155
155
|
|
|
@@ -134,7 +134,7 @@ export const mastraClient = new MastraClient({
|
|
|
134
134
|
})
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
Visit [MastraClient](https://mastra.ai/reference/client-js/mastra-client) for more configuration options.
|
|
137
|
+
> **Info:** Visit [MastraClient](https://mastra.ai/reference/client-js/mastra-client) for more configuration options.
|
|
138
138
|
|
|
139
139
|
## Credentials and session cookies
|
|
140
140
|
|
|
@@ -32,7 +32,7 @@ export const mastra = new Mastra({
|
|
|
32
32
|
})
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Visit the [configuration reference](https://mastra.ai/reference/configuration) for a full list of available server options.
|
|
35
|
+
> **Info:** Visit the [configuration reference](https://mastra.ai/reference/configuration) for a full list of available server options.
|
|
36
36
|
|
|
37
37
|
## Deploy your server
|
|
38
38
|
|
|
@@ -116,7 +116,7 @@ export const mastra = new Mastra({
|
|
|
116
116
|
})
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Visit the [PubSub reference](https://mastra.ai/reference/pubsub/base) for the full delivery contract and the configuration options for each backend.
|
|
119
|
+
> **Note:** Visit the [PubSub reference](https://mastra.ai/reference/pubsub/base) for the full delivery contract and the configuration options for each backend.
|
|
120
120
|
|
|
121
121
|
## Related
|
|
122
122
|
|