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

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 (127) hide show
  1. package/.docs/docs/agents/a2a.md +1 -1
  2. package/.docs/docs/agents/acp.md +1 -1
  3. package/.docs/docs/agents/agent-approval.md +1 -1
  4. package/.docs/docs/agents/networks.md +2 -2
  5. package/.docs/docs/agents/overview.md +2 -2
  6. package/.docs/docs/agents/processors.md +25 -1
  7. package/.docs/docs/agents/using-tools.md +2 -2
  8. package/.docs/docs/capabilities/channels/overview.md +1 -1
  9. package/.docs/docs/{agents/supervisor-agents.md → capabilities/subagents.md} +58 -58
  10. package/.docs/docs/deployment/sandbox.md +95 -1
  11. package/.docs/docs/getting-started/develop.md +2 -0
  12. package/.docs/docs/harness/agent-controller.md +370 -0
  13. package/.docs/docs/long-running-agents/background-tasks.md +1 -1
  14. package/.docs/docs/long-running-agents/goals.md +3 -3
  15. package/.docs/docs/mcp/overview.md +222 -281
  16. package/.docs/docs/memory/overview.md +2 -2
  17. package/.docs/docs/observability/integrations/exporters/confident-ai.md +140 -0
  18. package/.docs/docs/observability/integrations/overview.md +1 -1
  19. package/.docs/docs/observability/overview.md +122 -8
  20. package/.docs/docs/observability/tracing/overview.md +2 -2
  21. package/.docs/docs/server/mastra-client.md +1 -1
  22. package/.docs/docs/server/server-adapters.md +2 -0
  23. package/.docs/docs/storage/overview.md +2 -2
  24. package/.docs/docs/workflows/agents-and-tools.md +29 -0
  25. package/.docs/docs/workflows/stored-workflows.md +146 -0
  26. package/.docs/guides/build-your-ui/copilotkit/channels.md +49 -39
  27. package/.docs/guides/concepts/multi-agent-systems.md +7 -7
  28. package/.docs/guides/guide/coding-agent.md +2 -2
  29. package/.docs/guides/guide/research-coordinator.md +1 -1
  30. package/.docs/guides/migrations/network-to-supervisor.md +1 -1
  31. package/.docs/models/environment-variables.md +1 -1
  32. package/.docs/models/gateways/neon.md +71 -0
  33. package/.docs/models/gateways/netlify.md +6 -6
  34. package/.docs/models/gateways/openrouter.md +6 -6
  35. package/.docs/models/gateways/vercel.md +6 -6
  36. package/.docs/models/gateways.md +1 -0
  37. package/.docs/models/index.md +96 -97
  38. package/.docs/models/providers/alibaba-cn.md +23 -25
  39. package/.docs/models/providers/alibaba-token-plan-cn.md +24 -24
  40. package/.docs/models/providers/alibaba-token-plan.md +23 -25
  41. package/.docs/models/providers/alibaba.md +23 -25
  42. package/.docs/models/providers/ambient.md +23 -25
  43. package/.docs/models/providers/baseten.md +23 -25
  44. package/.docs/models/providers/chutes.md +23 -25
  45. package/.docs/models/providers/cortecs.md +23 -25
  46. package/.docs/models/providers/crof.md +23 -25
  47. package/.docs/models/providers/crossmodel.md +23 -25
  48. package/.docs/models/providers/deepinfra.md +22 -24
  49. package/.docs/models/providers/digitalocean.md +32 -34
  50. package/.docs/models/providers/empiriolabs.md +23 -25
  51. package/.docs/models/providers/fireworks-ai.md +24 -24
  52. package/.docs/models/providers/greenpt.md +23 -25
  53. package/.docs/models/providers/groq.md +23 -25
  54. package/.docs/models/providers/huggingface.md +23 -25
  55. package/.docs/models/providers/hyper.md +23 -25
  56. package/.docs/models/providers/impossibl.md +23 -25
  57. package/.docs/models/providers/infomaniak.md +24 -24
  58. package/.docs/models/providers/kilo.md +24 -26
  59. package/.docs/models/providers/llmgateway.md +24 -26
  60. package/.docs/models/providers/mistral.md +23 -25
  61. package/.docs/models/providers/modal.md +23 -25
  62. package/.docs/models/providers/modelis.md +23 -25
  63. package/.docs/models/providers/nano-gpt.md +23 -25
  64. package/.docs/models/providers/neuralwatt.md +23 -25
  65. package/.docs/models/providers/ofox.md +23 -25
  66. package/.docs/models/providers/ollama-cloud.md +23 -25
  67. package/.docs/models/providers/opencode-go.md +23 -25
  68. package/.docs/models/providers/opencode.md +25 -26
  69. package/.docs/models/providers/pioneer.md +23 -25
  70. package/.docs/models/providers/requesty.md +23 -25
  71. package/.docs/models/providers/routing-run.md +23 -25
  72. package/.docs/models/providers/scx.md +23 -25
  73. package/.docs/models/providers/tensorx.md +23 -25
  74. package/.docs/models/providers/togetherai.md +22 -24
  75. package/.docs/models/providers/umans-ai-coding-plan.md +24 -24
  76. package/.docs/models/providers/umans-ai.md +23 -25
  77. package/.docs/models/providers/wandb.md +23 -25
  78. package/.docs/models/providers/xai.md +26 -28
  79. package/.docs/models/providers/zai-coding-plan.md +23 -25
  80. package/.docs/models/providers/zhipuai-coding-plan.md +23 -25
  81. package/.docs/models/providers.md +0 -1
  82. package/.docs/reference/acp/acp-agent.md +1 -1
  83. package/.docs/reference/agent-controller/agent-controller-class.md +195 -506
  84. package/.docs/reference/agent-controller/session.md +274 -111
  85. package/.docs/reference/agents/network.md +1 -1
  86. package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
  87. package/.docs/reference/ai-sdk/network-route.md +1 -1
  88. package/.docs/reference/cli/create-mastra.md +1 -1
  89. package/.docs/reference/client-js/workflows.md +92 -0
  90. package/.docs/reference/core/addStoredWorkflow.md +62 -0
  91. package/.docs/reference/core/addStoredWorkflows.md +40 -0
  92. package/.docs/reference/editor/versioning.md +1 -1
  93. package/.docs/reference/evals/rubric.md +1 -1
  94. package/.docs/reference/file-based-agents/observability.md +2 -2
  95. package/.docs/reference/file-based-agents/storage.md +1 -1
  96. package/.docs/reference/file-based-agents/subagents.md +1 -1
  97. package/.docs/reference/file-based-agents/tools.md +1 -1
  98. package/.docs/reference/index.md +5 -0
  99. package/.docs/reference/observability/tracing/configuration.md +1 -1
  100. package/.docs/reference/observability/tracing/exporters/confident-ai.md +138 -0
  101. package/.docs/reference/observability/tracing/interfaces.md +29 -0
  102. package/.docs/reference/processors/processor-interface.md +121 -10
  103. package/.docs/reference/server/routes.md +13 -0
  104. package/.docs/reference/signals/signal-provider.md +2 -0
  105. package/.docs/reference/storage/overview.md +9 -8
  106. package/.docs/reference/streaming/workflows/observeStream.md +1 -1
  107. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  108. package/.docs/reference/streaming/workflows/stream.md +1 -1
  109. package/.docs/reference/tools/mcp-server.md +1 -1
  110. package/.docs/reference/tools/submit-plan-tool.md +1 -1
  111. package/.docs/reference/workflows/stored-workflow-definition.md +292 -0
  112. package/.docs/reference/workflows/workflow-methods/agent.md +62 -0
  113. package/.docs/reference/workflows/workflow-methods/tool.md +43 -0
  114. package/.docs/reference/workspace/railway-sandbox.md +5 -5
  115. package/CHANGELOG.md +14 -0
  116. package/package.json +4 -4
  117. package/.docs/docs/agent-controller/channels.md +0 -111
  118. package/.docs/docs/agent-controller/modes.md +0 -147
  119. package/.docs/docs/agent-controller/overview.md +0 -136
  120. package/.docs/docs/agent-controller/session.md +0 -161
  121. package/.docs/docs/agent-controller/subagents.md +0 -110
  122. package/.docs/docs/agent-controller/threads-and-state.md +0 -148
  123. package/.docs/docs/agent-controller/tool-approvals.md +0 -147
  124. package/.docs/docs/mcp/mcp-apps.md +0 -306
  125. package/.docs/docs/observability/config.md +0 -140
  126. package/.docs/docs/observability/storage.md +0 -81
  127. package/.docs/models/providers/neon.md +0 -109
