@mastra/mcp-docs-server 1.1.41 → 1.1.42-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agent-builder/access-control.md +97 -0
- package/.docs/docs/agent-builder/browser.md +61 -0
- package/.docs/docs/agent-builder/channels.md +76 -0
- package/.docs/docs/agent-builder/configuration.md +147 -0
- package/.docs/docs/agent-builder/deploying.md +121 -0
- package/.docs/docs/agent-builder/memory.md +65 -0
- package/.docs/docs/agent-builder/model-policy.md +48 -0
- package/.docs/docs/agent-builder/overview.md +97 -0
- package/.docs/docs/agent-builder/skill-registries.md +31 -0
- package/.docs/docs/agent-builder/workspace.md +60 -0
- package/.docs/docs/agents/a2a.md +1 -1
- package/.docs/docs/agents/acp.md +4 -4
- package/.docs/docs/agents/adding-voice.md +37 -6
- package/.docs/docs/agents/agent-approval.md +15 -1
- package/.docs/docs/agents/background-tasks.md +2 -2
- package/.docs/docs/agents/channels.md +3 -1
- package/.docs/docs/agents/code-mode.md +163 -0
- 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 +150 -73
- 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 +70 -8
- 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/getting-started/manual-install.md +1 -1
- 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/observational-memory.md +19 -0
- package/.docs/docs/memory/semantic-recall.md +2 -2
- package/.docs/docs/memory/storage.md +2 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -0
- package/.docs/docs/observability/metrics/querying.md +292 -0
- 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 +4 -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 +86 -24
- package/.docs/docs/voice/speech-to-speech.md +55 -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 +5 -3
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +1 -1
- package/.docs/guides/deployment/inngest.md +69 -0
- 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 +6 -6
- 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/models/embeddings.md +2 -2
- package/.docs/reference/agents/agent.md +60 -21
- package/.docs/reference/agents/channels.md +48 -6
- 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/client-js/agent-builder.md +161 -0
- package/.docs/reference/client-js/agents.md +19 -2
- package/.docs/reference/client-js/mastra-client.md +4 -0
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +74 -0
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +77 -0
- package/.docs/reference/editor/agent-builder/builder-models.md +64 -0
- package/.docs/reference/editor/blob-store-provider.md +59 -0
- package/.docs/reference/editor/browser-provider.md +75 -0
- package/.docs/reference/editor/filesystem-provider.md +62 -0
- package/.docs/reference/editor/mastra-editor.md +61 -1
- package/.docs/reference/editor/processor-provider.md +64 -0
- package/.docs/reference/editor/sandbox-provider.md +61 -0
- package/.docs/reference/editor/storage-browser-ref.md +80 -0
- package/.docs/reference/editor/storage-workspace-ref.md +93 -0
- 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/create-scorer.md +2 -0
- 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/index.md +15 -0
- package/.docs/reference/memory/memory-class.md +3 -3
- package/.docs/reference/memory/observational-memory.md +6 -4
- package/.docs/reference/memory/serialized-memory-config.md +72 -0
- package/.docs/reference/observability/metrics/automatic-metrics.md +7 -1
- 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 +33 -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/server/routes.md +108 -9
- 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 +3 -3
- package/.docs/reference/tools/mcp-client.md +53 -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 +3 -1
- package/.docs/reference/vectors/upstash.md +1 -1
- package/.docs/reference/voice/google-gemini-live.md +15 -2
- package/.docs/reference/voice/inworld-realtime.md +353 -0
- package/.docs/reference/voice/inworld.md +2 -0
- package/.docs/reference/voice/voice.addInstructions.md +1 -1
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +202 -0
- package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
- package/.docs/reference/workspace/azure-blob-filesystem.md +1 -1
- package/.docs/reference/workspace/blaxel-sandbox.md +3 -0
- package/.docs/reference/workspace/docker-sandbox.md +4 -2
- 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/.docs/reference/workspace/vercel-microvm-sandbox.md +199 -0
- package/.docs/reference/workspace/vercel.md +2 -0
- package/CHANGELOG.md +72 -0
- package/package.json +8 -6
|
@@ -61,7 +61,7 @@ describe('Agent Noise Resistance Tests', () => {
|
|
|
61
61
|
|
|
62
62
|
// Step 4: Evaluate using noise sensitivity scorer
|
|
63
63
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
64
|
-
model: 'openai/gpt-5.
|
|
64
|
+
model: 'openai/gpt-5.5',
|
|
65
65
|
options: {
|
|
66
66
|
baselineResponse,
|
|
67
67
|
noisyQuery,
|
|
@@ -256,7 +256,7 @@ describe('Agent Noise Resistance CI Tests', () => {
|
|
|
256
256
|
|
|
257
257
|
// Evaluate using noise sensitivity scorer
|
|
258
258
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
259
|
-
model: 'openai/gpt-5.
|
|
259
|
+
model: 'openai/gpt-5.5',
|
|
260
260
|
options: {
|
|
261
261
|
baselineResponse: testCase.baselineResponse,
|
|
262
262
|
noisyQuery: testCase.noisyQuery,
|
|
@@ -291,7 +291,7 @@ This example shows an agent that completely resists misinformation in a test sce
|
|
|
291
291
|
import { createNoiseSensitivityScorerLLM } from '@mastra/evals'
|
|
292
292
|
|
|
293
293
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
294
|
-
model: 'openai/gpt-5.
|
|
294
|
+
model: 'openai/gpt-5.5',
|
|
295
295
|
options: {
|
|
296
296
|
baselineResponse:
|
|
297
297
|
'Regular exercise improves cardiovascular health, strengthens muscles, and enhances mental wellbeing.',
|
|
@@ -337,7 +337,7 @@ This example shows an agent partially distracted by irrelevant requests:
|
|
|
337
337
|
import { createNoiseSensitivityScorerLLM } from '@mastra/evals/scorers/prebuilt'
|
|
338
338
|
|
|
339
339
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
340
|
-
model: 'openai/gpt-5.
|
|
340
|
+
model: 'openai/gpt-5.5',
|
|
341
341
|
options: {
|
|
342
342
|
baselineResponse:
|
|
343
343
|
'To bake a cake: Mix flour, sugar, eggs, and butter. Bake at 350°F for 30 minutes.',
|
|
@@ -382,7 +382,7 @@ This example shows an agent that incorporates misinformation:
|
|
|
382
382
|
import { createNoiseSensitivityScorerLLM } from '@mastra/evals'
|
|
383
383
|
|
|
384
384
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
385
|
-
model: 'openai/gpt-5.
|
|
385
|
+
model: 'openai/gpt-5.5',
|
|
386
386
|
options: {
|
|
387
387
|
baselineResponse: 'Climate change is caused by greenhouse gas emissions from human activities.',
|
|
388
388
|
noisyQuery:
|
|
@@ -428,7 +428,7 @@ import { createNoiseSensitivityScorerLLM } from '@mastra/evals'
|
|
|
428
428
|
|
|
429
429
|
// Lenient scoring - more forgiving of minor issues
|
|
430
430
|
const lenientScorer = createNoiseSensitivityScorerLLM({
|
|
431
|
-
model: 'openai/gpt-5.
|
|
431
|
+
model: 'openai/gpt-5.5',
|
|
432
432
|
options: {
|
|
433
433
|
baselineResponse: 'Python is a high-level programming language.',
|
|
434
434
|
noisyQuery: 'What is Python? Also, snakes are dangerous!',
|
|
@@ -448,7 +448,7 @@ const lenientScorer = createNoiseSensitivityScorerLLM({
|
|
|
448
448
|
|
|
449
449
|
// Strict scoring - harsh on any deviation
|
|
450
450
|
const strictScorer = createNoiseSensitivityScorerLLM({
|
|
451
|
-
model: 'openai/gpt-5.
|
|
451
|
+
model: 'openai/gpt-5.5',
|
|
452
452
|
options: {
|
|
453
453
|
baselineResponse: 'Python is a high-level programming language.',
|
|
454
454
|
noisyQuery: 'What is Python? Also, snakes are dangerous!',
|
|
@@ -499,7 +499,7 @@ async function evaluateNoiseResistance(testCases) {
|
|
|
499
499
|
|
|
500
500
|
for (const testCase of testCases) {
|
|
501
501
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
502
|
-
model: 'openai/gpt-5.
|
|
502
|
+
model: 'openai/gpt-5.5',
|
|
503
503
|
options: {
|
|
504
504
|
baselineResponse: testCase.baseline,
|
|
505
505
|
noisyQuery: testCase.noisyQuery,
|
|
@@ -546,9 +546,9 @@ import { createNoiseSensitivityScorerLLM } from '@mastra/evals'
|
|
|
546
546
|
|
|
547
547
|
async function compareModelRobustness() {
|
|
548
548
|
const models = [
|
|
549
|
-
{ name: 'GPT-5.4', model: 'openai/gpt-5.
|
|
549
|
+
{ name: 'GPT-5.4', model: 'openai/gpt-5.5' },
|
|
550
550
|
{ name: 'GPT-5.4-mini', model: 'openai/gpt-5-mini' },
|
|
551
|
-
{ name: 'Claude', model: 'anthropic/claude-opus-4-
|
|
551
|
+
{ name: 'Claude', model: 'anthropic/claude-opus-4-7' },
|
|
552
552
|
]
|
|
553
553
|
|
|
554
554
|
const testScenario = {
|
|
@@ -598,7 +598,7 @@ Include noise sensitivity tests in your security test suite to validate prompt i
|
|
|
598
598
|
import { createNoiseSensitivityScorerLLM } from '@mastra/evals'
|
|
599
599
|
|
|
600
600
|
const scorer = createNoiseSensitivityScorerLLM({
|
|
601
|
-
model: 'openai/gpt-5.
|
|
601
|
+
model: 'openai/gpt-5.5',
|
|
602
602
|
options: {
|
|
603
603
|
baselineResponse: 'I can help you with programming questions.',
|
|
604
604
|
noisyQuery:
|
|
@@ -60,7 +60,7 @@ You can customize the Prompt Alignment Scorer by adjusting the scale parameter a
|
|
|
60
60
|
|
|
61
61
|
```typescript
|
|
62
62
|
const scorer = createPromptAlignmentScorerLLM({
|
|
63
|
-
model: 'openai/gpt-5.
|
|
63
|
+
model: 'openai/gpt-5.5',
|
|
64
64
|
options: {
|
|
65
65
|
scale: 10, // Score from 0-10 instead of 0-1
|
|
66
66
|
evaluationMode: 'both', // 'user', 'system', or 'both' (default)
|
|
@@ -221,24 +221,24 @@ Measure how well your AI agents follow user instructions:
|
|
|
221
221
|
const agent = new Agent({
|
|
222
222
|
name: 'CodingAssistant',
|
|
223
223
|
instructions: 'You are a helpful coding assistant. Always provide working code examples.',
|
|
224
|
-
model: 'openai/gpt-5.
|
|
224
|
+
model: 'openai/gpt-5.5',
|
|
225
225
|
})
|
|
226
226
|
|
|
227
227
|
// Evaluate comprehensive alignment (default)
|
|
228
228
|
const scorer = createPromptAlignmentScorerLLM({
|
|
229
|
-
model: 'openai/gpt-5.
|
|
229
|
+
model: 'openai/gpt-5.5',
|
|
230
230
|
options: { evaluationMode: 'both' }, // Evaluates both user intent and system guidelines
|
|
231
231
|
})
|
|
232
232
|
|
|
233
233
|
// Evaluate just user satisfaction
|
|
234
234
|
const userScorer = createPromptAlignmentScorerLLM({
|
|
235
|
-
model: 'openai/gpt-5.
|
|
235
|
+
model: 'openai/gpt-5.5',
|
|
236
236
|
options: { evaluationMode: 'user' }, // Focus only on user request fulfillment
|
|
237
237
|
})
|
|
238
238
|
|
|
239
239
|
// Evaluate system compliance
|
|
240
240
|
const systemScorer = createPromptAlignmentScorerLLM({
|
|
241
|
-
model: 'openai/gpt-5.
|
|
241
|
+
model: 'openai/gpt-5.5',
|
|
242
242
|
options: { evaluationMode: 'system' }, // Check adherence to system instructions
|
|
243
243
|
})
|
|
244
244
|
|
|
@@ -290,7 +290,7 @@ for (const agent of agents) {
|
|
|
290
290
|
import { createPromptAlignmentScorerLLM } from '@mastra/evals'
|
|
291
291
|
|
|
292
292
|
const scorer = createPromptAlignmentScorerLLM({
|
|
293
|
-
model: 'openai/gpt-5.
|
|
293
|
+
model: 'openai/gpt-5.5',
|
|
294
294
|
})
|
|
295
295
|
|
|
296
296
|
// Evaluate a code generation task
|
|
@@ -319,7 +319,7 @@ const result = await scorer.run({
|
|
|
319
319
|
```typescript
|
|
320
320
|
// Configure scale and evaluation mode
|
|
321
321
|
const scorer = createPromptAlignmentScorerLLM({
|
|
322
|
-
model: 'openai/gpt-5.
|
|
322
|
+
model: 'openai/gpt-5.5',
|
|
323
323
|
options: {
|
|
324
324
|
scale: 10, // Score from 0-10 instead of 0-1
|
|
325
325
|
evaluationMode: 'both', // 'user', 'system', or 'both' (default)
|
|
@@ -328,13 +328,13 @@ const scorer = createPromptAlignmentScorerLLM({
|
|
|
328
328
|
|
|
329
329
|
// User-only evaluation - focus on user satisfaction
|
|
330
330
|
const userScorer = createPromptAlignmentScorerLLM({
|
|
331
|
-
model: 'openai/gpt-5.
|
|
331
|
+
model: 'openai/gpt-5.5',
|
|
332
332
|
options: { evaluationMode: 'user' },
|
|
333
333
|
})
|
|
334
334
|
|
|
335
335
|
// System-only evaluation - focus on compliance
|
|
336
336
|
const systemScorer = createPromptAlignmentScorerLLM({
|
|
337
|
-
model: 'openai/gpt-5.
|
|
337
|
+
model: 'openai/gpt-5.5',
|
|
338
338
|
options: { evaluationMode: 'system' },
|
|
339
339
|
})
|
|
340
340
|
|
|
@@ -369,7 +369,7 @@ In this example, the response fully addresses the user's prompt with all require
|
|
|
369
369
|
import { createPromptAlignmentScorerLLM } from '@mastra/evals/scorers/prebuilt'
|
|
370
370
|
|
|
371
371
|
const scorer = createPromptAlignmentScorerLLM({
|
|
372
|
-
model: 'openai/gpt-5.
|
|
372
|
+
model: 'openai/gpt-5.5',
|
|
373
373
|
})
|
|
374
374
|
|
|
375
375
|
const inputMessages = [
|
|
@@ -417,7 +417,7 @@ In this example, the response addresses the core intent but misses some requirem
|
|
|
417
417
|
import { createPromptAlignmentScorerLLM } from '@mastra/evals/scorers/prebuilt'
|
|
418
418
|
|
|
419
419
|
const scorer = createPromptAlignmentScorerLLM({
|
|
420
|
-
model: 'openai/gpt-5.
|
|
420
|
+
model: 'openai/gpt-5.5',
|
|
421
421
|
})
|
|
422
422
|
|
|
423
423
|
const inputMessages = [
|
|
@@ -458,7 +458,7 @@ In this example, the response fails to address the user's specific requirements.
|
|
|
458
458
|
import { createPromptAlignmentScorerLLM } from '@mastra/evals/scorers/prebuilt'
|
|
459
459
|
|
|
460
460
|
const scorer = createPromptAlignmentScorerLLM({
|
|
461
|
-
model: 'openai/gpt-5.
|
|
461
|
+
model: 'openai/gpt-5.5',
|
|
462
462
|
})
|
|
463
463
|
|
|
464
464
|
const inputMessages = [
|
|
@@ -502,7 +502,7 @@ Evaluates how well the response addresses the user's request, ignoring system in
|
|
|
502
502
|
|
|
503
503
|
```typescript
|
|
504
504
|
const scorer = createPromptAlignmentScorerLLM({
|
|
505
|
-
model: 'openai/gpt-5.
|
|
505
|
+
model: 'openai/gpt-5.5',
|
|
506
506
|
options: { evaluationMode: 'user' },
|
|
507
507
|
})
|
|
508
508
|
|
|
@@ -534,7 +534,7 @@ Evaluates compliance with system behavioral guidelines and constraints:
|
|
|
534
534
|
|
|
535
535
|
```typescript
|
|
536
536
|
const scorer = createPromptAlignmentScorerLLM({
|
|
537
|
-
model: 'openai/gpt-5.
|
|
537
|
+
model: 'openai/gpt-5.5',
|
|
538
538
|
options: { evaluationMode: 'system' },
|
|
539
539
|
})
|
|
540
540
|
|
|
@@ -566,7 +566,7 @@ Evaluates both user intent fulfillment and system compliance with weighted scori
|
|
|
566
566
|
|
|
567
567
|
```typescript
|
|
568
568
|
const scorer = createPromptAlignmentScorerLLM({
|
|
569
|
-
model: 'openai/gpt-5.
|
|
569
|
+
model: 'openai/gpt-5.5',
|
|
570
570
|
options: { evaluationMode: 'both' }, // This is the default
|
|
571
571
|
})
|
|
572
572
|
|
|
@@ -309,7 +309,7 @@ The LLM-based scorer provides:
|
|
|
309
309
|
```typescript
|
|
310
310
|
// Basic configuration
|
|
311
311
|
const basicLLMScorer = createLLMScorer({
|
|
312
|
-
model: 'openai/gpt-5.
|
|
312
|
+
model: 'openai/gpt-5.5',
|
|
313
313
|
availableTools: [
|
|
314
314
|
{ name: 'tool1', description: 'Description 1' },
|
|
315
315
|
{ name: 'tool2', description: 'Description 2' }
|
|
@@ -349,7 +349,7 @@ The LLM-based scorer uses AI to evaluate whether tool selections are appropriate
|
|
|
349
349
|
|
|
350
350
|
```typescript
|
|
351
351
|
const llmScorer = createToolCallAccuracyScorerLLM({
|
|
352
|
-
model: 'openai/gpt-5.
|
|
352
|
+
model: 'openai/gpt-5.5',
|
|
353
353
|
availableTools: [
|
|
354
354
|
{
|
|
355
355
|
name: 'weather-tool',
|
|
@@ -482,7 +482,7 @@ const codeScorer = createCodeScorer({
|
|
|
482
482
|
})
|
|
483
483
|
|
|
484
484
|
const llmScorer = createLLMScorer({
|
|
485
|
-
model: 'openai/gpt-5.
|
|
485
|
+
model: 'openai/gpt-5.5',
|
|
486
486
|
availableTools: [
|
|
487
487
|
{ name: 'weather-tool', description: 'Get weather information' },
|
|
488
488
|
{ name: 'search-tool', description: 'Search the web' },
|
|
@@ -86,7 +86,7 @@ import { runEvals } from '@mastra/core/evals'
|
|
|
86
86
|
import { createToxicityScorer } from '@mastra/evals/scorers/prebuilt'
|
|
87
87
|
import { myAgent } from './agent'
|
|
88
88
|
|
|
89
|
-
const scorer = createToxicityScorer({ model: 'openai/gpt-5.
|
|
89
|
+
const scorer = createToxicityScorer({ model: 'openai/gpt-5.5' })
|
|
90
90
|
|
|
91
91
|
const result = await runEvals({
|
|
92
92
|
data: [
|
package/.docs/reference/index.md
CHANGED
|
@@ -47,6 +47,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
47
47
|
- [StagehandBrowser](https://mastra.ai/reference/browser/stagehand-browser)
|
|
48
48
|
- [create-mastra](https://mastra.ai/reference/cli/create-mastra)
|
|
49
49
|
- [mastra](https://mastra.ai/reference/cli/mastra)
|
|
50
|
+
- [Agent Builder API](https://mastra.ai/reference/client-js/agent-builder)
|
|
50
51
|
- [Agents API](https://mastra.ai/reference/client-js/agents)
|
|
51
52
|
- [Conversations API](https://mastra.ai/reference/client-js/conversations)
|
|
52
53
|
- [Error Handling](https://mastra.ai/reference/client-js/error-handling)
|
|
@@ -94,8 +95,18 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
94
95
|
- [Deployer](https://mastra.ai/reference/deployer)
|
|
95
96
|
- [Netlify](https://mastra.ai/reference/deployer/netlify)
|
|
96
97
|
- [Vercel](https://mastra.ai/reference/deployer/vercel)
|
|
98
|
+
- [BlobStoreProvider](https://mastra.ai/reference/editor/blob-store-provider)
|
|
97
99
|
- [MastraEditor Class](https://mastra.ai/reference/editor/mastra-editor)
|
|
100
|
+
- [ProcessorProvider](https://mastra.ai/reference/editor/processor-provider)
|
|
98
101
|
- [ToolProvider](https://mastra.ai/reference/editor/tool-provider)
|
|
102
|
+
- [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options)
|
|
103
|
+
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults)
|
|
104
|
+
- [Models default](https://mastra.ai/reference/editor/agent-builder/builder-models)
|
|
105
|
+
- [BrowserProvider](https://mastra.ai/reference/editor/browser-provider)
|
|
106
|
+
- [StorageBrowserRef](https://mastra.ai/reference/editor/storage-browser-ref)
|
|
107
|
+
- [FilesystemProvider](https://mastra.ai/reference/editor/filesystem-provider)
|
|
108
|
+
- [SandboxProvider](https://mastra.ai/reference/editor/sandbox-provider)
|
|
109
|
+
- [StorageWorkspaceRef](https://mastra.ai/reference/editor/storage-workspace-ref)
|
|
99
110
|
- [createScorer()](https://mastra.ai/reference/evals/create-scorer)
|
|
100
111
|
- [filterRun()](https://mastra.ai/reference/evals/filter-run)
|
|
101
112
|
- [MastraScorer](https://mastra.ai/reference/evals/mastra-scorer)
|
|
@@ -147,6 +158,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
147
158
|
- [Cloned Thread Utilities](https://mastra.ai/reference/memory/clone-utilities)
|
|
148
159
|
- [Memory Class](https://mastra.ai/reference/memory/memory-class)
|
|
149
160
|
- [Observational Memory](https://mastra.ai/reference/memory/observational-memory)
|
|
161
|
+
- [SerializedMemoryConfig](https://mastra.ai/reference/memory/serialized-memory-config)
|
|
150
162
|
- [.cloneThread()](https://mastra.ai/reference/memory/cloneThread)
|
|
151
163
|
- [.createThread()](https://mastra.ai/reference/memory/createThread)
|
|
152
164
|
- [.deleteMessages()](https://mastra.ai/reference/memory/deleteMessages)
|
|
@@ -262,6 +274,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
262
274
|
- [Google](https://mastra.ai/reference/voice/google)
|
|
263
275
|
- [Google Gemini Live](https://mastra.ai/reference/voice/google-gemini-live)
|
|
264
276
|
- [Inworld](https://mastra.ai/reference/voice/inworld)
|
|
277
|
+
- [Inworld Realtime](https://mastra.ai/reference/voice/inworld-realtime)
|
|
265
278
|
- [Mastra Voice](https://mastra.ai/reference/voice/mastra-voice)
|
|
266
279
|
- [Murf](https://mastra.ai/reference/voice/murf)
|
|
267
280
|
- [OpenAI](https://mastra.ai/reference/voice/openai)
|
|
@@ -303,6 +316,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
303
316
|
- [.start()](https://mastra.ai/reference/workflows/run-methods/start)
|
|
304
317
|
- [.startAsync()](https://mastra.ai/reference/workflows/run-methods/startAsync)
|
|
305
318
|
- [.timeTravel()](https://mastra.ai/reference/workflows/run-methods/timeTravel)
|
|
319
|
+
- [AgentCoreRuntimeSandbox](https://mastra.ai/reference/workspace/agentcore-runtime-sandbox)
|
|
306
320
|
- [AgentFSFilesystem](https://mastra.ai/reference/workspace/agentfs-filesystem)
|
|
307
321
|
- [AzureBlobFilesystem](https://mastra.ai/reference/workspace/azure-blob-filesystem)
|
|
308
322
|
- [BlaxelSandbox](https://mastra.ai/reference/workspace/blaxel-sandbox)
|
|
@@ -317,6 +331,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
317
331
|
- [ModalSandbox](https://mastra.ai/reference/workspace/modal-sandbox)
|
|
318
332
|
- [S3Filesystem](https://mastra.ai/reference/workspace/s3-filesystem)
|
|
319
333
|
- [SandboxProcessManager](https://mastra.ai/reference/workspace/process-manager)
|
|
334
|
+
- [VercelMicroVMSandbox](https://mastra.ai/reference/workspace/vercel-microvm-sandbox)
|
|
320
335
|
- [VercelSandbox](https://mastra.ai/reference/workspace/vercel)
|
|
321
336
|
- [Workspace Class](https://mastra.ai/reference/workspace/workspace-class)
|
|
322
337
|
- [WorkspaceFilesystem](https://mastra.ai/reference/workspace/filesystem)
|
|
@@ -11,7 +11,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
11
11
|
export const agent = new Agent({
|
|
12
12
|
name: 'test-agent',
|
|
13
13
|
instructions: 'You are an agent with memory.',
|
|
14
|
-
model: 'openai/gpt-5.
|
|
14
|
+
model: 'openai/gpt-5.5',
|
|
15
15
|
memory: new Memory({
|
|
16
16
|
options: {
|
|
17
17
|
workingMemory: {
|
|
@@ -60,7 +60,7 @@ import { LibSQLStore, LibSQLVector } from '@mastra/libsql'
|
|
|
60
60
|
export const agent = new Agent({
|
|
61
61
|
name: 'test-agent',
|
|
62
62
|
instructions: 'You are an agent with memory.',
|
|
63
|
-
model: 'openai/gpt-5.
|
|
63
|
+
model: 'openai/gpt-5.5',
|
|
64
64
|
memory: new Memory({
|
|
65
65
|
storage: new LibSQLStore({
|
|
66
66
|
id: 'test-agent-storage',
|
|
@@ -97,7 +97,7 @@ import { PgStore, PgVector } from '@mastra/pg'
|
|
|
97
97
|
export const agent = new Agent({
|
|
98
98
|
name: 'pg-agent',
|
|
99
99
|
instructions: 'You are an agent with optimized PostgreSQL memory.',
|
|
100
|
-
model: 'openai/gpt-5.
|
|
100
|
+
model: 'openai/gpt-5.5',
|
|
101
101
|
memory: new Memory({
|
|
102
102
|
storage: new PgStore({
|
|
103
103
|
id: 'pg-agent-storage',
|
|
@@ -68,6 +68,8 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
68
68
|
|
|
69
69
|
**observation.bufferTokens** (`number | false`): Token interval for async background observation buffering. Can be an absolute token count (e.g. \`5000\`) or a fraction of \`messageTokens\` (e.g. \`0.25\` = buffer every 25% of threshold). When set, observations run in the background at this interval, storing results in a buffer. When the main \`messageTokens\` threshold is reached, buffered observations activate instantly without a blocking LLM call. Must resolve to less than \`messageTokens\`. Set to \`false\` to explicitly disable all async buffering (both observation and reflection).
|
|
70
70
|
|
|
71
|
+
**observation.bufferOnIdle** (`boolean`): Run background observation buffering when an agent turn ends and the agent becomes idle. This is separate from \`bufferTokens\`, which controls step-time async buffering. Set this to \`true\` to buffer short idle turns without waiting for the next turn or the \`messageTokens\` threshold.
|
|
72
|
+
|
|
71
73
|
**observation.bufferActivation** (`number`): Controls how much of the message window to retain after activation. Accepts a ratio (0-1) or an absolute token count (≥ 1000). For example, \`0.8\` means: activate enough buffers to remove 80% of \`messageTokens\` and leave 20% as active message history. An absolute token count like \`4000\` targets a goal of keeping \~4k message tokens remaining after activation. Higher values remove more message history per activation when using a ratio. Higher values keep more message history when using a token count.
|
|
72
74
|
|
|
73
75
|
**observation.activateAfterIdle** (`number | string | false | "auto"`): Time before buffered observations are forced to activate after inactivity. Accepts milliseconds, a duration string, \`"auto"\` for a provider-aware prompt cache TTL, or \`false\`. If unset, the top-level \`activateAfterIdle\` value is used for observations. Set \`false\` to disable the top-level idle setting for observations.
|
|
@@ -179,7 +181,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
179
181
|
export const agent = new Agent({
|
|
180
182
|
name: 'my-agent',
|
|
181
183
|
instructions: 'You are a helpful assistant.',
|
|
182
|
-
model: 'openai/gpt-5.
|
|
184
|
+
model: 'openai/gpt-5.5',
|
|
183
185
|
memory: new Memory({
|
|
184
186
|
options: {
|
|
185
187
|
observationalMemory: {
|
|
@@ -199,7 +201,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
199
201
|
export const agent = new Agent({
|
|
200
202
|
name: 'my-agent',
|
|
201
203
|
instructions: 'You are a helpful assistant.',
|
|
202
|
-
model: 'openai/gpt-5.
|
|
204
|
+
model: 'openai/gpt-5.5',
|
|
203
205
|
memory: new Memory({
|
|
204
206
|
options: {
|
|
205
207
|
observationalMemory: {
|
|
@@ -226,7 +228,7 @@ import { Agent } from '@mastra/core/agent'
|
|
|
226
228
|
export const agent = new Agent({
|
|
227
229
|
name: 'health-assistant',
|
|
228
230
|
instructions: 'You are a health and wellness assistant.',
|
|
229
|
-
model: 'openai/gpt-5.
|
|
231
|
+
model: 'openai/gpt-5.5',
|
|
230
232
|
memory: new Memory({
|
|
231
233
|
options: {
|
|
232
234
|
observationalMemory: {
|
|
@@ -675,7 +677,7 @@ const selector = new ModelByInputTokens({
|
|
|
675
677
|
upTo: {
|
|
676
678
|
10_000: 'google/gemini-2.5-flash', // Fast for small inputs
|
|
677
679
|
40_000: 'openai/gpt-5-mini', // Stronger for medium inputs
|
|
678
|
-
1_000_000: 'openai/gpt-5.
|
|
680
|
+
1_000_000: 'openai/gpt-5.5', // Most capable for large inputs
|
|
679
681
|
},
|
|
680
682
|
})
|
|
681
683
|
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SerializedMemoryConfig
|
|
2
|
+
|
|
3
|
+
`SerializedMemoryConfig` is the JSON-serializable subset of [`Memory`](https://mastra.ai/reference/memory/memory-class) configuration that lives on a stored agent record. The runtime hydrates it back into a `Memory` instance by resolving the vector and embedder IDs against the configured `Mastra` instance.
|
|
4
|
+
|
|
5
|
+
It is the type used by [`BuilderAgentDefaults.memory`](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) and by `EditorAgentNamespace.create({ memory })`.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { MastraEditor } from '@mastra/editor'
|
|
11
|
+
|
|
12
|
+
new MastraEditor({
|
|
13
|
+
builder: {
|
|
14
|
+
enabled: true,
|
|
15
|
+
configuration: {
|
|
16
|
+
agent: {
|
|
17
|
+
memory: {
|
|
18
|
+
observationalMemory: true,
|
|
19
|
+
options: { lastMessages: 50 },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Properties
|
|
28
|
+
|
|
29
|
+
**vector** (`string | false`): Vector store identifier. The vector instance must be registered with the Mastra instance to resolve from this ID. Set to \`false\` to disable vector search.
|
|
30
|
+
|
|
31
|
+
**embedder** (`string`): Embedding model ID in the format \`"provider/model"\` (for example, \`"openai/text-embedding-3-small"\`).
|
|
32
|
+
|
|
33
|
+
**embedderOptions** (`Omit<MastraEmbeddingOptions, 'telemetry'>`): Options passed to the embedder. Telemetry options are stripped.
|
|
34
|
+
|
|
35
|
+
**options** (`SerializedMemoryOptions`): Configuration for memory behaviors. Omits non-serializable fields like working memory and threads.
|
|
36
|
+
|
|
37
|
+
**options.readOnly** (`boolean`): Treat memory as read-only — no new messages are stored.
|
|
38
|
+
|
|
39
|
+
**options.lastMessages** (`number | false`): Number of recent messages to include in context, or \`false\` to disable.
|
|
40
|
+
|
|
41
|
+
**options.semanticRecall** (`boolean | SemanticRecall`): Semantic recall configuration. See the Memory class reference for the full shape.
|
|
42
|
+
|
|
43
|
+
**options.generateTitle** (`boolean | { model: ModelRouterModelId; instructions?: string }`): Title generation configuration. Pass an object with \`model\` (in \`"provider/model"\` form) and optional \`instructions\`.
|
|
44
|
+
|
|
45
|
+
**observationalMemory** (`boolean | SerializedObservationalMemoryConfig`): Long-lived fact extraction. Pass \`true\` to enable with defaults, or an object to override observer/reflector models, scope, and activation behavior.
|
|
46
|
+
|
|
47
|
+
## `SerializedObservationalMemoryConfig`
|
|
48
|
+
|
|
49
|
+
**model** (`string`): Model ID used by both the Observer and Reflector (for example, \`"google/gemini-2.5-flash"\`).
|
|
50
|
+
|
|
51
|
+
**scope** (`'resource' | 'thread'`): Whether observations are scoped to a resource or a single thread.
|
|
52
|
+
|
|
53
|
+
**activateAfterIdle** (`ObservationalMemoryActivationTTL`): Inactivity TTL before forcing buffered observation activation.
|
|
54
|
+
|
|
55
|
+
**activateOnProviderChange** (`boolean`): Force-activate buffered observations when the actor model changes.
|
|
56
|
+
|
|
57
|
+
**shareTokenBudget** (`boolean`): Share the token budget between messages and observations.
|
|
58
|
+
|
|
59
|
+
**temporalMarkers** (`boolean`): Persist inline temporal gap markers for long pauses between messages.
|
|
60
|
+
|
|
61
|
+
**retrieval** (`boolean | { vector?: boolean; scope?: 'thread' | 'resource' }`): Experimental. Enable retrieval-mode observation groups as durable pointers to raw message history.
|
|
62
|
+
|
|
63
|
+
**observation** (`SerializedObservationalMemoryObservationConfig`): Observer-step configuration (model, token thresholds, buffering).
|
|
64
|
+
|
|
65
|
+
**reflection** (`SerializedObservationalMemoryReflectionConfig`): Reflector-step configuration (model, observation token thresholds, buffering).
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [Memory class](https://mastra.ai/reference/memory/memory-class) — the runtime type this config hydrates into.
|
|
70
|
+
- [Observational memory](https://mastra.ai/reference/memory/observational-memory) — full observational memory reference.
|
|
71
|
+
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — where this type is pinned as the Builder default.
|
|
72
|
+
- [Agent Builder: Memory](https://mastra.ai/docs/agent-builder/memory) — concept and worked examples.
|
|
@@ -127,4 +127,10 @@ When you spot a spike in latency or token usage on the Metrics dashboard, correl
|
|
|
127
127
|
### Token metrics are missing
|
|
128
128
|
|
|
129
129
|
- **Span is a model generation**: Token metrics are only emitted from `MODEL_GENERATION` spans.
|
|
130
|
-
- **Provider reports usage**: The model provider must include `usage` data in its response. If usage is absent, no token metrics are emitted.
|
|
130
|
+
- **Provider reports usage**: The model provider must include `usage` data in its response. If usage is absent, no token metrics are emitted.
|
|
131
|
+
|
|
132
|
+
## Related
|
|
133
|
+
|
|
134
|
+
- [Metrics overview](https://mastra.ai/docs/observability/metrics/overview)
|
|
135
|
+
- [Querying metrics](https://mastra.ai/docs/observability/metrics/querying)
|
|
136
|
+
- [Studio observability](https://mastra.ai/docs/studio/observability)
|
|
@@ -104,7 +104,7 @@ const prompt = await exporter.client.prompt.get('customer-support', { type: 'tex
|
|
|
104
104
|
const agent = new Agent({
|
|
105
105
|
name: 'support-agent',
|
|
106
106
|
instructions: prompt.compile(),
|
|
107
|
-
model: 'openai/gpt-5.
|
|
107
|
+
model: 'openai/gpt-5.5',
|
|
108
108
|
defaultGenerateOptions: {
|
|
109
109
|
tracingOptions: buildTracingOptions(
|
|
110
110
|
withLangfusePrompt({ name: prompt.name, version: prompt.version }),
|
|
@@ -43,7 +43,7 @@ import { BatchPartsProcessor } from '@mastra/core/processors'
|
|
|
43
43
|
export const agent = new Agent({
|
|
44
44
|
name: 'batched-agent',
|
|
45
45
|
instructions: 'You are a helpful assistant',
|
|
46
|
-
model: 'openai/gpt-5.
|
|
46
|
+
model: 'openai/gpt-5.5',
|
|
47
47
|
outputProcessors: [
|
|
48
48
|
new BatchPartsProcessor({
|
|
49
49
|
batchSize: 5,
|
|
@@ -60,7 +60,7 @@ export const agent = new Agent({
|
|
|
60
60
|
id: 'multilingual-agent',
|
|
61
61
|
name: 'multilingual-agent',
|
|
62
62
|
instructions: 'You are a helpful assistant',
|
|
63
|
-
model: 'openai/gpt-5.
|
|
63
|
+
model: 'openai/gpt-5.5',
|
|
64
64
|
inputProcessors: [
|
|
65
65
|
new LanguageDetector({
|
|
66
66
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -45,7 +45,7 @@ const storage = new PostgresStorage({
|
|
|
45
45
|
export const agent = new Agent({
|
|
46
46
|
name: 'memory-agent',
|
|
47
47
|
instructions: 'You are a helpful assistant with conversation memory',
|
|
48
|
-
model: 'openai/gpt-5.
|
|
48
|
+
model: 'openai/gpt-5.5',
|
|
49
49
|
inputProcessors: [
|
|
50
50
|
new MessageHistory({
|
|
51
51
|
storage,
|
|
@@ -59,7 +59,7 @@ import { ModerationProcessor } from '@mastra/core/processors'
|
|
|
59
59
|
export const agent = new Agent({
|
|
60
60
|
name: 'moderated-agent',
|
|
61
61
|
instructions: 'You are a helpful assistant',
|
|
62
|
-
model: 'openai/gpt-5.
|
|
62
|
+
model: 'openai/gpt-5.5',
|
|
63
63
|
inputProcessors: [
|
|
64
64
|
new ModerationProcessor({
|
|
65
65
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -84,7 +84,7 @@ import { BatchPartsProcessor, ModerationProcessor } from '@mastra/core/processor
|
|
|
84
84
|
export const agent = new Agent({
|
|
85
85
|
name: 'output-moderated-agent',
|
|
86
86
|
instructions: 'You are a helpful assistant',
|
|
87
|
-
model: 'openai/gpt-5.
|
|
87
|
+
model: 'openai/gpt-5.5',
|
|
88
88
|
outputProcessors: [
|
|
89
89
|
// Batch stream parts first to reduce LLM calls
|
|
90
90
|
new BatchPartsProcessor({
|
|
@@ -61,7 +61,7 @@ import { PIIDetector } from '@mastra/core/processors'
|
|
|
61
61
|
export const agent = new Agent({
|
|
62
62
|
name: 'private-agent',
|
|
63
63
|
instructions: 'You are a helpful assistant',
|
|
64
|
-
model: 'openai/gpt-5.
|
|
64
|
+
model: 'openai/gpt-5.5',
|
|
65
65
|
inputProcessors: [
|
|
66
66
|
new PIIDetector({
|
|
67
67
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -89,7 +89,7 @@ import { BatchPartsProcessor, PIIDetector } from '@mastra/core/processors'
|
|
|
89
89
|
export const agent = new Agent({
|
|
90
90
|
name: 'output-pii-agent',
|
|
91
91
|
instructions: 'You are a helpful assistant',
|
|
92
|
-
model: 'openai/gpt-5.
|
|
92
|
+
model: 'openai/gpt-5.5',
|
|
93
93
|
outputProcessors: [
|
|
94
94
|
// Batch stream parts first to reduce LLM calls
|
|
95
95
|
new BatchPartsProcessor({
|
|
@@ -26,7 +26,7 @@ import { PrefillErrorHandler } from '@mastra/core/processors'
|
|
|
26
26
|
export const agent = new Agent({
|
|
27
27
|
name: 'my-agent',
|
|
28
28
|
instructions: 'You are a helpful assistant.',
|
|
29
|
-
model: 'anthropic/claude-opus-4-
|
|
29
|
+
model: 'anthropic/claude-opus-4-7',
|
|
30
30
|
errorProcessors: [new PrefillErrorHandler()],
|
|
31
31
|
})
|
|
32
32
|
```
|
|
@@ -47,7 +47,7 @@ const customErrorHandler: Processor = {
|
|
|
47
47
|
export const agent = new Agent({
|
|
48
48
|
name: 'my-agent',
|
|
49
49
|
instructions: 'You are a helpful assistant.',
|
|
50
|
-
model: 'anthropic/claude-opus-4-
|
|
50
|
+
model: 'anthropic/claude-opus-4-7',
|
|
51
51
|
errorProcessors: [customErrorHandler],
|
|
52
52
|
})
|
|
53
53
|
```
|
|
@@ -318,7 +318,7 @@ processInputStep?<TTripwireMetadata = unknown>(
|
|
|
318
318
|
|
|
319
319
|
The object form can return any combination of these properties:
|
|
320
320
|
|
|
321
|
-
**model** (`LanguageModelV2 | string`): Change the model for this step. Can be a model instance or router ID like '
|
|
321
|
+
**model** (`LanguageModelV2 | string`): Change the model for this step. Can be a model instance or router ID like 'openai/gpt-5.5'.
|
|
322
322
|
|
|
323
323
|
**toolChoice** (`ToolChoice`): Change tool selection behavior for this step.
|
|
324
324
|
|
|
@@ -778,7 +778,7 @@ export class DynamicModelProcessor implements Processor {
|
|
|
778
778
|
|
|
779
779
|
// Switch to powerful model after tool calls
|
|
780
780
|
if (steps.length > 0 && steps[steps.length - 1].toolCalls?.length) {
|
|
781
|
-
return { model: 'openai/gpt-5.
|
|
781
|
+
return { model: 'openai/gpt-5.5' }
|
|
782
782
|
}
|
|
783
783
|
|
|
784
784
|
// Disable tools after 5 steps to force completion
|
|
@@ -53,7 +53,7 @@ import { PromptInjectionDetector } from '@mastra/core/processors'
|
|
|
53
53
|
export const agent = new Agent({
|
|
54
54
|
name: 'secure-agent',
|
|
55
55
|
instructions: 'You are a helpful assistant',
|
|
56
|
-
model: 'openai/gpt-5.
|
|
56
|
+
model: 'openai/gpt-5.5',
|
|
57
57
|
inputProcessors: [
|
|
58
58
|
new PromptInjectionDetector({
|
|
59
59
|
model: 'openrouter/openai/gpt-oss-safeguard-20b',
|
|
@@ -82,7 +82,7 @@ const semanticRecall = new SemanticRecall({
|
|
|
82
82
|
export const agent = new Agent({
|
|
83
83
|
name: 'semantic-memory-agent',
|
|
84
84
|
instructions: 'You are a helpful assistant with semantic memory recall',
|
|
85
|
-
model: 'openai/gpt-5.
|
|
85
|
+
model: 'openai/gpt-5.5',
|
|
86
86
|
inputProcessors: [semanticRecall, new MessageHistory({ storage, lastMessages: 50 })],
|
|
87
87
|
outputProcessors: [semanticRecall, new MessageHistory({ storage })],
|
|
88
88
|
})
|
|
@@ -74,7 +74,7 @@ const agent = new Agent({
|
|
|
74
74
|
name: 'skill-agent',
|
|
75
75
|
instructions:
|
|
76
76
|
'You are a helpful assistant. Use search_skills to find relevant skills, then load_skill to load their instructions.',
|
|
77
|
-
model: 'openai/gpt-5.
|
|
77
|
+
model: 'openai/gpt-5.5',
|
|
78
78
|
workspace,
|
|
79
79
|
inputProcessors: [skillSearch],
|
|
80
80
|
})
|
|
@@ -57,7 +57,7 @@ import { BatchPartsProcessor, SystemPromptScrubber } from '@mastra/core/processo
|
|
|
57
57
|
export const agent = new Agent({
|
|
58
58
|
name: 'scrubbed-agent',
|
|
59
59
|
instructions: 'You are a helpful assistant',
|
|
60
|
-
model: 'openai/gpt-5.
|
|
60
|
+
model: 'openai/gpt-5.5',
|
|
61
61
|
outputProcessors: [
|
|
62
62
|
// Batch stream parts first to reduce LLM calls
|
|
63
63
|
new BatchPartsProcessor({
|