@mastra/mcp-docs-server 1.1.41 → 1.1.42-alpha.10
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 +65 -0
- package/package.json +8 -6
|
@@ -39,6 +39,54 @@ export const mastra = new Mastra({
|
|
|
39
39
|
|
|
40
40
|
**blobStores** (`Record<string, BlobStoreProvider>`): Blob storage providers for binary data (for example, S3). Falls back to the Mastra storage blob store if no provider is specified. (Default: `{}`)
|
|
41
41
|
|
|
42
|
+
**browsers** (`Record<string, BrowserProvider>`): Browser providers for agent browser access (for example, Stagehand). No built-ins — required when \`builder.features.agent.browser\` is enabled. See the BrowserProvider reference for the provider interface. (Default: `{}`)
|
|
43
|
+
|
|
44
|
+
**builder** (`AgentBuilderOptions`): Agent Builder configuration. See the AgentBuilderOptions reference. Omit or set \`enabled: false\` to disable the Builder.
|
|
45
|
+
|
|
46
|
+
**source** (`'code' | 'db'`): Where agent overrides are stored. With 'db', overrides live in the configured storage backend and Studio shows the save and publish flow. With 'code', overrides live as per-agent JSON files on disk (routed through a local FilesystemStore) and Studio shows filesystem actions. See the Editor overview for the difference. (Default: `'db'`)
|
|
47
|
+
|
|
48
|
+
**codePath** (`string`): Directory used by the 'code' source for per-agent JSON files. Ignored when source is not 'code'. (Default: `'./mastra/editor/'`)
|
|
49
|
+
|
|
50
|
+
### Provider interfaces
|
|
51
|
+
|
|
52
|
+
Each provider field above takes a record keyed by provider id. See the per-provider reference pages for the implementation shape:
|
|
53
|
+
|
|
54
|
+
- [ProcessorProvider](https://mastra.ai/reference/editor/processor-provider)
|
|
55
|
+
- [FilesystemProvider](https://mastra.ai/reference/editor/filesystem-provider)
|
|
56
|
+
- [SandboxProvider](https://mastra.ai/reference/editor/sandbox-provider)
|
|
57
|
+
- [BlobStoreProvider](https://mastra.ai/reference/editor/blob-store-provider)
|
|
58
|
+
- [BrowserProvider](https://mastra.ai/reference/editor/browser-provider)
|
|
59
|
+
|
|
60
|
+
## Agent Builder
|
|
61
|
+
|
|
62
|
+
The `builder` field enables the [Agent Builder](https://mastra.ai/docs/agent-builder/overview), a browser-based UI for creating and editing stored agents. See:
|
|
63
|
+
|
|
64
|
+
- [Agent Builder overview](https://mastra.ai/docs/agent-builder/overview) — concepts and getting started.
|
|
65
|
+
- [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options) — full options schema.
|
|
66
|
+
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — admin-pinned defaults for new agents.
|
|
67
|
+
- [builder.configuration.agent.models](https://mastra.ai/reference/editor/agent-builder/builder-models) — model allowlist and default model.
|
|
68
|
+
|
|
69
|
+
### Registering the Builder agent
|
|
70
|
+
|
|
71
|
+
The Builder UI runs against an agent created by the `createBuilderAgent()` factory from `@mastra/editor/ee`. Import the factory, invoke it, and register the returned agent under `agents` on your Mastra instance:
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import { Mastra } from '@mastra/core'
|
|
75
|
+
import { MastraEditor } from '@mastra/editor'
|
|
76
|
+
import { createBuilderAgent } from '@mastra/editor/ee'
|
|
77
|
+
|
|
78
|
+
export const mastra = new Mastra({
|
|
79
|
+
agents: { builderAgent: createBuilderAgent() },
|
|
80
|
+
editor: new MastraEditor({
|
|
81
|
+
builder: { enabled: true },
|
|
82
|
+
}),
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The key name (`builderAgent`) is conventional — any key works. The `@mastra/editor/ee` subpath is gated by the Mastra Enterprise Edition license at runtime.
|
|
87
|
+
|
|
88
|
+
See the [Agent Builder overview](https://mastra.ai/docs/agent-builder/overview) for the full setup checklist.
|
|
89
|
+
|
|
42
90
|
## Namespaces
|
|
43
91
|
|
|
44
92
|
The editor exposes namespaces for managing different entity types. Access them from any Mastra instance with `mastra.getEditor()` and call the CRUD methods directly in application code, or rely on the Mastra server routes that use them under the hood.
|
|
@@ -165,4 +213,16 @@ Returns all registered sandbox providers.
|
|
|
165
213
|
|
|
166
214
|
#### `getBlobStoreProviders()`
|
|
167
215
|
|
|
168
|
-
Returns all registered blob store providers.
|
|
216
|
+
Returns all registered blob store providers.
|
|
217
|
+
|
|
218
|
+
### Source
|
|
219
|
+
|
|
220
|
+
#### `getSource()`
|
|
221
|
+
|
|
222
|
+
Returns the configured source (`'code'` or `'db'`), or `undefined` when the editor was constructed without an explicit `source`.
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
const source = mastra.getEditor()?.getSource()
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Returns: `'code' | 'db' | undefined`
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# ProcessorProvider
|
|
2
|
+
|
|
3
|
+
`ProcessorProvider` is the interface a package implements to register a configurable processor with [`MastraEditor`](https://mastra.ai/reference/editor/mastra-editor). Processor providers serve two purposes:
|
|
4
|
+
|
|
5
|
+
1. **Discovery** — the UI uses `info`, `configSchema`, and `availablePhases` to render configuration forms.
|
|
6
|
+
2. **Runtime** — the editor calls `createProcessor(config)` during agent hydration to instantiate processors from stored configuration.
|
|
7
|
+
|
|
8
|
+
Providers are supplied via `MastraEditorConfig.processorProviders`.
|
|
9
|
+
|
|
10
|
+
## Usage example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { MastraEditor } from '@mastra/editor'
|
|
14
|
+
import { moderationProcessorProvider } from '@mastra/processors/moderation'
|
|
15
|
+
|
|
16
|
+
new MastraEditor({
|
|
17
|
+
processorProviders: {
|
|
18
|
+
moderation: moderationProcessorProvider,
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Properties
|
|
24
|
+
|
|
25
|
+
**info** (`ProcessorProviderInfo`): Metadata about the provider.
|
|
26
|
+
|
|
27
|
+
**info.id** (`string`): Unique identifier (for example, \`"moderation"\`, \`"token-limiter"\`).
|
|
28
|
+
|
|
29
|
+
**info.name** (`string`): Human-readable name.
|
|
30
|
+
|
|
31
|
+
**info.description** (`string`): Short description of the provider.
|
|
32
|
+
|
|
33
|
+
**configSchema** (`ZodSchema`): Zod schema describing the configuration this provider accepts. Used by the UI to render a form. The validated config object is passed to \`createProcessor()\`.
|
|
34
|
+
|
|
35
|
+
**availablePhases** (`ProcessorPhase[]`): Phases this provider's processors support. One or more of \`'processInput'\`, \`'processInputStep'\`, \`'processOutputStream'\`, \`'processOutputResult'\`, \`'processOutputStep'\`.
|
|
36
|
+
|
|
37
|
+
**createProcessor** (`(config: Record<string, unknown>) => Processor`): Create a \`Processor\` instance from the validated configuration. Called during agent hydration to resolve stored processor configs into live instances.
|
|
38
|
+
|
|
39
|
+
## Implementing a provider
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import type { ProcessorProvider } from '@mastra/core/processor-provider'
|
|
43
|
+
import { z } from 'zod'
|
|
44
|
+
import { MyProcessor } from './my-processor-impl'
|
|
45
|
+
|
|
46
|
+
export const myProcessorProvider: ProcessorProvider = {
|
|
47
|
+
info: {
|
|
48
|
+
id: 'my-processor',
|
|
49
|
+
name: 'My Processor',
|
|
50
|
+
description: 'Filters output for sensitive content.',
|
|
51
|
+
},
|
|
52
|
+
configSchema: z.object({
|
|
53
|
+
threshold: z.number().min(0).max(1),
|
|
54
|
+
}),
|
|
55
|
+
availablePhases: ['processOutputStream', 'processOutputResult'],
|
|
56
|
+
createProcessor(config) {
|
|
57
|
+
return new MyProcessor(config as { threshold: number })
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Related
|
|
63
|
+
|
|
64
|
+
- [MastraEditor class](https://mastra.ai/reference/editor/mastra-editor) — provider registry.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# SandboxProvider
|
|
2
|
+
|
|
3
|
+
`SandboxProvider` is the interface a package implements to register a sandbox with [`MastraEditor`](https://mastra.ai/reference/editor/mastra-editor). The editor calls `createSandbox(config)` at workspace hydration time, using the `provider` id from the stored [`StorageWorkspaceRef`](https://mastra.ai/reference/editor/storage-workspace-ref) sandbox config as the lookup key.
|
|
4
|
+
|
|
5
|
+
The built-in `local` sandbox provider is auto-registered. External providers (for example, E2B) are supplied via `MastraEditorConfig.sandboxes`.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { MastraEditor } from '@mastra/editor'
|
|
11
|
+
import { e2bSandboxProvider } from '@mastra/e2b'
|
|
12
|
+
|
|
13
|
+
new MastraEditor({
|
|
14
|
+
sandboxes: {
|
|
15
|
+
[e2bSandboxProvider.id]: e2bSandboxProvider,
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
**id** (`string`): Unique provider identifier (for example, \`"local"\`, \`"e2b"\`). Must match \`StorageSandboxConfig.provider\` on every stored workspace that uses this provider.
|
|
23
|
+
|
|
24
|
+
**name** (`string`): Human-readable name for UI display.
|
|
25
|
+
|
|
26
|
+
**description** (`string`): Short description shown in the workspace sandbox picker.
|
|
27
|
+
|
|
28
|
+
**configSchema** (`Record<string, unknown>`): JSON Schema describing provider-specific configuration. Used by the UI to render config forms.
|
|
29
|
+
|
|
30
|
+
**createSandbox** (`(config: TConfig) => WorkspaceSandbox | Promise<WorkspaceSandbox>`): Create a runtime \`WorkspaceSandbox\` instance from the stored config. Called at workspace hydration time.
|
|
31
|
+
|
|
32
|
+
## Implementing a provider
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import type { SandboxProvider, WorkspaceSandbox } from '@mastra/core/editor'
|
|
36
|
+
|
|
37
|
+
export const mySandboxProvider: SandboxProvider<{ apiKey: string }> = {
|
|
38
|
+
id: 'my-sandbox',
|
|
39
|
+
name: 'My Sandbox',
|
|
40
|
+
description: 'Cloud sandbox for command execution.',
|
|
41
|
+
configSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
required: ['apiKey'],
|
|
44
|
+
properties: {
|
|
45
|
+
apiKey: { type: 'string' },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
async createSandbox(config): Promise<WorkspaceSandbox> {
|
|
49
|
+
return createMySandbox({ apiKey: config.apiKey })
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Once registered, admins can reference the provider from an inline workspace config or a stored [`StorageWorkspaceRef`](https://mastra.ai/reference/editor/storage-workspace-ref).
|
|
55
|
+
|
|
56
|
+
## Related
|
|
57
|
+
|
|
58
|
+
- [Workspace](https://mastra.ai/docs/agent-builder/workspace) — concept and worked examples.
|
|
59
|
+
- [StorageWorkspaceRef](https://mastra.ai/reference/editor/storage-workspace-ref) — stored configuration consumed by `createSandbox`.
|
|
60
|
+
- [FilesystemProvider](https://mastra.ai/reference/editor/filesystem-provider) — sibling provider for file access.
|
|
61
|
+
- [MastraEditor class](https://mastra.ai/reference/editor/mastra-editor) — provider registry.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# StorageBrowserRef
|
|
2
|
+
|
|
3
|
+
`StorageBrowserRef` is the inline browser configuration attached to a stored agent. The `provider` id is resolved at hydration time against the [`BrowserProvider`](https://mastra.ai/reference/editor/browser-provider) registered on [`MastraEditor.browsers`](https://mastra.ai/reference/editor/mastra-editor).
|
|
4
|
+
|
|
5
|
+
It is the type used by [`BuilderAgentDefaults.browser`](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) and by stored agent records.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { MastraEditor } from '@mastra/editor'
|
|
11
|
+
import { stagehandBrowserProvider } from '@mastra/stagehand'
|
|
12
|
+
|
|
13
|
+
new MastraEditor({
|
|
14
|
+
browsers: { [stagehandBrowserProvider.id]: stagehandBrowserProvider },
|
|
15
|
+
builder: {
|
|
16
|
+
enabled: true,
|
|
17
|
+
configuration: {
|
|
18
|
+
agent: {
|
|
19
|
+
browser: {
|
|
20
|
+
type: 'inline',
|
|
21
|
+
config: {
|
|
22
|
+
provider: 'stagehand',
|
|
23
|
+
headless: true,
|
|
24
|
+
viewport: { width: 1280, height: 720 },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Type
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
type StorageBrowserRef = { type: 'inline'; config: StorageBrowserConfig }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
There is no `{ type: 'id' }` variant for browsers — they are always inlined.
|
|
40
|
+
|
|
41
|
+
## Properties
|
|
42
|
+
|
|
43
|
+
**type** (`'inline'`): Discriminant. Must be the literal \`"inline"\`.
|
|
44
|
+
|
|
45
|
+
**config** (`StorageBrowserConfig`): Provider id and per-instance browser configuration. See the section below.
|
|
46
|
+
|
|
47
|
+
## `StorageBrowserConfig`
|
|
48
|
+
|
|
49
|
+
The shape embedded under `config`. Defined in `@mastra/core/storage`.
|
|
50
|
+
|
|
51
|
+
**provider** (`string`): Provider identifier (for example, \`"stagehand"\`). Must match a \`BrowserProvider.id\` registered on \`MastraEditor.browsers\`. There are no built-in providers.
|
|
52
|
+
|
|
53
|
+
**headless** (`boolean`): Run the browser in headless mode (no visible UI). (Default: `true`)
|
|
54
|
+
|
|
55
|
+
**viewport** (`{ width: number; height: number }`): Browser viewport dimensions. Controls window size and how pages render.
|
|
56
|
+
|
|
57
|
+
**timeout** (`number`): Default timeout in milliseconds for browser operations. (Default: `10000`)
|
|
58
|
+
|
|
59
|
+
**screencast** (`ScreencastOptions`): Screencast options for streaming browser frames to the UI.
|
|
60
|
+
|
|
61
|
+
**screencast.format** (`'jpeg' | 'png'`): Image format.
|
|
62
|
+
|
|
63
|
+
**screencast.quality** (`number`): JPEG quality 0–100.
|
|
64
|
+
|
|
65
|
+
**screencast.maxWidth** (`number`): Max width in pixels.
|
|
66
|
+
|
|
67
|
+
**screencast.maxHeight** (`number`): Max height in pixels.
|
|
68
|
+
|
|
69
|
+
**screencast.everyNthFrame** (`number`): Capture every Nth frame.
|
|
70
|
+
|
|
71
|
+
## Hydration
|
|
72
|
+
|
|
73
|
+
`StorageBrowserRef` is resolved lazily on `mastra.editor.agent.getById()`. The editor looks up `config.provider` on `MastraEditor.browsers` and calls `provider.createBrowser(config)`. If the provider is not registered, the editor logs a warning and returns `undefined` — the agent still loads, but without a browser.
|
|
74
|
+
|
|
75
|
+
## Related
|
|
76
|
+
|
|
77
|
+
- [Browser](https://mastra.ai/docs/agent-builder/browser) — concept and worked examples.
|
|
78
|
+
- [BrowserProvider](https://mastra.ai/reference/editor/browser-provider) — implementer-facing provider interface.
|
|
79
|
+
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — where this type is pinned as the Builder default.
|
|
80
|
+
- [StorageWorkspaceRef](https://mastra.ai/reference/editor/storage-workspace-ref) — sibling reference type for workspace configuration.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# StorageWorkspaceRef
|
|
2
|
+
|
|
3
|
+
`StorageWorkspaceRef` is the discriminated union used to attach a workspace to a stored agent. It either points at a workspace registered on the Mastra runtime by ID, or embeds a workspace snapshot inline.
|
|
4
|
+
|
|
5
|
+
It is the type used by [`BuilderAgentDefaults.workspace`](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) and by stored agent records.
|
|
6
|
+
|
|
7
|
+
## Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { MastraEditor } from '@mastra/editor'
|
|
11
|
+
|
|
12
|
+
// Variant 1 — reference a runtime workspace by id
|
|
13
|
+
new MastraEditor({
|
|
14
|
+
builder: {
|
|
15
|
+
enabled: true,
|
|
16
|
+
configuration: {
|
|
17
|
+
agent: {
|
|
18
|
+
workspace: { type: 'id', workspaceId: 'builder-workspace' },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
// Variant 2 — inline a workspace snapshot
|
|
25
|
+
new MastraEditor({
|
|
26
|
+
builder: {
|
|
27
|
+
enabled: true,
|
|
28
|
+
configuration: {
|
|
29
|
+
agent: {
|
|
30
|
+
workspace: {
|
|
31
|
+
type: 'inline',
|
|
32
|
+
config: {
|
|
33
|
+
name: 'inline-builder-workspace',
|
|
34
|
+
filesystem: {
|
|
35
|
+
provider: 'local',
|
|
36
|
+
config: { basePath: './agent-files' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Variants
|
|
47
|
+
|
|
48
|
+
**{ type: 'id'; workspaceId: string }** (`IdRef`): Reference a workspace registered on the Mastra runtime via \`new Mastra({ workspace })\` or \`mastra.addWorkspace()\`. The id is the join key between admin config, stored agent record, and hydration.
|
|
49
|
+
|
|
50
|
+
**{ type: 'id'; workspaceId: string }.type** (`'id'`): Discriminant. Must be the literal \`"id"\`.
|
|
51
|
+
|
|
52
|
+
**{ type: 'id'; workspaceId: string }.workspaceId** (`string`): Id of a workspace registered on the Mastra runtime. Used by the Builder to snapshot, persist, and later hydrate the workspace.
|
|
53
|
+
|
|
54
|
+
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }** (`InlineRef`): Embed a workspace snapshot directly. The Builder derives a deterministic id of the form \`inline-\<sha256(config)\[:12]>\` and persists the snapshot, so identical inline configs are deduplicated across agents.
|
|
55
|
+
|
|
56
|
+
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }.type** (`'inline'`): Discriminant. Must be the literal \`"inline"\`.
|
|
57
|
+
|
|
58
|
+
**{ type: 'inline'; config: StorageWorkspaceSnapshotType }.config** (`StorageWorkspaceSnapshotType`): Serialized workspace configuration (filesystem, sandbox, mounts, search, skills, tools). See the \`StorageWorkspaceSnapshotType\` section below for the field list.
|
|
59
|
+
|
|
60
|
+
## `StorageWorkspaceSnapshotType`
|
|
61
|
+
|
|
62
|
+
The shape embedded under `{ type: 'inline', config }`. Defined in `@mastra/core/storage`.
|
|
63
|
+
|
|
64
|
+
**name** (`string`): Display name of the workspace.
|
|
65
|
+
|
|
66
|
+
**description** (`string`): Purpose description shown in the workspace listing.
|
|
67
|
+
|
|
68
|
+
**filesystem** (`StorageFilesystemConfig`): Primary filesystem configuration. \`provider\` must match an id registered on \`MastraEditor.filesystems\` (built-in: \`local\`).
|
|
69
|
+
|
|
70
|
+
**sandbox** (`StorageSandboxConfig`): Sandbox configuration. \`provider\` must match an id registered on \`MastraEditor.sandboxes\` (built-in: \`local\`).
|
|
71
|
+
|
|
72
|
+
**mounts** (`Record<string, StorageFilesystemConfig>`): Additional filesystems mounted on the workspace, keyed by mount path.
|
|
73
|
+
|
|
74
|
+
**search** (`StorageSearchConfig`): Search configuration (vector provider, embedder, BM25 settings).
|
|
75
|
+
|
|
76
|
+
**skills** (`string[]`): Skill entity IDs assigned to this workspace.
|
|
77
|
+
|
|
78
|
+
**tools** (`StorageWorkspaceToolsConfig`): Workspace tool configuration (allowlists, defaults).
|
|
79
|
+
|
|
80
|
+
**autoSync** (`boolean`): Auto-sync between filesystem and sandbox. (Default: `false`)
|
|
81
|
+
|
|
82
|
+
**operationTimeout** (`number`): Timeout for individual operations in milliseconds.
|
|
83
|
+
|
|
84
|
+
## Hydration
|
|
85
|
+
|
|
86
|
+
`StorageWorkspaceRef` is resolved lazily on `mastra.editor.agent.getById()`, not on `list()`. The editor looks up filesystem and sandbox providers on `MastraEditor.filesystems` / `MastraEditor.sandboxes` and materializes a runtime `Workspace`. Missing providers surface as a warning and the workspace is omitted.
|
|
87
|
+
|
|
88
|
+
## Related
|
|
89
|
+
|
|
90
|
+
- [Workspace](https://mastra.ai/docs/agent-builder/workspace) — concept and worked examples.
|
|
91
|
+
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults) — where this type is pinned as the Builder default.
|
|
92
|
+
- [MastraEditor class](https://mastra.ai/reference/editor/mastra-editor) — registers filesystem and sandbox providers.
|
|
93
|
+
- [StorageBrowserRef](https://mastra.ai/reference/editor/storage-browser-ref) — sibling reference type for browser configuration.
|
|
@@ -69,7 +69,7 @@ import { runEvals } from '@mastra/core/evals'
|
|
|
69
69
|
import { createAnswerRelevancyScorer } from '@mastra/evals/scorers/prebuilt'
|
|
70
70
|
import { myAgent } from './agent'
|
|
71
71
|
|
|
72
|
-
const scorer = createAnswerRelevancyScorer({ model: 'openai/gpt-5.
|
|
72
|
+
const scorer = createAnswerRelevancyScorer({ model: 'openai/gpt-5.5' })
|
|
73
73
|
|
|
74
74
|
const result = await runEvals({
|
|
75
75
|
data: [
|
|
@@ -62,7 +62,7 @@ import { runEvals } from '@mastra/core/evals'
|
|
|
62
62
|
import { createAnswerSimilarityScorer } from '@mastra/evals/scorers/prebuilt'
|
|
63
63
|
import { myAgent } from './agent'
|
|
64
64
|
|
|
65
|
-
const scorer = createAnswerSimilarityScorer({ model: 'openai/gpt-5.
|
|
65
|
+
const scorer = createAnswerSimilarityScorer({ model: 'openai/gpt-5.5' })
|
|
66
66
|
|
|
67
67
|
const result = await runEvals({
|
|
68
68
|
data: [
|
|
@@ -82,7 +82,7 @@ import { runEvals } from '@mastra/core/evals'
|
|
|
82
82
|
import { createBiasScorer } from '@mastra/evals/scorers/prebuilt'
|
|
83
83
|
import { myAgent } from './agent'
|
|
84
84
|
|
|
85
|
-
const scorer = createBiasScorer({ model: 'openai/gpt-5.
|
|
85
|
+
const scorer = createBiasScorer({ model: 'openai/gpt-5.5' })
|
|
86
86
|
|
|
87
87
|
const result = await runEvals({
|
|
88
88
|
data: [
|
|
@@ -98,7 +98,7 @@ MAP = (1.0 + 0.67) / 2 = 0.835 ≈ **0.83**
|
|
|
98
98
|
|
|
99
99
|
```typescript
|
|
100
100
|
const scorer = createContextPrecisionScorer({
|
|
101
|
-
model: 'openai/gpt-5.
|
|
101
|
+
model: 'openai/gpt-5.5',
|
|
102
102
|
options: {
|
|
103
103
|
contextExtractor: (input, output) => {
|
|
104
104
|
// Extract context dynamically based on the query
|
|
@@ -117,7 +117,7 @@ const scorer = createContextPrecisionScorer({
|
|
|
117
117
|
|
|
118
118
|
```typescript
|
|
119
119
|
const scorer = createContextPrecisionScorer({
|
|
120
|
-
model: 'openai/gpt-5.
|
|
120
|
+
model: 'openai/gpt-5.5',
|
|
121
121
|
options: {
|
|
122
122
|
context: [
|
|
123
123
|
// Simulate retrieved documents from vector database
|
|
@@ -142,7 +142,7 @@ import { createContextPrecisionScorer } from '@mastra/evals/scorers/prebuilt'
|
|
|
142
142
|
import { myAgent } from './agent'
|
|
143
143
|
|
|
144
144
|
const scorer = createContextPrecisionScorer({
|
|
145
|
-
model: 'openai/gpt-5.
|
|
145
|
+
model: 'openai/gpt-5.5',
|
|
146
146
|
options: {
|
|
147
147
|
contextExtractor: (input, output) => {
|
|
148
148
|
// Extract context from agent's retrieved documents
|
|
@@ -119,7 +119,7 @@ import { createContextRelevanceScorerLLM } from '@mastra/evals'
|
|
|
119
119
|
|
|
120
120
|
// Stricter penalty configuration
|
|
121
121
|
const strictScorer = createContextRelevanceScorerLLM({
|
|
122
|
-
model: 'openai/gpt-5.
|
|
122
|
+
model: 'openai/gpt-5.5',
|
|
123
123
|
options: {
|
|
124
124
|
context: [
|
|
125
125
|
'Einstein won the Nobel Prize for photoelectric effect',
|
|
@@ -137,7 +137,7 @@ const strictScorer = createContextRelevanceScorerLLM({
|
|
|
137
137
|
|
|
138
138
|
// Lenient penalty configuration
|
|
139
139
|
const lenientScorer = createContextRelevanceScorerLLM({
|
|
140
|
-
model: 'openai/gpt-5.
|
|
140
|
+
model: 'openai/gpt-5.5',
|
|
141
141
|
options: {
|
|
142
142
|
context: [
|
|
143
143
|
'Einstein won the Nobel Prize for photoelectric effect',
|
|
@@ -183,7 +183,7 @@ console.log('Lenient penalties:', lenientResult.score) // Higher score, less pen
|
|
|
183
183
|
|
|
184
184
|
```typescript
|
|
185
185
|
const scorer = createContextRelevanceScorerLLM({
|
|
186
|
-
model: 'openai/gpt-5.
|
|
186
|
+
model: 'openai/gpt-5.5',
|
|
187
187
|
options: {
|
|
188
188
|
contextExtractor: (input, output) => {
|
|
189
189
|
// Extract context based on the query
|
|
@@ -207,7 +207,7 @@ const scorer = createContextRelevanceScorerLLM({
|
|
|
207
207
|
|
|
208
208
|
```typescript
|
|
209
209
|
const scorer = createContextRelevanceScorerLLM({
|
|
210
|
-
model: 'openai/gpt-5.
|
|
210
|
+
model: 'openai/gpt-5.5',
|
|
211
211
|
options: {
|
|
212
212
|
context: ['Relevant information...', 'Supporting details...'],
|
|
213
213
|
scale: 100, // Scale scores from 0-100 instead of 0-1
|
|
@@ -221,7 +221,7 @@ const scorer = createContextRelevanceScorerLLM({
|
|
|
221
221
|
|
|
222
222
|
```typescript
|
|
223
223
|
const scorer = createContextRelevanceScorerLLM({
|
|
224
|
-
model: 'openai/gpt-5.
|
|
224
|
+
model: 'openai/gpt-5.5',
|
|
225
225
|
options: {
|
|
226
226
|
contextExtractor: (input, output) => {
|
|
227
227
|
const query = input?.inputMessages?.[0]?.content || ''
|
|
@@ -248,7 +248,7 @@ This example shows excellent context relevance where all context directly suppor
|
|
|
248
248
|
import { createContextRelevanceScorerLLM } from '@mastra/evals'
|
|
249
249
|
|
|
250
250
|
const scorer = createContextRelevanceScorerLLM({
|
|
251
|
-
model: 'openai/gpt-5.
|
|
251
|
+
model: 'openai/gpt-5.5',
|
|
252
252
|
options: {
|
|
253
253
|
context: [
|
|
254
254
|
'Einstein won the Nobel Prize for his discovery of the photoelectric effect in 1921.',
|
|
@@ -295,7 +295,7 @@ This example shows moderate relevance with some context being irrelevant or unus
|
|
|
295
295
|
import { createContextRelevanceScorerLLM } from '@mastra/evals'
|
|
296
296
|
|
|
297
297
|
const scorer = createContextRelevanceScorerLLM({
|
|
298
|
-
model: 'openai/gpt-5.
|
|
298
|
+
model: 'openai/gpt-5.5',
|
|
299
299
|
options: {
|
|
300
300
|
context: [
|
|
301
301
|
'Solar eclipses occur when the Moon blocks the Sun.',
|
|
@@ -337,7 +337,7 @@ console.log(result)
|
|
|
337
337
|
|
|
338
338
|
// With custom penalty configuration
|
|
339
339
|
const customScorer = createContextRelevanceScorerLLM({
|
|
340
|
-
model: 'openai/gpt-5.
|
|
340
|
+
model: 'openai/gpt-5.5',
|
|
341
341
|
options: {
|
|
342
342
|
context: [
|
|
343
343
|
'Solar eclipses occur when the Moon blocks the Sun.',
|
|
@@ -384,7 +384,7 @@ This example shows poor context relevance with mostly irrelevant information:
|
|
|
384
384
|
import { createContextRelevanceScorerLLM } from '@mastra/evals'
|
|
385
385
|
|
|
386
386
|
const scorer = createContextRelevanceScorerLLM({
|
|
387
|
-
model: 'openai/gpt-5.
|
|
387
|
+
model: 'openai/gpt-5.5',
|
|
388
388
|
options: {
|
|
389
389
|
context: [
|
|
390
390
|
'The Great Barrier Reef is located in Australia.',
|
|
@@ -432,7 +432,7 @@ Extract context dynamically based on the run input:
|
|
|
432
432
|
import { createContextRelevanceScorerLLM } from '@mastra/evals'
|
|
433
433
|
|
|
434
434
|
const scorer = createContextRelevanceScorerLLM({
|
|
435
|
-
model: 'openai/gpt-5.
|
|
435
|
+
model: 'openai/gpt-5.5',
|
|
436
436
|
options: {
|
|
437
437
|
contextExtractor: (input, output) => {
|
|
438
438
|
// Extract query from input
|
|
@@ -475,7 +475,7 @@ Integrate with RAG pipelines to evaluate retrieved context:
|
|
|
475
475
|
import { createContextRelevanceScorerLLM } from '@mastra/evals'
|
|
476
476
|
|
|
477
477
|
const scorer = createContextRelevanceScorerLLM({
|
|
478
|
-
model: 'openai/gpt-5.
|
|
478
|
+
model: 'openai/gpt-5.5',
|
|
479
479
|
options: {
|
|
480
480
|
contextExtractor: (input, output) => {
|
|
481
481
|
// Extract from RAG retrieval results
|
|
@@ -49,6 +49,8 @@ const scorer = createScorer({
|
|
|
49
49
|
|
|
50
50
|
**judge.instructions** (`string`): System prompt/instructions for the LLM.
|
|
51
51
|
|
|
52
|
+
**judge.jsonPromptInjection** (`boolean`): When true, inject the JSON schema into the prompt instead of using the provider's native \`response\_format\` API. Set this for models that don't support native structured output (e.g. some Groq Llama models) to avoid a wasted 400 call.
|
|
53
|
+
|
|
52
54
|
**type** (`string`): Type specification for input/output. Use 'agent' for automatic agent types. For custom types, use the generic approach instead.
|
|
53
55
|
|
|
54
56
|
**prepareRun** (`(run: ScorerRun) => ScorerRun | Promise<ScorerRun>`): Transform the scorer run data before the pipeline executes. Use this to filter messages, limit context size, or drop fields the scorer doesn't need. The \[\`filterRun()\`]\(/reference/evals/filter-run) utility creates this function from declarative options. Can be async.
|
|
@@ -104,7 +104,7 @@ Use static context when you have known ground truth to compare against:
|
|
|
104
104
|
import { createHallucinationScorer } from '@mastra/evals/scorers/prebuilt'
|
|
105
105
|
|
|
106
106
|
const scorer = createHallucinationScorer({
|
|
107
|
-
model: 'openai/gpt-5.
|
|
107
|
+
model: 'openai/gpt-5.5',
|
|
108
108
|
options: {
|
|
109
109
|
context: [
|
|
110
110
|
'The first iPhone was announced on January 9, 2007.',
|
|
@@ -124,7 +124,7 @@ import { createHallucinationScorer } from '@mastra/evals/scorers/prebuilt'
|
|
|
124
124
|
import { extractToolResults } from '@mastra/evals/scorers'
|
|
125
125
|
|
|
126
126
|
const scorer = createHallucinationScorer({
|
|
127
|
-
model: 'openai/gpt-5.
|
|
127
|
+
model: 'openai/gpt-5.5',
|
|
128
128
|
options: {
|
|
129
129
|
getContext: ({ run, step }) => {
|
|
130
130
|
// Extract tool results as context
|
|
@@ -145,7 +145,7 @@ import { createHallucinationScorer } from '@mastra/evals/scorers/prebuilt'
|
|
|
145
145
|
import { extractToolResults } from '@mastra/evals/scorers'
|
|
146
146
|
|
|
147
147
|
const hallucinationScorer = createHallucinationScorer({
|
|
148
|
-
model: 'openai/gpt-5.
|
|
148
|
+
model: 'openai/gpt-5.5',
|
|
149
149
|
options: {
|
|
150
150
|
getContext: ({ run }) => {
|
|
151
151
|
const toolResults = extractToolResults(run.output)
|
|
@@ -156,7 +156,7 @@ const hallucinationScorer = createHallucinationScorer({
|
|
|
156
156
|
|
|
157
157
|
const agent = new Agent({
|
|
158
158
|
name: 'my-agent',
|
|
159
|
-
model: 'openai/gpt-5.
|
|
159
|
+
model: 'openai/gpt-5.5',
|
|
160
160
|
instructions: 'You are a helpful assistant.',
|
|
161
161
|
evals: {
|
|
162
162
|
scorers: [hallucinationScorer],
|
|
@@ -172,7 +172,7 @@ import { createHallucinationScorer } from '@mastra/evals/scorers/prebuilt'
|
|
|
172
172
|
import { myAgent } from './agent'
|
|
173
173
|
|
|
174
174
|
const scorer = createHallucinationScorer({
|
|
175
|
-
model: 'openai/gpt-5.
|
|
175
|
+
model: 'openai/gpt-5.5',
|
|
176
176
|
options: {
|
|
177
177
|
context: ['Known fact 1', 'Known fact 2'],
|
|
178
178
|
},
|