@@ -2,70 +2,69 @@
2
2
 
3
3
  # CopilotKit channels
4
4
 
5
- The same Mastra agent that powers your in-app copilot can also run as a bot in messaging platforms. CopilotKit's bot layer connects your agent to Slack, Discord, Telegram, WhatsApp, and Microsoft Teams, with threads, tool calls, and human-in-the-loop approvals handled in the channel.
5
+ The same Mastra agent that powers your in-app copilot can also run as a bot in messaging platforms. CopilotKit's Channels SDK connects your agent to Slack and other messaging platforms, with threads, tool calls, rich interactive messages, and human-in-the-loop approvals handled natively in the channel.
6
6
 
7
- > **Info:** The full setup lives in the [CopilotKit bot documentation](https://docs.copilotkit.ai/slack). This page shows how it fits together with a Mastra agent.
7
+ > **Info:** Full platform setup lives in the [CopilotKit Channels documentation](https://docs.copilotkit.ai/slack/mastra). This page shows how Channels fit together with a Mastra agent.
8
8
 
9
9
  ## How it fits together
10
10
 
11
- Your Mastra agent stays where it's, exposed through `registerCopilotKit()` as described in [CopilotKit overview](https://mastra.ai/guides/build-your-ui/copilotkit/overview). The bot is a separate process built with `@copilotkit/bot`: you attach one or more platform adapters and point the bot at your agent. `createBot` takes an array of adapters, so a single bot can serve several platforms at once.
11
+ Your Mastra agent stays where it's deployed, exposed over AG-UI through `registerCopilotKit()` (see [CopilotKit overview](https://mastra.ai/guides/build-your-ui/copilotkit/overview)). A channel is a separate long-running process built with `@copilotkit/channels`: you attach one or more platform adapters and point the channel at your agent. `createChannel` takes an array of adapters, so a single process can serve several platforms at once.
12
12
 
13
- ```typescript
14
- import { createBot } from '@copilotkit/bot'
15
- import { slack } from '@copilotkit/bot-slack'
16
-
17
- const bot = createBot({
18
- adapters: [
19
- slack({
20
- botToken: process.env.SLACK_BOT_TOKEN!,
21
- appToken: process.env.SLACK_APP_TOKEN!,
22
- }),
23
- ],
24
- // Point the bot at your agent.
25
- agent: threadId => {
26
- // ...connect to your CopilotKit runtime / Mastra agent
27
- },
28
- })
29
-
30
- bot.onMention(async ({ thread }) => {
31
- await thread.runAgent()
32
- })
33
-
34
- await bot.start()
35
- ```
36
-
37
- Rich messages are written as JSX and rendered to each platform's native message format (Block Kit on Slack, for example), so an interactive card degrades gracefully where a platform has no equivalent.
38
-
39
- ## Slack
40
-
41
- The [Slack quickstart](https://docs.copilotkit.ai/slack) takes you from zero to a bot you can `@`-mention in a channel, then adds an interactive button card. Slack runs over Socket Mode, which opens an outbound WebSocket to Slack, so no public URL or tunnel is required during development.
42
-
43
- Install the packages:
13
+ Install the SDK (batteries-included, every adapter):
44
14
 
45
15
  **npm**:
46
16
 
47
17
  ```bash
48
- npm install @copilotkit/bot @copilotkit/bot-ui @copilotkit/bot-slack
18
+ npm install @copilotkit/channels
49
19
  ```
50
20
 
51
21
  **pnpm**:
52
22
 
53
23
  ```bash
54
- pnpm add @copilotkit/bot @copilotkit/bot-ui @copilotkit/bot-slack
24
+ pnpm add @copilotkit/channels
55
25
  ```
56
26
 
57
27
  **Yarn**:
58
28
 
59
29
  ```bash
60
- yarn add @copilotkit/bot @copilotkit/bot-ui @copilotkit/bot-slack
30
+ yarn add @copilotkit/channels
61
31
  ```
62
32
 
63
33
  **Bun**:
64
34
 
65
35
  ```bash
66
- bun add @copilotkit/bot @copilotkit/bot-ui @copilotkit/bot-slack
36
+ bun add @copilotkit/channels
67
37
  ```
68
38
 
39
+ ```typescript
40
+ import { createChannel, Message, Section } from '@copilotkit/channels'
41
+ import { slack } from '@copilotkit/channels/slack'
42
+ import { mastraAgent } from './agent' // your AG-UI Mastra agent
43
+
44
+ const channel = createChannel({
45
+ // Point the channel at your Mastra agent (an AbstractAgent, or a per-thread factory).
46
+ agent: mastraAgent,
47
+ adapters: [
48
+ slack({
49
+ botToken: process.env.SLACK_BOT_TOKEN!,
50
+ appToken: process.env.SLACK_APP_TOKEN!,
51
+ }),
52
+ ],
53
+ })
54
+
55
+ channel.onMention(async ({ thread }) => {
56
+ await thread.runAgent()
57
+ })
58
+
59
+ await channel.start()
60
+ ```
61
+
62
+ The agent receives ordinary AG-UI input and emits ordinary AG-UI events; the platform mechanics stay behind the adapter, so the same Mastra agent runs unchanged across every channel. Rich messages are written as JSX and rendered to each platform's native format (Block Kit on Slack, for example), so an interactive card degrades gracefully where a platform has no equivalent.
63
+
64
+ ## Slack
65
+
66
+ The [Slack quickstart](https://docs.copilotkit.ai/slack/mastra) takes you from zero to a bot you can `@`-mention in a channel, then adds an interactive button card. Slack runs over Socket Mode, which opens an outbound WebSocket to Slack, so no public URL or tunnel is required during development.
67
+
69
68
  Set the Slack credentials in your environment:
70
69
 
71
70
  - `SLACK_BOT_TOKEN`: Bot User OAuth token (`xoxb-...`)
@@ -73,4 +72,15 @@ Set the Slack credentials in your environment:
73
72
 
74
73
  ## Other platforms
75
74
 
76
- The bot adapters share one `@copilotkit/bot` API and differ only in what each platform natively supports. For Discord, Telegram, WhatsApp, and Microsoft Teams, set the relevant platform credentials and add the matching adapter to the `adapters` array. See the [CopilotKit bot documentation](https://docs.copilotkit.ai/slack) for platform-specific setup.
75
+ The Channels SDK isn't limited to Slack. Other platforms like Microsoft Teams run through the same `@copilotkit/channels` API: add the matching adapter to the `adapters` array and the rest of your agent code stays the same. See the [CopilotKit Channels documentation](https://docs.copilotkit.ai/slack/mastra) for the current platform list and per-platform setup.
76
+
77
+ ## Message pipeline and architecture
78
+
79
+ Managed channels keep a deliberate credential split, which matters when your Mastra agent uses separate model keys and tools:
80
+
81
+ - **You keep** the agent logic, model credentials, tools, and the channel process.
82
+ - **CopilotKit Intelligence holds** the platform credentials, message delivery, registration, health, and reconnects.
83
+
84
+ A turn begins when a user messages the app. Intelligence receives the platform event, and the gateway delivers the turn to your running channel process. Your Mastra agent runs and renders a reply. Intelligence then returns the reply as native platform content. Platform credentials never enter the agent process, and enterprise Intelligence can be self-hosted for data residency.
85
+
86
+ > **Note:** By default, interactive actions live in memory and reset on restart. Back the channel with a durable action and state store (Redis or Postgres) so buttons and per-thread state survive restarts and span multiple instances.
@@ -44,7 +44,7 @@ A supervisor pattern keeps one lead agent in control for the full task. The supe
44
44
 
45
45
  Use this pattern when the task is open-ended and the full sequence isn't known in advance. For example, a research task may require different lines of inquiry based on what earlier steps uncover. A supervisor can adapt as the task unfolds. The tradeoff is that the supervisor becomes the main coordination point. That makes the pattern flexible, but it also means the result depends heavily on good delegation behavior and clear subagent boundaries.
46
46
 
47
- In Mastra, this pattern maps directly to [supervisor agents](https://mastra.ai/docs/agents/supervisor-agents). A supervisor agent defines subagents on the `agents` property and uses `stream()` or `generate()` to coordinate them. Mastra also provides delegation hooks, message filtering, and memory isolation to help control this pattern.
47
+ In Mastra, this pattern maps directly to [supervisor agents](https://mastra.ai/docs/capabilities/subagents). A supervisor agent defines subagents on the `agents` property and uses `stream()` or `generate()` to coordinate them. Mastra also provides delegation hooks, message filtering, and memory isolation to help control this pattern.
48
48
 
49
49
  > **Tip:** Follow the [supervisor agents tutorial](https://mastra.ai/guides/guide/research-coordinator) for a step-by-step guide.
50
50
 
@@ -60,12 +60,12 @@ Mastra doesn't provide a dedicated council primitive. In Mastra, implement this
60
60
 
61
61
  These patterns differ mainly in how they distribute control:
62
62
 
63
- | Pattern | Who stays in control | Use when | Tradeoff | Mastra implementation |
64
- | ----------------- | -------------------- | ------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------------------- |
65
- | Handoffs | Current specialist | Ownership should move between specialists | Context transfer becomes more important | Agents with workflows and memory |
66
- | Workflows | Execution graph | The path is known in advance | Less adaptive when the task changes | [Workflows](https://mastra.ai/docs/workflows/overview) |
67
- | Supervisor agents | One lead agent | Delegation must adapt during execution | Results depend on good coordination and clear boundaries | [Supervisor agents](https://mastra.ai/docs/agents/supervisor-agents) |
68
- | Council | Final synthesis step | The task needs multiple independent perspectives | Higher cost and latency | Agents with workflow parallelism |
63
+ | Pattern | Who stays in control | Use when | Tradeoff | Mastra implementation |
64
+ | ----------------- | -------------------- | ------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------ |
65
+ | Handoffs | Current specialist | Ownership should move between specialists | Context transfer becomes more important | Agents with workflows and memory |
66
+ | Workflows | Execution graph | The path is known in advance | Less adaptive when the task changes | [Workflows](https://mastra.ai/docs/workflows/overview) |
67
+ | Supervisor agents | One lead agent | Delegation must adapt during execution | Results depend on good coordination and clear boundaries | [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) |
68
+ | Council | Final synthesis step | The task needs multiple independent perspectives | Higher cost and latency | Agents with workflow parallelism |
69
69
 
70
70
  In practice, these patterns are often combined:
71
71
 
@@ -191,7 +191,7 @@ export async function createCodingAgentSession() {
191
191
  }
192
192
  ```
193
193
 
194
- This example uses one mode and disables the controller's additional built-in tools so the introductory UI can focus on workspace execution. The simplified setup is intended for this tutorial. In a production application, enable the built-in tools your product needs and implement their UI flows: interactive tools such as `ask_user` and `submit_plan` suspend until your interface resumes them, while task and subagent tools have their own lifecycle events. See [tool approvals and suspensions](https://mastra.ai/docs/agent-controller/tool-approvals).
194
+ This example uses one mode and disables the controller's additional built-in tools so the introductory UI can focus on workspace execution. The simplified setup is intended for this tutorial. In a production application, enable the built-in tools your product needs and implement their UI flows: interactive tools such as `ask_user` and `submit_plan` suspend until your interface resumes them, while task and subagent tools have their own lifecycle events. See [tool approvals and suspensions](https://mastra.ai/docs/harness/agent-controller).
195
195
 
196
196
  The example also omits storage, so the conversation lasts only for the current process. You can add storage later when you want to resume sessions.
197
197
 
@@ -387,6 +387,6 @@ Learn more:
387
387
 
388
388
  - [`createCodingAgent()` reference](https://mastra.ai/reference/coding-agent/create-coding-agent)
389
389
  - [`buildBasePrompt()` reference](https://mastra.ai/reference/coding-agent/build-base-prompt)
390
- - [AgentController overview](https://mastra.ai/docs/agent-controller/overview)
390
+ - [AgentController overview](https://mastra.ai/docs/harness/agent-controller)
391
391
  - [`AgentController` reference](https://mastra.ai/reference/agent-controller/agent-controller-class)
392
392
  - [Workspace overview](https://mastra.ai/docs/workspace/overview)
@@ -414,5 +414,5 @@ You can extend this research coordinator to:
414
414
 
415
415
  Learn more:
416
416
 
417
- - [Supervisor Agents](https://mastra.ai/docs/agents/supervisor-agents)
417
+ - [Supervisor Agents](https://mastra.ai/docs/capabilities/subagents)
418
418
  - [Agent.stream() Reference](https://mastra.ai/reference/streaming/agents/stream)
@@ -255,7 +255,7 @@ const stream = await supervisorAgent.stream('Research AI in education', {
255
255
 
256
256
  ## See also
257
257
 
258
- - [Supervisor Agents](https://mastra.ai/docs/agents/supervisor-agents)
258
+ - [Supervisor Agents](https://mastra.ai/docs/capabilities/subagents)
259
259
  - [Agent Networks](https://mastra.ai/docs/agents/networks)
260
260
  - [Agent.stream() Reference](https://mastra.ai/reference/streaming/agents/stream)
261
261
  - [Agent.generate() Reference](https://mastra.ai/reference/agents/generate)
@@ -101,7 +101,6 @@ List of required environment variables for each model provider and gateway suppo
101
101
  | [NanoGPT](https://mastra.ai/models/providers/nano-gpt) | `nano-gpt/*` | `NANO_GPT_API_KEY` |
102
102
  | [NEAR AI Cloud](https://mastra.ai/models/providers/nearai) | `nearai/*` | `NEARAI_API_KEY` |
103
103
  | [Nebius Token Factory](https://mastra.ai/models/providers/nebius) | `nebius/*` | `NEBIUS_API_KEY` |
104
- | [Neon](https://mastra.ai/models/providers/neon) | `neon/*` | `NEON_AI_GATEWAY_BASE_URL`, `NEON_AI_GATEWAY_TOKEN` |
105
104
  | [Neuralwatt](https://mastra.ai/models/providers/neuralwatt) | `neuralwatt/*` | `NEURALWATT_API_KEY` |
106
105
  | [Nova](https://mastra.ai/models/providers/nova) | `nova/*` | `NOVA_API_KEY` |
107
106
  | [NovitaAI](https://mastra.ai/models/providers/novita-ai) | `novita-ai/*` | `NOVITA_API_KEY` |
@@ -171,6 +170,7 @@ List of required environment variables for each model provider and gateway suppo
171
170
  | [Zhipu AI Coding Plan](https://mastra.ai/models/providers/zhipuai-coding-plan) | `zhipuai-coding-plan/*` | `ZHIPU_API_KEY` |
172
171
  | [Azure OpenAI](https://mastra.ai/models/gateways/azure-openai) (Gateway) | `azure-openai/*` | `AZURE_API_KEY`, `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID` |
173
172
  | [Mastra](https://mastra.ai/models/gateways/mastra) (Gateway) | `mastra/*` | `MASTRA_GATEWAY_API_KEY` |
173
+ | [Neon](https://mastra.ai/models/gateways/neon) (Gateway) | `neon/*` | `NEON_AI_GATEWAY_BASE_URL`, `NEON_AI_GATEWAY_TOKEN` |
174
174
  | [Netlify](https://mastra.ai/models/gateways/netlify) (Gateway) | `netlify/*` | `NETLIFY_TOKEN`, `NETLIFY_SITE_ID` |
175
175
  | [OpenRouter](https://mastra.ai/models/gateways/openrouter) (Gateway) | `openrouter/*` | `OPENROUTER_API_KEY` |
176
176
  | [Vercel](https://mastra.ai/models/gateways/vercel) (Gateway) | `vercel/*` | `AI_GATEWAY_API_KEY` |
@@ -0,0 +1,71 @@
1
+ > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
+
3
+ # ![Neon logo](https://models.dev/logos/neon.svg)Neon
4
+
5
+ Neon aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 36 models through Mastra's model router.
6
+
7
+ Learn more in the [Neon documentation](https://neon.com/docs).
8
+
9
+ ## Usage
10
+
11
+ ```typescript
12
+ import { Agent } from "@mastra/core/agent";
13
+
14
+ const agent = new Agent({
15
+ id: "my-agent",
16
+ name: "My Agent",
17
+ instructions: "You are a helpful assistant",
18
+ model: "neon/claude-haiku-4-5"
19
+ });
20
+ ```
21
+
22
+ > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Neon documentation](https://neon.com/docs) for details.
23
+
24
+ ## Configuration
25
+
26
+ ```bash
27
+ # Gateway configuration
28
+ NEON_AI_GATEWAY_BASE_URL=https://your-base-url
29
+ NEON_AI_GATEWAY_TOKEN=your-gateway-key
30
+ ```
31
+
32
+ ## Available models
33
+
34
+ | Model |
35
+ | ----------------------------- |
36
+ | `claude-haiku-4-5` |
37
+ | `claude-opus-4-1` |
38
+ | `claude-opus-4-5` |
39
+ | `claude-opus-4-6` |
40
+ | `claude-opus-4-7` |
41
+ | `claude-opus-4-8` |
42
+ | `claude-sonnet-4` |
43
+ | `claude-sonnet-4-5` |
44
+ | `claude-sonnet-4-6` |
45
+ | `gemini-2-5-flash` |
46
+ | `gemini-2-5-pro` |
47
+ | `gemini-3-1-flash-lite` |
48
+ | `gemini-3-1-pro` |
49
+ | `gemini-3-5-flash` |
50
+ | `gemini-3-flash` |
51
+ | `gemini-3-pro` |
52
+ | `gemma-3-12b` |
53
+ | `gpt-5` |
54
+ | `gpt-5-1` |
55
+ | `gpt-5-1-codex-max` |
56
+ | `gpt-5-1-codex-mini` |
57
+ | `gpt-5-2` |
58
+ | `gpt-5-2-codex` |
59
+ | `gpt-5-3-codex` |
60
+ | `gpt-5-4` |
61
+ | `gpt-5-4-mini` |
62
+ | `gpt-5-4-nano` |
63
+ | `gpt-5-mini` |
64
+ | `gpt-5-nano` |
65
+ | `gpt-oss-120b` |
66
+ | `gpt-oss-20b` |
67
+ | `llama-4-maverick` |
68
+ | `meta-llama-3-1-8b-instruct` |
69
+ | `meta-llama-3-3-70b-instruct` |
70
+ | `qwen3-next-80b-a3b-instruct` |
71
+ | `qwen35-122b-a10b` |
@@ -9,14 +9,14 @@ Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gate
9
9
  ## Usage
10
10
 
11
11
  ```typescript
12
- import { Agent } from "@mastra/core/agent";
12
+ import { Agent } from '@mastra/core/agent'
13
13
 
14
14
  const agent = new Agent({
15
- id: "my-agent",
16
- name: "My Agent",
17
- instructions: "You are a helpful assistant",
18
- model: "netlify/anthropic/claude-fable-5"
19
- });
15
+ id: 'my-agent',
16
+ name: 'My Agent',
17
+ instructions: 'You are a helpful assistant',
18
+ model: 'netlify/anthropic/claude-fable-5',
19
+ })
20
20
  ```
21
21
 
22
22
  > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/) for details.
@@ -9,14 +9,14 @@ Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
9
9
  ## Usage
10
10
 
11
11
  ```typescript
12
- import { Agent } from "@mastra/core/agent";
12
+ import { Agent } from '@mastra/core/agent'
13
13
 
14
14
  const agent = new Agent({
15
- id: "my-agent",
16
- name: "My Agent",
17
- instructions: "You are a helpful assistant",
18
- model: "openrouter/ai21/jamba-large-1.7"
19
- });
15
+ id: 'my-agent',
16
+ name: 'My Agent',
17
+ instructions: 'You are a helpful assistant',
18
+ model: 'openrouter/ai21/jamba-large-1.7',
19
+ })
20
20
  ```
21
21
 
22
22
  > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [OpenRouter documentation](https://openrouter.ai/models) for details.
@@ -9,14 +9,14 @@ Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-pro
9
9
  ## Usage
10
10
 
11
11
  ```typescript
12
- import { Agent } from "@mastra/core/agent";
12
+ import { Agent } from '@mastra/core/agent'
13
13
 
14
14
  const agent = new Agent({
15
- id: "my-agent",
16
- name: "My Agent",
17
- instructions: "You are a helpful assistant",
18
- model: "vercel/alibaba/qwen-3-14b"
19
- });
15
+ id: 'my-agent',
16
+ name: 'My Agent',
17
+ instructions: 'You are a helpful assistant',
18
+ model: 'vercel/alibaba/qwen-3-14b',
19
+ })
20
20
  ```
21
21
 
22
22
  > **Info:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers) for details.
@@ -12,6 +12,7 @@ Create custom gateways for private LLM deployments or specialized provider integ
12
12
 
13
13
  - [Azure OpenAI](https://mastra.ai/models/gateways/azure-openai)
14
14
  - [Mastra](https://mastra.ai/models/gateways/mastra)
15
+ - [Neon](https://mastra.ai/models/gateways/neon)
15
16
  - [Netlify](https://mastra.ai/models/gateways/netlify)
16
17
  - [OpenRouter](https://mastra.ai/models/gateways/openrouter)
17
18
  - [Vercel](https://mastra.ai/models/gateways/vercel)