@mastra/mcp-docs-server 1.2.13-alpha.1 → 1.2.13-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agents/agent-approval.md +2 -2
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +2 -2
- package/.docs/docs/agents/using-tools.md +29 -0
- package/.docs/docs/capabilities/channels/imessage.md +181 -0
- package/.docs/docs/capabilities/channels/overview.md +1 -0
- package/.docs/docs/{evals/datasets → datasets}/overview.md +3 -3
- package/.docs/docs/{evals/datasets → datasets}/running-experiments.md +60 -3
- package/.docs/docs/deployment/workers.md +14 -14
- package/.docs/docs/editor/overview.md +201 -206
- package/.docs/docs/evals/evals-with-memory.md +1 -1
- package/.docs/docs/getting-started/develop.md +196 -0
- package/.docs/docs/index.md +78 -1
- package/.docs/docs/long-running-agents/durable-agents.md +2 -2
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/workspaces.md +152 -0
- package/.docs/docs/memory/observational-memory.md +53 -13
- package/.docs/docs/memory/overview.md +14 -0
- package/.docs/docs/server/auth/workers.md +7 -5
- package/.docs/docs/server/mastra-client.md +60 -0
- package/.docs/docs/server/pubsub.md +2 -2
- package/.docs/docs/studio/observability.md +4 -0
- package/.docs/docs/studio/overview.md +2 -2
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -0
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/deployment/kubernetes.md +2 -0
- package/.docs/guides/deployment/mastra-workers.md +350 -6
- package/.docs/guides/deployment/vercel.md +2 -0
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/{docs → guides}/rag/chunking-and-embedding.md +1 -1
- package/.docs/{docs → guides}/rag/graph-rag.md +1 -1
- package/.docs/{docs → guides}/rag/overview.md +2 -2
- package/.docs/{docs → guides}/rag/retrieval.md +1 -1
- package/.docs/{docs → guides}/voice/overview.md +4 -4
- package/.docs/{docs → guides}/voice/realtime-voice.md +2 -2
- package/.docs/{docs → guides}/voice/speech-to-speech.md +1 -1
- package/.docs/{docs → guides}/voice/speech-to-text.md +1 -1
- package/.docs/{docs → guides}/voice/text-to-speech.md +2 -2
- package/.docs/models/embeddings.md +63 -65
- package/.docs/models/environment-variables.md +6 -2
- package/.docs/models/gateways/netlify.md +1 -2
- package/.docs/models/gateways/openrouter.md +5 -6
- package/.docs/models/gateways/vercel.md +9 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +3 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +27 -25
- package/.docs/models/providers/alibaba-token-plan.md +27 -25
- package/.docs/models/providers/alibaba.md +2 -1
- package/.docs/models/providers/ambient.md +13 -12
- package/.docs/models/providers/baseten.md +3 -1
- package/.docs/models/providers/chutes.md +6 -8
- package/.docs/models/providers/crof.md +3 -1
- package/.docs/models/providers/crossmodel.md +7 -3
- package/.docs/models/providers/deepinfra.md +9 -2
- package/.docs/models/providers/digitalocean.md +34 -27
- package/.docs/models/providers/empiriolabs.md +5 -1
- package/.docs/models/providers/fireworks-ai.md +20 -19
- package/.docs/models/providers/greenpt.md +17 -8
- package/.docs/models/providers/groq.md +20 -20
- package/.docs/models/providers/huggingface.md +5 -1
- package/.docs/models/providers/hyper.md +13 -8
- package/.docs/models/providers/impossibl.md +148 -0
- package/.docs/models/providers/infomaniak.md +83 -0
- package/.docs/models/providers/kilo.md +349 -350
- package/.docs/models/providers/llmgateway.md +7 -4
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mistral.md +5 -2
- package/.docs/models/providers/modal.md +5 -4
- package/.docs/models/providers/modelis.md +81 -0
- package/.docs/models/providers/nano-gpt.md +146 -148
- package/.docs/models/providers/neuralwatt.md +4 -1
- package/.docs/models/providers/ofox.md +2 -2
- package/.docs/models/providers/ollama-cloud.md +23 -22
- package/.docs/models/providers/openai.md +2 -2
- package/.docs/models/providers/opencode-go.md +4 -2
- package/.docs/models/providers/opencode.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +3 -1
- package/.docs/models/providers/requesty.md +54 -45
- package/.docs/models/providers/scaleway.md +1 -3
- package/.docs/models/providers/scx.md +74 -0
- package/.docs/models/providers/tensorx.md +97 -0
- package/.docs/models/providers/the-grid-ai.md +3 -3
- package/.docs/models/providers/togetherai.md +2 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +11 -9
- package/.docs/models/providers/umans-ai.md +11 -9
- package/.docs/models/providers/wandb.md +2 -2
- package/.docs/models/providers/zai-coding-plan.md +11 -13
- package/.docs/models/providers/zhipuai-coding-plan.md +12 -12
- package/.docs/models/providers.md +5 -1
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/durable-agent.md +12 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/{docs/getting-started → reference}/build-with-ai.md +5 -110
- package/.docs/reference/cli/create-mastra.md +2 -0
- package/.docs/reference/cli/mastra.md +36 -16
- package/.docs/reference/client-js/agents.md +1 -1
- package/.docs/reference/configuration.md +2 -2
- package/.docs/reference/core/getEditor.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/mastra-class.md +2 -2
- package/.docs/reference/datasets/startExperiment.md +6 -0
- package/.docs/reference/datasets/startExperimentAsync.md +4 -0
- package/.docs/reference/editor/browser-provider.md +2 -2
- package/.docs/reference/editor/filesystem-provider.md +1 -1
- package/.docs/reference/editor/mastra-editor.md +31 -18
- package/.docs/reference/editor/prompt-blocks.md +137 -0
- package/.docs/reference/editor/sandbox-provider.md +1 -1
- package/.docs/reference/editor/storage-browser-ref.md +3 -3
- package/.docs/reference/editor/storage-workspace-ref.md +3 -3
- package/.docs/reference/editor/tool-provider.md +44 -10
- package/.docs/reference/editor/tools.md +100 -0
- package/.docs/reference/editor/versioning.md +130 -0
- package/.docs/reference/evals/mastra-scorer.md +68 -8
- package/.docs/reference/evals/summarization.md +203 -0
- package/.docs/reference/file-based-agents/config.md +39 -1
- package/.docs/reference/index.md +4 -4
- package/.docs/reference/memory/observational-memory.md +76 -24
- package/.docs/reference/memory/serialized-memory-config.md +3 -3
- package/.docs/reference/observability/tracing/interfaces.md +6 -1
- package/.docs/reference/processors/processor-interface.md +14 -2
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +15 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/reference/storage/composite.md +2 -0
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/vectors/mongodb.md +13 -13
- package/.docs/reference/voice/livekit.md +3 -3
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workspace/platform-filesystem.md +8 -5
- package/.docs/reference/workspace/platform-sandbox.md +83 -7
- package/CHANGELOG.md +51 -0
- package/README.md +1 -1
- package/package.json +5 -5
- package/.docs/docs/agent-builder/access-control.md +0 -99
- package/.docs/docs/agent-builder/browser.md +0 -63
- package/.docs/docs/agent-builder/channels.md +0 -78
- package/.docs/docs/agent-builder/configuration.md +0 -132
- package/.docs/docs/agent-builder/deploying.md +0 -124
- package/.docs/docs/agent-builder/integrations.md +0 -115
- package/.docs/docs/agent-builder/memory.md +0 -69
- package/.docs/docs/agent-builder/model-policy.md +0 -50
- package/.docs/docs/agent-builder/overview.md +0 -114
- package/.docs/docs/agent-builder/skill-registries.md +0 -31
- package/.docs/docs/agent-builder/workspace.md +0 -62
- package/.docs/docs/editor/prompts.md +0 -140
- package/.docs/docs/editor/tools.md +0 -148
- package/.docs/docs/getting-started/file-based-agents.md +0 -121
- package/.docs/docs/mastra-platform/workspace.md +0 -111
- package/.docs/docs/what-is-mastra.md +0 -161
- package/.docs/reference/client-js/agent-builder.md +0 -163
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +0 -76
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +0 -79
- package/.docs/reference/editor/agent-builder/builder-models.md +0 -66
- /package/.docs/{docs → guides}/getting-started/manual-install.md +0 -0
- /package/.docs/{docs → guides}/rag/vector-databases.md +0 -0
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# What is Mastra?
|
|
4
|
-
|
|
5
|
-
Mastra is an open-source TypeScript framework for building AI applications and autonomous AI systems. Use it for anything from an AI feature inside an existing product to long-running agents that run entire processes on their own, such as a software factory that plans, builds, reviews, and ships code.
|
|
6
|
-
|
|
7
|
-
Mastra gives you everything you need to build an agent harness out of the box. It's built on established patterns, so you make fewer integration decisions and spend more time on your product. And, as you'd expect from an AI framework, it includes a [skill and CLI](https://mastra.ai/docs/getting-started/build-with-ai) that help your coding agent write accurate, up-to-date Mastra code.
|
|
8
|
-
|
|
9
|
-
Run Mastra standalone or inside your existing web server, and call your agents from your own code, over HTTP using the [Mastra client](https://mastra.ai/docs/server/mastra-client), or from channels (for example, Slack).
|
|
10
|
-
|
|
11
|
-
> **📹 Video:** [A quick tour of the Mastra platform](https://www.youtube.com/watch?v=NosES9aJxCc) shows how the pieces fit together.
|
|
12
|
-
|
|
13
|
-
## Framework
|
|
14
|
-
|
|
15
|
-
Mastra is batteries-included, but not all-or-nothing. A single agent can start small:
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { Agent } from '@mastra/core/agent'
|
|
19
|
-
import { searchDocs } from '../tools/search-docs'
|
|
20
|
-
|
|
21
|
-
export const supportAgent = new Agent({
|
|
22
|
-
id: 'support-agent',
|
|
23
|
-
name: 'Support Agent',
|
|
24
|
-
instructions: 'Answer customer support questions clearly.',
|
|
25
|
-
model: 'openai/gpt-5.6-sol',
|
|
26
|
-
tools: { searchDocs },
|
|
27
|
-
})
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Then add the capabilities your agent needs:
|
|
31
|
-
|
|
32
|
-
- **Act in real environments**: Use [workspaces](https://mastra.ai/docs/workspace/overview) so agents can read and write files, run commands, and work inside a sandbox.
|
|
33
|
-
- **Bring the right context**: Use tools, [memory](https://mastra.ai/docs/memory/observational-memory), [skills](https://mastra.ai/docs/agents/skills), and domain knowledge so agents remember what matters and stay within the context window.
|
|
34
|
-
- **Coordinate complex work**: Run typed [workflows](https://mastra.ai/docs/workflows/overview), [tasks](https://mastra.ai/docs/agents/using-tools), and [subagents](https://mastra.ai/docs/agents/supervisor-agents) when work needs multiple steps or parallel execution.
|
|
35
|
-
- **Control the agent loop**: [Suspend](https://mastra.ai/docs/agents/agent-approval) for human approval, steer an in-flight loop with [signals](https://mastra.ai/docs/long-running-agents/signals), or queue input for the next turn.
|
|
36
|
-
- **Meet users where they work**: Connect agents to Slack, Discord, GitHub, and other [channels](https://mastra.ai/docs/capabilities/channels/overview).
|
|
37
|
-
- **Manage risk and cost**: Configure authentication, multi-tenant isolation, and [guardrails](https://mastra.ai/docs/agents/guardrails), including [`CostGuardProcessor`](https://mastra.ai/reference/processors/cost-guard-processor).
|
|
38
|
-
|
|
39
|
-
See the left-hand sidebar for the full menu of features.
|
|
40
|
-
|
|
41
|
-
## Studio
|
|
42
|
-
|
|
43
|
-

|
|
44
|
-
|
|
45
|
-
[Studio](https://mastra.ai/docs/studio/overview) is usually the first place you go after creating a Mastra app. It gives you a live environment for testing agents, inspecting runs, and iterating quickly.
|
|
46
|
-
|
|
47
|
-
Studio isn't just for engineers. Deploy it and share it with your team, so collaborators can try an agent before it ships. With the [Editor](https://mastra.ai/docs/editor/overview) and [Agent Builder](https://mastra.ai/docs/agent-builder/overview), non-technical teammates can create and iterate on agents themselves, with every change versioned in code.
|
|
48
|
-
|
|
49
|
-
## Observability and evals
|
|
50
|
-
|
|
51
|
-

|
|
52
|
-
|
|
53
|
-
Mastra has built-in logs, traces, and metrics, so you can understand every run in development and production. See [Observability](https://mastra.ai/docs/observability/overview).
|
|
54
|
-
|
|
55
|
-
Evals close the loop. Score outputs with rule-based or LLM-as-judge [scorers](https://mastra.ai/docs/evals/overview), live in production or offline in CI. Create datasets from real traces, run experiments, and compare versions. Because you own the code and the observability layer, you get a closed loop from trace to prompt edit to measurable improvement.
|
|
56
|
-
|
|
57
|
-
## Long-running agents
|
|
58
|
-
|
|
59
|
-
Some agents finish in a single request. Others run for hours or days, like a sales agent that watches for signups or an SRE agent that handles incidents. Mastra supports [long-running agents](https://mastra.ai/docs/long-running-agents/durable-agents) with these capabilities:
|
|
60
|
-
|
|
61
|
-
- **Survive restarts and disconnects**: [Durable agents](https://mastra.ai/docs/long-running-agents/durable-agents) persist run state so work resumes and clients reconnect.
|
|
62
|
-
- **Wake and steer agents mid-run**: Send [messages and signals](https://mastra.ai/docs/long-running-agents/signals) to wake an agent, add context, or queue input.
|
|
63
|
-
- **Keep working toward a goal**: [Goals](https://mastra.ai/docs/long-running-agents/goals) persist an objective until it's met or the run budget is spent.
|
|
64
|
-
- **Run work outside the request**: Use [schedules](https://mastra.ai/docs/long-running-agents/schedules) and [background tasks](https://mastra.ai/docs/long-running-agents/background-tasks) for recurring jobs, slow tools, and work that shouldn't block the agent loop.
|
|
65
|
-
|
|
66
|
-
For long-running interactive applications, [AgentController](https://mastra.ai/docs/agent-controller/overview) manages threads, modes, tool approvals, and model switching. It powers [Mastra Code](https://code.mastra.ai/) and lets you build a Claude Code-style experience for your own domain.
|
|
67
|
-
|
|
68
|
-
## Deployment
|
|
69
|
-
|
|
70
|
-
Mastra is open source and infrastructure-neutral. The framework fits your stack instead of requiring your stack to fit one vendor. Choose from an ecosystem of model providers, databases, sandboxes, and observability platforms, and change providers without rewriting your application around proprietary infrastructure.
|
|
71
|
-
|
|
72
|
-
When you're ready to deploy:
|
|
73
|
-
|
|
74
|
-
- **[Mastra Server](https://mastra.ai/docs/mastra-platform/server)**: The quickest path to production. Mastra builds and hosts your application as an API server with a stable endpoint, environment variables, custom domains, and deploy history.
|
|
75
|
-
- **Your infrastructure**: Use Mastra's [deployers for major platforms](https://mastra.ai/docs/deployment/overview), deploy a standard server to your preferred virtual machine, container, or platform as a service, or run Mastra inside an existing TypeScript application with a [server adapter](https://mastra.ai/docs/server/server-adapters).
|
|
76
|
-
|
|
77
|
-
## Use cases
|
|
78
|
-
|
|
79
|
-
Here are some of the ways you can use Mastra:
|
|
80
|
-
|
|
81
|
-
<details>
|
|
82
|
-
**Embed agents in your product**
|
|
83
|
-
|
|
84
|
-
Add AI capabilities to your platform so your users can build or interact with agents.
|
|
85
|
-
|
|
86
|
-
Used by [Replit](https://mastra.ai/blog/replitagent3), [Fireworks](https://mastra.ai/blog/fireworks-xml-prompting), [Medusa](https://mastra.ai/blog/medusa-ecommerce)
|
|
87
|
-
|
|
88
|
-
</details>
|
|
89
|
-
|
|
90
|
-
<details>
|
|
91
|
-
**Customer-facing assistants**
|
|
92
|
-
|
|
93
|
-
Build agents that handle inquiries, schedule appointments, send reminders, and answer questions via chat, WhatsApp, or voice.
|
|
94
|
-
|
|
95
|
-
Used by [Vetnio](https://mastra.ai/blog/vetnio), [Lua](https://mastra.ai/blog/lua-scaling)
|
|
96
|
-
|
|
97
|
-
Templates: [Docs Chatbot](https://mastra.ai/templates/docs-chatbot), [Slack Agent](https://mastra.ai/templates/slack-agent)
|
|
98
|
-
|
|
99
|
-
</details>
|
|
100
|
-
|
|
101
|
-
<details>
|
|
102
|
-
**Internal copilots**
|
|
103
|
-
|
|
104
|
-
Help employees work faster with AI that understands your domain—HR queries, clinical documentation, sales prep, or document generation.
|
|
105
|
-
|
|
106
|
-
Used by [Factorial](https://mastra.ai/blog/factorial-case-study), [Counsel Health](https://mastra.ai/blog/counsel-health), [Cedar](https://mastra.ai/blog/cedar-case-study), [SoftBank](https://mastra.ai/blog/softbank-productivity-mastra-2025-08-20)
|
|
107
|
-
|
|
108
|
-
Templates: [Chat with PDF](https://mastra.ai/templates/chat-with-pdf), [Google Sheet Analysis](https://mastra.ai/templates/google-sheets-analysis)
|
|
109
|
-
|
|
110
|
-
</details>
|
|
111
|
-
|
|
112
|
-
<details>
|
|
113
|
-
**Data analysis agents**
|
|
114
|
-
|
|
115
|
-
Let users query databases and dashboards in natural language. Connect to your data sources and return answers, charts, or reports.
|
|
116
|
-
|
|
117
|
-
Used by [Index](https://mastra.ai/blog/index-case-study), [PLAID Japan](https://mastra.ai/blog/plaid-jpn-gcp-agents)
|
|
118
|
-
|
|
119
|
-
Templates: [Chat with Database](https://mastra.ai/templates/text-to-sql), [CSV to Questions](https://mastra.ai/templates/csv-to-questions)
|
|
120
|
-
|
|
121
|
-
</details>
|
|
122
|
-
|
|
123
|
-
<details>
|
|
124
|
-
**Content automation**
|
|
125
|
-
|
|
126
|
-
Generate, transform, and manage structured content at scale—whether for a CMS, knowledge base, or documentation system.
|
|
127
|
-
|
|
128
|
-
Used by [Sanity](https://mastra.ai/blog/sanity)
|
|
129
|
-
|
|
130
|
-
Templates: [Chat with YouTube](https://mastra.ai/templates/chat-with-youtube), [Flash Cards from PDF](https://mastra.ai/templates/flash-cards-from-pdf)
|
|
131
|
-
|
|
132
|
-
</details>
|
|
133
|
-
|
|
134
|
-
<details>
|
|
135
|
-
**DevOps & engineering automation**
|
|
136
|
-
|
|
137
|
-
Automate deployments, debug production issues, manage infrastructure, and handle on-call workflows.
|
|
138
|
-
|
|
139
|
-
Used by [StarSling](https://mastra.ai/blog/starsling)
|
|
140
|
-
|
|
141
|
-
Templates: [GitHub PR Code Review](https://mastra.ai/templates/github-pr-code-review-agent), [Browser Agent](https://mastra.ai/templates/browsing-agent)
|
|
142
|
-
|
|
143
|
-
</details>
|
|
144
|
-
|
|
145
|
-
<details>
|
|
146
|
-
**Sales & GTM workflows**
|
|
147
|
-
|
|
148
|
-
Turn customer conversations into structured tasks, generate investment memos, or automate outreach sequences.
|
|
149
|
-
|
|
150
|
-
Used by [Kestral](https://mastra.ai/blog/kestral), [Orange Collective](https://mastra.ai/blog/orange-collective-vc-operating-system), [WorkOS](https://mastra.ai/blog/workos-teaching-mastra)
|
|
151
|
-
|
|
152
|
-
Templates: [Customer Feedback Summarization](https://mastra.ai/templates/customer-feedback-summarization)
|
|
153
|
-
|
|
154
|
-
</details>
|
|
155
|
-
|
|
156
|
-
Browse [templates](https://mastra.ai/templates) for working examples.
|
|
157
|
-
|
|
158
|
-
## Next steps
|
|
159
|
-
|
|
160
|
-
- [Get started](https://mastra.ai/docs)
|
|
161
|
-
- [Agents overview](https://mastra.ai/docs/agents/overview)
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Agent Builder API
|
|
4
|
-
|
|
5
|
-
The Agent Builder API provides methods to interact with [Agent Builder](https://mastra.ai/docs/agent-builder/overview) actions on the server. Each action is a workflow exposed under `/agent-builder/:actionId/*`. The Builder must be enabled on the server via `MastraEditor.builder.enabled`, with a valid `MASTRA_EE_LICENSE` in production.
|
|
6
|
-
|
|
7
|
-
## Getting all actions
|
|
8
|
-
|
|
9
|
-
Retrieve a record of available Agent Builder actions:
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
const actions = await mastraClient.getAgentBuilderActions()
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Returns a `Record<string, WorkflowInfo>` keyed by action ID.
|
|
16
|
-
|
|
17
|
-
## Working with a specific action
|
|
18
|
-
|
|
19
|
-
Get an instance of a specific action by its ID:
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
const action = mastraClient.getAgentBuilderAction('create-agent')
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Action methods
|
|
26
|
-
|
|
27
|
-
### `details()`
|
|
28
|
-
|
|
29
|
-
Retrieve metadata about an Agent Builder action:
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
const info = await action.details()
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### `createRun()`
|
|
36
|
-
|
|
37
|
-
Create a new run for this action and receive a `runId`. Use the returned id with `startActionRun()`, `stream()`, `resume()`, or `observeStream()`.
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
const { runId } = await action.createRun()
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
You can also pass an explicit `runId`:
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
const { runId } = await action.createRun({ runId: 'my-run-id' })
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### `startAsync()`
|
|
50
|
-
|
|
51
|
-
Start the action and wait for completion. Returns the final `AgentBuilderActionResult` with `success`, `applied`, `branchName`, `message`, `validationResults`, `error`, `errors`, and `stepResults`.
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
const result = await action.startAsync({
|
|
55
|
-
inputData: { agentName: 'support-bot' },
|
|
56
|
-
})
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Pass an existing `runId` as the second argument to start a previously created run:
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
const { runId } = await action.createRun()
|
|
63
|
-
const result = await action.startAsync({ inputData }, runId)
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### `startActionRun()`
|
|
67
|
-
|
|
68
|
-
Start an existing run without waiting for completion. Returns `{ message }`.
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
const { runId } = await action.createRun()
|
|
72
|
-
await action.startActionRun({ inputData }, runId)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### `stream()`
|
|
76
|
-
|
|
77
|
-
Start an existing run and stream progress events as a `ReadableStream<{ type, payload }>`.
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
const { runId } = await action.createRun()
|
|
81
|
-
const stream = await action.stream({ inputData }, runId)
|
|
82
|
-
|
|
83
|
-
for await (const event of stream) {
|
|
84
|
-
console.log(event.type, event.payload)
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### `resume()`
|
|
89
|
-
|
|
90
|
-
Resume a suspended step on a run. Returns `{ message }`.
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
await action.resume({ step: 'review', resumeData: { approved: true } }, runId)
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### `resumeAsync()`
|
|
97
|
-
|
|
98
|
-
Resume a suspended step and wait for completion. Returns an `AgentBuilderActionResult`.
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
const result = await action.resumeAsync({ step: 'review', resumeData: { approved: true } }, runId)
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### `resumeStream()`
|
|
105
|
-
|
|
106
|
-
Resume a suspended step and stream subsequent events.
|
|
107
|
-
|
|
108
|
-
```typescript
|
|
109
|
-
const stream = await action.resumeStream({
|
|
110
|
-
runId,
|
|
111
|
-
step: 'review',
|
|
112
|
-
resumeData: { approved: true },
|
|
113
|
-
})
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### `observeStream()`
|
|
117
|
-
|
|
118
|
-
Attach to an existing run, replaying cached events from the beginning, then continuing with live events. Use this to recover after a page refresh or hot reload.
|
|
119
|
-
|
|
120
|
-
```typescript
|
|
121
|
-
const stream = await action.observeStream({ runId })
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### `observeStreamLegacy()`
|
|
125
|
-
|
|
126
|
-
Same as `observeStream()` but uses the legacy streaming endpoint. Prefer `observeStream()` for new code.
|
|
127
|
-
|
|
128
|
-
```typescript
|
|
129
|
-
const stream = await action.observeStreamLegacy({ runId })
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### `runs()`
|
|
133
|
-
|
|
134
|
-
List runs for this action with optional filters.
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
const runs = await action.runs({ page: 0, perPage: 20 })
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Accepts `fromDate`, `toDate`, `page`, `perPage`, `resourceId`, and legacy `limit`/`offset`.
|
|
141
|
-
|
|
142
|
-
### `runById()`
|
|
143
|
-
|
|
144
|
-
Fetch a specific run by ID. Use `fields` to limit the returned payload and `withNestedWorkflows` to skip nested workflow data.
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
const run = await action.runById(runId, {
|
|
148
|
-
fields: ['result', 'steps'],
|
|
149
|
-
withNestedWorkflows: false,
|
|
150
|
-
})
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### `cancelRun()`
|
|
154
|
-
|
|
155
|
-
Cancel an in-flight run.
|
|
156
|
-
|
|
157
|
-
```typescript
|
|
158
|
-
await action.cancelRun(runId)
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Access control
|
|
162
|
-
|
|
163
|
-
The `/agent-builder/*` routes are gated by the `agent-builder` permission resource. Calling clients need at minimum `agent-builder:read` and `agent-builder:execute`, plus any picker resources the action touches (`stored-agents`, `stored-skills`, `tools`, `workflows`, `memory`). See [Access control](https://mastra.ai/docs/agent-builder/access-control) for the full grant list.
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# AgentBuilderOptions
|
|
4
|
-
|
|
5
|
-
`AgentBuilderOptions` configures the Agent Builder. Pass it as `MastraEditor.builder` to enable the Builder UI, toggle visible surfaces, pin admin defaults, and opt into skill registries.
|
|
6
|
-
|
|
7
|
-
See the [Configuration](https://mastra.ai/docs/agent-builder/configuration) page for concepts and worked examples.
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { MastraEditor } from '@mastra/editor'
|
|
13
|
-
|
|
14
|
-
new MastraEditor({
|
|
15
|
-
builder: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
features: {
|
|
18
|
-
agent: { browser: false },
|
|
19
|
-
},
|
|
20
|
-
configuration: {
|
|
21
|
-
agent: {
|
|
22
|
-
memory: { observationalMemory: true },
|
|
23
|
-
models: {
|
|
24
|
-
allowed: [
|
|
25
|
-
{ provider: 'openai', modelId: 'gpt-5.4-mini' },
|
|
26
|
-
{ provider: 'openai', modelId: 'gpt-5.4' },
|
|
27
|
-
{ provider: 'anthropic', modelId: 'claude-opus-4-7' },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
registries: {
|
|
33
|
-
skillsSh: { enabled: true },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
})
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Properties
|
|
40
|
-
|
|
41
|
-
**enabled** (`boolean`): Master switch. When false, the Builder UI is disabled and MastraEditor.resolveBuilder() returns undefined. (Default: `true`)
|
|
42
|
-
|
|
43
|
-
**features** (`{ agent?: AgentFeatures }`): UI toggles. Each key on features.agent defaults to true when omitted.
|
|
44
|
-
|
|
45
|
-
**features.agent.tools** (`boolean`): Show the tools tab in the agent editor.
|
|
46
|
-
|
|
47
|
-
**features.agent.agents** (`boolean`): Show the sub-agents picker in the agent editor.
|
|
48
|
-
|
|
49
|
-
**features.agent.workflows** (`boolean`): Show the workflows picker in the agent editor.
|
|
50
|
-
|
|
51
|
-
**features.agent.skills** (`boolean`): Show the skills tab and library for the agent.
|
|
52
|
-
|
|
53
|
-
**features.agent.memory** (`boolean`): Show the memory configuration in the agent editor.
|
|
54
|
-
|
|
55
|
-
**features.agent.model** (`boolean`): Show the model picker in the agent editor. When false, the admin-pinned default model applies.
|
|
56
|
-
|
|
57
|
-
**features.agent.browser** (`boolean`): Show the browser tab. Resolves to true only when a valid browser provider is registered on MastraEditor.browsers; otherwise it is downgraded to false and a warning is logged.
|
|
58
|
-
|
|
59
|
-
**features.agent.avatarUpload** (`boolean`): Allow end users to upload an avatar for stored agents.
|
|
60
|
-
|
|
61
|
-
**features.agent.favorites** (`boolean`): Show favorite agents and skills with per-user state and aggregate counts.
|
|
62
|
-
|
|
63
|
-
**configuration** (`{ agent?: BuilderAgentDefaults }`): Admin-pinned defaults applied to every Builder-created agent. End users cannot override these values. See the BuilderAgentDefaults reference for the full schema.
|
|
64
|
-
|
|
65
|
-
**registries** (`{ skillsSh?: { enabled: boolean } }`): Opt-in third-party skill registries. When no registry is enabled, the Builder hides registry browse UI.
|
|
66
|
-
|
|
67
|
-
**registries.skillsSh** (`{ enabled: boolean }`): Enable the skills.sh registry. When enabled, the Builder shows registry browse UI for skills.sh skills.
|
|
68
|
-
|
|
69
|
-
**registries.skillsSh.enabled** (`boolean`): Set to true to opt in. Defaults to false.
|
|
70
|
-
|
|
71
|
-
## Related
|
|
72
|
-
|
|
73
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Concept and worked examples.
|
|
74
|
-
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults): Full schema for `configuration.agent`.
|
|
75
|
-
- [builder.configuration.agent.models](https://mastra.ai/reference/editor/agent-builder/builder-models): Model allowlist and default model.
|
|
76
|
-
- [MastraEditor class](https://mastra.ai/reference/editor/mastra-editor): The parent surface that hosts `builder`.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# BuilderAgentDefaults
|
|
4
|
-
|
|
5
|
-
`BuilderAgentDefaults` describes the admin-pinned defaults applied to every agent the Agent Builder produces. Pass it as `builder.configuration.agent`. End users can't override these values from the Builder UI.
|
|
6
|
-
|
|
7
|
-
See [Configuration](https://mastra.ai/docs/agent-builder/configuration) and [Memory](https://mastra.ai/docs/agent-builder/memory) for worked examples.
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { MastraEditor } from '@mastra/editor'
|
|
13
|
-
|
|
14
|
-
new MastraEditor({
|
|
15
|
-
builder: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
configuration: {
|
|
18
|
-
agent: {
|
|
19
|
-
memory: { observationalMemory: true },
|
|
20
|
-
workspace: {
|
|
21
|
-
type: 'inline',
|
|
22
|
-
config: {
|
|
23
|
-
name: 'builder-workspace',
|
|
24
|
-
filesystem: {
|
|
25
|
-
provider: 'local',
|
|
26
|
-
config: { basePath: './workspace' },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
models: {
|
|
31
|
-
allowed: [
|
|
32
|
-
{ provider: 'openai', modelId: 'gpt-5.4-mini' },
|
|
33
|
-
{ provider: 'openai', modelId: 'gpt-5.4' },
|
|
34
|
-
{ provider: 'anthropic', modelId: 'claude-opus-4-7' },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
tools: { allowed: ['weather-info'] },
|
|
38
|
-
agents: { allowed: ['weather-agent'] },
|
|
39
|
-
workflows: { allowed: ['greet-workflow'] },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Properties
|
|
47
|
-
|
|
48
|
-
**memory** (`SerializedMemoryConfig`): Default memory configuration for new agents. Pass { observationalMemory: true } to enable long-lived fact extraction. Requires Mastra.storage. See the SerializedMemoryConfig reference for the full schema.
|
|
49
|
-
|
|
50
|
-
**workspace** (`StorageWorkspaceRef`): Default workspace reference for new agents. Pass { type: 'inline', config } to embed a snapshot, or { type: 'id', workspaceId } to point at a workspace registered on Mastra.workspace. See the StorageWorkspaceRef reference for both variants.
|
|
51
|
-
|
|
52
|
-
**browser** (`StorageBrowserRef`): Default browser configuration for new agents. Pass { type: 'inline', config: { provider } } to attach a registered browser provider. See the StorageBrowserRef reference for the full schema.
|
|
53
|
-
|
|
54
|
-
**models** (`{ allowed?: ProviderModelEntry[]; default?: DefaultModelEntry }`): Model allowlist and default applied to every Builder-created agent. See the BuilderModels reference for the full schema and validation rules.
|
|
55
|
-
|
|
56
|
-
**models.allowed** (`ProviderModelEntry[]`): Allowlist of providers and models. Omit to allow every registered model. ProviderModelEntry is a discriminated union (known providers vs. custom).
|
|
57
|
-
|
|
58
|
-
**models.default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Required when the model picker is hidden. DefaultModelEntry requires provider and modelId, with an optional kind.
|
|
59
|
-
|
|
60
|
-
**tools** (`{ allowed?: string[] }`): Allowlist of tool IDs visible in the Builder tools picker. Unknown IDs are dropped and surfaced as warnings.
|
|
61
|
-
|
|
62
|
-
**tools.allowed** (`string[]`): Allowlist of tool.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed tools.
|
|
63
|
-
|
|
64
|
-
**agents** (`{ allowed?: string[] }`): Allowlist of agent IDs visible in the Builder sub-agents picker. Unknown IDs are dropped and surfaced as warnings.
|
|
65
|
-
|
|
66
|
-
**agents.allowed** (`string[]`): Allowlist of Agent.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed agents.
|
|
67
|
-
|
|
68
|
-
**workflows** (`{ allowed?: string[] }`): Allowlist of workflow IDs visible in the Builder workflows picker. Unknown IDs are dropped and surfaced as warnings.
|
|
69
|
-
|
|
70
|
-
**workflows.allowed** (`string[]`): Allowlist of workflow\.id values. Omit for unrestricted, pass \[] to lock the picker down, pass \[...ids] to restrict to the listed workflows.
|
|
71
|
-
|
|
72
|
-
## Related
|
|
73
|
-
|
|
74
|
-
- [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options): The parent options object.
|
|
75
|
-
- [builder.configuration.agent.models](https://mastra.ai/reference/editor/agent-builder/builder-models): Admin-facing model allowlist and default.
|
|
76
|
-
- [SerializedMemoryConfig](https://mastra.ai/reference/memory/serialized-memory-config): Memory shape for new agents.
|
|
77
|
-
- [StorageWorkspaceRef](https://mastra.ai/reference/editor/storage-workspace-ref): Workspace reference shape.
|
|
78
|
-
- [StorageBrowserRef](https://mastra.ai/reference/editor/storage-browser-ref): Browser reference shape.
|
|
79
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Concept and worked examples.
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# builder.configuration.agent.models
|
|
4
|
-
|
|
5
|
-
`builder.configuration.agent.models` is the admin-facing model policy input on `AgentBuilderOptions`. It controls which providers and models the Agent Builder exposes, and which model is pre-selected on new-agent create.
|
|
6
|
-
|
|
7
|
-
See [Model policy](https://mastra.ai/docs/agent-builder/model-policy) for concepts and worked examples.
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { MastraEditor } from '@mastra/editor'
|
|
13
|
-
|
|
14
|
-
new MastraEditor({
|
|
15
|
-
builder: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
configuration: {
|
|
18
|
-
agent: {
|
|
19
|
-
models: {
|
|
20
|
-
allowed: [
|
|
21
|
-
{ provider: 'openai', modelId: 'gpt-5.4-mini' },
|
|
22
|
-
{ provider: 'openai', modelId: 'gpt-5.4' },
|
|
23
|
-
{ provider: 'anthropic', modelId: 'claude-opus-4-7' },
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
})
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Properties
|
|
33
|
-
|
|
34
|
-
**allowed** (`ProviderModelEntry[]`): Allowlist of providers and models. Omit to allow every registered model. When non-empty, only the listed entries are selectable in the Builder.
|
|
35
|
-
|
|
36
|
-
**allowed.provider** (`Provider`): Provider id from the generated provider registry (for example, openai, anthropic).
|
|
37
|
-
|
|
38
|
-
**allowed.modelId** (`ModelForProvider<Provider>`): Specific model id for that provider. Omit to allow every model under the provider.
|
|
39
|
-
|
|
40
|
-
**allowed.kind** (`'custom'`): Discriminant marking this entry as a gateway or self-hosted provider not in the registry.
|
|
41
|
-
|
|
42
|
-
**allowed.provider** (`string`): Provider id for the custom provider.
|
|
43
|
-
|
|
44
|
-
**allowed.modelId** (`string`): Specific model id under the custom provider. Omit to allow every model under it.
|
|
45
|
-
|
|
46
|
-
**default** (`DefaultModelEntry`): Pre-selected model on new-agent create. Same shape as ProviderModelEntry, but modelId is required. Must satisfy the allowed list when set.
|
|
47
|
-
|
|
48
|
-
**default.provider** (`Provider | string`): Provider id. Use a Provider literal for known providers, or any string with kind: 'custom'.
|
|
49
|
-
|
|
50
|
-
**default.modelId** (`string`): Required model id. Points at a specific model, not a whole provider.
|
|
51
|
-
|
|
52
|
-
**default.kind** (`'custom'`): Set to custom when targeting a provider that isn't in the generated registry.
|
|
53
|
-
|
|
54
|
-
## Validation rules
|
|
55
|
-
|
|
56
|
-
Mastra validates the admin policy at server boot. Violations surface as warnings on `GET /editor/builder/settings.modelPolicyWarnings`.
|
|
57
|
-
|
|
58
|
-
- `allowed` empty or omitted: no restriction. Every registered model is available.
|
|
59
|
-
- When `allowed` is non-empty and a `default` is set: `default` must satisfy `isModelAllowed(allowed, default)`. A `default` that fails this check is dropped and surfaced as a warning.
|
|
60
|
-
- To hide the end-user model picker, set `features.agent.model: false` in [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options). When the picker is hidden, provide a `default` so new agents resolve a model.
|
|
61
|
-
|
|
62
|
-
## Related
|
|
63
|
-
|
|
64
|
-
- [BuilderAgentDefaults](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults): Parent object containing `models`.
|
|
65
|
-
- [AgentBuilderOptions](https://mastra.ai/reference/editor/agent-builder/agent-builder-options): The top-level Builder options.
|
|
66
|
-
- [Model policy](https://mastra.ai/docs/agent-builder/model-policy): Concept and worked examples.
|
|
File without changes
|
|
File without changes
|