@mastra/mcp-docs-server 0.13.24 → 0.13.25-alpha.1

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.
Files changed (128) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
  2. package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
  3. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +24 -1
  4. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +22 -0
  5. package/.docs/organized/changelogs/%40mastra%2Fastra.md +19 -19
  6. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +19 -19
  7. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +21 -21
  8. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +46 -46
  9. package/.docs/organized/changelogs/%40mastra%2Fcloud.md +19 -19
  10. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +21 -21
  11. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +21 -21
  12. package/.docs/organized/changelogs/%40mastra%2Fcore.md +104 -104
  13. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +19 -19
  14. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +40 -40
  15. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +33 -33
  16. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +34 -34
  17. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +34 -34
  18. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +59 -59
  19. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +21 -21
  20. package/.docs/organized/changelogs/%40mastra%2Fevals.md +24 -24
  21. package/.docs/organized/changelogs/%40mastra%2Flance.md +21 -21
  22. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +29 -29
  23. package/.docs/organized/changelogs/%40mastra%2Floggers.md +19 -19
  24. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +25 -25
  25. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +19 -19
  26. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +22 -22
  27. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +27 -27
  28. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +21 -21
  29. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +21 -21
  30. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +19 -19
  31. package/.docs/organized/changelogs/%40mastra%2Fpg.md +33 -33
  32. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +19 -19
  33. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +73 -73
  34. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +20 -20
  35. package/.docs/organized/changelogs/%40mastra%2Frag.md +22 -22
  36. package/.docs/organized/changelogs/%40mastra%2Freact.md +17 -0
  37. package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +18 -0
  38. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
  39. package/.docs/organized/changelogs/%40mastra%2Fserver.md +51 -51
  40. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +19 -19
  41. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +24 -24
  42. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +19 -19
  43. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +19 -19
  44. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +19 -19
  45. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +19 -19
  46. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +19 -19
  47. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +20 -3
  48. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +18 -0
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +21 -21
  50. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +20 -20
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +20 -20
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +21 -21
  53. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +19 -19
  54. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +19 -19
  55. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +19 -19
  56. package/.docs/organized/changelogs/create-mastra.md +32 -32
  57. package/.docs/organized/changelogs/mastra.md +64 -64
  58. package/.docs/organized/code-examples/agent.md +0 -4
  59. package/.docs/organized/code-examples/ai-elements.md +47 -0
  60. package/.docs/organized/code-examples/heads-up-game.md +5 -5
  61. package/.docs/raw/auth/clerk.mdx +3 -3
  62. package/.docs/raw/index.mdx +1 -0
  63. package/.docs/raw/observability/ai-tracing/exporters/braintrust.mdx +81 -0
  64. package/.docs/raw/observability/ai-tracing/exporters/cloud.mdx +120 -0
  65. package/.docs/raw/observability/ai-tracing/exporters/default.mdx +168 -0
  66. package/.docs/raw/observability/ai-tracing/exporters/langfuse.mdx +121 -0
  67. package/.docs/raw/observability/ai-tracing/exporters/langsmith.mdx +88 -0
  68. package/.docs/raw/observability/ai-tracing/exporters/otel.mdx +250 -0
  69. package/.docs/raw/observability/ai-tracing/overview.mdx +565 -0
  70. package/.docs/raw/observability/ai-tracing/processors/sensitive-data-filter.mdx +274 -0
  71. package/.docs/raw/observability/{tracing.mdx → otel-tracing.mdx} +2 -2
  72. package/.docs/raw/observability/overview.mdx +66 -0
  73. package/.docs/raw/reference/agents/generate.mdx +39 -1
  74. package/.docs/raw/reference/agents/generateVNext.mdx +34 -2
  75. package/.docs/raw/reference/agents/network.mdx +35 -3
  76. package/.docs/raw/reference/auth/clerk.mdx +1 -1
  77. package/.docs/raw/reference/client-js/agents.mdx +4 -13
  78. package/.docs/raw/reference/client-js/mastra-client.mdx +10 -0
  79. package/.docs/raw/reference/client-js/observability.mdx +76 -0
  80. package/.docs/raw/reference/core/getScorer.mdx +75 -0
  81. package/.docs/raw/reference/core/getScorerByName.mdx +75 -0
  82. package/.docs/raw/reference/core/getScorers.mdx +42 -0
  83. package/.docs/raw/reference/core/mastra-class.mdx +7 -0
  84. package/.docs/raw/reference/observability/ai-tracing/ai-tracing.mdx +182 -0
  85. package/.docs/raw/reference/observability/ai-tracing/configuration.mdx +234 -0
  86. package/.docs/raw/reference/observability/ai-tracing/exporters/braintrust.mdx +112 -0
  87. package/.docs/raw/reference/observability/ai-tracing/exporters/cloud-exporter.mdx +176 -0
  88. package/.docs/raw/reference/observability/ai-tracing/exporters/console-exporter.mdx +148 -0
  89. package/.docs/raw/reference/observability/ai-tracing/exporters/default-exporter.mdx +196 -0
  90. package/.docs/raw/reference/observability/ai-tracing/exporters/langfuse.mdx +116 -0
  91. package/.docs/raw/reference/observability/ai-tracing/exporters/langsmith.mdx +112 -0
  92. package/.docs/raw/reference/observability/ai-tracing/exporters/otel.mdx +355 -0
  93. package/.docs/raw/reference/observability/ai-tracing/interfaces.mdx +651 -0
  94. package/.docs/raw/reference/observability/ai-tracing/processors/sensitive-data-filter.mdx +178 -0
  95. package/.docs/raw/reference/observability/ai-tracing/span.mdx +371 -0
  96. package/.docs/raw/reference/observability/{logger.mdx → logging/pino-logger.mdx} +1 -1
  97. package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/index.mdx +6 -4
  98. package/.docs/raw/reference/scorers/create-scorer.mdx +59 -9
  99. package/.docs/raw/reference/scorers/mastra-scorer.mdx +6 -0
  100. package/.docs/raw/reference/scorers/run-experiment.mdx +216 -0
  101. package/.docs/raw/reference/streaming/ChunkType.mdx +3 -2
  102. package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -1
  103. package/.docs/raw/reference/streaming/agents/stream.mdx +41 -3
  104. package/.docs/raw/reference/streaming/agents/streamVNext.mdx +34 -2
  105. package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +17 -1
  106. package/.docs/raw/reference/streaming/workflows/stream.mdx +39 -1
  107. package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +39 -1
  108. package/.docs/raw/reference/tools/create-tool.mdx +34 -1
  109. package/.docs/raw/reference/workflows/run-methods/resume.mdx +38 -0
  110. package/.docs/raw/reference/workflows/run-methods/start.mdx +38 -0
  111. package/.docs/raw/scorers/custom-scorers.mdx +16 -1
  112. package/.docs/raw/scorers/overview.mdx +28 -0
  113. package/CHANGELOG.md +15 -0
  114. package/package.json +6 -6
  115. package/.docs/raw/observability/ai-tracing.mdx +0 -597
  116. /package/.docs/raw/reference/observability/{otel-config.mdx → otel-tracing/otel-config.mdx} +0 -0
  117. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/arize-ax.mdx +0 -0
  118. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/arize-phoenix.mdx +0 -0
  119. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/braintrust.mdx +0 -0
  120. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/dash0.mdx +0 -0
  121. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/keywordsai.mdx +0 -0
  122. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/laminar.mdx +0 -0
  123. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/langfuse.mdx +0 -0
  124. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/langsmith.mdx +0 -0
  125. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/langwatch.mdx +0 -0
  126. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/new-relic.mdx +0 -0
  127. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/signoz.mdx +0 -0
  128. /package/.docs/raw/reference/observability/{providers → otel-tracing/providers}/traceloop.mdx +0 -0
