@mastra/mcp-docs-server 0.13.5-alpha.0 → 0.13.5

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 (28) hide show
  1. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +18 -18
  2. package/.docs/organized/changelogs/%40mastra%2Fcore.md +16 -16
  3. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +21 -21
  4. package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +14 -14
  5. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +14 -14
  6. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +23 -23
  7. package/.docs/organized/changelogs/%40mastra%2Frag.md +14 -14
  8. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
  9. package/.docs/organized/changelogs/%40mastra%2Fserver.md +18 -18
  10. package/.docs/organized/changelogs/create-mastra.md +8 -8
  11. package/.docs/organized/changelogs/mastra.md +17 -17
  12. package/.docs/raw/agents/overview.mdx +16 -33
  13. package/.docs/raw/community/licensing.mdx +27 -19
  14. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +1 -1
  15. package/.docs/raw/deployment/server-deployment.mdx +56 -0
  16. package/.docs/raw/rag/retrieval.mdx +24 -5
  17. package/.docs/raw/reference/rag/rerankWithScorer.mdx +213 -0
  18. package/.docs/raw/server-db/production-server.mdx +66 -0
  19. package/.docs/raw/tools-mcp/mcp-overview.mdx +4 -6
  20. package/.docs/raw/workflows/control-flow.mdx +34 -34
  21. package/LICENSE.md +11 -42
  22. package/package.json +5 -5
  23. package/.docs/raw/deployment/server.mdx +0 -116
  24. /package/.docs/raw/{deployment → server-db}/custom-api-routes.mdx +0 -0
  25. /package/.docs/raw/{local-dev/mastra-dev.mdx → server-db/local-dev-playground.mdx} +0 -0
  26. /package/.docs/raw/{client-js/overview.mdx → server-db/mastra-client.mdx} +0 -0
  27. /package/.docs/raw/{deployment → server-db}/middleware.mdx +0 -0
  28. /package/.docs/raw/{storage/overview.mdx → server-db/storage.mdx} +0 -0
@@ -1,5 +1,22 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.10.10-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - @mastra/core@0.10.11-alpha.4
8
+
9
+ ## 0.10.10-alpha.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [c7bbf1e]
14
+ - Updated dependencies [8722d53]
15
+ - Updated dependencies [132027f]
16
+ - Updated dependencies [0c85311]
17
+ - Updated dependencies [cb16baf]
18
+ - @mastra/core@0.10.11-alpha.3
19
+
3
20
  ## 0.10.10-alpha.2
4
21
 
5
22
  ### Patch Changes
@@ -281,22 +298,5 @@
281
298
 
282
299
  ### Patch Changes
283
300
 
284
- - Updated dependencies [4b0f8a6]
285
- - @mastra/core@0.10.6-alpha.2
286
-
287
- ## 0.10.5-alpha.1
288
-
289
- ### Patch Changes
290
-
291
- - ee9af57: Add api for polling run execution result and get run by id
292
- - 3270d9d: Fix runtime context being undefined
293
- - Updated dependencies [ee9af57]
294
- - Updated dependencies [751c894]
295
- - Updated dependencies [577ce3a]
296
- - Updated dependencies [9260b3a]
297
- - @mastra/core@0.10.6-alpha.1
298
-
299
- ## 0.10.5-alpha.0
300
-
301
301
 
302
- ... 1480 more lines hidden. See full changelog in package directory.
302
+ ... 1497 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,19 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 0.10.11-alpha.4
4
+
5
+ ## 0.10.11-alpha.3
6
+
7
+ ### Patch Changes
8
+
9
+ - c7bbf1e: Implement workflow retry delay
10
+ - 8722d53: Fix multi modal remaining steps
11
+ - 132027f: Check if workflow and step is suspended before resuming
12
+ - 0c85311: Fix Google models ZodNull tool schema handling
13
+ - cb16baf: Fix MCP tool output schema type and return value
14
+ - Updated dependencies [0c85311]
15
+ - @mastra/schema-compat@0.10.4-alpha.0
16
+
3
17
  ## 0.10.11-alpha.2
