@mastra/mcp-docs-server 1.1.42-alpha.8 → 1.1.42
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/memory.md +1 -1
- package/.docs/docs/agents/a2a.md +1 -1
- package/.docs/docs/agents/acp.md +4 -4
- package/.docs/docs/agents/adding-voice.md +7 -7
- package/.docs/docs/agents/agent-approval.md +1 -1
- package/.docs/docs/agents/background-tasks.md +2 -2
- package/.docs/docs/agents/channels.md +1 -1
- package/.docs/docs/agents/code-mode.md +3 -3
- package/.docs/docs/agents/guardrails.md +2 -2
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/response-caching.md +1 -1
- package/.docs/docs/agents/sdk-agents.md +261 -0
- package/.docs/docs/agents/signals.md +1 -1
- package/.docs/docs/agents/structured-output.md +5 -5
- package/.docs/docs/agents/supervisor-agents.md +2 -2
- package/.docs/docs/agents/using-tools.md +5 -5
- package/.docs/docs/browser/agent-browser.md +1 -1
- package/.docs/docs/browser/browser-viewer.md +1 -1
- package/.docs/docs/browser/overview.md +1 -1
- package/.docs/docs/browser/stagehand.md +5 -5
- package/.docs/docs/editor/overview.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +1 -1
- package/.docs/docs/evals/datasets/running-experiments.md +1 -1
- package/.docs/docs/evals/overview.md +2 -2
- package/.docs/docs/mcp/mcp-apps.md +3 -3
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/memory/memory-processors.md +6 -6
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/memory/storage.md +2 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/tracing/exporters/langfuse.md +1 -1
- package/.docs/docs/observability/tracing/exporters/langsmith.md +2 -2
- package/.docs/docs/rag/graph-rag.md +2 -2
- package/.docs/docs/rag/retrieval.md +12 -12
- package/.docs/docs/server/auth/fga.md +2 -0
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/request-context.md +3 -3
- package/.docs/docs/streaming/overview.md +1 -1
- package/.docs/docs/streaming/tool-streaming.md +1 -1
- package/.docs/docs/voice/overview.md +25 -25
- package/.docs/docs/voice/speech-to-speech.md +4 -4
- package/.docs/docs/voice/speech-to-text.md +1 -1
- package/.docs/docs/voice/text-to-speech.md +1 -1
- package/.docs/docs/workspace/filesystem.md +2 -2
- package/.docs/docs/workspace/overview.md +1 -1
- package/.docs/docs/workspace/sandbox.md +1 -1
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +1 -1
- package/.docs/guides/guide/chef-michel.md +1 -1
- package/.docs/guides/guide/code-review-bot.md +1 -1
- package/.docs/guides/guide/dev-assistant.md +1 -1
- package/.docs/guides/guide/docs-manager.md +1 -1
- package/.docs/guides/guide/firecrawl.md +1 -1
- package/.docs/guides/guide/github-actions-pr-description.md +1 -1
- package/.docs/guides/guide/research-assistant.md +1 -1
- package/.docs/guides/guide/research-coordinator.md +2 -2
- package/.docs/guides/guide/slack-assistant.md +1 -1
- package/.docs/guides/guide/stock-agent.md +2 -2
- package/.docs/guides/guide/whatsapp-chat-bot.md +2 -2
- package/.docs/guides/migrations/agentnetwork.md +4 -4
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +2 -2
- package/.docs/reference/agents/agent.md +4 -4
- package/.docs/reference/agents/channels.md +47 -5
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/getLLM.md +2 -2
- package/.docs/reference/agents/getMetadata.md +2 -2
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/browser/agent-browser.md +1 -1
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +5 -5
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/evals/answer-relevancy.md +1 -1
- package/.docs/reference/evals/answer-similarity.md +1 -1
- package/.docs/reference/evals/bias.md +1 -1
- package/.docs/reference/evals/context-precision.md +3 -3
- package/.docs/reference/evals/context-relevance.md +11 -11
- package/.docs/reference/evals/faithfulness.md +1 -1
- package/.docs/reference/evals/hallucination.md +5 -5
- package/.docs/reference/evals/noise-sensitivity.md +11 -11
- package/.docs/reference/evals/prompt-alignment.md +15 -15
- package/.docs/reference/evals/tool-call-accuracy.md +3 -3
- package/.docs/reference/evals/toxicity.md +1 -1
- package/.docs/reference/memory/memory-class.md +3 -3
- package/.docs/reference/memory/observational-memory.md +4 -4
- package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/cost-guard-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -1
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/moderation-processor.md +2 -2
- package/.docs/reference/processors/pii-detector.md +2 -2
- package/.docs/reference/processors/prefill-error-handler.md +2 -2
- package/.docs/reference/processors/processor-interface.md +2 -2
- package/.docs/reference/processors/prompt-injection-detector.md +1 -1
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/semantic-recall-processor.md +1 -1
- package/.docs/reference/processors/skill-search-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +3 -3
- package/.docs/reference/processors/tool-call-filter.md +2 -2
- package/.docs/reference/processors/tool-search-processor.md +2 -2
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/processors/working-memory-processor.md +1 -1
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/server/nestjs-adapter.md +1 -1
- package/.docs/reference/storage/dsql.md +1 -1
- package/.docs/reference/storage/mongodb.md +1 -1
- package/.docs/reference/storage/postgresql.md +1 -1
- package/.docs/reference/storage/redis.md +1 -1
- package/.docs/reference/storage/spanner.md +5 -0
- package/.docs/reference/storage/upstash.md +1 -1
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/mcp-client.md +2 -2
- package/.docs/reference/tools/mcp-server.md +33 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -1
- package/.docs/reference/vectors/libsql.md +1 -1
- package/.docs/reference/vectors/mongodb.md +1 -1
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/upstash.md +1 -1
- package/.docs/reference/voice/voice.addInstructions.md +1 -1
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
- package/.docs/reference/workspace/azure-blob-filesystem.md +1 -1
- package/.docs/reference/workspace/docker-sandbox.md +1 -1
- package/.docs/reference/workspace/e2b-sandbox.md +9 -5
- package/.docs/reference/workspace/files-sdk-filesystem.md +1 -1
- package/.docs/reference/workspace/gcs-filesystem.md +1 -1
- package/.docs/reference/workspace/google-drive-filesystem.md +1 -1
- package/.docs/reference/workspace/local-filesystem.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/modal-sandbox.md +1 -1
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/CHANGELOG.md +30 -0
- package/package.json +6 -6
|
@@ -47,13 +47,13 @@ import { StagehandBrowser } from '@mastra/stagehand'
|
|
|
47
47
|
|
|
48
48
|
const browser = new StagehandBrowser({
|
|
49
49
|
headless: false,
|
|
50
|
-
model: 'openai/gpt-5.
|
|
50
|
+
model: 'openai/gpt-5.5',
|
|
51
51
|
})
|
|
52
52
|
|
|
53
53
|
export const stagehandAgent = new Agent({
|
|
54
54
|
id: 'stagehand-agent',
|
|
55
55
|
name: 'Stagehand Agent',
|
|
56
|
-
model: 'openai/gpt-5.
|
|
56
|
+
model: 'openai/gpt-5.5',
|
|
57
57
|
browser,
|
|
58
58
|
instructions: `You are a web automation assistant.
|
|
59
59
|
|
|
@@ -117,7 +117,7 @@ Use screenshots when you need to visually inspect the page — for example, eval
|
|
|
117
117
|
```typescript
|
|
118
118
|
const browser = new StagehandBrowser({
|
|
119
119
|
headless: false,
|
|
120
|
-
model: 'openai/gpt-5.
|
|
120
|
+
model: 'openai/gpt-5.5',
|
|
121
121
|
})
|
|
122
122
|
```
|
|
123
123
|
|
|
@@ -126,7 +126,7 @@ To disable the screenshot tool for models that do not support vision, use `exclu
|
|
|
126
126
|
```typescript
|
|
127
127
|
const browser = new StagehandBrowser({
|
|
128
128
|
headless: false,
|
|
129
|
-
model: 'openai/gpt-5.
|
|
129
|
+
model: 'openai/gpt-5.5',
|
|
130
130
|
excludeTools: ['stagehand_screenshot'],
|
|
131
131
|
})
|
|
132
132
|
```
|
|
@@ -140,7 +140,7 @@ const browser = new StagehandBrowser({
|
|
|
140
140
|
env: 'BROWSERBASE',
|
|
141
141
|
apiKey: process.env.BROWSERBASE_API_KEY,
|
|
142
142
|
projectId: process.env.BROWSERBASE_PROJECT_ID,
|
|
143
|
-
model: 'openai/gpt-5.
|
|
143
|
+
model: 'openai/gpt-5.5',
|
|
144
144
|
})
|
|
145
145
|
```
|
|
146
146
|
|
|
@@ -194,7 +194,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
194
194
|
|
|
195
195
|
export const supportAgent = new Agent({
|
|
196
196
|
name: 'support-agent',
|
|
197
|
-
model: 'openai/gpt-5.
|
|
197
|
+
model: 'openai/gpt-5.5',
|
|
198
198
|
editor: { instructions: true, tools: { description: true } },
|
|
199
199
|
})
|
|
200
200
|
```
|
|
@@ -44,7 +44,7 @@ const glutenCheckerScorer = createScorer({
|
|
|
44
44
|
id: 'gluten-checker',
|
|
45
45
|
description: 'Check if recipes contain gluten ingredients',
|
|
46
46
|
judge: { // Optional: for prompt object steps
|
|
47
|
-
model: 'openai/gpt-5.
|
|
47
|
+
model: 'openai/gpt-5.5',
|
|
48
48
|
instructions: 'You are a Chef that identifies if recipes contain gluten.'
|
|
49
49
|
}
|
|
50
50
|
})
|
|
@@ -104,7 +104,7 @@ const summary = await dataset.startExperiment({
|
|
|
104
104
|
```typescript
|
|
105
105
|
import { createAnswerRelevancyScorer } from '@mastra/evals/scorers/prebuilt'
|
|
106
106
|
|
|
107
|
-
const relevancy = createAnswerRelevancyScorer({ model: '
|
|
107
|
+
const relevancy = createAnswerRelevancyScorer({ model: 'openai/gpt-5-mini' })
|
|
108
108
|
|
|
109
109
|
const summary = await dataset.startExperiment({
|
|
110
110
|
name: 'with-scorer-instances',
|
|
@@ -57,11 +57,11 @@ import { createAnswerRelevancyScorer, createToxicityScorer } from '@mastra/evals
|
|
|
57
57
|
export const evaluatedAgent = new Agent({
|
|
58
58
|
scorers: {
|
|
59
59
|
relevancy: {
|
|
60
|
-
scorer: createAnswerRelevancyScorer({ model: '
|
|
60
|
+
scorer: createAnswerRelevancyScorer({ model: 'openai/gpt-5-mini' }),
|
|
61
61
|
sampling: { type: 'ratio', rate: 0.5 },
|
|
62
62
|
},
|
|
63
63
|
safety: {
|
|
64
|
-
scorer: createToxicityScorer({ model: '
|
|
64
|
+
scorer: createToxicityScorer({ model: 'openai/gpt-5-mini' }),
|
|
65
65
|
sampling: { type: 'ratio', rate: 1 },
|
|
66
66
|
},
|
|
67
67
|
},
|
|
@@ -93,7 +93,7 @@ export const myAgent = new Agent({
|
|
|
93
93
|
id: 'my-agent',
|
|
94
94
|
name: 'My Agent',
|
|
95
95
|
instructions: 'You have access to interactive UI tools.',
|
|
96
|
-
model: '
|
|
96
|
+
model: 'openai/gpt-5-mini',
|
|
97
97
|
tools: { calculatorTool },
|
|
98
98
|
})
|
|
99
99
|
```
|
|
@@ -125,7 +125,7 @@ const mcpClient = new MCPClient({
|
|
|
125
125
|
const myAgent = new Agent({
|
|
126
126
|
id: 'my-agent',
|
|
127
127
|
name: 'My Agent',
|
|
128
|
-
model: '
|
|
128
|
+
model: 'openai/gpt-5-mini',
|
|
129
129
|
tools: await mcpClient.listTools(),
|
|
130
130
|
})
|
|
131
131
|
|
|
@@ -270,7 +270,7 @@ const mcpClient = new MCPClient({
|
|
|
270
270
|
const myAgent = new Agent({
|
|
271
271
|
id: 'my-agent',
|
|
272
272
|
name: 'My Agent',
|
|
273
|
-
model: '
|
|
273
|
+
model: 'openai/gpt-5-mini',
|
|
274
274
|
tools: await mcpClient.listTools(),
|
|
275
275
|
})
|
|
276
276
|
|
|
@@ -82,7 +82,7 @@ export const testAgent = new Agent({
|
|
|
82
82
|
- US National Weather Service
|
|
83
83
|
|
|
84
84
|
Answer questions using the information you find using the MCP Servers.`,
|
|
85
|
-
model: 'openai/gpt-5.
|
|
85
|
+
model: 'openai/gpt-5.5',
|
|
86
86
|
tools: await testMcpClient.listTools(),
|
|
87
87
|
})
|
|
88
88
|
```
|
|
@@ -45,7 +45,7 @@ const agent = new Agent({
|
|
|
45
45
|
id: 'test-agent',
|
|
46
46
|
name: 'Test Agent',
|
|
47
47
|
instructions: 'You are a helpful assistant',
|
|
48
|
-
model: 'openai/gpt-5.
|
|
48
|
+
model: 'openai/gpt-5.5',
|
|
49
49
|
memory: new Memory({
|
|
50
50
|
storage: new LibSQLStore({
|
|
51
51
|
id: 'memory-store',
|
|
@@ -95,7 +95,7 @@ import { openai } from '@ai-sdk/openai'
|
|
|
95
95
|
const agent = new Agent({
|
|
96
96
|
name: 'semantic-agent',
|
|
97
97
|
instructions: 'You are a helpful assistant with semantic memory',
|
|
98
|
-
model: 'openai/gpt-5.
|
|
98
|
+
model: 'openai/gpt-5.5',
|
|
99
99
|
memory: new Memory({
|
|
100
100
|
storage: new LibSQLStore({
|
|
101
101
|
id: 'memory-store',
|
|
@@ -148,7 +148,7 @@ import { openai } from '@ai-sdk/openai'
|
|
|
148
148
|
const agent = new Agent({
|
|
149
149
|
name: 'working-memory-agent',
|
|
150
150
|
instructions: 'You are an assistant with working memory',
|
|
151
|
-
model: 'openai/gpt-5.
|
|
151
|
+
model: 'openai/gpt-5.5',
|
|
152
152
|
memory: new Memory({
|
|
153
153
|
storage: new LibSQLStore({
|
|
154
154
|
id: 'memory-store',
|
|
@@ -180,7 +180,7 @@ const customMessageHistory = new MessageHistory({
|
|
|
180
180
|
const agent = new Agent({
|
|
181
181
|
name: 'custom-memory-agent',
|
|
182
182
|
instructions: 'You are a helpful assistant',
|
|
183
|
-
model: 'openai/gpt-5.
|
|
183
|
+
model: 'openai/gpt-5.5',
|
|
184
184
|
memory: new Memory({
|
|
185
185
|
storage: new LibSQLStore({ id: 'memory-store', url: 'file:memory.db' }),
|
|
186
186
|
lastMessages: 10, // This would normally add MessageHistory(10)
|
|
@@ -250,7 +250,7 @@ const contentBlocker = {
|
|
|
250
250
|
const agent = new Agent({
|
|
251
251
|
name: 'safe-agent',
|
|
252
252
|
instructions: 'You are a helpful assistant',
|
|
253
|
-
model: 'openai/gpt-5.
|
|
253
|
+
model: 'openai/gpt-5.5',
|
|
254
254
|
memory: new Memory({ lastMessages: 10 }),
|
|
255
255
|
// Your guardrail runs BEFORE memory saves
|
|
256
256
|
outputProcessors: [contentBlocker],
|
|
@@ -289,7 +289,7 @@ const inputValidator = {
|
|
|
289
289
|
const agent = new Agent({
|
|
290
290
|
name: 'validated-agent',
|
|
291
291
|
instructions: 'You are a helpful assistant',
|
|
292
|
-
model: 'openai/gpt-5.
|
|
292
|
+
model: 'openai/gpt-5.5',
|
|
293
293
|
memory: new Memory({ lastMessages: 10 }),
|
|
294
294
|
// Your guardrail runs AFTER memory loads history
|
|
295
295
|
inputProcessors: [inputValidator],
|
|
@@ -65,7 +65,7 @@ const memory = new Memory({
|
|
|
65
65
|
export const collabAgent = new Agent({
|
|
66
66
|
id: 'collab',
|
|
67
67
|
name: 'CollabAgent',
|
|
68
|
-
model: '
|
|
68
|
+
model: 'openai/gpt-5-mini',
|
|
69
69
|
memory,
|
|
70
70
|
instructions: `
|
|
71
71
|
You are a collaborative document assistant. Multiple users talk to you in the SAME thread.
|
|
@@ -30,7 +30,7 @@ const agent = new Agent({
|
|
|
30
30
|
id: 'support-agent',
|
|
31
31
|
name: 'SupportAgent',
|
|
32
32
|
instructions: 'You are a helpful support agent.',
|
|
33
|
-
model: 'openai/gpt-5.
|
|
33
|
+
model: 'openai/gpt-5.5',
|
|
34
34
|
memory: new Memory({
|
|
35
35
|
storage: new LibSQLStore({
|
|
36
36
|
id: 'agent-storage',
|
|
@@ -41,6 +41,7 @@ Each provider page includes installation instructions, configuration parameters,
|
|
|
41
41
|
- [DynamoDB](https://mastra.ai/reference/storage/dynamodb)
|
|
42
42
|
- [LanceDB](https://mastra.ai/reference/storage/lance)
|
|
43
43
|
- [Microsoft SQL Server](https://mastra.ai/reference/storage/mssql)
|
|
44
|
+
- [Google Cloud Spanner](https://mastra.ai/reference/storage/spanner)
|
|
44
45
|
|
|
45
46
|
> **Tip:** libSQL is the easiest way to get started because it doesn’t require running a separate database server.
|
|
46
47
|
|
|
@@ -179,7 +180,7 @@ export const agent = new Agent({
|
|
|
179
180
|
memory: new Memory({
|
|
180
181
|
options: {
|
|
181
182
|
generateTitle: {
|
|
182
|
-
model: '
|
|
183
|
+
model: 'openai/gpt-5-mini',
|
|
183
184
|
instructions: 'Generate a 1 word title',
|
|
184
185
|
},
|
|
185
186
|
},
|
|
@@ -214,7 +214,7 @@ const prompt = await exporter.client.prompt.get('customer-support', { type: 'tex
|
|
|
214
214
|
export const supportAgent = new Agent({
|
|
215
215
|
name: 'support-agent',
|
|
216
216
|
instructions: prompt.compile(), // Use the prompt text from Langfuse
|
|
217
|
-
model: 'openai/gpt-5.
|
|
217
|
+
model: 'openai/gpt-5.5',
|
|
218
218
|
defaultGenerateOptions: {
|
|
219
219
|
tracingOptions: buildTracingOptions(
|
|
220
220
|
withLangfusePrompt({ name: prompt.name, version: prompt.version }),
|
|
@@ -143,7 +143,7 @@ export const supportAgent = new Agent({
|
|
|
143
143
|
id: 'support-agent',
|
|
144
144
|
name: 'support-agent',
|
|
145
145
|
instructions: 'You are a helpful support agent.',
|
|
146
|
-
model: 'openai/gpt-5.
|
|
146
|
+
model: 'openai/gpt-5.5',
|
|
147
147
|
defaultOptions: {
|
|
148
148
|
tracingOptions: buildTracingOptions(withLangsmithMetadata({ projectName: 'customer-support' })),
|
|
149
149
|
},
|
|
@@ -163,7 +163,7 @@ export const supportAgent = new Agent({
|
|
|
163
163
|
id: 'support-agent',
|
|
164
164
|
name: 'support-agent',
|
|
165
165
|
instructions: 'You are a helpful support agent.',
|
|
166
|
-
model: 'openai/gpt-5.
|
|
166
|
+
model: 'openai/gpt-5.5',
|
|
167
167
|
defaultOptions: ({ requestContext }) => {
|
|
168
168
|
const userTier = requestContext?.get('user-tier') as string
|
|
169
169
|
const userId = requestContext?.get('user-id') as string
|
|
@@ -75,7 +75,7 @@ const ragAgent = new Agent({
|
|
|
75
75
|
instructions: `You are a helpful assistant that answers questions based on the provided context.
|
|
76
76
|
When answering questions, use the graph query tool to find relevant information and relationships.
|
|
77
77
|
Base your answers on the context provided by the tool, and clearly state if the context doesn't contain enough information.`,
|
|
78
|
-
model: 'openai/gpt-5.
|
|
78
|
+
model: 'openai/gpt-5.5',
|
|
79
79
|
tools: {
|
|
80
80
|
graphQueryTool,
|
|
81
81
|
},
|
|
@@ -197,7 +197,7 @@ const agent = new Agent({
|
|
|
197
197
|
name: 'RAG Agent',
|
|
198
198
|
instructions: `Use vector search for simple fact-finding queries.
|
|
199
199
|
Use graph search when you need to understand relationships or find connected information.`,
|
|
200
|
-
model: 'openai/gpt-5.
|
|
200
|
+
model: 'openai/gpt-5.5',
|
|
201
201
|
tools: {
|
|
202
202
|
vectorQueryTool,
|
|
203
203
|
graphQueryTool,
|
|
@@ -272,7 +272,7 @@ import { PGVECTOR_PROMPT } from '@mastra/pg'
|
|
|
272
272
|
export const ragAgent = new Agent({
|
|
273
273
|
id: 'rag-agent',
|
|
274
274
|
name: 'RAG Agent',
|
|
275
|
-
model: 'openai/gpt-5.
|
|
275
|
+
model: 'openai/gpt-5.5',
|
|
276
276
|
instructions: `
|
|
277
277
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
278
278
|
${PGVECTOR_PROMPT}
|
|
@@ -289,7 +289,7 @@ import { PINECONE_PROMPT } from '@mastra/pinecone'
|
|
|
289
289
|
export const ragAgent = new Agent({
|
|
290
290
|
id: 'rag-agent',
|
|
291
291
|
name: 'RAG Agent',
|
|
292
|
-
model: 'openai/gpt-5.
|
|
292
|
+
model: 'openai/gpt-5.5',
|
|
293
293
|
instructions: `
|
|
294
294
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
295
295
|
${PINECONE_PROMPT}
|
|
@@ -306,7 +306,7 @@ import { QDRANT_PROMPT } from '@mastra/qdrant'
|
|
|
306
306
|
export const ragAgent = new Agent({
|
|
307
307
|
id: 'rag-agent',
|
|
308
308
|
name: 'RAG Agent',
|
|
309
|
-
model: 'openai/gpt-5.
|
|
309
|
+
model: 'openai/gpt-5.5',
|
|
310
310
|
instructions: `
|
|
311
311
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
312
312
|
${QDRANT_PROMPT}
|
|
@@ -323,7 +323,7 @@ import { CHROMA_PROMPT } from '@mastra/chroma'
|
|
|
323
323
|
export const ragAgent = new Agent({
|
|
324
324
|
id: 'rag-agent',
|
|
325
325
|
name: 'RAG Agent',
|
|
326
|
-
model: 'openai/gpt-5.
|
|
326
|
+
model: 'openai/gpt-5.5',
|
|
327
327
|
instructions: `
|
|
328
328
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
329
329
|
${CHROMA_PROMPT}
|
|
@@ -340,7 +340,7 @@ import { ASTRA_PROMPT } from '@mastra/astra'
|
|
|
340
340
|
export const ragAgent = new Agent({
|
|
341
341
|
id: 'rag-agent',
|
|
342
342
|
name: 'RAG Agent',
|
|
343
|
-
model: 'openai/gpt-5.
|
|
343
|
+
model: 'openai/gpt-5.5',
|
|
344
344
|
instructions: `
|
|
345
345
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
346
346
|
${ASTRA_PROMPT}
|
|
@@ -357,7 +357,7 @@ import { LIBSQL_PROMPT } from '@mastra/libsql'
|
|
|
357
357
|
export const ragAgent = new Agent({
|
|
358
358
|
id: 'rag-agent',
|
|
359
359
|
name: 'RAG Agent',
|
|
360
|
-
model: 'openai/gpt-5.
|
|
360
|
+
model: 'openai/gpt-5.5',
|
|
361
361
|
instructions: `
|
|
362
362
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
363
363
|
${LIBSQL_PROMPT}
|
|
@@ -374,7 +374,7 @@ import { UPSTASH_PROMPT } from '@mastra/upstash'
|
|
|
374
374
|
export const ragAgent = new Agent({
|
|
375
375
|
id: 'rag-agent',
|
|
376
376
|
name: 'RAG Agent',
|
|
377
|
-
model: 'openai/gpt-5.
|
|
377
|
+
model: 'openai/gpt-5.5',
|
|
378
378
|
instructions: `
|
|
379
379
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
380
380
|
${UPSTASH_PROMPT}
|
|
@@ -391,7 +391,7 @@ import { VECTORIZE_PROMPT } from '@mastra/vectorize'
|
|
|
391
391
|
export const ragAgent = new Agent({
|
|
392
392
|
id: 'rag-agent',
|
|
393
393
|
name: 'RAG Agent',
|
|
394
|
-
model: 'openai/gpt-5.
|
|
394
|
+
model: 'openai/gpt-5.5',
|
|
395
395
|
instructions: `
|
|
396
396
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
397
397
|
${VECTORIZE_PROMPT}
|
|
@@ -408,7 +408,7 @@ import { MONGODB_PROMPT } from '@mastra/mongodb'
|
|
|
408
408
|
export const ragAgent = new Agent({
|
|
409
409
|
id: 'rag-agent',
|
|
410
410
|
name: 'RAG Agent',
|
|
411
|
-
model: 'openai/gpt-5.
|
|
411
|
+
model: 'openai/gpt-5.5',
|
|
412
412
|
instructions: `
|
|
413
413
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
414
414
|
${MONGODB_PROMPT}
|
|
@@ -425,7 +425,7 @@ import { OPENSEARCH_PROMPT } from '@mastra/opensearch'
|
|
|
425
425
|
export const ragAgent = new Agent({
|
|
426
426
|
id: 'rag-agent',
|
|
427
427
|
name: 'RAG Agent',
|
|
428
|
-
model: 'openai/gpt-5.
|
|
428
|
+
model: 'openai/gpt-5.5',
|
|
429
429
|
instructions: `
|
|
430
430
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
431
431
|
${OPENSEARCH_PROMPT}
|
|
@@ -442,7 +442,7 @@ import { S3VECTORS_PROMPT } from '@mastra/s3vectors'
|
|
|
442
442
|
export const ragAgent = new Agent({
|
|
443
443
|
id: 'rag-agent',
|
|
444
444
|
name: 'RAG Agent',
|
|
445
|
-
model: 'openai/gpt-5.
|
|
445
|
+
model: 'openai/gpt-5.5',
|
|
446
446
|
instructions: `
|
|
447
447
|
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
448
448
|
${S3VECTORS_PROMPT}
|
|
@@ -474,7 +474,7 @@ const initialResults = await pgVector.query({
|
|
|
474
474
|
// Create a relevance scorer
|
|
475
475
|
const relevanceProvider = new MastraAgentRelevanceScorer(
|
|
476
476
|
'relevance-scorer',
|
|
477
|
-
'openai/gpt-5.
|
|
477
|
+
'openai/gpt-5.5',
|
|
478
478
|
)
|
|
479
479
|
|
|
480
480
|
// Re-rank the results
|
|
@@ -213,6 +213,8 @@ When an FGA provider is configured, Mastra automatically checks authorization at
|
|
|
213
213
|
| Stored resource routes | Stored resource permission for the route action | Stored resource type | Route record ID, or the stored-resource scope for collection routes |
|
|
214
214
|
| HTTP resource routes | Configured per route | Configured per route | Configured per route |
|
|
215
215
|
|
|
216
|
+
For OAuth-protected MCP servers, HTTP MCP transports pass authenticated data as `extra.authInfo`. If an `MCPServer` is registered on an FGA-enabled Mastra instance, configure `mapAuthInfoToUser` so Mastra can set `requestContext.get('user')` before checking `tools/list` and `tools/call`. See [MCPServer authentication context](https://mastra.ai/reference/tools/mcp-server).
|
|
217
|
+
|
|
216
218
|
Direct SDK calls to `createRun().start()`, `resume()`, or `restart()` are not independently checked by core FGA in this release. Make those calls from a protected route or guard them in application code. Pass a `requestContext` with an authenticated user when invoking protected entry points directly.
|
|
217
219
|
|
|
218
220
|
Core agent, internal workflow, tool, and memory checks also pass `requestContext` and action metadata to the FGA provider. Route checks pass `requestContext`. Thread checks pass the owning `resourceId` when available.
|
|
@@ -235,7 +235,7 @@ export const colorAgent = new Agent({
|
|
|
235
235
|
instructions: `You are a helpful CSS assistant.
|
|
236
236
|
You can change the background color of web pages.
|
|
237
237
|
Respond with a hex reference for the color requested by the user`,
|
|
238
|
-
model: 'openai/gpt-5.
|
|
238
|
+
model: 'openai/gpt-5.5',
|
|
239
239
|
})
|
|
240
240
|
```
|
|
241
241
|
|
|
@@ -155,7 +155,7 @@ export const dynamicAgent = new Agent({
|
|
|
155
155
|
|
|
156
156
|
return `${basePrompt} ${localeInstructions}`.trim()
|
|
157
157
|
},
|
|
158
|
-
model: 'openai/gpt-5.
|
|
158
|
+
model: 'openai/gpt-5.5',
|
|
159
159
|
})
|
|
160
160
|
```
|
|
161
161
|
|
|
@@ -182,7 +182,7 @@ export const registryAgent = new Agent({
|
|
|
182
182
|
|
|
183
183
|
return prompt.content
|
|
184
184
|
},
|
|
185
|
-
model: 'openai/gpt-5.
|
|
185
|
+
model: 'openai/gpt-5.5',
|
|
186
186
|
})
|
|
187
187
|
```
|
|
188
188
|
|
|
@@ -336,7 +336,7 @@ export const validatedAgent = new Agent({
|
|
|
336
336
|
|
|
337
337
|
return `You are helping user ${userId}`
|
|
338
338
|
},
|
|
339
|
-
model: 'openai/gpt-5.
|
|
339
|
+
model: 'openai/gpt-5.5',
|
|
340
340
|
})
|
|
341
341
|
```
|
|
342
342
|
|
|
@@ -16,7 +16,7 @@ const voiceAgent = new Agent({
|
|
|
16
16
|
id: 'voice-agent',
|
|
17
17
|
name: 'Voice Agent',
|
|
18
18
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
19
|
-
model: 'openai/gpt-5.
|
|
19
|
+
model: 'openai/gpt-5.5',
|
|
20
20
|
voice: new OpenAIVoice(),
|
|
21
21
|
})
|
|
22
22
|
```
|
|
@@ -40,7 +40,7 @@ const voiceAgent = new Agent({
|
|
|
40
40
|
id: 'voice-agent',
|
|
41
41
|
name: 'Voice Agent',
|
|
42
42
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
43
|
-
model: 'openai/gpt-5.
|
|
43
|
+
model: 'openai/gpt-5.5',
|
|
44
44
|
voice: new OpenAIVoice(),
|
|
45
45
|
})
|
|
46
46
|
|
|
@@ -68,7 +68,7 @@ const voiceAgent = new Agent({
|
|
|
68
68
|
id: 'voice-agent',
|
|
69
69
|
name: 'Voice Agent',
|
|
70
70
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
71
|
-
model: 'openai/gpt-5.
|
|
71
|
+
model: 'openai/gpt-5.5',
|
|
72
72
|
voice: new AzureVoice(),
|
|
73
73
|
})
|
|
74
74
|
|
|
@@ -95,7 +95,7 @@ const voiceAgent = new Agent({
|
|
|
95
95
|
id: 'voice-agent',
|
|
96
96
|
name: 'Voice Agent',
|
|
97
97
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
98
|
-
model: 'openai/gpt-5.
|
|
98
|
+
model: 'openai/gpt-5.5',
|
|
99
99
|
voice: new ElevenLabsVoice(),
|
|
100
100
|
})
|
|
101
101
|
|
|
@@ -122,7 +122,7 @@ const voiceAgent = new Agent({
|
|
|
122
122
|
id: 'voice-agent',
|
|
123
123
|
name: 'Voice Agent',
|
|
124
124
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
125
|
-
model: 'openai/gpt-5.
|
|
125
|
+
model: 'openai/gpt-5.5',
|
|
126
126
|
voice: new PlayAIVoice(),
|
|
127
127
|
})
|
|
128
128
|
|
|
@@ -149,7 +149,7 @@ const voiceAgent = new Agent({
|
|
|
149
149
|
id: 'voice-agent',
|
|
150
150
|
name: 'Voice Agent',
|
|
151
151
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
152
|
-
model: 'openai/gpt-5.
|
|
152
|
+
model: 'openai/gpt-5.5',
|
|
153
153
|
voice: new GoogleVoice(),
|
|
154
154
|
})
|
|
155
155
|
|
|
@@ -176,7 +176,7 @@ const voiceAgent = new Agent({
|
|
|
176
176
|
id: 'voice-agent',
|
|
177
177
|
name: 'Voice Agent',
|
|
178
178
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
179
|
-
model: 'openai/gpt-5.
|
|
179
|
+
model: 'openai/gpt-5.5',
|
|
180
180
|
voice: new CloudflareVoice(),
|
|
181
181
|
})
|
|
182
182
|
|
|
@@ -203,7 +203,7 @@ const voiceAgent = new Agent({
|
|
|
203
203
|
id: 'voice-agent',
|
|
204
204
|
name: 'Voice Agent',
|
|
205
205
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
206
|
-
model: 'openai/gpt-5.
|
|
206
|
+
model: 'openai/gpt-5.5',
|
|
207
207
|
voice: new DeepgramVoice(),
|
|
208
208
|
})
|
|
209
209
|
|
|
@@ -230,7 +230,7 @@ const voiceAgent = new Agent({
|
|
|
230
230
|
id: 'voice-agent',
|
|
231
231
|
name: 'Voice Agent',
|
|
232
232
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
233
|
-
model: 'openai/gpt-5.
|
|
233
|
+
model: 'openai/gpt-5.5',
|
|
234
234
|
voice: new InworldVoice(),
|
|
235
235
|
})
|
|
236
236
|
|
|
@@ -257,7 +257,7 @@ const voiceAgent = new Agent({
|
|
|
257
257
|
id: 'voice-agent',
|
|
258
258
|
name: 'Voice Agent',
|
|
259
259
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
260
|
-
model: 'openai/gpt-5.
|
|
260
|
+
model: 'openai/gpt-5.5',
|
|
261
261
|
voice: new SpeechifyVoice(),
|
|
262
262
|
})
|
|
263
263
|
|
|
@@ -284,7 +284,7 @@ const voiceAgent = new Agent({
|
|
|
284
284
|
id: 'voice-agent',
|
|
285
285
|
name: 'Voice Agent',
|
|
286
286
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
287
|
-
model: 'openai/gpt-5.
|
|
287
|
+
model: 'openai/gpt-5.5',
|
|
288
288
|
voice: new SarvamVoice(),
|
|
289
289
|
})
|
|
290
290
|
|
|
@@ -311,7 +311,7 @@ const voiceAgent = new Agent({
|
|
|
311
311
|
id: 'voice-agent',
|
|
312
312
|
name: 'Voice Agent',
|
|
313
313
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
314
|
-
model: 'openai/gpt-5.
|
|
314
|
+
model: 'openai/gpt-5.5',
|
|
315
315
|
voice: new MurfVoice(),
|
|
316
316
|
})
|
|
317
317
|
|
|
@@ -346,7 +346,7 @@ const voiceAgent = new Agent({
|
|
|
346
346
|
id: 'voice-agent',
|
|
347
347
|
name: 'Voice Agent',
|
|
348
348
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
349
|
-
model: 'openai/gpt-5.
|
|
349
|
+
model: 'openai/gpt-5.5',
|
|
350
350
|
voice: new OpenAIVoice(),
|
|
351
351
|
})
|
|
352
352
|
|
|
@@ -375,7 +375,7 @@ const voiceAgent = new Agent({
|
|
|
375
375
|
id: 'voice-agent',
|
|
376
376
|
name: 'Voice Agent',
|
|
377
377
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
378
|
-
model: 'openai/gpt-5.
|
|
378
|
+
model: 'openai/gpt-5.5',
|
|
379
379
|
voice: new AzureVoice(),
|
|
380
380
|
})
|
|
381
381
|
|
|
@@ -403,7 +403,7 @@ const voiceAgent = new Agent({
|
|
|
403
403
|
id: 'voice-agent',
|
|
404
404
|
name: 'Voice Agent',
|
|
405
405
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
406
|
-
model: 'openai/gpt-5.
|
|
406
|
+
model: 'openai/gpt-5.5',
|
|
407
407
|
voice: new ElevenLabsVoice(),
|
|
408
408
|
})
|
|
409
409
|
|
|
@@ -431,7 +431,7 @@ const voiceAgent = new Agent({
|
|
|
431
431
|
id: 'voice-agent',
|
|
432
432
|
name: 'Voice Agent',
|
|
433
433
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
434
|
-
model: 'openai/gpt-5.
|
|
434
|
+
model: 'openai/gpt-5.5',
|
|
435
435
|
voice: new GoogleVoice(),
|
|
436
436
|
})
|
|
437
437
|
|
|
@@ -459,7 +459,7 @@ const voiceAgent = new Agent({
|
|
|
459
459
|
id: 'voice-agent',
|
|
460
460
|
name: 'Voice Agent',
|
|
461
461
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
462
|
-
model: 'openai/gpt-5.
|
|
462
|
+
model: 'openai/gpt-5.5',
|
|
463
463
|
voice: new CloudflareVoice(),
|
|
464
464
|
})
|
|
465
465
|
|
|
@@ -487,7 +487,7 @@ const voiceAgent = new Agent({
|
|
|
487
487
|
id: 'voice-agent',
|
|
488
488
|
name: 'Voice Agent',
|
|
489
489
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
490
|
-
model: 'openai/gpt-5.
|
|
490
|
+
model: 'openai/gpt-5.5',
|
|
491
491
|
voice: new DeepgramVoice(),
|
|
492
492
|
})
|
|
493
493
|
|
|
@@ -515,7 +515,7 @@ const voiceAgent = new Agent({
|
|
|
515
515
|
id: 'voice-agent',
|
|
516
516
|
name: 'Voice Agent',
|
|
517
517
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
518
|
-
model: 'openai/gpt-5.
|
|
518
|
+
model: 'openai/gpt-5.5',
|
|
519
519
|
voice: new InworldVoice(),
|
|
520
520
|
})
|
|
521
521
|
|
|
@@ -543,7 +543,7 @@ const voiceAgent = new Agent({
|
|
|
543
543
|
id: 'voice-agent',
|
|
544
544
|
name: 'Voice Agent',
|
|
545
545
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
546
|
-
model: 'openai/gpt-5.
|
|
546
|
+
model: 'openai/gpt-5.5',
|
|
547
547
|
voice: new SarvamVoice(),
|
|
548
548
|
})
|
|
549
549
|
|
|
@@ -575,7 +575,7 @@ const voiceAgent = new Agent({
|
|
|
575
575
|
id: 'voice-agent',
|
|
576
576
|
name: 'Voice Agent',
|
|
577
577
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
578
|
-
model: 'openai/gpt-5.
|
|
578
|
+
model: 'openai/gpt-5.5',
|
|
579
579
|
voice: new OpenAIRealtimeVoice(),
|
|
580
580
|
})
|
|
581
581
|
|
|
@@ -605,7 +605,7 @@ const voiceAgent = new Agent({
|
|
|
605
605
|
id: 'voice-agent',
|
|
606
606
|
name: 'Voice Agent',
|
|
607
607
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
608
|
-
model: 'openai/gpt-5.
|
|
608
|
+
model: 'openai/gpt-5.5',
|
|
609
609
|
voice: new GeminiLiveVoice({
|
|
610
610
|
// Live API mode
|
|
611
611
|
apiKey: process.env.GOOGLE_API_KEY,
|
|
@@ -654,7 +654,7 @@ const voiceAgent = new Agent({
|
|
|
654
654
|
id: 'voice-agent',
|
|
655
655
|
name: 'Voice Agent',
|
|
656
656
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
657
|
-
model: 'openai/gpt-5.
|
|
657
|
+
model: 'openai/gpt-5.5',
|
|
658
658
|
voice: new NovaSonicVoice({
|
|
659
659
|
region: 'us-east-1',
|
|
660
660
|
speaker: 'matthew',
|
|
@@ -697,7 +697,7 @@ const voiceAgent = new Agent({
|
|
|
697
697
|
id: 'voice-agent',
|
|
698
698
|
name: 'Voice Agent',
|
|
699
699
|
instructions: 'You are a voice assistant that can help users with their tasks.',
|
|
700
|
-
model: 'openai/gpt-5.
|
|
700
|
+
model: 'openai/gpt-5.5',
|
|
701
701
|
voice: new InworldRealtimeVoice({
|
|
702
702
|
apiKey: process.env.INWORLD_API_KEY,
|
|
703
703
|
model: 'inworld/models/gemma-4-26b-a4b-it',
|
|
@@ -1132,7 +1132,7 @@ const voiceAgent = new Agent({
|
|
|
1132
1132
|
id: 'aisdk-voice-agent',
|
|
1133
1133
|
name: 'AI SDK Voice Agent',
|
|
1134
1134
|
instructions: 'You are a helpful assistant with voice capabilities.',
|
|
1135
|
-
model: 'openai/gpt-5.
|
|
1135
|
+
model: 'openai/gpt-5.5',
|
|
1136
1136
|
voice,
|
|
1137
1137
|
})
|
|
1138
1138
|
```
|