@mastra/mcp-docs-server 1.2.8-alpha.0 → 1.2.8-alpha.17
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/deploying.md +1 -0
- package/.docs/docs/agent-builder/integrations.md +1 -3
- package/.docs/docs/agent-builder/overview.md +1 -1
- package/.docs/docs/agent-controller/overview.md +1 -1
- package/.docs/docs/agents/overview.md +17 -13
- package/.docs/docs/agents/skills.md +1 -3
- package/.docs/docs/agents/structured-output.md +14 -7
- package/.docs/docs/agents/using-tools.md +80 -26
- package/.docs/docs/browser/agent-browser.md +1 -0
- package/.docs/docs/browser/firecrawl.md +129 -0
- package/.docs/docs/browser/overview.md +16 -2
- package/.docs/docs/capabilities/channels/other-adapters.md +1 -1
- package/.docs/docs/capabilities/channels/overview.md +1 -0
- package/.docs/docs/capabilities/channels/slack.md +113 -3
- package/.docs/docs/deployment/mastra-server.md +35 -0
- package/.docs/docs/deployment/monorepo.md +2 -0
- package/.docs/docs/deployment/overview.md +6 -0
- package/.docs/docs/deployment/sandbox.md +277 -0
- package/.docs/docs/editor/overview.md +2 -6
- package/.docs/docs/editor/tools.md +2 -6
- package/.docs/docs/evals/multi-turn.md +178 -0
- package/.docs/docs/evals/overview.md +1 -0
- package/.docs/docs/evals/running-in-ci.md +3 -9
- package/.docs/docs/getting-started/file-based-agents.md +2 -2
- package/.docs/docs/index.md +17 -13
- package/.docs/docs/long-running-agents/background-tasks.md +2 -2
- package/.docs/docs/long-running-agents/durable-agents.md +2 -1
- package/.docs/docs/long-running-agents/schedules.md +2 -2
- package/.docs/docs/mastra-platform/database.md +13 -6
- package/.docs/docs/mastra-platform/deploy.md +17 -8
- package/.docs/docs/mastra-platform/environments.md +5 -4
- package/.docs/docs/mastra-platform/regions.md +73 -0
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/memory/multi-user-threads.md +4 -4
- package/.docs/docs/memory/observational-memory.md +78 -3
- package/.docs/docs/memory/overview.md +4 -0
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/integrations/bridges/otel.md +1 -3
- package/.docs/docs/observability/integrations/exporters/braintrust.md +34 -2
- package/.docs/docs/observability/integrations/exporters/otel.md +1 -3
- package/.docs/docs/server/auth/simple-auth.md +1 -3
- package/.docs/docs/server/request-context.md +2 -0
- package/.docs/docs/studio/overview.md +2 -0
- package/.docs/docs/voice/livekit.md +1 -1
- package/.docs/docs/workflows/control-flow.md +1 -3
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +1 -0
- package/.docs/guides/guide/signal-provider.md +2 -0
- package/.docs/guides/migrations/vnext-to-standard-apis.md +1 -3
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/openrouter.md +339 -345
- package/.docs/models/gateways/vercel.md +6 -5
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/ambient.md +12 -10
- package/.docs/models/providers/baseten.md +3 -2
- package/.docs/models/providers/crossmodel.md +2 -1
- package/.docs/models/providers/deepinfra.md +4 -7
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/evroc.md +3 -2
- package/.docs/models/providers/google.md +2 -2
- package/.docs/models/providers/kilo.md +1 -1
- package/.docs/models/providers/kimi-for-coding.md +10 -11
- package/.docs/models/providers/llmgateway.md +3 -8
- package/.docs/models/providers/moonshotai-cn.md +3 -2
- package/.docs/models/providers/moonshotai.md +3 -2
- package/.docs/models/providers/nebius.md +3 -1
- package/.docs/models/providers/ollama-cloud.md +25 -42
- package/.docs/models/providers/opencode-go.md +5 -3
- package/.docs/models/providers/orcarouter.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +10 -10
- package/.docs/models/providers/thinkingmachines.md +73 -0
- package/.docs/models/providers/togetherai.md +2 -6
- package/.docs/models/providers/zenmux.md +2 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/acp/acp-agent.md +2 -0
- package/.docs/reference/acp/create-acp-tool.md +28 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +1 -1
- package/.docs/reference/agent-controller/session.md +15 -0
- package/.docs/reference/agents/agent.md +14 -2
- package/.docs/reference/agents/durable-agent.md +23 -0
- package/.docs/reference/agents/generate.md +19 -1
- package/.docs/reference/browser/firecrawl-browser.md +71 -0
- package/.docs/reference/cli/mastra.md +14 -6
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -3
- package/.docs/reference/core/getMCPServer.md +1 -3
- package/.docs/reference/core/getMCPServerById.md +1 -3
- package/.docs/reference/core/getTool.md +33 -0
- package/.docs/reference/core/getToolById.md +48 -0
- package/.docs/reference/core/getWorkflow.md +1 -3
- package/.docs/reference/core/listMCPServers.md +2 -6
- package/.docs/reference/core/listTools.md +38 -0
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/datasets/addItem.md +1 -3
- package/.docs/reference/datasets/addItems.md +1 -3
- package/.docs/reference/datasets/compareExperiments.md +1 -3
- package/.docs/reference/datasets/create.md +1 -3
- package/.docs/reference/datasets/dataset.md +2 -6
- package/.docs/reference/datasets/datasets-manager.md +5 -15
- package/.docs/reference/datasets/delete.md +1 -3
- package/.docs/reference/datasets/deleteExperiment.md +1 -3
- package/.docs/reference/datasets/deleteItem.md +1 -3
- package/.docs/reference/datasets/deleteItems.md +1 -3
- package/.docs/reference/datasets/get.md +1 -3
- package/.docs/reference/datasets/getDetails.md +1 -3
- package/.docs/reference/datasets/getExperiment.md +1 -3
- package/.docs/reference/datasets/getItem.md +1 -3
- package/.docs/reference/datasets/getItemHistory.md +1 -3
- package/.docs/reference/datasets/list.md +1 -3
- package/.docs/reference/datasets/listExperimentResults.md +1 -3
- package/.docs/reference/datasets/listExperiments.md +1 -3
- package/.docs/reference/datasets/listItems.md +1 -3
- package/.docs/reference/datasets/listVersions.md +1 -3
- package/.docs/reference/datasets/startExperiment.md +1 -3
- package/.docs/reference/datasets/startExperimentAsync.md +1 -3
- package/.docs/reference/datasets/update.md +1 -3
- package/.docs/reference/datasets/updateItem.md +1 -3
- package/.docs/reference/editor/mastra-editor.md +1 -3
- package/.docs/reference/evals/create-scorer.md +4 -10
- package/.docs/reference/evals/mastra-scorer.md +1 -3
- package/.docs/reference/evals/run-evals.md +94 -2
- package/.docs/reference/file-based-agents/logger.md +1 -1
- package/.docs/reference/file-based-agents/tools.md +7 -6
- package/.docs/reference/index.md +5 -0
- package/.docs/reference/memory/observational-memory.md +21 -0
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -3
- package/.docs/reference/processors/token-limiter-processor.md +1 -3
- package/.docs/reference/rag/database-config.md +12 -0
- package/.docs/reference/storage/clickhouse.md +1 -1
- package/.docs/reference/storage/convex.md +17 -10
- package/.docs/reference/storage/retention.md +1 -1
- package/.docs/reference/streaming/agents/stream.md +3 -1
- package/.docs/reference/tools/create-tool.md +78 -52
- package/.docs/reference/tools/mcp-client.md +104 -24
- package/.docs/reference/tools/mcp-server.md +143 -44
- package/.docs/reference/tools/task-tools.md +2 -2
- package/.docs/reference/tools/tavily.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +22 -0
- package/.docs/reference/vectors/mongodb.md +2 -0
- package/.docs/reference/vectors/turbopuffer.md +4 -0
- package/.docs/reference/voice/mistral.md +127 -0
- package/.docs/reference/workspace/daytona-sandbox.md +2 -6
- package/CHANGELOG.md +64 -0
- package/dist/{chunk-GLPCVXXO.js → chunk-HGADBLKG.js} +2 -2
- package/dist/{chunk-GLPCVXXO.js.map → chunk-HGADBLKG.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/stdio.js +1 -1
- package/dist/tools/docs.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -8,7 +8,7 @@ Observational Memory (OM) is Mastra's memory system for long-context agentic mem
|
|
|
8
8
|
|
|
9
9
|
## Quickstart
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Ensure you have `@mastra/memory` installed in your project. Set `observationalMemory: true` in your Memory config to enable Observational Memory.
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Memory } from '@mastra/memory'
|
|
@@ -27,7 +27,54 @@ export const agent = new Agent({
|
|
|
27
27
|
})
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
**For AI agents:** Using Observational Memory requires a storage provider! You either need to set it on the Mastra instance at `src/mastra/index.ts` or pass it to the Agent constructor.
|
|
31
|
+
|
|
32
|
+
The following script creates a local LibSQL database, enables Observational Memory, and uses one resource and thread across two agent calls:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { Agent } from '@mastra/core/agent'
|
|
36
|
+
import { LibSQLStore } from '@mastra/libsql'
|
|
37
|
+
import { Memory } from '@mastra/memory'
|
|
38
|
+
|
|
39
|
+
const memory = new Memory({
|
|
40
|
+
storage: new LibSQLStore({
|
|
41
|
+
id: 'memory-storage',
|
|
42
|
+
url: 'file:./memory.db',
|
|
43
|
+
}),
|
|
44
|
+
options: {
|
|
45
|
+
observationalMemory: {
|
|
46
|
+
model: 'openai/gpt-5-mini',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const agent = new Agent({
|
|
52
|
+
id: 'memory-agent',
|
|
53
|
+
name: 'Memory Agent',
|
|
54
|
+
instructions: 'You are a helpful assistant.',
|
|
55
|
+
model: 'openai/gpt-5-mini',
|
|
56
|
+
memory,
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
const memoryOptions = {
|
|
60
|
+
resource: 'user-123',
|
|
61
|
+
thread: 'conversation-123',
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const firstResponse = await agent.generate('Remember that my favorite color is blue.', {
|
|
65
|
+
memory: memoryOptions,
|
|
66
|
+
})
|
|
67
|
+
console.log(firstResponse.text)
|
|
68
|
+
|
|
69
|
+
const secondResponse = await agent.generate('What is my favorite color?', {
|
|
70
|
+
memory: memoryOptions,
|
|
71
|
+
})
|
|
72
|
+
console.log(secondResponse.text)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The `resource` identifies the user or entity, while the `thread` identifies the conversation. Reuse both values to continue the same conversation. Observational Memory processes the stored history as it grows and replaces older messages with observations when its activation conditions are met.
|
|
76
|
+
|
|
77
|
+
The agent now has humanlike long-term memory that persists across conversations. Setting `observationalMemory: true` uses `google/gemini-2.5-flash` by default. To use a different model, pass it in the config object:
|
|
31
78
|
|
|
32
79
|
```typescript
|
|
33
80
|
const memory = new Memory({
|
|
@@ -47,7 +94,7 @@ See [configuration options](https://mastra.ai/reference/memory/observational-mem
|
|
|
47
94
|
>
|
|
48
95
|
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/guides/build-your-ui/ai-sdk-ui).
|
|
49
96
|
|
|
50
|
-
> **Note:** OM currently only supports `@mastra/pg`, `@mastra/libsql`, and `@mastra/
|
|
97
|
+
> **Note:** OM currently only supports `@mastra/pg`, `@mastra/libsql`, `@mastra/mongodb`, and `@mastra/convex` storage adapters. It uses background agents for managing memory. When no model is set, the default model is `google/gemini-2.5-flash`.
|
|
51
98
|
|
|
52
99
|
## Temporal gap markers
|
|
53
100
|
|
|
@@ -237,6 +284,34 @@ new Extractor({
|
|
|
237
284
|
})
|
|
238
285
|
```
|
|
239
286
|
|
|
287
|
+
#### Read extracted values from a stream
|
|
288
|
+
|
|
289
|
+
Extractor results are emitted when OM completes an observation or reflection. Read both completion data parts from the stream:
|
|
290
|
+
|
|
291
|
+
```typescript
|
|
292
|
+
const stream = await agent.stream('Remember that I prefer dark mode.')
|
|
293
|
+
|
|
294
|
+
for await (const chunk of stream.fullStream) {
|
|
295
|
+
if (chunk.type === 'data-om-observation-end' || chunk.type === 'data-om-buffering-end') {
|
|
296
|
+
const { operationType, extractedValues = {}, extractionFailures = [] } = chunk.data
|
|
297
|
+
|
|
298
|
+
for (const [slug, value] of Object.entries(extractedValues)) {
|
|
299
|
+
console.log(`${operationType} extractor ${slug}:`, value)
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
for (const failure of extractionFailures) {
|
|
303
|
+
console.error(`Extractor ${failure.slug} failed:`, failure.error)
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
`extractedValues` uses each extractor's slug as its key. Both result fields are optional, and a failed extractor doesn't remove values from successful extractors.
|
|
310
|
+
|
|
311
|
+
`data-om-observation-end` reports a synchronous completion. `data-om-buffering-end` reports completed background work. Its extractor metadata is persisted immediately, but the buffered content remains inactive until activation. Check `operationType` to determine whether the completed work was an observation or reflection.
|
|
312
|
+
|
|
313
|
+
See the [`data-om-observation-end`](https://mastra.ai/reference/memory/observational-memory) and [`data-om-buffering-end`](https://mastra.ai/reference/memory/observational-memory) reference tables for the complete payloads.
|
|
314
|
+
|
|
240
315
|
### Working memory updates
|
|
241
316
|
|
|
242
317
|
Use `observationalMemory.observation.manageWorkingMemory` to let the Observer manage working memory automatically. The main agent no longer needs to call the working memory tool while it handles the user request, so working memory updates don't depend on the agent remembering to make them.
|
|
@@ -81,6 +81,8 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
|
|
|
81
81
|
|
|
82
82
|
3. Add the storage provider to your main Mastra instance to enable memory across all configured agents.
|
|
83
83
|
|
|
84
|
+
**For AI agents:** Important: Add `id` to `LibSQLStore`.
|
|
85
|
+
|
|
84
86
|
```typescript
|
|
85
87
|
import { Mastra } from '@mastra/core'
|
|
86
88
|
import { LibSQLStore } from '@mastra/libsql'
|
|
@@ -151,6 +153,8 @@ To list all threads for a resource, or retrieve a specific thread, [use the memo
|
|
|
151
153
|
|
|
152
154
|
For long-running conversations, raw message history grows until it fills the context window, degrading agent performance. [Observational Memory](https://mastra.ai/docs/memory/observational-memory) solves this by running background agents that compress old messages into dense observations, keeping the context window small while preserving long-term memory.
|
|
153
155
|
|
|
156
|
+
**For AI agents:** Using Observational Memory requires a storage provider! You either need to set it on the Mastra instance at `src/mastra/index.ts` or pass it to the Agent constructor.
|
|
157
|
+
|
|
154
158
|
```typescript
|
|
155
159
|
import { Agent } from '@mastra/core/agent'
|
|
156
160
|
import { Memory } from '@mastra/memory'
|
|
@@ -403,7 +403,7 @@ By default, working memory reaches the model as part of the system message. You
|
|
|
403
403
|
|
|
404
404
|
```typescript
|
|
405
405
|
const memory = new Memory({
|
|
406
|
-
storage: new LibSQLStore({ url: 'file:./mastra.db' }),
|
|
406
|
+
storage: new LibSQLStore({ id: 'mastra-storage', url: 'file:./mastra.db' }),
|
|
407
407
|
options: {
|
|
408
408
|
workingMemory: {
|
|
409
409
|
enabled: true,
|
|
@@ -109,10 +109,38 @@ new BraintrustExporter({
|
|
|
109
109
|
|
|
110
110
|
## Attach traces to Braintrust evals
|
|
111
111
|
|
|
112
|
+
Install the Braintrust SDK directly when your application uses `Eval()`, `logger.traced()`, or `currentSpan`:
|
|
113
|
+
|
|
114
|
+
**npm**:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npm install braintrust@latest
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**pnpm**:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pnpm add braintrust@latest
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Yarn**:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
yarn add braintrust@latest
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Bun**:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
bun add braintrust@latest
|
|
136
|
+
```
|
|
137
|
+
|
|
112
138
|
When you run Mastra inside Braintrust `Eval()` or `logger.traced()`, pass the Braintrust logger and `currentSpan` resolver to the exporter. Import `currentSpan` from the same `braintrust` package instance that creates the eval or traced span.
|
|
113
139
|
|
|
114
140
|
This helps Mastra attach its spans under the active Braintrust span when your app and `@mastra/braintrust` resolve different installed copies of the Braintrust SDK.
|
|
115
141
|
|
|
142
|
+
The exporter accepts compatible logger and span objects from Braintrust SDK v2 and v3. Your application's Braintrust SDK version doesn't need to match the version installed by `@mastra/braintrust`.
|
|
143
|
+
|
|
116
144
|
```typescript
|
|
117
145
|
import { currentSpan, initLogger } from 'braintrust'
|
|
118
146
|
import { BraintrustExporter } from '@mastra/braintrust'
|
|
@@ -144,15 +172,19 @@ await Eval('my-project', {
|
|
|
144
172
|
})
|
|
145
173
|
```
|
|
146
174
|
|
|
175
|
+
If your application upgrades its direct Braintrust dependency from v2 to v3 and uses Nunjucks prompt templates, follow the [Braintrust v2 to v3 migration guide](https://www.braintrust.dev/docs/sdks/typescript/migrations/v2-to-v3).
|
|
176
|
+
|
|
147
177
|
## Querying Braintrust with returned `spanId`
|
|
148
178
|
|
|
149
|
-
|
|
179
|
+
Mastra uses its returned `spanId` as both the Braintrust row ID and span ID. Use it to find the corresponding Braintrust span by `id` or `span_id`.
|
|
180
|
+
|
|
181
|
+
Braintrust v3 stores a separate W3C trace ID in `root_span_id`, so the returned Mastra `spanId` isn't the Braintrust `root_span_id`.
|
|
150
182
|
|
|
151
183
|
```typescript
|
|
152
184
|
const result = await agent.stream('Summarize this ticket')
|
|
153
185
|
|
|
154
186
|
console.log('Mastra trace ID:', result.traceId)
|
|
155
|
-
console.log('Braintrust
|
|
187
|
+
console.log('Braintrust row and span ID:', result.spanId)
|
|
156
188
|
|
|
157
189
|
// Use result.spanId in your Braintrust lookup/query path
|
|
158
190
|
```
|
|
@@ -247,6 +247,8 @@ auth: {
|
|
|
247
247
|
}
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
+
When the resource ID is derived this way, clients can omit `memory.resource` from agent generate and stream request bodies — the server-derived value is used instead (and always takes precedence over any client-provided value). If a request uses memory and neither the body nor the request context provides a resource ID, the server responds with a 400 error.
|
|
251
|
+
|
|
250
252
|
You can also set these keys manually in middleware:
|
|
251
253
|
|
|
252
254
|
```typescript
|
|
@@ -91,6 +91,8 @@ See [request context](https://mastra.ai/docs/server/request-context) for configu
|
|
|
91
91
|
|
|
92
92
|
## Evaluation
|
|
93
93
|
|
|
94
|
+
Use the date filter to limit score metrics to a preset or custom time range.
|
|
95
|
+
|
|
94
96
|
### Scorers
|
|
95
97
|
|
|
96
98
|
The Scorers tab displays the results of your agent's scorers as they run. When messages pass through your agent, the defined scorers evaluate each output asynchronously and render their results here. This allows you to understand how your scorers respond to different interactions, compare performance across test cases, and identify areas for improvement.
|
|
@@ -360,7 +360,7 @@ import { LibSQLStore } from '@mastra/libsql'
|
|
|
360
360
|
import { Observability, MastraStorageExporter } from '@mastra/observability'
|
|
361
361
|
|
|
362
362
|
export const mastra = new Mastra({
|
|
363
|
-
storage: new LibSQLStore({ url: 'file:./voice-agent.db' }),
|
|
363
|
+
storage: new LibSQLStore({ id: 'voice-agent-storage', url: 'file:./voice-agent.db' }),
|
|
364
364
|
observability: new Observability({
|
|
365
365
|
configs: {
|
|
366
366
|
default: {
|
|
@@ -591,9 +591,7 @@ const embedStep = createStep({
|
|
|
591
591
|
inputSchema: z.object({ chunk: z.string() }),
|
|
592
592
|
outputSchema: z.object({ embedding: z.array(z.number()) }),
|
|
593
593
|
execute: async ({ inputData }) => ({
|
|
594
|
-
embedding: [
|
|
595
|
-
/* vector embedding */
|
|
596
|
-
],
|
|
594
|
+
embedding: [/* vector embedding */],
|
|
597
595
|
}),
|
|
598
596
|
})
|
|
599
597
|
|
|
@@ -26,6 +26,7 @@ import { LibSQLStore } from '@mastra/libsql'
|
|
|
26
26
|
|
|
27
27
|
export const mastra = new Mastra({
|
|
28
28
|
storage: new LibSQLStore({
|
|
29
|
+
id: 'mastra-storage',
|
|
29
30
|
url: 'file:./mastra.db',
|
|
30
31
|
}),
|
|
31
32
|
})
|
|
@@ -133,6 +134,7 @@ import { devAgent } from './agents/dev-agent'
|
|
|
133
134
|
export const mastra = new Mastra({
|
|
134
135
|
agents: { devAgent },
|
|
135
136
|
storage: new LibSQLStore({
|
|
137
|
+
id: 'mastra-storage',
|
|
136
138
|
url: 'file:./mastra.db',
|
|
137
139
|
}),
|
|
138
140
|
})
|
|
@@ -245,9 +245,7 @@ The following options are available in the standard `.stream()` and `generate()`
|
|
|
245
245
|
const result = await agent.stream(messages, {
|
|
246
246
|
prepareStep: ({ step, state }) => {
|
|
247
247
|
console.log('About to execute step:', step)
|
|
248
|
-
return {
|
|
249
|
-
/* modified state */
|
|
250
|
-
}
|
|
248
|
+
return {/* modified state */}
|
|
251
249
|
},
|
|
252
250
|
})
|
|
253
251
|
```
|
|
@@ -132,6 +132,7 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
132
132
|
| [Tencent Token Plan](https://mastra.ai/models/providers/tencent-token-plan) | `tencent-token-plan/*` | `TENCENT_TOKEN_PLAN_API_KEY` |
|
|
133
133
|
| [Tencent TokenHub](https://mastra.ai/models/providers/tencent-tokenhub) | `tencent-tokenhub/*` | `TENCENT_TOKENHUB_API_KEY` |
|
|
134
134
|
| [The Grid AI](https://mastra.ai/models/providers/the-grid-ai) | `the-grid-ai/*` | `THEGRIDAI_API_KEY` |
|
|
135
|
+
| [Thinking Machines](https://mastra.ai/models/providers/thinkingmachines) | `thinkingmachines/*` | `TINKER_API_KEY` |
|
|
135
136
|
| [Tinfoil](https://mastra.ai/models/providers/tinfoil) | `tinfoil/*` | `TINFOIL_API_KEY` |
|
|
136
137
|
| [Together AI](https://mastra.ai/models/providers/togetherai) | `togetherai/*` | `TOGETHER_API_KEY` |
|
|
137
138
|
| [TrustedRouter](https://mastra.ai/models/providers/trustedrouter) | `trustedrouter/*` | `TRUSTEDROUTER_API_KEY` |
|