@mastra/mcp-docs-server 1.2.14-alpha.4 → 1.2.14

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 (53) hide show
  1. package/.docs/models/gateways/neon.md +6 -6
  2. package/.docs/models/gateways/netlify.md +6 -6
  3. package/.docs/models/gateways/openrouter.md +6 -6
  4. package/.docs/models/gateways/vercel.md +7 -7
  5. package/.docs/models/index.md +97 -96
  6. package/.docs/models/providers/alibaba-cn.md +25 -23
  7. package/.docs/models/providers/alibaba-token-plan-cn.md +24 -24
  8. package/.docs/models/providers/alibaba-token-plan.md +25 -23
  9. package/.docs/models/providers/alibaba.md +25 -23
  10. package/.docs/models/providers/ambient.md +26 -24
  11. package/.docs/models/providers/baseten.md +25 -23
  12. package/.docs/models/providers/chutes.md +25 -23
  13. package/.docs/models/providers/cortecs.md +133 -85
  14. package/.docs/models/providers/crof.md +25 -23
  15. package/.docs/models/providers/crossmodel.md +25 -23
  16. package/.docs/models/providers/deepinfra.md +24 -22
  17. package/.docs/models/providers/digitalocean.md +25 -23
  18. package/.docs/models/providers/empiriolabs.md +25 -23
  19. package/.docs/models/providers/fireworks-ai.md +24 -24
  20. package/.docs/models/providers/greenpt.md +25 -23
  21. package/.docs/models/providers/groq.md +25 -23
  22. package/.docs/models/providers/huggingface.md +25 -23
  23. package/.docs/models/providers/hyper.md +31 -29
  24. package/.docs/models/providers/impossibl.md +25 -23
  25. package/.docs/models/providers/infomaniak.md +24 -24
  26. package/.docs/models/providers/kilo.md +26 -24
  27. package/.docs/models/providers/llmgateway.md +26 -24
  28. package/.docs/models/providers/minimax.md +23 -25
  29. package/.docs/models/providers/mistral.md +25 -23
  30. package/.docs/models/providers/modal.md +25 -23
  31. package/.docs/models/providers/modelis.md +25 -23
  32. package/.docs/models/providers/nano-gpt.md +26 -24
  33. package/.docs/models/providers/neuralwatt.md +25 -23
  34. package/.docs/models/providers/ofox.md +25 -23
  35. package/.docs/models/providers/ollama-cloud.md +25 -23
  36. package/.docs/models/providers/openai.md +26 -28
  37. package/.docs/models/providers/opencode-go.md +25 -23
  38. package/.docs/models/providers/opencode.md +25 -23
  39. package/.docs/models/providers/perplexity-agent.md +24 -24
  40. package/.docs/models/providers/pioneer.md +25 -23
  41. package/.docs/models/providers/requesty.md +25 -23
  42. package/.docs/models/providers/routing-run.md +25 -23
  43. package/.docs/models/providers/scx.md +25 -23
  44. package/.docs/models/providers/tensorx.md +25 -23
  45. package/.docs/models/providers/togetherai.md +24 -22
  46. package/.docs/models/providers/umans-ai-coding-plan.md +24 -24
  47. package/.docs/models/providers/umans-ai.md +25 -23
  48. package/.docs/models/providers/wandb.md +25 -23
  49. package/.docs/models/providers/xai.md +28 -26
  50. package/.docs/models/providers/zai-coding-plan.md +25 -23
  51. package/.docs/models/providers/zhipuai-coding-plan.md +25 -23
  52. package/CHANGELOG.md +7 -0
  53. package/package.json +6 -6