4
18
 
5
19
  ### Patch Changes
@@ -284,19 +298,5 @@
284
298
 
285
299
  - d1ed912: dependencies updates:
286
300
  - Updated dependency [`dotenv@^16.5.0` ↗︎](https://www.npmjs.com/package/dotenv/v/16.5.0) (from `^16.4.7`, in `dependencies`)
287
- - f6fd25f: Updates @mastra/schema-compat to allow all zod schemas. Uses @mastra/schema-compat to apply schema transformations to agent output schema.
288
- - dffb67b: updated stores to add alter table and change tests
289
- - f1f1f1b: Add basic filtering capabilities to logs
290
- - 925ab94: added paginated functions to base class and added boilerplate and updated imports
291
- - f9816ae: Create @mastra/schema-compat package to extract the schema compatibility layer to be used outside of mastra
292
- - 82090c1: Add pagination to logs
293
- - 1b443fd: - add trackException to loggers to allow mastra cloud to track exceptions at runtime
294
- - Added generic MastraBaseError<D, C> in packages/core/src/error/index.ts to improve type safety and flexibility of error handling
295
- - ce97900: Add paginated APIs to cloudflare-d1 storage class
296
- - f1309d3: Now that UIMessages are stored, we added a check to make sure large text files or source urls are not sent to the LLM for thread title generation.
297
- - 14a2566: Add pagination to libsql storage APIs
298
- - f7f8293: Added LanceDB implementations for MastraVector and MastraStorage
299
- - 48eddb9: update filter logic in Memory class to support semantic recall search scope
300
- - Updated dependencies [f6fd25f]
301
-
302
- ... 2070 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 2084 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,25 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.10.11-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 40cd025: Check if tool is actually a tool for /api/tools
8
+ - @mastra/core@0.10.11-alpha.4
9
+ - @mastra/server@0.10.11-alpha.4
10
+
11
+ ## 0.10.11-alpha.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [c7bbf1e]
16
+ - Updated dependencies [8722d53]
17
+ - Updated dependencies [132027f]
18
+ - Updated dependencies [0c85311]
19
+ - Updated dependencies [cb16baf]
20
+ - @mastra/core@0.10.11-alpha.3
21
+ - @mastra/server@0.10.11-alpha.3
22
+
3
23
  ## 0.10.11-alpha.2
4
24
 
5
25
  ### Patch Changes
@@ -278,25 +298,5 @@
278
298
  - Updated dependencies [9d52b17]
279
299
  - Updated dependencies [8ba1b51]
280
300
  - @mastra/core@0.10.7-alpha.0
281
- - @mastra/server@0.10.7-alpha.0
282
-
283
- ## 0.10.6
284
-
285
- ### Patch Changes
286
301
 
287
- - 4051477: dependencies updates:
288
- - Updated dependency [`@rollup/plugin-commonjs@^28.0.5` ↗︎](https://www.npmjs.com/package/@rollup/plugin-commonjs/v/28.0.5) (from `^28.0.3`, in `dependencies`)
289
- - 2d12edd: dependencies updates:
290
- - Updated dependency [`rollup@^4.43.0` ↗︎](https://www.npmjs.com/package/rollup/v/4.43.0) (from `^4.42.0`, in `dependencies`)
291
- - 63f6b7d: dependencies updates:
292
- - Updated dependency [`detect-libc@^2.0.4` ↗︎](https://www.npmjs.com/package/detect-libc/v/2.0.4) (from `^2.0.3`, in `dependencies`)
293
- - Updated dependency [`esbuild@^0.25.5` ↗︎](https://www.npmjs.com/package/esbuild/v/0.25.5) (from `^0.25.1`, in `dependencies`)
294
- - Updated dependency [`rollup@^4.42.0` ↗︎](https://www.npmjs.com/package/rollup/v/4.42.0) (from `^4.41.1`, in `dependencies`)
295
- - Updated dependency [`zod@^3.25.57` ↗︎](https://www.npmjs.com/package/zod/v/3.25.57) (from `^3.25.56`, in `dependencies`)
296
- - c28ed65: dependencies updates:
297
- - Updated dependency [`@rollup/plugin-commonjs@^28.0.5` ↗︎](https://www.npmjs.com/package/@rollup/plugin-commonjs/v/28.0.5) (from `^28.0.3`, in `dependencies`)
298
- - 79b9909: Optimize dependencies of tools even when unused.
299
-
300
- Fixes #5149
301
-
302
- ... 2725 more lines hidden. See full changelog in package directory.
302
+ ... 2745 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,18 @@
1
1
  # @mastra/firecrawl
2
2
 
3
+ ## 1.2.6-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [c7bbf1e]
8
+ - Updated dependencies [8722d53]
9
+ - Updated dependencies [43da563]
10
+ - Updated dependencies [132027f]
11
+ - Updated dependencies [0c85311]
12
+ - Updated dependencies [cb16baf]
13
+ - @mastra/core@0.10.11-alpha.3
14
+ - @mastra/rag@1.0.2-alpha.0
15
+
3
16
  ## 1.2.5
4
17
 
5
18
  ### Patch Changes
@@ -286,17 +299,4 @@
286
299
  - @mastra/core@0.10.0-alpha.1
287
300
  - @mastra/rag@0.2.0-alpha.1
288
301
 
289
- ## 1.1.24-alpha.0
290
-
291
- ### Patch Changes
292
-
293
- - Updated dependencies [f53a6ac]
294
- - Updated dependencies [eabdcd9]
295
- - Updated dependencies [90be034]
296
- - Updated dependencies [99f050a]
297
- - Updated dependencies [d0ee3c6]
298
- - Updated dependencies [23f258c]
299
- - Updated dependencies [2672a05]
300
- - @mastra/core@0.9.5-alpha.0
301
-
302
- ... 2362 more lines hidden. See full changelog in package directory.
302
+ ... 2375 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,18 @@
1
1
  # @mastra/mcp
2
2
 
3
+ ## 0.10.6-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c0ba5e2: Handle json schema with $defs and $ref property for MCP tool schemas.
8
+ - cb16baf: Fix MCP tool output schema type and return value
9
+ - Updated dependencies [c7bbf1e]
10
+ - Updated dependencies [8722d53]
11
+ - Updated dependencies [132027f]
12
+ - Updated dependencies [0c85311]
13
+ - Updated dependencies [cb16baf]
14
+ - @mastra/core@0.10.11-alpha.3
15
+
3
16
  ## 0.10.6-alpha.0
4
17
 
5
18
  ### Patch Changes
@@ -285,18 +298,5 @@
285
298
 
286
299
  ## 0.5.1-alpha.0
287
300
 
288
- ### Patch Changes
289
-
290
- - 23f258c: Add new list and get routes for mcp servers. Changed route make-up for more consistency with existing API routes. Lastly, added in a lot of extra detail that can be optionally passed to the mcp server per the mcp spec.
291
- - 2672a05: Add MCP servers and tool call execution to playground
292
- - Updated dependencies [f53a6ac]
293
- - Updated dependencies [eabdcd9]
294
- - Updated dependencies [90be034]
295
- - Updated dependencies [99f050a]
296
- - Updated dependencies [d0ee3c6]
297
- - Updated dependencies [23f258c]
298
- - Updated dependencies [2672a05]
299
- - @mastra/core@0.9.5-alpha.0
300
-
301
301
 
302
- ... 1825 more lines hidden. See full changelog in package directory.
302
+ ... 1838 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,27 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 5.1.11-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - c1cceea: Bump peerdeps of @matra/core
8
+ - @mastra/core@0.10.11-alpha.4
9
+ - @mastra/client-js@0.10.10-alpha.4
10
+
11
+ ## 5.1.11-alpha.3
12
+
13
+ ### Patch Changes
14
+
15
+ - f457d86: reset localstorage when resetting model settings
16
+ - 8722d53: Fix multi modal remaining steps
17
+ - Updated dependencies [c7bbf1e]
18
+ - Updated dependencies [8722d53]
19
+ - Updated dependencies [132027f]
20
+ - Updated dependencies [0c85311]
21
+ - Updated dependencies [cb16baf]
22
+ - @mastra/core@0.10.11-alpha.3
23
+ - @mastra/client-js@0.10.10-alpha.3
24
+
3
25
  ## 5.1.11-alpha.2
4
26
 
5
27
  ### Patch Changes
@@ -277,26 +299,4 @@
277
299
  - @mastra/client-js@0.10.6-alpha.2
278
300
  - @mastra/core@0.10.7-alpha.2
279
301
 
280
- ## 5.1.7-alpha.1
281
-
282
- ### Patch Changes
283
-
284
- - 21ffb97: Make dynamic form handle schema better
285
- - Updated dependencies [d1baedb]
286
- - Updated dependencies [4d21bf2]
287
- - Updated dependencies [2097952]
288
- - Updated dependencies [4fb0cc2]
289
- - Updated dependencies [d2a7a31]
290
- - Updated dependencies [0e17048]
291
- - @mastra/core@0.10.7-alpha.1
292
- - @mastra/client-js@0.10.6-alpha.1
293
-
294
- ## 5.1.7-alpha.0
295
-
296
- ### Patch Changes
297
-
298
- - 9102d89: Fix final output not showing on playground for previously suspended steps
299
- - Updated dependencies [d8f2d19]
300
- - Updated dependencies [9d52b17]
301
-
302
- ... 1889 more lines hidden. See full changelog in package directory.
302
+ ... 1911 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,17 @@
1
1
  # @mastra/rag
2
2
 
3
+ ## 1.0.2-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 43da563: Refactor relevance provider
8
+ - Updated dependencies [c7bbf1e]
9
+ - Updated dependencies [8722d53]
10
+ - Updated dependencies [132027f]
11
+ - Updated dependencies [0c85311]
12
+ - Updated dependencies [cb16baf]
13
+ - @mastra/core@0.10.11-alpha.3
14
+
3
15
  ## 1.0.1
4
16
 
5
17
  ### Patch Changes
@@ -286,17 +298,5 @@
286
298
 
287
299
  - Updated dependencies [396be50]
288
300
  - Updated dependencies [ab80e7e]
289
- - Updated dependencies [c3bd795]
290
- - Updated dependencies [da082f8]
291
- - Updated dependencies [a5810ce]
292
- - Updated dependencies [3e9c131]
293
- - Updated dependencies [3171b5b]
294
- - Updated dependencies [973e5ac]
295
- - Updated dependencies [daf942f]
296
- - Updated dependencies [0b8b868]
297
- - Updated dependencies [9e1eff5]
298
- - Updated dependencies [6fa1ad1]
299
- - Updated dependencies [c28d7a0]
300
- - Updated dependencies [edf1e88]
301
-
302
- ... 2174 more lines hidden. See full changelog in package directory.
301
+
302
+ ... 2186 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,11 @@
1
1
  # @mastra/schema-compat
2
2
 
3
+ ## 0.10.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 0c85311: Fix Google models ZodNull tool schema handling
8
+
3
9
  ## 0.10.3
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,22 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.10.11-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - @mastra/core@0.10.11-alpha.4
8
+
9
+ ## 0.10.11-alpha.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [c7bbf1e]
14
+ - Updated dependencies [8722d53]
15
+ - Updated dependencies [132027f]
16
+ - Updated dependencies [0c85311]
17
+ - Updated dependencies [cb16baf]
18
+ - @mastra/core@0.10.11-alpha.3
19
+
3
20
  ## 0.10.11-alpha.2
4
21
 
5
22
  ### Patch Changes
@@ -281,22 +298,5 @@
281
298
  ### Patch Changes
282
299
 
283
300
  - ee9af57: Add api for polling run execution result and get run by id
284
- - 3270d9d: Fix runtime context being undefined
285
- - Updated dependencies [ee9af57]
286
- - Updated dependencies [751c894]
287
- - Updated dependencies [577ce3a]
288
- - Updated dependencies [9260b3a]
289
- - @mastra/core@0.10.6-alpha.1
290
-
291
- ## 0.10.6-alpha.0
292
-
293
- ### Patch Changes
294
-
295
- - 53d3c37: Get workflows from an agent if not found from Mastra instance #5083
296
- - Updated dependencies [63f6b7d]
297
- - Updated dependencies [36f1c36]
298
- - Updated dependencies [10d352e]
299
- - Updated dependencies [53d3c37]
300
- - @mastra/core@0.10.6-alpha.0
301
301
 
302
- ... 2277 more lines hidden. See full changelog in package directory.
302
+ ... 2294 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # create-mastra
2
2
 
3
+ ## 0.10.10-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f457d86: reset localstorage when resetting model settings
8
+ - 8722d53: Fix multi modal remaining steps
9
+
3
10
  ## 0.10.10-alpha.2
4
11
 
5
12
  ### Patch Changes
@@ -291,12 +298,5 @@
291
298
 
292
299
  - 7a32205: add empty states for workflows, agents and mcp servers
293
300
 
294
- ## 0.10.1-alpha.0
295
-
296
- ### Patch Changes
297
-
298
- - 35bb6a3: Allow undefined temprature, topP model setting from playground
299
-
300
- ## 0.10.0
301
301
 
302
- ... 991 more lines hidden. See full changelog in package directory.
302
+ ... 998 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,21 @@
1
1
  # mastra
2
2
 
3
+ ## 0.10.11-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f457d86: reset localstorage when resetting model settings
8
+ - 8722d53: Fix multi modal remaining steps
9
+ - Updated dependencies [c7bbf1e]
10
+ - Updated dependencies [8722d53]
11
+ - Updated dependencies [132027f]
12
+ - Updated dependencies [0c85311]
13
+ - Updated dependencies [c0ba5e2]
14
+ - Updated dependencies [cb16baf]
15
+ - @mastra/core@0.10.11-alpha.3
16
+ - @mastra/mcp@0.10.6-alpha.1
17
+ - @mastra/deployer@0.10.11-alpha.3
18
+
3
19
  ## 0.10.11-alpha.2
4
20
 
5
21
  ### Patch Changes
@@ -282,21 +298,5 @@
282
298
  - Updated dependencies [8e1b6e9]
283
299
  - Updated dependencies [36cd0f1]
284
300
  - Updated dependencies [2eab82b]
285
- - Updated dependencies [ee93d96]
286
- - Updated dependencies [c00039d]
287
- - Updated dependencies [15e9d26]
288
- - Updated dependencies [9bf1d55]
289
- - Updated dependencies [914684e]
290
- - Updated dependencies [07d6d88]
291
- - Updated dependencies [5d74aab]
292
- - Updated dependencies [5d74aab]
293
- - Updated dependencies [17903a3]
294
- - Updated dependencies [144eb0b]
295
- - @mastra/deployer@0.10.7-alpha.2
296
- - @mastra/mcp@0.10.5-alpha.1
297
- - @mastra/core@0.10.7-alpha.2
298
-
299
- ## 0.10.7-alpha.1
300
-
301
301
 
302
- ... 4219 more lines hidden. See full changelog in package directory.
302
+ ... 4235 more lines hidden. See full changelog in package directory.
@@ -1,13 +1,13 @@
1
1
  ---
2
- title: "Creating and Calling Agents | Agent Documentation | Mastra"
2
+ title: "Agent Overview | Agent Documentation | Mastra"
3
3
  description: Overview of agents in Mastra, detailing their capabilities and how they interact with tools, workflows, and external systems.
4
4
  ---
5
5
 
6
- # Creating and Calling Agents
6
+ # Using Agents
7
7
 
8
- Agents in Mastra are systems where the language model can autonomously decide on a sequence of actions to perform tasks. They have access to tools, workflows, and synced data, enabling them to perform complex tasks and interact with external systems. Agents can invoke your custom functions, utilize third-party APIs through integrations, and access knowledge bases you have built.
8
+ **Agents** are one of the core Mastra primitives. Agents use a language model to decide on a sequence of actions. They can call functions (known as _tools_). You can compose them with *workflows* (the other main Mastra primitive), either by giving an agent a workflow as a tool, or by running an agent from within a workflow.
9
9
 
10
- Agents are like employees who can be used for ongoing projects. They have names, persistent memory, consistent model configurations, and instructions across calls, as well as a set of enabled tools.
10
+ Agents can run autonomously in a loop, run once, or take turns with a user. You can give short-term, long-term, and working memory of their user interactions. They can stream text or return structured output (ie, JSON). They can access third-party APIs, query knowledge bases, and so on.
11
11
 
12
12
  ## 1. Creating an Agent
13
13
 
@@ -185,11 +185,13 @@ console.log("Structured Output:", response.object);
185
185
 
186
186
  This allows you to have strong typing and validation for the structured data returned by the agent.
187
187
 
188
- ## 4. Multi-step Tool use Agents
188
+ ## 4. Multi-step tool use
189
189
 
190
- Agents can be enhanced with tools - functions that extend their capabilities beyond text generation. Tools allow agents to perform calculations, access external systems, and process data. For details on creating and configuring tools, see the [Adding Tools documentation](/docs/agents/using-tools-and-mcp).
190
+ Agents can be enhanced with tools - functions that extend their capabilities beyond text generation. Tools allow agents to perform calculations, access external systems, and process data. Agents not only decide whether to call tools they're given, they determine the parameters that should be given to that tool.
191
191
 
192
- ### Using maxSteps
192
+ For a detailed guide to creating and configuring tools, see the [Adding Tools documentation](/docs/agents/using-tools-and-mcp), but below are the important things to know.
193
+
194
+ ### Using `maxSteps`
193
195
 
194
196
  The `maxSteps` parameter controls the maximum number of sequential LLM calls an agent can make, particularly important when using tool calls. By default, it is set to 1 to prevent infinite loops in case of misconfigured tools. You can increase this limit based on your use case:
195
197
 
@@ -217,7 +219,7 @@ const response = await myAgent.generate(
217
219
  {
218
220
  role: "user",
219
221
  content:
220
- "If a taxi driver earns $9461 per hour and works 12 hours a day, how much do they earn in one day?",
222
+ "If a taxi driver earns $41 per hour and works 12 hours a day, how much do they earn in one day?",
221
223
  },
222
224
  ],
223
225
  {
@@ -226,9 +228,10 @@ const response = await myAgent.generate(
226
228
  );
227
229
  ```
228
230
 
229
- ### Using onStepFinish
231
+ ### Streaming progress with `onStepFinish`
230
232
 
231
233
  You can monitor the progress of multi-step operations using the `onStepFinish` callback. This is useful for debugging or providing progress updates to users.
234
+
232
235
  `onStepFinish` is only available when streaming or generating text without structured output.
233
236
 
234
237
  ```ts showLineNumbers filename="src/mastra/agents/index.ts" copy
@@ -243,7 +246,7 @@ const response = await myAgent.generate(
243
246
  );
244
247
  ```
245
248
 
246
- ### Using onFinish
249
+ ### Detecting completion with `onFinish`
247
250
 
248
251
  The `onFinish` callback is available when streaming responses and provides detailed information about the completed interaction. It is called after the LLM has finished generating its response and all tool executions have completed.
249
252
  This callback receives the final response text, execution steps, token usage statistics, and other metadata that can be useful for monitoring and logging:
@@ -270,31 +273,11 @@ const stream = await myAgent.stream(
270
273
  );
271
274
  ```
272
275
 
273
- ## 5. Running Agents
274
-
275
- Mastra provides a CLI command `mastra dev` to run your agents behind an API. By default, this looks for exported agents in files in the `src/mastra/agents` directory.
276
+ ## 5. Testing agents locally
276
277
 
277
- ### Starting the Server
278
-
279
- ```bash
280
- mastra dev
281
- ```
278
+ Mastra provides a CLI command `mastra dev` to run your agents behind an API. By default, this looks for exported agents in files in the `src/mastra/agents` directory. It generates endpoints for testing your agent (eg `http://localhost:4111/api/agents/myAgent/generate`) and provides a visual playground where you can chat with an agent and view traces.
282
279
 
283
- This will start the server and make your agent available at `http://localhost:4111/api/agents/myAgent/generate`.
284
-
285
- ### Interacting with the Agent
286
-
287
- You can interact with the agent using `curl` from the command line:
288
-
289
- ```bash
290
- curl -X POST http://localhost:4111/api/agents/myAgent/generate \
291
- -H "Content-Type: application/json" \
292
- -d '{
293
- "messages": [
294
- { "role": "user", "content": "Hello, how can you assist me today?" }
295
- ]
296
- }'
297
- ```
280
+ For more details, see the [Local Dev Playground](/docs/server-db/local-dev-playground) docs.
298
281
 
299
282
  ## Next Steps
300
283
 
@@ -5,36 +5,39 @@ description: "Mastra License"
5
5
 
6
6
  # License
7
7
 
8
- ## Elastic License 2.0 (ELv2)
8
+ ## Apache License 2.0
9
9
 
10
- Mastra is licensed under the Elastic License 2.0 (ELv2), a modern license designed to balance open-source principles with sustainable business practices.
10
+ Mastra is licensed under the Apache License 2.0, a permissive open-source license that provides users with broad rights to use, modify, and distribute the software.
11
11
 
12
- ### What is Elastic License 2.0?
12
+ ### What is Apache License 2.0?
13
13
 
14
- The Elastic License 2.0 is a source-available license that grants users broad rights to use, modify, and distribute the software while including specific limitations to protect the project's sustainability. It allows:
14
+ The Apache License 2.0 is a permissive open-source license that grants users extensive rights to use, modify, and distribute the software. It allows:
15
15
 
16
- - Free use for most purposes
16
+ - Free use for any purpose, including commercial use
17
17
  - Viewing, modifying, and redistributing the source code
18
18
  - Creating and distributing derivative works
19
- - Commercial use within your organization
19
+ - Commercial use without restrictions
20
+ - Patent protection from contributors
20
21
 
21
- The primary limitation is that you cannot provide Mastra as a hosted or managed service that offers users access to the substantial functionality of the software.
22
+ The Apache License 2.0 is one of the most permissive and business-friendly open-source licenses available.
22
23
 
23
- ### Why We Chose Elastic License 2.0
24
+ ### Why We Chose Apache License 2.0
24
25
 
25
- We selected the Elastic License 2.0 for several important reasons:
26
+ We selected the Apache License 2.0 for several important reasons:
26
27
 
27
- 1. **Sustainability**: It enables us to maintain a healthy balance between openness and the ability to sustain long-term development.
28
+ 1. **True Open Source**: It's a recognized open-source license that aligns with open-source principles and community expectations.
28
29
 
29
- 2. **Innovation Protection**: It ensures we can continue investing in innovation without concerns about our work being repackaged as competing services.
30
+ 2. **Business Friendly**: It allows for unrestricted commercial use and distribution, making it ideal for businesses of all sizes.
30
31
 
31
- 3. **Community Focus**: It maintains the spirit of open source by allowing users to view, modify, and learn from our code while protecting our ability to support the community.
32
+ 3. **Patent Protection**: It includes explicit patent protection for users, providing additional legal security.
32
33
 
33
- 4. **Business Clarity**: It provides clear guidelines for how Mastra can be used in commercial contexts.
34
+ 4. **Community Focus**: It encourages community contributions and collaboration without restrictions.
35
+
36
+ 5. **Widely Adopted**: It's one of the most popular and well-understood open-source licenses in the industry.
34
37
 
35
38
  ### Building Your Business with Mastra
36
39
 
37
- Despite the licensing restrictions, there are numerous ways to build successful businesses using Mastra:
40
+ The Apache License 2.0 provides maximum flexibility for building businesses with Mastra:
38
41
 
39
42
  #### Allowed Business Models
40
43
 
@@ -43,6 +46,8 @@ Despite the licensing restrictions, there are numerous ways to build successful
43
46
  - **Developing Custom Solutions**: Build bespoke AI solutions for clients using Mastra
44
47
  - **Creating Add-ons and Extensions**: Develop and sell complementary tools that extend Mastra's functionality
45
48
  - **Training and Education**: Offer courses and educational materials about using Mastra effectively
49
+ - **Hosted Services**: Offer Mastra as a hosted or managed service
50
+ - **SaaS Platforms**: Build SaaS platforms powered by Mastra
46
51
 
47
52
  #### Examples of Compliant Usage
48
53
 
@@ -50,14 +55,17 @@ Despite the licensing restrictions, there are numerous ways to build successful
50
55
  - A consulting firm offers implementation and customization services for Mastra
51
56
  - A developer creates specialized agents and tools with Mastra and licenses them to other businesses
52
57
  - A startup builds a vertical-specific solution (e.g., healthcare AI assistant) powered by Mastra
58
+ - A company offers Mastra as a hosted service to their customers
59
+ - A SaaS platform integrates Mastra as their AI backend
53
60
 
54
- #### What to Avoid
61
+ #### Compliance Requirements
55
62
 
56
- The main restriction is that you cannot offer Mastra itself as a hosted service where users access its core functionality. This means:
63
+ The Apache License 2.0 has minimal requirements:
57
64
 
58
- - Don't create a SaaS platform that is essentially Mastra with minimal modifications
59
- - Don't offer a managed Mastra service where customers are primarily paying to use Mastra's features
65
+ - **Attribution**: Maintain copyright notices and license information (including NOTICE file)
66
+ - **State Changes**: If you modify the software, state that you have made changes
67
+ - **Include License**: Include a copy of the Apache License 2.0 when distributing
60
68
 
61
69
  ### Questions About Licensing?
62
70
 
63
- If you have specific questions about how the Elastic License 2.0 applies to your use case, please [contact us](https://discord.gg/BTYqqHKUrf) on Discord for clarification. We're committed to supporting legitimate business use cases while protecting the sustainability of the project.
71
+ If you have specific questions about how the Apache License 2.0 applies to your use case, please [contact us](https://discord.gg/BTYqqHKUrf) on Discord for clarification. We're committed to supporting all legitimate use cases while maintaining the open-source nature of the project.
@@ -100,7 +100,7 @@ The guide assumes your droplet runs Ubuntu 24+.
100
100
 
101
101
  You can now connect to your Mastra server from your client application using a `MastraClient` from the `@mastra/client-js` package.
102
102
 
103
- Refer to the [`MastraClient` documentation](../../client-js/overview.mdx) for more information.
103
+ Refer to the [`MastraClient` documentation](/docs/server-db/mastra-client) for more information.
104
104
 
105
105
  ```typescript copy showLineNumbers
106
106
  import { MastraClient } from "@mastra/client-js";