@@ -1,5 +1,68 @@
1
1
  # mastra
2
2
 
3
+ ## 0.13.3-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Update peer deps ([#8154](https://github.com/mastra-ai/mastra/pull/8154))
8
+
9
+ - Fixed an issue in playground where text-start/end parts were ignored in handleStreamChunk and tool ordering vs text wasn't retained ([#8234](https://github.com/mastra-ai/mastra/pull/8234))
10
+
11
+ - Add conditional chaining to scorer.agentNames return ([#8199](https://github.com/mastra-ai/mastra/pull/8199))
12
+
13
+ - Show model that worked when there are model fallbacks ([#8167](https://github.com/mastra-ai/mastra/pull/8167))
14
+
15
+ - Updated dependencies [[`5089c84`](https://github.com/mastra-ai/mastra/commit/5089c84a2f535ad12e79b5aa524ad7d8ca5e2b4c), [`5f4e677`](https://github.com/mastra-ai/mastra/commit/5f4e67757bc23f2694d83af10f88cfccdc6013ff), [`5c98f03`](https://github.com/mastra-ai/mastra/commit/5c98f03ae76d9a93cd6be206b4abb7bf186b3163), [`57b75b0`](https://github.com/mastra-ai/mastra/commit/57b75b01c0c64d91c50d7384c700afda89456fe8), [`4c5e65d`](https://github.com/mastra-ai/mastra/commit/4c5e65de746fbdab23eb6072cb999f4c7aeef9f3), [`504438b`](https://github.com/mastra-ai/mastra/commit/504438b961bde211071186bba63a842c4e3db879), [`57b6dd5`](https://github.com/mastra-ai/mastra/commit/57b6dd50f9e6d92c0ed3e7199e6a92752025e3a1), [`a7243e2`](https://github.com/mastra-ai/mastra/commit/a7243e2e58762667a6e3921e755e89d6bb0a3282), [`504438b`](https://github.com/mastra-ai/mastra/commit/504438b961bde211071186bba63a842c4e3db879), [`7fceb0a`](https://github.com/mastra-ai/mastra/commit/7fceb0a327d678e812f90f5387c5bc4f38bd039e), [`df64f9e`](https://github.com/mastra-ai/mastra/commit/df64f9ef814916fff9baedd861c988084e7c41de), [`809eea0`](https://github.com/mastra-ai/mastra/commit/809eea092fa80c3f69b9eaf078d843b57fd2a88e), [`683e5a1`](https://github.com/mastra-ai/mastra/commit/683e5a1466e48b686825b2c11f84680f296138e4), [`3679378`](https://github.com/mastra-ai/mastra/commit/3679378673350aa314741dc826f837b1984149bc), [`7775bc2`](https://github.com/mastra-ai/mastra/commit/7775bc20bb1ad1ab24797fb420e4f96c65b0d8ec), [`db1891a`](https://github.com/mastra-ai/mastra/commit/db1891a4707443720b7cd8a260dc7e1d49b3609c), [`e8f379d`](https://github.com/mastra-ai/mastra/commit/e8f379d390efa264c4e0874f9ac0cf8839b07777), [`652066b`](https://github.com/mastra-ai/mastra/commit/652066bd1efc6bb6813ba950ed1d7573e8b7d9d4), [`ea8d386`](https://github.com/mastra-ai/mastra/commit/ea8d386cd8c5593664515fd5770c06bf2aa980ef), [`c2a4919`](https://github.com/mastra-ai/mastra/commit/c2a4919ba6797d8bdb1509e02287496eef69303e), [`6f67656`](https://github.com/mastra-ai/mastra/commit/6f676562276926e2982401574d1e07157579be30), [`0130986`](https://github.com/mastra-ai/mastra/commit/0130986fc62d0edcc626dd593282661dbb9af141), [`5dc8e9a`](https://github.com/mastra-ai/mastra/commit/5dc8e9a7f8472298cd3d4e8a0cf6d265529f287d)]:
16
+ - @mastra/deployer@0.19.0-alpha.1
17
+ - @mastra/mcp@0.13.2-alpha.0
18
+ - @mastra/core@0.19.0-alpha.1
19
+ - @mastra/loggers@0.10.14-alpha.0
20
+
21
+ ## 0.13.3-alpha.0
22
+
23
+ ### Patch Changes
24
+
25
+ - Remove legacy helpers ([#8017](https://github.com/mastra-ai/mastra/pull/8017))
26
+
27
+ - add a way to hide the deploy mastra cloud button ([#8137](https://github.com/mastra-ai/mastra/pull/8137))
28
+
29
+ - Add types in the streamVNext codepath, fixes for various issues across multiple packages surfaced from type issues, align return types. ([#8010](https://github.com/mastra-ai/mastra/pull/8010))
30
+
31
+ - Add model fallbacks to playground ([#7427](https://github.com/mastra-ai/mastra/pull/7427))
32
+
33
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`623ffaf`](https://github.com/mastra-ai/mastra/commit/623ffaf2d969e11e99a0224633cf7b5a0815c857), [`9fc1613`](https://github.com/mastra-ai/mastra/commit/9fc16136400186648880fd990119ac15f7c02ee4), [`61f62aa`](https://github.com/mastra-ai/mastra/commit/61f62aa31bc88fe4ddf8da6240dbcfbeb07358bd), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
34
+ - @mastra/core@0.18.1-alpha.0
35
+ - @mastra/deployer@0.18.1-alpha.0
36
+
37
+ ## 0.13.2
38
+
39
+ ### Patch Changes
40
+
41
+ - feat: implement trace scoring with batch processing capabilities ([#8033](https://github.com/mastra-ai/mastra/pull/8033))
42
+
43
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
44
+
45
+ - dependencies updates: ([#8007](https://github.com/mastra-ai/mastra/pull/8007))
46
+ - Updated dependency [`fs-extra@^11.3.2` ↗︎](https://www.npmjs.com/package/fs-extra/v/11.3.2) (from `^11.3.1`, in `dependencies`)
47
+
48
+ - show the tool-output stream in the playground for streamVNext ([#7983](https://github.com/mastra-ai/mastra/pull/7983))
49
+
50
+ - Get rid off swr one for all ([#7931](https://github.com/mastra-ai/mastra/pull/7931))
51
+
52
+ - Fix DateTimePicker style issue ([#8106](https://github.com/mastra-ai/mastra/pull/8106))
53
+
54
+ - Fix navigating between scores and entity types ([#8129](https://github.com/mastra-ai/mastra/pull/8129))
55
+
56
+ - Fix getting tool link path from agent in playground ui tools page ([#8135](https://github.com/mastra-ai/mastra/pull/8135))
57
+
58
+ - Update Peerdeps for packages based on core minor bump ([#8025](https://github.com/mastra-ai/mastra/pull/8025))
59
+
60
+ - Updated dependencies [[`288745a`](https://github.com/mastra-ai/mastra/commit/288745a19aa9557db3ab3c877d667ff59f14d79c), [`cf34503`](https://github.com/mastra-ai/mastra/commit/cf345031de4e157f29087946449e60b965e9c8a9), [`6b4b1e4`](https://github.com/mastra-ai/mastra/commit/6b4b1e4235428d39e51cbda9832704c0ba70ab32), [`3469fca`](https://github.com/mastra-ai/mastra/commit/3469fca7bb7e5e19369ff9f7044716a5e4b02585), [`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`8f56160`](https://github.com/mastra-ai/mastra/commit/8f56160fd45c740076529148b9c225f6842d43b0), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`2d29ad9`](https://github.com/mastra-ai/mastra/commit/2d29ad92763cac02fc1d80c221ac93c39c0c5caf), [`c45298a`](https://github.com/mastra-ai/mastra/commit/c45298a0a0791db35cf79f1199d77004da0704cb), [`c4a8204`](https://github.com/mastra-ai/mastra/commit/c4a82046bfd241d6044e234bc5917d5a01fe6b55), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a), [`5b1ee71`](https://github.com/mastra-ai/mastra/commit/5b1ee71dc3ac92383226dc1e375642ca5f9b4224), [`282379f`](https://github.com/mastra-ai/mastra/commit/282379fafed80c6417fe1e791087110decd481ca)]:
61
+ - @mastra/deployer@0.18.0
62
+ - @mastra/core@0.18.0
63
+ - @mastra/loggers@0.10.13
64
+ - @mastra/mcp@0.13.1
65
+
3
66
  ## 0.13.2-alpha.4
4
67
 
5
68
  ### Patch Changes
@@ -236,67 +299,4 @@
236
299
 
237
300
  ## 0.12.4-alpha.0
238
301
 
239
- ### Patch Changes
240
-
241
- - fix minor playground stuff for observability ([#7765](https://github.com/mastra-ai/mastra/pull/7765))
242
-
243
- - Handle zod intersections in dynamic form ([#7768](https://github.com/mastra-ai/mastra/pull/7768))
244
-
245
- - Playground ui -pass runtimeContext to client SDK get methods ([#7767](https://github.com/mastra-ai/mastra/pull/7767))
246
-
247
- - Updated dependencies [[`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`f0ab020`](https://github.com/mastra-ai/mastra/commit/f0ab02034532a4afb71a1ef4fe243f9a8dffde84), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11)]:
248
- - @mastra/core@0.16.4-alpha.0
249
- - @mastra/deployer@0.16.4-alpha.0
250
-
251
- ## 0.12.3
252
-
253
- ### Patch Changes
254
-
255
- - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
256
-
257
- - Add new scorers to list ([#7614](https://github.com/mastra-ai/mastra/pull/7614))
258
-
259
- - fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
260
-
261
- - Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`2a6585f`](https://github.com/mastra-ai/mastra/commit/2a6585f7cb71f023f805d521d1c3c95fb9a3aa59), [`3d26e83`](https://github.com/mastra-ai/mastra/commit/3d26e8353a945719028f087cc6ac4b06f0ce27d2), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`56e55d1`](https://github.com/mastra-ai/mastra/commit/56e55d1e9eb63e7d9e41aa46e012aae471256812), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`0666082`](https://github.com/mastra-ai/mastra/commit/06660820230dcb1fa7c1d51c8254107afd68cd67), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`4c81b65`](https://github.com/mastra-ai/mastra/commit/4c81b65a28d128560bdf63bc9b8a1bddd4884812), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
262
- - @mastra/core@0.16.3
263
- - @mastra/deployer@0.16.3
264
-
265
- ## 0.12.3-alpha.1
266
-
267
- ### Patch Changes
268
-
269
- - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
270
-
271
- - Updated dependencies [[`2a6585f`](https://github.com/mastra-ai/mastra/commit/2a6585f7cb71f023f805d521d1c3c95fb9a3aa59), [`3d26e83`](https://github.com/mastra-ai/mastra/commit/3d26e8353a945719028f087cc6ac4b06f0ce27d2), [`56e55d1`](https://github.com/mastra-ai/mastra/commit/56e55d1e9eb63e7d9e41aa46e012aae471256812), [`4c81b65`](https://github.com/mastra-ai/mastra/commit/4c81b65a28d128560bdf63bc9b8a1bddd4884812)]:
272
- - @mastra/core@0.16.3-alpha.1
273
- - @mastra/deployer@0.16.3-alpha.1
274
-
275
- ## 0.12.3-alpha.0
276
-
277
- ### Patch Changes
278
-
279
- - Add new scorers to list ([#7614](https://github.com/mastra-ai/mastra/pull/7614))
280
-
281
- - fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
282
-
283
- - Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`0666082`](https://github.com/mastra-ai/mastra/commit/06660820230dcb1fa7c1d51c8254107afd68cd67), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
284
- - @mastra/core@0.16.3-alpha.0
285
- - @mastra/deployer@0.16.3-alpha.0
286
-
287
- ## 0.12.2
288
-
289
- ### Patch Changes
290
-
291
- - Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
292
- - @mastra/core@0.16.2
293
- - @mastra/deployer@0.16.2
294
-
295
- ## 0.12.2-alpha.0
296
-
297
- ### Patch Changes
298
-
299
- - Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
300
- - @mastra/core@0.16.2-alpha.0
301
-
302
- ... 5720 more lines hidden. See full changelog in package directory.
302
+ ... 5783 more lines hidden. See full changelog in package directory.
@@ -762,7 +762,6 @@ const weatherAgent = new Agent({
762
762
  instructions: `You are a weather agent that can help you get weather information for a given city`,
763
763
  description: `An agent that can help you get weather information for a given city`,
764
764
  model: openai_v5('gpt-4o-mini'),
765
- tools: { weatherInfo },
766
765
  workflows: {
767
766
  myWorkflow,
768
767
  },
@@ -774,9 +773,6 @@ export const networkAgent = new Agent({
774
773
  'A chef agent that can help you cook great meals with whatever ingredients you have available based on your location and current weather.',
775
774
  instructions: `You are a the manager of several agent, tools, and workflows. Use the best primitives based on what the user wants to accomplish your task.`,
776
775
  model: openai_v5('gpt-4o-mini'),
777
- workflows: {
778
- myWorkflow,
779
- },
780
776
  agents: {
781
777
  weatherAgent,
782
778
  },
@@ -0,0 +1,47 @@
1
+ ### package.json
2
+ ```json
3
+ {
4
+ "name": "ai-elements",
5
+ "dependencies": {
6
+ "@mastra/playground-ui": "file:../../packages/playground-ui",
7
+ "@mastra/react": "file:../../client-sdks/react",
8
+ "@radix-ui/react-avatar": "^1.1.10",
9
+ "@radix-ui/react-collapsible": "^1.1.12",
10
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
11
+ "@radix-ui/react-hover-card": "^1.1.15",
12
+ "@radix-ui/react-progress": "^1.1.7",
13
+ "@radix-ui/react-scroll-area": "^1.2.10",
14
+ "@radix-ui/react-select": "^2.2.6",
15
+ "@radix-ui/react-slot": "^1.2.3",
16
+ "@radix-ui/react-tooltip": "^1.2.8",
17
+ "@radix-ui/react-use-controllable-state": "^1.2.2",
18
+ "ai": "^5.0.57",
19
+ "class-variance-authority": "^0.7.1",
20
+ "clsx": "^2.1.1",
21
+ "embla-carousel-react": "^8.6.0",
22
+ "lucide-react": "^0.544.0",
23
+ "nanoid": "^5.1.6",
24
+ "next": "15.5.4",
25
+ "react": "19.1.0",
26
+ "react-dom": "19.1.0",
27
+ "react-syntax-highlighter": "^15.6.6",
28
+ "streamdown": "^1.3.0",
29
+ "tailwind-merge": "^3.3.1",
30
+ "tokenlens": "^1.3.1",
31
+ "use-stick-to-bottom": "^1.1.1"
32
+ },
33
+ "devDependencies": {
34
+ "@eslint/eslintrc": "^3",
35
+ "@tailwindcss/postcss": "^4",
36
+ "@types/node": "^20",
37
+ "@types/react": "^19",
38
+ "@types/react-dom": "^19",
39
+ "@types/react-syntax-highlighter": "^15.5.13",
40
+ "eslint": "^9",
41
+ "eslint-config-next": "15.5.4",
42
+ "tailwindcss": "^4",
43
+ "tw-animate-css": "^1.4.0",
44
+ "typescript": "^5"
45
+ }
46
+ }
47
+ ```
@@ -7,15 +7,15 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@ai-sdk/openai": "^1.3.23",
10
- "@mastra/core": "^0.16.3",
11
- "@mastra/libsql": "^0.14.1",
12
- "@mastra/loggers": "^0.10.11",
13
- "@mastra/memory": "^0.15.1",
10
+ "@mastra/core": "^0.18.0",
11
+ "@mastra/libsql": "^0.14.3",
12
+ "@mastra/loggers": "^0.10.13",
13
+ "@mastra/memory": "^0.15.3",
14
14
  "zod": "^3.25.76"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "^24.3.0",
18
- "mastra": "^0.12.3",
18
+ "mastra": "^0.13.2",
19
19
  "typescript": "^5.9.2"
20
20
  }
21
21
  }
@@ -23,17 +23,17 @@ CLERK_JWKS_URI=https://your-clerk-domain.clerk.accounts.dev/.well-known/jwks.jso
23
23
 
24
24
  ## Installation
25
25
 
26
- Before you can use the `MastraAuthClerk` class you have to install the `@mastra/clerk-auth` package.
26
+ Before you can use the `MastraAuthClerk` class you have to install the `@mastra/auth-clerk` package.
27
27
 
28
28
  ```bash copy
29
- npm install @mastra/clerk-auth@latest
29
+ npm install @mastra/auth-clerk@latest
30
30
  ```
31
31
 
32
32
  ## Usage example
33
33
 
34
34
  ```typescript {2,7-11} filename="src/mastra/index.ts" showLineNumbers copy
35
35
  import { Mastra } from "@mastra/core/mastra";
36
- import { MastraAuthClerk } from '@mastra/clerk-auth';
36
+ import { MastraAuthClerk } from '@mastra/auth-clerk';
37
37
 
38
38
  export const mastra = new Mastra({
39
39
  // ..
@@ -20,3 +20,4 @@ The main features include:
20
20
  - **[Retrieval-augmented generation (RAG)](/docs/rag/overview.mdx)**: Mastra gives you APIs to process documents (text, HTML, Markdown, JSON) into chunks, create embeddings, and store them in a vector database. At query time, it retrieves relevant chunks to ground LLM responses in your data, with a unified API on top of multiple vector stores (Pinecone, pgvector, etc) and embedding providers (OpenAI, Cohere, etc).
21
21
  - **[Deployment](/docs/deployment/deployment.mdx)**: Mastra supports bundling your agents and workflows within an existing React, Next.js, or Node.js application, or into standalone endpoints. The Mastra deploy helper lets you easily bundle agents and workflows into a Node.js server using Hono, or deploy it onto a serverless platform like Vercel, Cloudflare Workers, or Netlify.
22
22
  - **[Evals](/docs/evals/overview.mdx)**: Mastra provides automated evaluation metrics that use model-graded, rule-based, and statistical methods to assess LLM outputs, with built-in metrics for toxicity, bias, relevance, and factual accuracy. You can also define your own evals.
23
+ - **[Observability](/docs/observability/overview.mdx)**: Mastra provides specialized AI tracing to monitor LLM operations, agent decisions, and tool executions. Track token usage, latency, and conversation flows with native exporters for Langfuse, Braintrust, and Mastra Cloud. Structured logging provides additional debugging capabilities for comprehensive monitoring.
@@ -0,0 +1,81 @@
1
+ ---
2
+ title: "Braintrust Exporter | AI Tracing | Observability | Mastra Docs"
3
+ description: "Send AI traces to Braintrust for evaluation and monitoring"
4
+ ---
5
+
6
+ import { Callout } from "nextra/components";
7
+
8
+ # Braintrust Exporter
9
+
10
+ [Braintrust](https://www.braintrust.dev/) is an evaluation and monitoring platform that helps you measure and improve LLM application quality. The Braintrust exporter sends your AI traces to Braintrust, enabling systematic evaluation, scoring, and experimentation.
11
+
12
+ ## When to Use Braintrust
13
+
14
+ Braintrust excels at:
15
+ - **Evaluation workflows** - Systematic quality measurement
16
+ - **Experiment tracking** - Compare model versions and prompts
17
+ - **Dataset management** - Curate test cases and golden datasets
18
+ - **Regression testing** - Ensure improvements don't break existing functionality
19
+ - **Team collaboration** - Share experiments and insights
20
+
21
+ ## Installation
22
+
23
+ ```bash npm2yarn
24
+ npm install @mastra/braintrust
25
+ ```
26
+
27
+ ## Configuration
28
+
29
+ ### Prerequisites
30
+
31
+ 1. **Braintrust Account**: Sign up at [braintrust.dev](https://www.braintrust.dev/)
32
+ 2. **Project**: Create or select a project for your traces
33
+ 3. **API Key**: Generate in Braintrust Settings → API Keys
34
+ 4. **Environment Variables**: Set your credentials:
35
+
36
+ ```bash filename=".env"
37
+ BRAINTRUST_API_KEY=sk-xxxxxxxxxxxxxxxx
38
+ BRAINTRUST_PROJECT_NAME=my-project # Optional, defaults to 'mastra-tracing'
39
+ ```
40
+
41
+ ### Basic Setup
42
+
43
+ ```typescript filename="src/mastra/index.ts"
44
+ import { Mastra } from "@mastra/core";
45
+ import { BraintrustExporter } from "@mastra/braintrust";
46
+
47
+ export const mastra = new Mastra({
48
+ observability: {
49
+ configs: {
50
+ braintrust: {
51
+ serviceName: 'my-service',
52
+ exporters: [
53
+ new BraintrustExporter({
54
+ apiKey: process.env.BRAINTRUST_API_KEY,
55
+ projectName: process.env.BRAINTRUST_PROJECT_NAME,
56
+ }),
57
+ ],
58
+ },
59
+ },
60
+ },
61
+ });
62
+ ```
63
+
64
+ ### Complete Configuration
65
+
66
+ ```typescript
67
+ new BraintrustExporter({
68
+ // Required
69
+ apiKey: process.env.BRAINTRUST_API_KEY!,
70
+
71
+ // Optional settings
72
+ projectName: 'my-project', // Default: 'mastra-tracing'
73
+ endpoint: 'https://api.braintrust.dev', // Custom endpoint if needed
74
+ logLevel: 'info', // Diagnostic logging: debug | info | warn | error
75
+ })
76
+ ```
77
+
78
+ ## Related
79
+
80
+ - [AI Tracing Overview](/docs/observability/ai-tracing/overview)
81
+ - [Braintrust Documentation](https://www.braintrust.dev/docs)
@@ -0,0 +1,120 @@
1
+ ---
2
+ title: "Cloud Exporter | AI Tracing | Observability | Mastra Docs"
3
+ description: "Send traces to Mastra Cloud for production monitoring"
4
+ ---
5
+
6
+ import { Callout } from "nextra/components";
7
+
8
+ # Cloud Exporter
9
+
10
+ The `CloudExporter` sends traces to Mastra Cloud for centralized monitoring and team collaboration. It's automatically enabled when using the default observability configuration with a valid access token.
11
+
12
+ ## When to Use CloudExporter
13
+
14
+ CloudExporter is ideal for:
15
+ - **Production monitoring** - Centralized trace visualization
16
+ - **Team collaboration** - Share traces across your organization
17
+ - **Advanced analytics** - Insights and performance metrics
18
+ - **Zero maintenance** - No infrastructure to manage
19
+
20
+ ## Configuration
21
+
22
+ ### Prerequisites
23
+
24
+ 1. **Mastra Cloud Account**: Sign up at [cloud.mastra.ai](https://cloud.mastra.ai)
25
+ 2. **Access Token**: Generate in Mastra Cloud → Settings → API Tokens
26
+ 3. **Environment Variables**: Set your credentials:
27
+
28
+ ```bash filename=".env"
29
+ MASTRA_CLOUD_ACCESS_TOKEN=mst_xxxxxxxxxxxxxxxx
30
+ ```
31
+
32
+ ### Basic Setup
33
+
34
+ ```typescript filename="src/mastra/index.ts"
35
+ import { Mastra } from "@mastra/core";
36
+ import { CloudExporter } from "@mastra/core/ai-tracing";
37
+
38
+ export const mastra = new Mastra({
39
+ observability: {
40
+ configs: {
41
+ production: {
42
+ serviceName: 'my-service',
43
+ exporters: [
44
+ new CloudExporter(), // Uses MASTRA_CLOUD_ACCESS_TOKEN env var
45
+ ],
46
+ },
47
+ },
48
+ },
49
+ });
50
+ ```
51
+
52
+ ### Automatic Configuration
53
+
54
+ When using the default observability configuration, CloudExporter is automatically included if the access token is set:
55
+
56
+ ```typescript
57
+ export const mastra = new Mastra({
58
+ observability: {
59
+ default: { enabled: true }, // Automatically includes CloudExporter if token exists
60
+ },
61
+ });
62
+ ```
63
+
64
+ ### Complete Configuration
65
+
66
+ ```typescript
67
+ new CloudExporter({
68
+ // Optional - defaults to env var
69
+ accessToken: process.env.MASTRA_CLOUD_ACCESS_TOKEN,
70
+
71
+ // Optional - for self-hosted Mastra Cloud
72
+ endpoint: 'https://cloud.your-domain.com',
73
+
74
+ // Batching configuration
75
+ maxBatchSize: 1000, // Max spans per batch
76
+ maxBatchWaitMs: 5000, // Max wait before sending batch
77
+
78
+ // Diagnostic logging
79
+ logLevel: 'info', // debug | info | warn | error
80
+ })
81
+ ```
82
+
83
+ ## Viewing Traces
84
+
85
+ ### Mastra Cloud Dashboard
86
+
87
+ 1. Navigate to [cloud.mastra.ai](https://cloud.mastra.ai)
88
+ 2. Select your project
89
+ 3. Go to Observability → Traces
90
+ 4. Use filters to find specific traces:
91
+ - Service name
92
+ - Time range
93
+ - Trace ID
94
+ - Error status
95
+
96
+ ### Features
97
+
98
+ - **Trace Timeline** - Visual execution flow
99
+ - **Span Details** - Inputs, outputs, metadata
100
+ - **Performance Metrics** - Latency, token usage
101
+ - **Team Collaboration** - Share trace links
102
+
103
+ ## Performance
104
+
105
+ <Callout type="info">
106
+ CloudExporter uses intelligent batching to optimize network usage. Traces are buffered and sent in batches, reducing overhead while maintaining near real-time visibility.
107
+ </Callout>
108
+
109
+ ### Batching Behavior
110
+
111
+ - Traces are batched up to `maxBatchSize` (default: 1000)
112
+ - Batches are sent when full or after `maxBatchWaitMs` (default: 5 seconds)
113
+ - Failed batches are retried with exponential backoff
114
+ - Graceful degradation if Mastra Cloud is unreachable
115
+
116
+ ## Related
117
+
118
+ - [AI Tracing Overview](/docs/observability/ai-tracing/overview)
119
+ - [DefaultExporter](/docs/observability/ai-tracing/exporters/default)
120
+ - [Mastra Cloud Documentation](https://cloud.mastra.ai/docs)
@@ -0,0 +1,168 @@
1
+ ---
2
+ title: "Default Exporter | AI Tracing | Observability | Mastra Docs"
3
+ description: "Store traces locally for development and debugging"
4
+ ---
5
+
6
+ # Default Exporter
7
+
8
+ The `DefaultExporter` persists traces to your configured storage backend, making them accessible through the Mastra Playground. It's automatically enabled when using the default observability configuration and requires no external services.
9
+
10
+ ## When to Use DefaultExporter
11
+
12
+ DefaultExporter is ideal for:
13
+ - **Local development** - Debug and analyze traces offline
14
+ - **Data ownership** - Complete control over your trace data
15
+ - **Zero dependencies** - No external services required
16
+ - **Playground integration** - View traces in Mastra Playground UI
17
+
18
+ ## Configuration
19
+
20
+ ### Prerequisites
21
+
22
+ 1. **Storage Backend**: Configure a storage provider (LibSQL, PostgreSQL, etc.)
23
+ 2. **Mastra Playground**: Install for viewing traces locally
24
+
25
+ ### Basic Setup
26
+
27
+ ```typescript filename="src/mastra/index.ts"
28
+ import { Mastra } from "@mastra/core";
29
+ import { DefaultExporter } from "@mastra/core/ai-tracing";
30
+ import { LibSQLStore } from "@mastra/libsql";
31
+
32
+ export const mastra = new Mastra({
33
+ storage: new LibSQLStore({
34
+ url: "file:./mastra.db", // Required for trace persistence
35
+ }),
36
+ observability: {
37
+ configs: {
38
+ local: {
39
+ serviceName: 'my-service',
40
+ exporters: [
41
+ new DefaultExporter(),
42
+ ],
43
+ },
44
+ },
45
+ },
46
+ });
47
+ ```
48
+
49
+ ### Automatic Configuration
50
+
51
+ When using the default observability configuration, DefaultExporter is automatically included:
52
+
53
+ ```typescript
54
+ export const mastra = new Mastra({
55
+ storage: new LibSQLStore({
56
+ url: "file:./mastra.db",
57
+ }),
58
+ observability: {
59
+ default: { enabled: true }, // Automatically includes DefaultExporter
60
+ },
61
+ });
62
+ ```
63
+
64
+ ## Viewing Traces
65
+
66
+ ### Mastra Playground
67
+
68
+ Access your traces through the local Playground:
69
+
70
+ 1. Start the Playground
71
+ 2. Navigate to Observability
72
+ 3. Filter and search your local traces
73
+ 4. Inspect detailed span information
74
+
75
+ ## Tracing Strategies
76
+
77
+ DefaultExporter automatically selects the optimal tracing strategy based on your storage provider. You can also override this selection if needed.
78
+
79
+ ### Available Strategies
80
+
81
+ | Strategy | Description | Use Case |
82
+ |----------|-------------|----------|
83
+ | **realtime** | Process each event immediately | Development, debugging, low traffic |
84
+ | **batch-with-updates** | Buffer events and batch write with full lifecycle support | Low volume Production |
85
+ | **insert-only** | Only process completed spans, ignore updates | High volume Production |
86
+
87
+ ### Strategy Configuration
88
+
89
+ ```typescript
90
+ new DefaultExporter({
91
+ strategy: 'auto', // Default - let storage provider decide
92
+ // or explicitly set:
93
+ // strategy: 'realtime' | 'batch-with-updates' | 'insert-only'
94
+
95
+ // Batching configuration (applies to both batch-with-updates and insert-only)
96
+ maxBatchSize: 1000, // Max spans per batch
97
+ maxBatchWaitMs: 5000, // Max wait before flushing
98
+ maxBufferSize: 10000, // Max spans to buffer
99
+ })
100
+ ```
101
+
102
+ ## Storage Provider Support
103
+
104
+ Different storage providers support different tracing strategies.
105
+
106
+ If you set the strategy to `'auto'`, the `DefaultExporter` automatically selects the optimal strategy for the storage provider. If you set the strategy to a mode that the storage provider doesn't support, you will get an error message.
107
+
108
+ | Storage Provider | Preferred Strategy | Supported Strategies | Notes |
109
+ |-----------------|-------------------|---------------------|--------|
110
+ | **[LibSQL](/reference/storage/libsql)** | batch-with-updates | realtime, batch-with-updates, insert-only | Default storage, good for development |
111
+ | **[PostgreSQL](/reference/storage/postgresql)** | batch-with-updates | batch-with-updates, insert-only | Recommended for production |
112
+
113
+ ### Strategy Benefits
114
+
115
+ - **realtime**: Immediate visibility, best for debugging
116
+ - **batch-with-updates**: 10-100x throughput improvement, full span lifecycle
117
+ - **insert-only**: Additional 70% reduction in database operations, perfect for analytics
118
+
119
+ ## Batching Behavior
120
+
121
+ ### Flush Triggers
122
+
123
+ For both batch strategies (`batch-with-updates` and `insert-only`), traces are flushed to storage when any of these conditions are met:
124
+
125
+ 1. **Size trigger**: Buffer reaches `maxBatchSize` spans
126
+ 2. **Time trigger**: `maxBatchWaitMs` elapsed since first event
127
+ 3. **Emergency flush**: Buffer approaches `maxBufferSize` limit
128
+ 4. **Shutdown**: Force flush all pending events
129
+
130
+ ### Error Handling
131
+
132
+ The DefaultExporter includes robust error handling for production use:
133
+
134
+ - **Retry Logic**: Exponential backoff (500ms, 1s, 2s, 4s)
135
+ - **Transient Failures**: Automatic retry with backoff
136
+ - **Persistent Failures**: Drop batch after 4 failed attempts
137
+ - **Buffer Overflow**: Prevent memory issues during storage outages
138
+
139
+ ### Configuration Examples
140
+
141
+ ```typescript
142
+ // Zero config - recommended for most users
143
+ new DefaultExporter()
144
+
145
+ // Development override
146
+ new DefaultExporter({
147
+ strategy: 'realtime', // Immediate visibility for debugging
148
+ })
149
+
150
+ // High-throughput production
151
+ new DefaultExporter({
152
+ maxBatchSize: 2000, // Larger batches
153
+ maxBatchWaitMs: 10000, // Wait longer to fill batches
154
+ maxBufferSize: 50000, // Handle longer outages
155
+ })
156
+
157
+ // Low-latency production
158
+ new DefaultExporter({
159
+ maxBatchSize: 100, // Smaller batches
160
+ maxBatchWaitMs: 1000, // Flush quickly
161
+ })
162
+ ```
163
+
164
+ ## Related
165
+
166
+ - [AI Tracing Overview](/docs/observability/ai-tracing/overview)
167
+ - [CloudExporter](/docs/observability/ai-tracing/exporters/cloud)
168
+ - [Storage Configuration](/docs/storage/overview)