@@ -11,22 +11,22 @@ KILO_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'kilo/ai21/jamba-large-1.7',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "kilo/ai21/jamba-large-1.7"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -360,7 +360,7 @@ for await (const chunk of stream) {
360
360
  | `kilo/thinkingmachines/inkling` | 524K | | | | | | $0.95 | $4 |
361
361
  | `kilo/thinkingmachines/inkling-small` | 524K | | | | | | $0.45 | $1 |
362
362
  | `kilo/undi95/remm-slerp-l2-13b` | 6K | | | | | | $0.45 | $0.65 |
363
- | `kilo/upstage/solar-pro-3` | 128K | | | | | | $0.15 | $0.60 |
363
+ | `kilo/upstage/solar-pro-3` | 131K | | | | | | $0.15 | $0.60 |
364
364
  | `kilo/writer/palmyra-x5` | 1.0M | | | | | | $0.60 | $6 |
365
365
  | `kilo/x-ai/grok-4.20` | 2.0M | | | | | | $1 | $3 |
366
366
  | `kilo/x-ai/grok-4.20-multi-agent` | 2.0M | | | | | | $1 | $3 |
@@ -388,28 +388,30 @@ for await (const chunk of stream) {
388
388
 
389
389
  ```typescript
390
390
  const agent = new Agent({
391
- id: 'custom-agent',
392
- name: 'custom-agent',
391
+ id: "custom-agent",
392
+ name: "custom-agent",
393
393
  model: {
394
- url: 'https://api.kilo.ai/api/gateway',
395
- id: 'kilo/ai21/jamba-large-1.7',
394
+ url: "https://api.kilo.ai/api/gateway",
395
+ id: "kilo/ai21/jamba-large-1.7",
396
396
  apiKey: process.env.KILO_API_KEY,
397
397
  headers: {
398
- 'X-Custom-Header': 'value',
399
- },
400
- },
401
- })
398
+ "X-Custom-Header": "value"
399
+ }
400
+ }
401
+ });
402
402
  ```
403
403
 
404
404
  ### Dynamic model selection
405
405
 
406
406
  ```typescript
407
407
  const agent = new Agent({
408
- id: 'dynamic-agent',
409
- name: 'Dynamic Agent',
408
+ id: "dynamic-agent",
409
+ name: "Dynamic Agent",
410
410
  model: ({ requestContext }) => {
411
- const useAdvanced = requestContext.task === 'complex'
412
- return useAdvanced ? 'kilo/~x-ai/grok-latest' : 'kilo/ai21/jamba-large-1.7'
413
- },
414
- })
411
+ const useAdvanced = requestContext.task === "complex";
412
+ return useAdvanced
413
+ ? "kilo/~x-ai/grok-latest"
414
+ : "kilo/ai21/jamba-large-1.7";
415
+ }
416
+ });
415
417
  ```
@@ -11,22 +11,22 @@ LLMGATEWAY_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'llmgateway/auto',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "llmgateway/auto"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -56,7 +56,7 @@ for await (const chunk of stream) {
56
56
  | `llmgateway/cosmos3-super-reasoner` | 262K | | | | | | $0.10 | $0.30 |
57
57
  | `llmgateway/custom` | 128K | | | | | | — | — |
58
58
  | `llmgateway/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.38 |
59
- | `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.14 | $0.28 |
59
+ | `llmgateway/deepseek-v4-flash` | 1.1M | | | | | | $0.08 | $0.15 |
60
60
  | `llmgateway/deepseek-v4-pro` | 1.1M | | | | | | $0.43 | $0.87 |
61
61
  | `llmgateway/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
62
62
  | `llmgateway/gemini-2.5-flash` | 1.0M | | | | | | $0.30 | $3 |
@@ -231,28 +231,30 @@ for await (const chunk of stream) {
231
231
 
232
232
  ```typescript
233
233
  const agent = new Agent({
234
- id: 'custom-agent',
235
- name: 'custom-agent',
234
+ id: "custom-agent",
235
+ name: "custom-agent",
236
236
  model: {
237
- url: 'https://api.llmgateway.io/v1',
238
- id: 'llmgateway/auto',
237
+ url: "https://api.llmgateway.io/v1",
238
+ id: "llmgateway/auto",
239
239
  apiKey: process.env.LLMGATEWAY_API_KEY,
240
240
  headers: {
241
- 'X-Custom-Header': 'value',
242
- },
243
- },
244
- })
241
+ "X-Custom-Header": "value"
242
+ }
243
+ }
244
+ });
245
245
  ```
246
246
 
247
247
  ### Dynamic model selection
248
248
 
249
249
  ```typescript
