@mastra/mcp-docs-server 1.2.19-alpha.4 → 1.2.19
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/channels.md +28 -1
- package/.docs/docs/deployment/cloud-providers.md +1 -0
- package/.docs/docs/deployment/mastra-server.md +19 -0
- package/.docs/docs/deployment/overview.md +1 -0
- package/.docs/docs/deployment/workers.md +2 -2
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/mastra-platform/api.md +54 -0
- package/.docs/docs/mastra-platform/deploy.md +101 -0
- package/.docs/docs/mastra-platform/observability.md +3 -1
- package/.docs/docs/mastra-platform/server.md +6 -11
- package/.docs/docs/mastra-platform/studio.md +8 -10
- package/.docs/docs/memory/semantic-recall.md +19 -0
- package/.docs/docs/observability/feedback.md +14 -0
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +19 -14
- package/.docs/docs/observability/metrics/overview.md +31 -44
- package/.docs/docs/sandbox/overview.md +43 -0
- package/.docs/docs/server/middleware.md +30 -0
- package/.docs/docs/server/server-adapters.md +109 -34
- package/.docs/docs/storage.md +2 -0
- package/.docs/docs/subagents.md +6 -6
- package/.docs/integrations/channels/github.md +56 -9
- package/.docs/integrations/channels/imessage.md +150 -8
- package/.docs/integrations/databases/elasticsearch.md +156 -0
- package/.docs/integrations/databases/libsql.md +16 -0
- package/.docs/integrations/databases/mongodb.md +1 -1
- package/.docs/integrations/databases/postgresql.md +26 -0
- package/.docs/integrations/databases/valkey.md +99 -0
- package/.docs/integrations/deploy/kubernetes-helm.md +332 -0
- package/.docs/integrations/deploy/kubernetes.md +1 -1
- package/.docs/integrations/deploy/render.md +47 -61
- package/.docs/integrations/sandboxes/daytona.md +52 -0
- package/.docs/integrations/sandboxes/e2b-desktop.md +128 -0
- package/.docs/integrations/sandboxes/e2b.md +6 -0
- package/.docs/integrations/sandboxes/vercel.md +2 -2
- package/.docs/integrations/tools/parallel.md +240 -0
- package/.docs/integrations.md +5 -0
- package/.docs/models/environment-variables.md +9 -0
- package/.docs/models/gateways/netlify.md +12 -5
- package/.docs/models/gateways/openrouter.md +5 -10
- package/.docs/models/gateways/vercel.md +5 -5
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/agentrouter.md +17 -34
- package/.docs/models/providers/agnes.md +75 -0
- package/.docs/models/providers/aixy.md +73 -0
- package/.docs/models/providers/aki-io.md +14 -13
- package/.docs/models/providers/chutes.md +2 -2
- package/.docs/models/providers/cline-pass.md +4 -2
- package/.docs/models/providers/crof.md +3 -8
- package/.docs/models/providers/deepseek.md +4 -6
- package/.docs/models/providers/edenai.md +14 -14
- package/.docs/models/providers/evroc.md +3 -2
- package/.docs/models/providers/gmicloud.md +6 -4
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/hyper.md +5 -5
- package/.docs/models/providers/inceptron.md +2 -2
- package/.docs/models/providers/iteracompute.md +73 -0
- package/.docs/models/providers/kilo.md +26 -27
- package/.docs/models/providers/llmgateway-providers.md +18 -9
- package/.docs/models/providers/llmgateway.md +3 -5
- package/.docs/models/providers/llmtech.md +73 -0
- package/.docs/models/providers/nano-gpt.md +22 -13
- package/.docs/models/providers/neosmith.md +104 -0
- package/.docs/models/providers/nvidia.md +3 -1
- package/.docs/models/providers/ofox.md +2 -1
- package/.docs/models/providers/openai.md +2 -2
- package/.docs/models/providers/opencode-go.md +3 -2
- package/.docs/models/providers/opper.md +112 -0
- package/.docs/models/providers/pendra.md +78 -0
- package/.docs/models/providers/requesty.md +1 -1
- package/.docs/models/providers/standardcompute.md +73 -0
- package/.docs/models/providers/vivgrid.md +2 -1
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers/zai.md +2 -1
- package/.docs/models/providers.md +9 -0
- package/.docs/reference/agents/channels.md +1 -1
- package/.docs/reference/ai-sdk/handle-chat-stream.md +11 -0
- package/.docs/reference/ai-sdk/with-sse-heartbeat.md +47 -0
- package/.docs/reference/cli/mastra.md +10 -4
- package/.docs/reference/client-js/observability.md +1 -1
- package/.docs/reference/index.md +5 -0
- package/.docs/reference/observability/feedback.md +4 -0
- package/.docs/reference/observability/metrics/automatic-metrics.md +1 -1
- package/.docs/reference/observability/metrics/queries.md +462 -0
- package/.docs/reference/pubsub/valkey-streams.md +84 -0
- package/.docs/reference/rag/vector-databases.md +4 -4
- package/.docs/reference/server/elysia-adapter.md +184 -0
- package/.docs/reference/server/express-adapter.md +6 -8
- package/.docs/reference/server/hono-adapter.md +19 -6
- package/.docs/reference/storage/turso.md +88 -0
- package/.docs/reference/streaming/ChunkType.md +29 -1
- package/.docs/reference/streaming/agents/stream.md +1 -3
- package/.docs/reference/tools/mcp-client.md +41 -9
- package/.docs/reference/vectors/mongodb.md +11 -11
- package/.docs/reference/vectors/pg.md +2 -0
- package/.docs/reference/workspace/local-sandbox.md +2 -0
- package/.docs/reference/workspace/platform-sandbox.md +3 -1
- package/.docs/reference/workspace/sandbox.md +143 -3
- package/CHANGELOG.md +81 -0
- package/package.json +6 -6
- package/.docs/docs/observability/metrics/querying.md +0 -314
|
@@ -14,8 +14,11 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
14
14
|
- [302.AI](https://mastra.ai/models/providers/302ai)
|
|
15
15
|
- [Abacus](https://mastra.ai/models/providers/abacus)
|
|
16
16
|
- [abliteration.ai](https://mastra.ai/models/providers/abliteration-ai)
|
|
17
|
+
- [AgentRouter](https://mastra.ai/models/providers/agentrouter)
|
|
18
|
+
- [Agnes AI](https://mastra.ai/models/providers/agnes)
|
|
17
19
|
- [AI-ROUTER](https://mastra.ai/models/providers/ai-router)
|
|
18
20
|
- [ai&](https://mastra.ai/models/providers/aiand)
|
|
21
|
+
- [Aixy](https://mastra.ai/models/providers/aixy)
|
|
19
22
|
- [AKI.IO](https://mastra.ai/models/providers/aki-io)
|
|
20
23
|
- [Alibaba](https://mastra.ai/models/providers/alibaba)
|
|
21
24
|
- [Alibaba (China)](https://mastra.ai/models/providers/alibaba-cn)
|
|
@@ -77,6 +80,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
77
80
|
- [InferX](https://mastra.ai/models/providers/inferx)
|
|
78
81
|
- [Infomaniak](https://mastra.ai/models/providers/infomaniak)
|
|
79
82
|
- [IO.NET](https://mastra.ai/models/providers/io-net)
|
|
83
|
+
- [IteraCompute](https://mastra.ai/models/providers/iteracompute)
|
|
80
84
|
- [Jalapeno Cloud](https://mastra.ai/models/providers/jalapeno)
|
|
81
85
|
- [Jiekou.AI](https://mastra.ai/models/providers/jiekou)
|
|
82
86
|
- [Kenari](https://mastra.ai/models/providers/kenari)
|
|
@@ -87,6 +91,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
87
91
|
- [Lilac](https://mastra.ai/models/providers/lilac)
|
|
88
92
|
- [Llama](https://mastra.ai/models/providers/llama)
|
|
89
93
|
- [LLM Gateway](https://mastra.ai/models/providers/llmgateway-providers)
|
|
94
|
+
- [LLM Tech](https://mastra.ai/models/providers/llmtech)
|
|
90
95
|
- [LLMTR](https://mastra.ai/models/providers/llmtr)
|
|
91
96
|
- [LMStudio](https://mastra.ai/models/providers/lmstudio)
|
|
92
97
|
- [LongCat](https://mastra.ai/models/providers/longcat)
|
|
@@ -110,6 +115,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
110
115
|
- [NanoGPT](https://mastra.ai/models/providers/nano-gpt)
|
|
111
116
|
- [NEAR AI Cloud](https://mastra.ai/models/providers/nearai)
|
|
112
117
|
- [Nebius Token Factory](https://mastra.ai/models/providers/nebius)
|
|
118
|
+
- [NeoSmith](https://mastra.ai/models/providers/neosmith)
|
|
113
119
|
- [Neuralwatt](https://mastra.ai/models/providers/neuralwatt)
|
|
114
120
|
- [Nova](https://mastra.ai/models/providers/nova)
|
|
115
121
|
- [NovitaAI](https://mastra.ai/models/providers/novita-ai)
|
|
@@ -118,8 +124,10 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
118
124
|
- [Ollama Cloud](https://mastra.ai/models/providers/ollama-cloud)
|
|
119
125
|
- [OpenCode Go](https://mastra.ai/models/providers/opencode-go)
|
|
120
126
|
- [OpenCode Zen](https://mastra.ai/models/providers/opencode)
|
|
127
|
+
- [Opper](https://mastra.ai/models/providers/opper)
|
|
121
128
|
- [OrcaRouter](https://mastra.ai/models/providers/orcarouter)
|
|
122
129
|
- [OVHcloud AI Endpoints](https://mastra.ai/models/providers/ovhcloud)
|
|
130
|
+
- [Pendra](https://mastra.ai/models/providers/pendra)
|
|
123
131
|
- [Perplexity](https://mastra.ai/models/providers/perplexity)
|
|
124
132
|
- [Perplexity Agent](https://mastra.ai/models/providers/perplexity-agent)
|
|
125
133
|
- [Pioneer](https://mastra.ai/models/providers/pioneer)
|
|
@@ -141,6 +149,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
141
149
|
- [SiliconFlow (China)](https://mastra.ai/models/providers/siliconflow-cn)
|
|
142
150
|
- [Snowflake Cortex](https://mastra.ai/models/providers/snowflake-cortex)
|
|
143
151
|
- [STACKIT](https://mastra.ai/models/providers/stackit)
|
|
152
|
+
- [Standard Compute](https://mastra.ai/models/providers/standardcompute)
|
|
144
153
|
- [StepFun (China)](https://mastra.ai/models/providers/stepfun)
|
|
145
154
|
- [StepFun (Global)](https://mastra.ai/models/providers/stepfun-ai)
|
|
146
155
|
- [StepFun Step Plan (China)](https://mastra.ai/models/providers/stepfun-step-plan)
|
|
@@ -162,7 +162,7 @@ const agent = new Agent({
|
|
|
162
162
|
|
|
163
163
|
## Custom typing status
|
|
164
164
|
|
|
165
|
-
Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes.
|
|
165
|
+
Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes. When the run ends, any status it set is cleared automatically so runs that finish without posting a message don't leave a stale status on the thread.
|
|
166
166
|
|
|
167
167
|
`defaultTypingStatus` is exported from `@mastra/core/channels` so you can fall back to the built-in defaults for chunks you don't handle.
|
|
168
168
|
|
|
@@ -49,6 +49,17 @@ export async function POST(req: Request) {
|
|
|
49
49
|
}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
## Keeping connections alive
|
|
53
|
+
|
|
54
|
+
Proxies and load balancers often close a connection that sends no bytes for a while, which drops the response during long reasoning bursts or slow tool calls. Wrap the encoded response with [`withSseHeartbeat()`](https://mastra.ai/reference/ai-sdk/with-sse-heartbeat) to emit periodic SSE comments while the stream is idle:
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { handleChatStream, withSseHeartbeat } from '@mastra/ai-sdk'
|
|
58
|
+
import { createUIMessageStreamResponse } from 'ai'
|
|
59
|
+
|
|
60
|
+
return withSseHeartbeat(createUIMessageStreamResponse({ stream }), 15000)
|
|
61
|
+
```
|
|
62
|
+
|
|
52
63
|
## Parameters
|
|
53
64
|
|
|
54
65
|
**version** (`'v5' | 'v6' | 'v7'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. Pass 'v7' when your app is typed against AI SDK v7. (Default: `'v5'`)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# withSseHeartbeat()
|
|
4
|
+
|
|
5
|
+
Wraps a server-sent events `Response` so it emits periodic `: heartbeat` comments while the underlying stream is idle. Proxies and load balancers often close connections that send no bytes for a while, which drops responses during long reasoning bursts or slow tool calls.
|
|
6
|
+
|
|
7
|
+
Use this when you build the response yourself with [`handleChatStream()`](https://mastra.ai/reference/ai-sdk/handle-chat-stream), [`handleWorkflowStream()`](https://mastra.ai/reference/ai-sdk/handle-workflow-stream), or [`handleNetworkStream()`](https://mastra.ai/reference/ai-sdk/handle-network-stream). [`chatRoute()`](https://mastra.ai/reference/ai-sdk/chat-route) applies the same wrapper internally through its `heartbeatMs` option.
|
|
8
|
+
|
|
9
|
+
## Usage example
|
|
10
|
+
|
|
11
|
+
Next.js App Router example:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { handleChatStream, withSseHeartbeat } from '@mastra/ai-sdk'
|
|
15
|
+
import { createUIMessageStreamResponse } from 'ai'
|
|
16
|
+
import { mastra } from '@/src/mastra'
|
|
17
|
+
|
|
18
|
+
export async function POST(req: Request) {
|
|
19
|
+
const params = await req.json()
|
|
20
|
+
const stream = await handleChatStream({
|
|
21
|
+
mastra,
|
|
22
|
+
agentId: 'weatherAgent',
|
|
23
|
+
version: 'v7',
|
|
24
|
+
params,
|
|
25
|
+
})
|
|
26
|
+
return withSseHeartbeat(createUIMessageStreamResponse({ stream }), 15000)
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Wrap the response after it has been encoded. `handleChatStream()` returns a stream of UI message chunks, and heartbeats are raw SSE comments that only exist once those chunks are serialized to the wire format.
|
|
31
|
+
|
|
32
|
+
## Parameters
|
|
33
|
+
|
|
34
|
+
**response** (`Response`): The server-sent events response to wrap. Status, status text, and headers are preserved.
|
|
35
|
+
|
|
36
|
+
**heartbeatMs** (`number`): Interval in milliseconds between heartbeats. Omit it or pass a value of 0 or less to disable heartbeats.
|
|
37
|
+
|
|
38
|
+
## Returns
|
|
39
|
+
|
|
40
|
+
A `Response` that streams the source body with heartbeat comments inserted during idle periods. The input response is returned unchanged when `heartbeatMs` is omitted, is `0` or less, or the response has no body.
|
|
41
|
+
|
|
42
|
+
## Behavior
|
|
43
|
+
|
|
44
|
+
- Heartbeats are only inserted between complete SSE frames, so a partially delivered frame is never split.
|
|
45
|
+
- Source data, stream completion, and stream errors always take priority over a due heartbeat.
|
|
46
|
+
- Canceling the wrapped response cancels the source stream and clears the pending heartbeat timer.
|
|
47
|
+
- A `RangeError` is thrown when heartbeats are enabled with a value that can't be scheduled with a timer, meaning a non-finite number or a value greater than `2147483647`. Use `assertValidHeartbeatMs()` to apply the same check to user-supplied configuration before you start streaming.
|
|
@@ -1100,9 +1100,9 @@ For runtime commands, the command resolves the target server in this order:
|
|
|
1100
1100
|
2. `http://localhost:4111` for a local `mastra dev` server.
|
|
1101
1101
|
3. `.mastra-project.json` for a Mastra platform project.
|
|
1102
1102
|
|
|
1103
|
-
Automatic
|
|
1103
|
+
Automatic Platform authentication is used when the CLI resolves a project from `.mastra-project.json` or recognizes an explicit Mastra-hosted Studio, Factory, or observability URL. Localhost and arbitrary explicit `--url` targets don't receive automatic credentials. Headers passed with `--header` are sent to any target, including localhost.
|
|
1104
1104
|
|
|
1105
|
-
For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets `https://observability.mastra.ai` by default instead of a project deployment URL. Trace Intelligence commands (`learning`) work the same way but target `https://output.signals.mastra.ai`.
|
|
1105
|
+
For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targets the United States endpoint at `https://observability.mastra.ai` by default instead of a project deployment URL. Trace Intelligence commands (`learning`) work the same way but target `https://output.signals.mastra.ai`. When the CLI selects either hosted target automatically, it resolves credentials in this order:
|
|
1106
1106
|
|
|
1107
1107
|
1. Explicit `Authorization` and `X-Mastra-Project-Id` headers passed with `--header`.
|
|
1108
1108
|
2. `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` from your environment.
|
|
@@ -1111,7 +1111,13 @@ For observability commands (`trace`, `log`, `score`, and `metric`), the CLI targ
|
|
|
1111
1111
|
|
|
1112
1112
|
Learning commands also send `X-Mastra-Organization-Id`, resolved from an explicit `--header`, `MASTRA_ORGANIZATION_ID` in your environment, or `.mastra-project.json`, in that order.
|
|
1113
1113
|
|
|
1114
|
-
|
|
1114
|
+
European Union observability data is stored at `https://observability.eu.mastra.ai`. Pass that trusted host with `--url`; it uses the same Platform credential resolution as the default United States endpoint:
|
|
1115
|
+
|
|
1116
|
+
```bash
|
|
1117
|
+
mastra api --url https://observability.eu.mastra.ai trace list
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1120
|
+
Use `--url` and `--header` when you need to override another target or its credentials.
|
|
1115
1121
|
|
|
1116
1122
|
### Flags
|
|
1117
1123
|
|
|
@@ -1527,7 +1533,7 @@ mastra api metric label-values '{"metricName":"latency_ms","labelKey":"model","p
|
|
|
1527
1533
|
|
|
1528
1534
|
#### Observability with `curl`
|
|
1529
1535
|
|
|
1530
|
-
You can call the hosted observability API directly with your platform access token and project ID:
|
|
1536
|
+
You can call the hosted observability API directly with your platform access token and project ID. The examples below use the United States host. Substitute `https://observability.eu.mastra.ai` for a European Union environment. The [hosted feedback query API](https://mastra.ai/docs/mastra-platform/api) documents feedback endpoints that don't have CLI commands:
|
|
1531
1537
|
|
|
1532
1538
|
```bash
|
|
1533
1539
|
curl -sS "https://observability.mastra.ai/api/observability/traces?page=0&perPage=20" \
|
|
@@ -92,7 +92,7 @@ const scores = await mastraClient.listScoresBySpan({
|
|
|
92
92
|
|
|
93
93
|
## Feedback
|
|
94
94
|
|
|
95
|
-
Feedback methods create, list, and query human-in-the-loop signals such as ratings, thumbs, comments, and corrections. See the [feedback guide](https://mastra.ai/docs/observability/feedback) for examples and the [feedback reference](https://mastra.ai/reference/observability/feedback) for full schemas.
|
|
95
|
+
Feedback methods create, list, and query human-in-the-loop signals such as ratings, thumbs, comments, and corrections through the target Mastra runtime and its configured observability storage. They don't call the hosted Mastra Platform feedback query API. See the [feedback guide](https://mastra.ai/docs/observability/feedback) for examples and the [feedback reference](https://mastra.ai/reference/observability/feedback) for full schemas.
|
|
96
96
|
|
|
97
97
|
### Creating feedback
|
|
98
98
|
|
package/.docs/reference/index.md
CHANGED
|
@@ -45,6 +45,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
45
45
|
- [toAISdkV4Messages()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-v4-messages)
|
|
46
46
|
- [toAISdkV5Messages()](https://mastra.ai/reference/ai-sdk/to-ai-sdk-v5-messages)
|
|
47
47
|
- [withMastra()](https://mastra.ai/reference/ai-sdk/with-mastra)
|
|
48
|
+
- [withSseHeartbeat()](https://mastra.ai/reference/ai-sdk/with-sse-heartbeat)
|
|
48
49
|
- [workflowRoute()](https://mastra.ai/reference/ai-sdk/workflow-route)
|
|
49
50
|
- [workflowSnapshotToStream()](https://mastra.ai/reference/ai-sdk/workflow-snapshot-to-stream)
|
|
50
51
|
- [Auth0](https://mastra.ai/reference/auth/auth0)
|
|
@@ -244,6 +245,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
244
245
|
- [Feedback](https://mastra.ai/reference/observability/feedback)
|
|
245
246
|
- [PinoLogger](https://mastra.ai/reference/logging/pino-logger)
|
|
246
247
|
- [Automatic Metrics](https://mastra.ai/reference/observability/metrics/automatic-metrics)
|
|
248
|
+
- [Metric queries](https://mastra.ai/reference/observability/metrics/queries)
|
|
247
249
|
- [Configuration](https://mastra.ai/reference/observability/tracing/configuration)
|
|
248
250
|
- [Instances](https://mastra.ai/reference/observability/tracing/instances)
|
|
249
251
|
- [Interfaces](https://mastra.ai/reference/observability/tracing/interfaces)
|
|
@@ -277,6 +279,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
277
279
|
- [PubSub](https://mastra.ai/reference/pubsub/base)
|
|
278
280
|
- [RedisStreamsPubSub](https://mastra.ai/reference/pubsub/redis-streams)
|
|
279
281
|
- [UnixSocketPubSub](https://mastra.ai/reference/pubsub/unix-socket-pubsub)
|
|
282
|
+
- [ValkeyStreamsPubSub](https://mastra.ai/reference/pubsub/valkey-streams)
|
|
280
283
|
- [Overview](https://mastra.ai/reference/rag/overview)
|
|
281
284
|
- [Chunking and Embedding](https://mastra.ai/reference/rag/chunking-and-embedding)
|
|
282
285
|
- [DatabaseConfig](https://mastra.ai/reference/rag/database-config)
|
|
@@ -293,6 +296,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
293
296
|
- [.chunk()](https://mastra.ai/reference/rag/chunk)
|
|
294
297
|
- [Overview](https://mastra.ai/reference/schedules/overview)
|
|
295
298
|
- [createRoute()](https://mastra.ai/reference/server/create-route)
|
|
299
|
+
- [Elysia Adapter](https://mastra.ai/reference/server/elysia-adapter)
|
|
296
300
|
- [Express Adapter](https://mastra.ai/reference/server/express-adapter)
|
|
297
301
|
- [Fastify Adapter](https://mastra.ai/reference/server/fastify-adapter)
|
|
298
302
|
- [Hono Adapter](https://mastra.ai/reference/server/hono-adapter)
|
|
@@ -308,6 +312,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
308
312
|
- [Overview](https://mastra.ai/reference/storage/overview)
|
|
309
313
|
- [Composite Storage](https://mastra.ai/reference/storage/composite)
|
|
310
314
|
- [Retention (prune)](https://mastra.ai/reference/storage/retention)
|
|
315
|
+
- [Turso Storage](https://mastra.ai/reference/storage/turso)
|
|
311
316
|
- [ChunkType](https://mastra.ai/reference/streaming/ChunkType)
|
|
312
317
|
- [smoothStream()](https://mastra.ai/reference/streaming/smoothStream)
|
|
313
318
|
- [MastraModelOutput](https://mastra.ai/reference/streaming/agents/MastraModelOutput)
|
|
@@ -54,6 +54,8 @@ await mastra.observability.addFeedback?.({
|
|
|
54
54
|
|
|
55
55
|
**feedback** (`FeedbackInput`): Feedback payload to add.
|
|
56
56
|
|
|
57
|
+
Without `correlationContext`, the method looks up `traceId` in configured observability storage. If the trace or requested span isn't found, Mastra logs a warning and drops the feedback event. Configure `MastraStorageExporter` when adding feedback by ID after execution, including when `MastraPlatformExporter` handles remote export.
|
|
58
|
+
|
|
57
59
|
### `createFeedback(args)`
|
|
58
60
|
|
|
59
61
|
Creates one feedback record through the observability storage domain. Storage-level calls write directly to the store, so include `timestamp`.
|
|
@@ -375,6 +377,8 @@ Use `FeedbackFilter` in `listFeedback()` and OLAP query `filters`.
|
|
|
375
377
|
|
|
376
378
|
## HTTP routes
|
|
377
379
|
|
|
380
|
+
These routes belong to a Mastra runtime and use its configured observability storage. They're separate from the [unversioned Mastra Platform feedback query API](https://mastra.ai/docs/mastra-platform/api), which doesn't provide a feedback creation route.
|
|
381
|
+
|
|
378
382
|
| Method | Path | Purpose | Permission |
|
|
379
383
|
| ------ | ----------------------------------------- | ---------------------------- | -------------------- |
|
|
380
384
|
| `GET` | `/api/observability/feedback` | List feedback records | None derived |
|
|
@@ -136,5 +136,5 @@ When you spot a spike in latency or token usage on the Metrics dashboard, correl
|
|
|
136
136
|
## Related
|
|
137
137
|
|
|
138
138
|
- [Metrics overview](https://mastra.ai/docs/observability/metrics/overview)
|
|
139
|
-
- [
|
|
139
|
+
- [Metric queries](https://mastra.ai/reference/observability/metrics/queries)
|
|
140
140
|
- [Studio observability](https://mastra.ai/docs/studio/observability)
|