@mastra/mcp-docs-server 1.3.9-alpha.6 → 1.3.9-alpha.8
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/agents/human-in-the-loop.md +2 -1
- package/.docs/docs/harness/agent-controller.md +1 -1
- package/.docs/docs/harness/durable-agents.md +17 -5
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/memory/observational-memory.md +4 -2
- package/.docs/docs/studio/overview.md +8 -0
- package/.docs/docs/workflows/control-flow.md +3 -1
- package/.docs/docs/workflows/overview.md +2 -0
- package/.docs/docs/workflows/time-travel.md +1 -1
- package/.docs/integrations/databases/clickhouse.md +1 -1
- package/.docs/integrations/voice/google.md +6 -0
- package/.docs/models/gateways/merge-gateway.md +3 -1
- package/.docs/models/gateways/netlify.md +6 -4
- package/.docs/models/gateways/openrouter.md +6 -4
- package/.docs/models/gateways/vercel.md +7 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +31 -30
- package/.docs/models/providers/baseten.md +27 -25
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/coralbricks.md +5 -8
- package/.docs/models/providers/cortecs.md +4 -4
- package/.docs/models/providers/deepinfra.md +2 -1
- package/.docs/models/providers/edenai.md +12 -6
- package/.docs/models/providers/empiriolabs.md +3 -1
- package/.docs/models/providers/engy.md +12 -11
- package/.docs/models/providers/fireworks-ai.md +2 -1
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/hyper.md +26 -25
- package/.docs/models/providers/kilo.md +21 -19
- package/.docs/models/providers/llmgateway-providers.md +9 -5
- package/.docs/models/providers/llmgateway.md +3 -1
- package/.docs/models/providers/minimax-cn-coding-plan.md +2 -1
- package/.docs/models/providers/minimax-cn.md +3 -2
- package/.docs/models/providers/minimax-coding-plan.md +2 -1
- package/.docs/models/providers/minimax.md +3 -2
- package/.docs/models/providers/nano-gpt.md +52 -55
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +2 -1
- package/.docs/models/providers/novita-ai.md +2 -1
- package/.docs/models/providers/nvidia.md +2 -1
- package/.docs/models/providers/ofox.md +2 -1
- package/.docs/models/providers/ollama-cloud.md +31 -29
- package/.docs/models/providers/opencode-go.md +2 -2
- package/.docs/models/providers/opencode.md +2 -2
- package/.docs/models/providers/prime.md +3 -1
- package/.docs/models/providers/requesty.md +4 -1
- package/.docs/models/providers/standardcompute.md +47 -8
- package/.docs/models/providers/togetherai.md +4 -1
- package/.docs/models/providers/upstage.md +8 -7
- package/.docs/models/providers/zenmux.md +2 -1
- package/.docs/reference/agents/channels.md +5 -1
- package/.docs/reference/agents/durable-agent.md +11 -6
- package/.docs/reference/classifier/classifier.md +29 -5
- package/.docs/reference/cli/mastra.md +39 -4
- package/.docs/reference/client-js/agent-controller.md +2 -0
- package/.docs/reference/client-js/observability.md +121 -6
- package/.docs/reference/core/mastra-class.md +7 -1
- package/.docs/reference/evals/create-classifier-scorer.md +1 -0
- package/.docs/reference/index.md +1 -1
- package/.docs/reference/memory/observational-memory.md +2 -2
- package/.docs/reference/observability/tracing/{trace-query.md → advanced-queries.md} +477 -158
- package/.docs/reference/processors/classifier-processor.md +8 -6
- package/.docs/reference/processors/model-selection-processor.md +2 -2
- package/.docs/reference/processors/moderation-processor.md +5 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +4 -0
- package/.docs/reference/signals/create-notification-inbox-tool.md +11 -9
- package/.docs/reference/tools/create-tool.md +2 -2
- package/.docs/reference/tools/mcp-client.md +2 -2
- package/.docs/reference/workflows/dynamic-workflow-definition.md +1 -1
- package/.docs/reference/workflows/run-methods/resume.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +15 -16
- package/.docs/reference/workflows/step.md +1 -0
- package/.docs/reference/workflows/workflow-methods/classifier.md +1 -0
- package/.docs/reference/workspace/factory-sandbox.md +2 -0
- package/.docs/reference/workspace/filesystem.md +4 -0
- package/.docs/reference/workspace/workspace-class.md +10 -10
- package/package.json +8 -9
|
@@ -109,6 +109,121 @@ The additional identity, context and parent/root entity filters require an updat
|
|
|
109
109
|
|
|
110
110
|
DuckDB returns `null` for parent/root entity type, ID and name, and for `executionSource`. Equality filters on these fields match no spans. Parent/root entity version IDs remain available.
|
|
111
111
|
|
|
112
|
+
## Querying threads
|
|
113
|
+
|
|
114
|
+
`queryTraceThreads()` returns thread summaries from completed traces through `POST /observability/threads/query`. Each row includes activity timestamps, trace counts, context and previews. Traces without a thread ID aren't included.
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
const result = await mastraClient.queryTraceThreads({
|
|
118
|
+
timeRange: {
|
|
119
|
+
traces: {
|
|
120
|
+
from: '2026-10-01T00:00:00.000Z',
|
|
121
|
+
to: '2026-10-02T00:00:00.000Z',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
where: { op: 'eq', left: { path: 'status' }, right: { literal: 'error' } },
|
|
125
|
+
orderBy: [{ field: 'endedAt', direction: 'desc' }],
|
|
126
|
+
page: { limit: 100 },
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
for (const thread of result.threads) {
|
|
130
|
+
console.log(thread.firstTraceId, thread.lastTraceId, thread.traceCount, thread.outputPreview)
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Thread time ranges
|
|
135
|
+
|
|
136
|
+
Choose exactly one time selector. Each range requires ISO timestamps with `from` earlier than `to`. The range includes `from` and excludes `to`.
|
|
137
|
+
|
|
138
|
+
| Selector | Matches threads with |
|
|
139
|
+
| ----------------------------------------------------- | --------------------------------------------- |
|
|
140
|
+
| `timeRange.traces: { from, to }` | At least one trace that started in the window |
|
|
141
|
+
| `timeRange.threads: { field: 'startedAt', from, to }` | Their first activity in the window |
|
|
142
|
+
| `timeRange.threads: { field: 'endedAt', from, to }` | Their last activity in the window |
|
|
143
|
+
|
|
144
|
+
For example, find threads whose most recent activity falls on October 1:
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
const result = await mastraClient.queryTraceThreads({
|
|
148
|
+
timeRange: {
|
|
149
|
+
threads: {
|
|
150
|
+
field: 'endedAt',
|
|
151
|
+
from: '2026-10-01T00:00:00.000Z',
|
|
152
|
+
to: '2026-10-02T00:00:00.000Z',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
})
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Rows include the full retained history within the authorized scope, including traces before and after the window. Filters apply to these complete rows. An `environment` filter checks the first trace's environment.
|
|
159
|
+
|
|
160
|
+
### Thread filters
|
|
161
|
+
|
|
162
|
+
Use `where` to filter thread rows. Combine predicates with `and`, `or` and `not`.
|
|
163
|
+
|
|
164
|
+
| Fields | Operators |
|
|
165
|
+
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
166
|
+
| `threadId`, `organizationId`, `firstTraceId`, `lastTraceId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
|
|
167
|
+
| `resourceId`, `userId`, `runId`, `sessionId`, `requestId`, `serviceName`, `experimentId`, `environment`, `executionSource` | Same string operators |
|
|
168
|
+
| `entityType`, `entityId`, `entityName`, `entityVersionId` | Same string operators |
|
|
169
|
+
| `status` | `eq`, `ne`, `in`, `notIn`, with values `success` or `error` |
|
|
170
|
+
| `startedAt`, `endedAt`, `timeToFirstChunkMs` | `eq`, `ne`, `lt`, `lte`, `gt`, `gte`, `in`, `notIn`, `exists`, `notExists` |
|
|
171
|
+
| `traceCount` | `eq`, `ne`, `lt`, `lte`, `gt`, `gte` |
|
|
172
|
+
|
|
173
|
+
For example, filter for threads from selected agents with at least three traces:
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
const result = await mastraClient.queryTraceThreads({
|
|
177
|
+
timeRange: {
|
|
178
|
+
traces: {
|
|
179
|
+
from: '2026-10-01T00:00:00.000Z',
|
|
180
|
+
to: '2026-10-02T00:00:00.000Z',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
where: {
|
|
184
|
+
op: 'and',
|
|
185
|
+
args: [
|
|
186
|
+
{ op: 'in', value: { path: 'entityId' }, set: ['support-agent', 'sales-agent'] },
|
|
187
|
+
{ op: 'gte', left: { path: 'traceCount' }, right: { literal: 3 } },
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
})
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Presence filters use `{ op: 'exists', path: 'userId' }` to check for a non-null value. Model/provider and previews are available in returned rows but aren't filterable.
|
|
194
|
+
|
|
195
|
+
### Thread response
|
|
196
|
+
|
|
197
|
+
The response is `{ threads, page: { next } }`, without a total count. Each entry in `threads` contains these fields:
|
|
198
|
+
|
|
199
|
+
| Returned fields | Meaning |
|
|
200
|
+
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
201
|
+
| `threadId`, `organizationId` | Thread identity. Equal thread IDs in different organizations remain separate. |
|
|
202
|
+
| `firstTraceId`, `lastTraceId` | Earliest and latest trace by start time. Equal start times use trace ID as a deterministic tie-breaker. |
|
|
203
|
+
| `resourceId`, `userId`, `runId`, `sessionId`, `requestId`, `serviceName`, `experimentId`, `environment`, `executionSource` | First-trace context, or `null` when missing. |
|
|
204
|
+
| `entityType`, `entityId`, `entityName`, `entityVersionId` | First-trace entity. |
|
|
205
|
+
| `startedAt`, `endedAt` | Earliest start and maximum end time across the thread. |
|
|
206
|
+
| `status` | `error` when the last-started trace's root span has an error, otherwise `success`. |
|
|
207
|
+
| `traceCount` | Number of logical traces in the thread. |
|
|
208
|
+
| `inputPreview` | First trace's input preview. |
|
|
209
|
+
| `outputPreview`, `errorPreview` | Last-started trace's previews. |
|
|
210
|
+
| `timeToFirstChunkMs` | First trace's root agent time to first chunk, in milliseconds. `null` when unavailable or the root isn't an agent. |
|
|
211
|
+
| `model`, `provider` | Model/provider from the first completed model generation directly under the first trace's root agent. `null` when unavailable. |
|
|
212
|
+
|
|
213
|
+
An earlier-started trace can finish last. In that case, it supplies `endedAt`, while the last-started trace still supplies status and output/error previews. Missing first-trace values aren't replaced with values from a later trace.
|
|
214
|
+
|
|
215
|
+
### Thread ordering and pagination
|
|
216
|
+
|
|
217
|
+
Ordering accepts exactly one of `startedAt` or `endedAt`, with direction `asc` or `desc`. The default is `endedAt` descending. Pages default to 100 rows and allow at most 1,000. Pass `result.page.next` as `page.after` with the same time selector, filters, scope and ordering. A `null` cursor means no more pages are available. Pagination reflects live data, so new traces can move a thread between pages.
|
|
218
|
+
|
|
219
|
+
To load the traces within a thread, use [`queryTraces()`](#querying-traces) with a `threadId` filter and a time range covering the thread's activity.
|
|
220
|
+
|
|
221
|
+
### Thread query support
|
|
222
|
+
|
|
223
|
+
Check `capabilities.threadQueryRows` from `getObservabilityCapabilities()` before using this contract. A missing or false value means full thread rows aren't available. Older core or storage packages return a structured `501` for these requests. Legacy identity requests remain supported for mixed package versions.
|
|
224
|
+
|
|
225
|
+
ClickHouse rejects broad thread queries when the authorized history exceeds 250,000 stored trace-root rows, including duplicate copies. A narrower time range can still succeed by selecting fewer candidate threads. Rejected queries return `503 TRACE_QUERY_RESOURCE_LIMIT` without partial results.
|
|
226
|
+
|
|
112
227
|
## Querying traces
|
|
113
228
|
|
|
114
229
|
`queryTraces()` finds completed logical traces using trace fields and conditions over related spans. Every query requires an ISO timestamp range.
|
|
@@ -133,7 +248,7 @@ const result = await mastraClient.queryTraces({
|
|
|
133
248
|
})
|
|
134
249
|
```
|
|
135
250
|
|
|
136
|
-
See [
|
|
251
|
+
See [Query traces](https://mastra.ai/reference/observability/tracing/advanced-queries) for request fields, predicates, limits, response shapes, and errors.
|
|
137
252
|
|
|
138
253
|
### Load a page and poll for traces
|
|
139
254
|
|
|
@@ -160,7 +275,7 @@ const changes = await mastraClient.queryTraces({
|
|
|
160
275
|
|
|
161
276
|
Merge `changes.traces` by `traceId`, retain `changes.deltaCursor`, and continue while `changes.delta.hasMore` is `true`. Keep the same time range and predicate across polls. Only completed traces are returned; polling doesn't guarantee notifications for related-record updates, deletions, or traces that stop matching.
|
|
162
277
|
|
|
163
|
-
See [Delta polling](https://mastra.ai/reference/observability/tracing/
|
|
278
|
+
See [Delta polling](https://mastra.ai/reference/observability/tracing/advanced-queries) for bootstrap behavior, cursor lifetime, retention, and a complete polling loop.
|
|
164
279
|
|
|
165
280
|
### Aggregate traces
|
|
166
281
|
|
|
@@ -185,9 +300,9 @@ if (capabilities.traceAggregate) {
|
|
|
185
300
|
}
|
|
186
301
|
```
|
|
187
302
|
|
|
188
|
-
Each row has `dimensions` keyed by `groupBy` field, `measures` keyed by measure name, a `bucket` timestamp when `interval` is set, and `cost` coverage when a cost measure is requested. `truncated` is `true` when more groups matched than `limit`.
|
|
303
|
+
Each row has `dimensions` keyed by `groupBy` field, `measures` keyed by measure name, a `bucket` timestamp when `interval` is set, and `cost` coverage when a cost measure is requested. `truncated` is `true` when more groups matched than `limit`. Check `capabilities.traceAggregate` before calling. The client retries server errors like `queryTraces()` but doesn't retry `422` validation errors.
|
|
189
304
|
|
|
190
|
-
|
|
305
|
+
See [Aggregate traces](https://mastra.ai/reference/observability/tracing/advanced-queries) for dimensions, measures, token and cost semantics, time buckets, limits, and errors.
|
|
191
306
|
|
|
192
307
|
### Discover trace-query fields and values
|
|
193
308
|
|
|
@@ -207,7 +322,7 @@ const fields = await mastraClient.getTraceQueryFields({
|
|
|
207
322
|
})
|
|
208
323
|
```
|
|
209
324
|
|
|
210
|
-
For the `trace` scope on a server that supports aggregation, the response also includes `aggregate`: the `dimensions` you can pass to `groupBy` and the `measures` you can request.
|
|
325
|
+
For the `trace` scope on a server that supports aggregation, the response also includes `aggregate`: the `dimensions` you can pass to `groupBy` and the `measures` you can request. See [Discover fields and values](https://mastra.ai/reference/observability/tracing/advanced-queries).
|
|
211
326
|
|
|
212
327
|
Use the exact local path from the response with the same scope. For example, `model` belongs inside a `spans.some` or `spans.none` predicate. A field picker can fetch the `trace` and `spans` scopes in parallel.
|
|
213
328
|
|
|
@@ -385,7 +500,7 @@ const ratingPercentiles = await mastraClient.getFeedbackPercentiles({
|
|
|
385
500
|
|
|
386
501
|
## Related
|
|
387
502
|
|
|
388
|
-
- [
|
|
503
|
+
- [Advanced trace queries](https://mastra.ai/reference/observability/tracing/advanced-queries): Query and aggregate completed traces with recursive predicates
|
|
389
504
|
- [Feedback guide](https://mastra.ai/docs/observability/feedback): Learn how to create, list, and query feedback
|
|
390
505
|
- [Feedback reference](https://mastra.ai/reference/observability/feedback): Review feedback schemas and HTTP routes
|
|
391
506
|
- [Agents API](https://mastra.ai/reference/client-js/agents): Learn about agent interactions that generate traces
|
|
@@ -147,6 +147,12 @@ Re-drives every orphaned `running` durable-agent run across all registered durab
|
|
|
147
147
|
|
|
148
148
|
Requires persistent storage. With an in-memory store, there's nothing to recover after a process restart.
|
|
149
149
|
|
|
150
|
+
Agents and their runs are attempted serially. Each built-in `recoverActiveRuns()` attempt waits up to 30 seconds in total for `recover()` setup and settlement of the whole recovered workflow, then traversal can continue to later runs and agents. This isn't an overall recovery deadline: discovery and overridden custom recovery methods aren't bounded by this budget.
|
|
151
|
+
|
|
152
|
+
A timed-out attempt continues in the background. Its outcome is `status: 'skipped'` with `reason: 'recovery-timeout'` and no `retryAt`. It contributes only to `skipped`, not `recovered`, `succeeded`, or `failed`, and Mastra doesn't automatically retry it. Late settlement doesn't change the returned counts.
|
|
153
|
+
|
|
154
|
+
When shutdown begins, recovery stops dispatching new agents and runs. The recovery traversal and original attempts, including timed-out setup or execution, participate in the same shared shutdown drain as active executions. A recovery wait timeout doesn't cancel the attempt or give it a separate shutdown drain window.
|
|
155
|
+
|
|
150
156
|
A run that another execution still drives isn't taken over. It's counted in `skipped` and checked again once that execution's claim could have lapsed, so a run whose process crashed is recovered without another call. `shutdown()` cancels pending re-checks. See [run ownership](https://mastra.ai/docs/harness/durable-agents).
|
|
151
157
|
|
|
152
158
|
```typescript
|
|
@@ -164,4 +170,4 @@ Returns:
|
|
|
164
170
|
|
|
165
171
|
**failed** (`number`): Runs whose restart threw an error.
|
|
166
172
|
|
|
167
|
-
**skipped** (`number`): Runs
|
|
173
|
+
**skipped** (`number`): Runs skipped because they are already active, recovery is already in progress, or the recovery wait timed out. Only ownership skips eligible for re-checks are checked again; recovery timeouts are not automatically retried.
|
|
@@ -183,6 +183,7 @@ The factory also accepts `name` and `description` from `createScorer()`.
|
|
|
183
183
|
Failures while the scorer runs reject `scorer.run()` with a `ScorerRunError` whose `failedStep` is `analyze`, and the original error is available as its `cause`. This covers:
|
|
184
184
|
|
|
185
185
|
- Classifier evaluation fails or doesn't return an answer for the selected question.
|
|
186
|
+
- The decision model refuses the selected question. The error names the classifier, the question, and the scorer.
|
|
186
187
|
- A classifier ID is used before the scorer is registered with Mastra, or the ID isn't present in `classifiers`.
|
|
187
188
|
- A registered classifier has an invalid configuration for this scorer.
|
|
188
189
|
|
package/.docs/reference/index.md
CHANGED
|
@@ -266,11 +266,11 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
266
266
|
- [Automatic Metrics](https://mastra.ai/reference/observability/metrics/automatic-metrics)
|
|
267
267
|
- [Metric queries](https://mastra.ai/reference/observability/metrics/queries)
|
|
268
268
|
- [Configuration](https://mastra.ai/reference/observability/tracing/configuration)
|
|
269
|
+
- [Advanced trace queries](https://mastra.ai/reference/observability/tracing/advanced-queries)
|
|
269
270
|
- [Instances](https://mastra.ai/reference/observability/tracing/instances)
|
|
270
271
|
- [Interfaces](https://mastra.ai/reference/observability/tracing/interfaces)
|
|
271
272
|
- [Span filtering](https://mastra.ai/reference/observability/tracing/span-filtering)
|
|
272
273
|
- [Spans](https://mastra.ai/reference/observability/tracing/spans)
|
|
273
|
-
- [Trace queries](https://mastra.ai/reference/observability/tracing/trace-query)
|
|
274
274
|
- [AgentsMDInjector](https://mastra.ai/reference/processors/agents-md-injector)
|
|
275
275
|
- [BatchPartsProcessor](https://mastra.ai/reference/processors/batch-parts-processor)
|
|
276
276
|
- [ClassifierProcessor](https://mastra.ai/reference/processors/classifier-processor)
|
|
@@ -75,7 +75,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
75
75
|
|
|
76
76
|
**observation.maxRetries** (`number`): Retries after the initial Observer model call on transient provider errors. Governs OM's own retry ladder; the Observer model call itself is configured with no provider-level retries.
|
|
77
77
|
|
|
78
|
-
**observation.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Observer retries are exhausted. 'abort' aborts the agent turn. 'continue' emits the existing failure diagnostic, keeps the failed input pending for a later cycle, and allows the main agent turn to continue. Persistence, indexing, transform, locking, invariant, and explicit abort failures remain fatal. This setting doesn't prevent the underlying provider error or change blockAfter or attachment handling, and it has no backstop for a sustained outage: pending messages keep accruing in the main agent's context until they reach the model's context limit.
|
|
78
|
+
**observation.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Observer retries are exhausted in a synchronous observation. Background buffered observation failures are reported as om\_buffering\_failed and never stop the turn. 'abort' aborts the agent turn. 'continue' emits the existing failure diagnostic, keeps the failed input pending for a later cycle, and allows the main agent turn to continue. Persistence, indexing, transform, locking, invariant, and explicit abort failures remain fatal. This setting doesn't prevent the underlying provider error or change blockAfter or attachment handling, and it has no backstop for a sustained outage: pending messages keep accruing in the main agent's context until they reach the model's context limit.
|
|
79
79
|
|
|
80
80
|
**observation.messageTokens** (`number`): Token count of unobserved messages that triggers observation. When unobserved message tokens exceed this threshold, the Observer agent is called. Text is estimated locally with tokenx. Image parts are included with model-aware heuristics when possible, with deterministic fallbacks when image metadata is incomplete. Image-like file parts are counted the same way when uploads are normalized as files.
|
|
81
81
|
|
|
@@ -111,7 +111,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
111
111
|
|
|
112
112
|
**reflection.maxRetries** (`number`): Retries after the initial Reflector model call on transient provider errors. Governs OM's own retry ladder; the Reflector model call itself is configured with no provider-level retries.
|
|
113
113
|
|
|
114
|
-
**reflection.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Reflector retries are exhausted. 'abort' aborts the agent turn. 'continue' emits the failure diagnostic and allows the turn to continue, leaving already-persisted observations committed and deferring reflection to the next threshold crossing. A provider outage usually takes out both stages, so set the policy on observation too if the turn should survive one.
|
|
114
|
+
**reflection.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Reflector retries are exhausted in a synchronous reflection. Background buffered reflection failures are reported as om\_buffering\_failed and never stop the turn. 'abort' aborts the agent turn. 'continue' emits the failure diagnostic and allows the turn to continue, leaving already-persisted observations committed and deferring reflection to the next threshold crossing. A provider outage usually takes out both stages, so set the policy on observation too if the turn should survive one.
|
|
115
115
|
|
|
116
116
|
**reflection.instruction** (`string`): Custom instruction appended to the Reflector's system prompt. Use this to customize how the Reflector consolidates observations, such as prioritizing certain types of information.
|
|
117
117
|
|