250
250
  const agent = new Agent({
251
- id: 'dynamic-agent',
252
- name: 'Dynamic Agent',
251
+ id: "dynamic-agent",
252
+ name: "Dynamic Agent",
253
253
  model: ({ requestContext }) => {
254
- const useAdvanced = requestContext.task === 'complex'
255
- return useAdvanced ? 'llmgateway/sonar-reasoning-pro' : 'llmgateway/auto'
256
- },
257
- })
254
+ const useAdvanced = requestContext.task === "complex";
255
+ return useAdvanced
256
+ ? "llmgateway/sonar-reasoning-pro"
257
+ : "llmgateway/auto";
258
+ }
259
+ });
258
260
  ```
@@ -11,22 +11,22 @@ MINIMAX_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from "@mastra/core/agent";
14
+ import { Agent } from '@mastra/core/agent'
15
15
 
16
16
  const agent = new Agent({
17
- id: "my-agent",
18
- name: "My Agent",
19
- instructions: "You are a helpful assistant",
20
- model: "minimax/MiniMax-M2"
21
- });
17
+ id: 'my-agent',
18
+ name: 'My Agent',
19
+ instructions: 'You are a helpful assistant',
20
+ model: 'minimax/MiniMax-M2',
21
+ })
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate("Hello!");
24
+ const response = await agent.generate('Hello!')
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream("Tell me a story");
27
+ const stream = await agent.stream('Tell me a story')
28
28
  for await (const chunk of stream) {
29
- console.log(chunk);
29
+ console.log(chunk)
30
30
  }
31
31
  ```
32
32
 
@@ -50,32 +50,30 @@ for await (const chunk of stream) {
50
50
 
51
51
  ```typescript
52
52
  const agent = new Agent({
53
- id: "custom-agent",
54
- name: "custom-agent",
53
+ id: 'custom-agent',
54
+ name: 'custom-agent',
55
55
  model: {
56
- url: "https://api.minimax.io/anthropic/v1",
57
- id: "minimax/MiniMax-M2",
56
+ url: 'https://api.minimax.io/anthropic/v1',
57
+ id: 'minimax/MiniMax-M2',
58
58
  apiKey: process.env.MINIMAX_API_KEY,
59
59
  headers: {
60
- "X-Custom-Header": "value"
61
- }
62
- }
63
- });
60
+ 'X-Custom-Header': 'value',
61
+ },
62
+ },
63
+ })
64
64
  ```
65
65
 
66
66
  ### Dynamic model selection
67
67
 
68
68
  ```typescript
69
69
  const agent = new Agent({
70
- id: "dynamic-agent",
71
- name: "Dynamic Agent",
70
+ id: 'dynamic-agent',
71
+ name: 'Dynamic Agent',
72
72
  model: ({ requestContext }) => {
73
- const useAdvanced = requestContext.task === "complex";
74
- return useAdvanced
75
- ? "minimax/MiniMax-M3"
76
- : "minimax/MiniMax-M2";
77
- }
78
- });
73
+ const useAdvanced = requestContext.task === 'complex'
74
+ return useAdvanced ? 'minimax/MiniMax-M3' : 'minimax/MiniMax-M2'
75
+ },
76
+ })
79
77
  ```
80
78
 
81
79
  ## Direct provider installation
@@ -11,22 +11,22 @@ MISTRAL_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'mistral/codestral-latest',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "mistral/codestral-latest"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -66,30 +66,32 @@ for await (const chunk of stream) {
66
66
 
67
67
  ```typescript
68
68
  const agent = new Agent({
69
- id: 'custom-agent',
70
- name: 'custom-agent',
69
+ id: "custom-agent",
70
+ name: "custom-agent",
71
71
  model: {
72
- url: 'https://api.mistral.ai/v1',
73
- id: 'mistral/codestral-latest',
72
+ url: "https://api.mistral.ai/v1",
73
+ id: "mistral/codestral-latest",
74
74
  apiKey: process.env.MISTRAL_API_KEY,
75
75
  headers: {
76
- 'X-Custom-Header': 'value',
77
- },
78
- },
79
- })
76
+ "X-Custom-Header": "value"
77
+ }
78
+ }
79
+ });
80
80
  ```
81
81
 
82
82
  ### Dynamic model selection
83
83
 
84
84
  ```typescript
85
85
  const agent = new Agent({
86
- id: 'dynamic-agent',
87
- name: 'Dynamic Agent',
86
+ id: "dynamic-agent",
87
+ name: "Dynamic Agent",
88
88
  model: ({ requestContext }) => {
89
- const useAdvanced = requestContext.task === 'complex'
90
- return useAdvanced ? 'mistral/voxtral-small-latest' : 'mistral/codestral-latest'
91
- },
92
- })
89
+ const useAdvanced = requestContext.task === "complex";
90
+ return useAdvanced
91
+ ? "mistral/voxtral-small-latest"
92
+ : "mistral/codestral-latest";
93
+ }
94
+ });
93
95
  ```
94
96
 
95
97
  ## Direct provider installation
@@ -11,22 +11,22 @@ MODAL_PROXY_TOKEN=your-api-token
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'modal/moonshotai/Kimi-K3',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "modal/moonshotai/Kimi-K3"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -45,28 +45,30 @@ for await (const chunk of stream) {
45
45
 
46
46
  ```typescript
47
47
  const agent = new Agent({
48
- id: 'custom-agent',
49
- name: 'custom-agent',
48
+ id: "custom-agent",
49
+ name: "custom-agent",
50
50
  model: {
51
- url: 'https://inference.us-west.modal.direct/v1',
52
- id: 'modal/moonshotai/Kimi-K3',
51
+ url: "https://inference.us-west.modal.direct/v1",
52
+ id: "modal/moonshotai/Kimi-K3",
53
53
  apiKey: process.env.MODAL_PROXY_TOKEN,
54
54
  headers: {
55
- 'X-Custom-Header': 'value',
56
- },
57
- },
58
- })
55
+ "X-Custom-Header": "value"
56
+ }
57
+ }
58
+ });
59
59
  ```
60
60
 
61
61
  ### Dynamic model selection
62
62
 
63
63
  ```typescript
64
64
  const agent = new Agent({
65
- id: 'dynamic-agent',
66
- name: 'Dynamic Agent',
65
+ id: "dynamic-agent",
66
+ name: "Dynamic Agent",
67
67
  model: ({ requestContext }) => {
68
- const useAdvanced = requestContext.task === 'complex'
69
- return useAdvanced ? 'modal/thinkingmachines/Inkling-NVFP4' : 'modal/moonshotai/Kimi-K3'
70
- },
71
- })
68
+ const useAdvanced = requestContext.task === "complex";
69
+ return useAdvanced
70
+ ? "modal/thinkingmachines/Inkling-NVFP4"
71
+ : "modal/moonshotai/Kimi-K3";
72
+ }
73
+ });
72
74
  ```
@@ -11,22 +11,22 @@ MODELIS_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'modelis/claude-fable-5',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "modelis/claude-fable-5"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -52,28 +52,30 @@ for await (const chunk of stream) {
52
52
 
53
53
  ```typescript
54
54
  const agent = new Agent({
55
- id: 'custom-agent',
56
- name: 'custom-agent',
55
+ id: "custom-agent",
56
+ name: "custom-agent",
57
57
  model: {
58
- url: 'https://modelishub.com/v1',
59
- id: 'modelis/claude-fable-5',
58
+ url: "https://modelishub.com/v1",
59
+ id: "modelis/claude-fable-5",
60
60
  apiKey: process.env.MODELIS_API_KEY,
61
61
  headers: {
62
- 'X-Custom-Header': 'value',
63
- },
64
- },
65
- })
62
+ "X-Custom-Header": "value"
63
+ }
64
+ }
65
+ });
66
66
  ```
67
67
 
68
68
  ### Dynamic model selection
69
69
 
70
70
  ```typescript
71
71
  const agent = new Agent({
72
- id: 'dynamic-agent',
73
- name: 'Dynamic Agent',
72
+ id: "dynamic-agent",
73
+ name: "Dynamic Agent",
74
74
  model: ({ requestContext }) => {
75
- const useAdvanced = requestContext.task === 'complex'
76
- return useAdvanced ? 'modelis/qwen/qwen3.7-plus' : 'modelis/claude-fable-5'
77
- },
78
- })
75
+ const useAdvanced = requestContext.task === "complex";
76
+ return useAdvanced
77
+ ? "modelis/qwen/qwen3.7-plus"
78
+ : "modelis/claude-fable-5";
79
+ }
80
+ });
79
81
  ```
@@ -11,22 +11,22 @@ NANO_GPT_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'nano-gpt/Baichuan-M2',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "nano-gpt/Baichuan-M2"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -84,7 +84,6 @@ for await (const chunk of stream) {
84
84
  | `nano-gpt/Baichuan-M2` | 33K | | | | | | $16 | $16 |
85
85
  | `nano-gpt/Baichuan4-Air` | 33K | | | | | | $0.16 | $0.16 |
86
86
  | `nano-gpt/Baichuan4-Turbo` | 128K | | | | | | $2 | $2 |
87
- | `nano-gpt/baidu/ernie-4.5-vl-28b-a3b` | 33K | | | | | | $0.14 | $0.56 |
88
87
  | `nano-gpt/baseten/Kimi-K2-Instruct-FP4` | 128K | | | | | | $0.40 | $2 |
89
88
  | `nano-gpt/brave` | 8K | | | | | | $5 | $5 |
90
89
  | `nano-gpt/brave-pro` | 8K | | | | | | $5 | $5 |
@@ -426,6 +425,7 @@ for await (const chunk of stream) {
426
425
  | `nano-gpt/perplexity-academic-researcher` | 127K | | | | | | $2 | $8 |
427
426
  | `nano-gpt/phi-4-mini-instruct` | 128K | | | | | | $0.17 | $0.68 |
428
427
  | `nano-gpt/phi-4-multimodal-instruct` | 128K | | | | | | $0.07 | $0.11 |
428
+ | `nano-gpt/pokee-isaac` | 10.0M | | | | | | $0.15 | $1 |
429
429
  | `nano-gpt/poolside/laguna-m.1` | 262K | | | | | | $0.20 | $0.40 |
430
430
  | `nano-gpt/poolside/laguna-s-2.1` | 1.0M | | | | | | $0.10 | $0.20 |
431
431
  | `nano-gpt/poolside/laguna-s-2.1:thinking` | 1.0M | | | | | | $0.10 | $0.20 |
@@ -658,28 +658,30 @@ for await (const chunk of stream) {
658
658
 
659
659
  ```typescript
660
660
  const agent = new Agent({
661
- id: 'custom-agent',
662
- name: 'custom-agent',
661
+ id: "custom-agent",
662
+ name: "custom-agent",
663
663
  model: {
664
- url: 'https://nano-gpt.com/api/v1',
665
- id: 'nano-gpt/Baichuan-M2',
664
+ url: "https://nano-gpt.com/api/v1",
665
+ id: "nano-gpt/Baichuan-M2",
666
666
  apiKey: process.env.NANO_GPT_API_KEY,
667
667
  headers: {
668
- 'X-Custom-Header': 'value',
669
- },
670
- },
671
- })
668
+ "X-Custom-Header": "value"
669
+ }
670
+ }
671
+ });
672
672
  ```
673
673
 
674
674
  ### Dynamic model selection
675
675
 
676
676
  ```typescript
677
677
  const agent = new Agent({
678
- id: 'dynamic-agent',
679
- name: 'Dynamic Agent',
678
+ id: "dynamic-agent",
679
+ name: "Dynamic Agent",
680
680
  model: ({ requestContext }) => {
681
- const useAdvanced = requestContext.task === 'complex'
682
- return useAdvanced ? 'nano-gpt/zai-org/glm-latest' : 'nano-gpt/Baichuan-M2'
683
- },
684
- })
681
+ const useAdvanced = requestContext.task === "complex";
682
+ return useAdvanced
683
+ ? "nano-gpt/zai-org/glm-latest"
684
+ : "nano-gpt/Baichuan-M2";
685
+ }
686
+ });
685
687
  ```
@@ -11,22 +11,22 @@ NEURALWATT_API_KEY=your-api-key
11
11
  ```
12
12
 
13
13
  ```typescript
14
- import { Agent } from '@mastra/core/agent'
14
+ import { Agent } from "@mastra/core/agent";
15
15
 
16
16
  const agent = new Agent({
17
- id: 'my-agent',
18
- name: 'My Agent',
19
- instructions: 'You are a helpful assistant',
20
- model: 'neuralwatt/Qwen/Qwen3.5-397B-A17B-FP8',
21
- })
17
+ id: "my-agent",
18
+ name: "My Agent",
19
+ instructions: "You are a helpful assistant",
20
+ model: "neuralwatt/Qwen/Qwen3.5-397B-A17B-FP8"
21
+ });
22
22
 
23
23
  // Generate a response
24
- const response = await agent.generate('Hello!')
24
+ const response = await agent.generate("Hello!");
25
25
 
26
26
  // Stream a response
27
- const stream = await agent.stream('Tell me a story')
27
+ const stream = await agent.stream("Tell me a story");
28
28
  for await (const chunk of stream) {
29
- console.log(chunk)
29
+ console.log(chunk);
30
30
  }
31
31
  ```
32
32
 
@@ -64,28 +64,30 @@ for await (const chunk of stream) {
64
64
 
65
65
  ```typescript
66
66
  const agent = new Agent({
67
- id: 'custom-agent',
68
- name: 'custom-agent',
67
+ id: "custom-agent",
68
+ name: "custom-agent",
69
69
  model: {
70
- url: 'https://api.neuralwatt.com/v1',
71
- id: 'neuralwatt/Qwen/Qwen3.5-397B-A17B-FP8',
70
+ url: "https://api.neuralwatt.com/v1",
71
+ id: "neuralwatt/Qwen/Qwen3.5-397B-A17B-FP8",
72
72
  apiKey: process.env.NEURALWATT_API_KEY,
73
73
  headers: {
74
- 'X-Custom-Header': 'value',
75
- },
76
- },
77
- })
74
+ "X-Custom-Header": "value"
75
+ }
76
+ }
77
+ });
78
78
  ```
79
79
 
80
80
  ### Dynamic model selection
81
81
 
82
82
  ```typescript
83
83
  const agent = new Agent({
84
- id: 'dynamic-agent',
85
- name: 'Dynamic Agent',
84
+ id: "dynamic-agent",
85
+ name: "Dynamic Agent",
86
86
  model: ({ requestContext }) => {
87
- const useAdvanced = requestContext.task === 'complex'
88
- return useAdvanced ? 'neuralwatt/qwen3.6-35b-fast' : 'neuralwatt/Qwen/Qwen3.5-397B-A17B-FP8'
89
- },
90
- })
87
+ const useAdvanced = requestContext.task === "complex";
88
+ return useAdvanced
89
+ ? "neuralwatt/qwen3.6-35b-fast"
90
+ : "neuralwatt/Qwen/Qwen3.5-397B-A17B-FP8";
91
+ }
92
+ });
91
93
  ```