@mastra/mcp-docs-server 1.2.8-alpha.9 → 1.2.8
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/agent-builder/integrations.md +1 -3
- package/.docs/docs/agent-builder/overview.md +2 -0
- package/.docs/docs/agents/overview.md +17 -13
- package/.docs/docs/agents/skills.md +1 -3
- package/.docs/docs/agents/structured-output.md +2 -0
- package/.docs/docs/agents/using-tools.md +66 -49
- package/.docs/docs/browser/agent-browser.md +1 -0
- package/.docs/docs/browser/firecrawl.md +129 -0
- package/.docs/docs/browser/overview.md +16 -2
- package/.docs/docs/capabilities/channels/slack.md +111 -1
- package/.docs/docs/deployment/mastra-server.md +35 -0
- package/.docs/docs/deployment/monorepo.md +2 -0
- package/.docs/docs/deployment/overview.md +6 -0
- package/.docs/docs/deployment/sandbox.md +277 -0
- package/.docs/docs/editor/overview.md +2 -6
- package/.docs/docs/editor/tools.md +2 -6
- package/.docs/docs/evals/running-in-ci.md +3 -9
- package/.docs/docs/getting-started/build-with-ai.md +2 -6
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/index.md +17 -13
- package/.docs/docs/long-running-agents/background-tasks.md +2 -2
- package/.docs/docs/long-running-agents/goals.md +3 -1
- package/.docs/docs/mastra-platform/database.md +12 -6
- package/.docs/docs/mastra-platform/deploy.md +14 -7
- package/.docs/docs/mastra-platform/environments.md +5 -4
- package/.docs/docs/mastra-platform/observability.md +4 -12
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/regions.md +73 -0
- package/.docs/docs/mastra-platform/workspace.md +111 -0
- package/.docs/docs/memory/observational-memory.md +77 -2
- package/.docs/docs/memory/overview.md +4 -0
- package/.docs/docs/observability/feedback.md +4 -0
- package/.docs/docs/observability/integrations/bridges/otel.md +1 -3
- package/.docs/docs/observability/integrations/exporters/otel.md +1 -3
- package/.docs/docs/server/auth/fga.md +40 -0
- package/.docs/docs/server/auth/simple-auth.md +1 -3
- package/.docs/docs/studio/overview.md +2 -0
- package/.docs/docs/workflows/control-flow.md +1 -3
- package/.docs/docs/workspace/filesystem.md +1 -0
- package/.docs/docs/workspace/sandbox.md +1 -0
- package/.docs/guides/getting-started/quickstart.md +40 -25
- package/.docs/guides/index.md +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +1 -3
- package/.docs/models/environment-variables.md +2 -0
- package/.docs/models/gateways/netlify.md +3 -6
- package/.docs/models/gateways/openrouter.md +343 -346
- package/.docs/models/gateways/vercel.md +6 -5
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/aki-io.md +78 -0
- package/.docs/models/providers/alibaba-token-plan-cn.md +22 -21
- package/.docs/models/providers/alibaba-token-plan.md +22 -21
- package/.docs/models/providers/ambient.md +12 -10
- package/.docs/models/providers/baseten.md +2 -1
- package/.docs/models/providers/cline-pass.md +82 -0
- package/.docs/models/providers/cortecs.md +2 -1
- package/.docs/models/providers/crossmodel.md +2 -1
- package/.docs/models/providers/deepinfra.md +4 -7
- package/.docs/models/providers/deepseek.md +3 -1
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/google.md +4 -2
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/inferx.md +3 -3
- package/.docs/models/providers/kenari.md +44 -29
- package/.docs/models/providers/kimi-for-coding.md +6 -9
- package/.docs/models/providers/llmgateway.md +4 -1
- package/.docs/models/providers/moonshotai-cn.md +1 -1
- package/.docs/models/providers/moonshotai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -1
- package/.docs/models/providers/novita-ai.md +3 -1
- package/.docs/models/providers/opencode-go.md +4 -3
- package/.docs/models/providers/opencode.md +4 -2
- package/.docs/models/providers/poolside.md +2 -2
- package/.docs/models/providers/togetherai.md +2 -6
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers/zenmux.md +3 -1
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/agent-controller/session.md +13 -0
- package/.docs/reference/agents/agent.md +13 -1
- package/.docs/reference/agents/generate.md +18 -0
- package/.docs/reference/browser/firecrawl-browser.md +71 -0
- package/.docs/reference/cli/create-mastra.md +118 -43
- package/.docs/reference/cli/mastra.md +59 -5
- package/.docs/reference/code-sdk/mount-agent-controller.md +4 -4
- package/.docs/reference/core/getMCPServer.md +1 -3
- package/.docs/reference/core/getMCPServerById.md +1 -3
- package/.docs/reference/core/getWorkflow.md +1 -3
- package/.docs/reference/core/listMCPServers.md +2 -6
- package/.docs/reference/datasets/addItem.md +1 -3
- package/.docs/reference/datasets/addItems.md +1 -3
- package/.docs/reference/datasets/compareExperiments.md +1 -3
- package/.docs/reference/datasets/create.md +1 -3
- package/.docs/reference/datasets/dataset.md +2 -6
- package/.docs/reference/datasets/datasets-manager.md +5 -15
- package/.docs/reference/datasets/delete.md +1 -3
- package/.docs/reference/datasets/deleteExperiment.md +1 -3
- package/.docs/reference/datasets/deleteItem.md +1 -3
- package/.docs/reference/datasets/deleteItems.md +1 -3
- package/.docs/reference/datasets/get.md +1 -3
- package/.docs/reference/datasets/getDetails.md +1 -3
- package/.docs/reference/datasets/getExperiment.md +1 -3
- package/.docs/reference/datasets/getItem.md +1 -3
- package/.docs/reference/datasets/getItemHistory.md +1 -3
- package/.docs/reference/datasets/list.md +1 -3
- package/.docs/reference/datasets/listExperimentResults.md +1 -3
- package/.docs/reference/datasets/listExperiments.md +1 -3
- package/.docs/reference/datasets/listItems.md +1 -3
- package/.docs/reference/datasets/listVersions.md +1 -3
- package/.docs/reference/datasets/startExperiment.md +1 -3
- package/.docs/reference/datasets/startExperimentAsync.md +1 -3
- package/.docs/reference/datasets/update.md +1 -3
- package/.docs/reference/datasets/updateItem.md +1 -3
- package/.docs/reference/editor/mastra-editor.md +1 -3
- package/.docs/reference/evals/context-recall.md +205 -0
- package/.docs/reference/evals/create-scorer.md +3 -9
- package/.docs/reference/evals/mastra-scorer.md +1 -3
- package/.docs/reference/file-based-agents/tools.md +7 -6
- package/.docs/reference/index.md +5 -0
- package/.docs/reference/memory/observational-memory.md +21 -0
- package/.docs/reference/observability/tracing/exporters/posthog.md +39 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -3
- package/.docs/reference/processors/token-limiter-processor.md +1 -3
- package/.docs/reference/rag/database-config.md +12 -0
- package/.docs/reference/streaming/agents/stream.md +2 -0
- package/.docs/reference/templates/overview.md +6 -32
- package/.docs/reference/tools/create-tool.md +78 -52
- package/.docs/reference/tools/mcp-client.md +8 -24
- package/.docs/reference/tools/mcp-server.md +143 -44
- package/.docs/reference/tools/tavily.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +22 -0
- package/.docs/reference/vectors/mongodb.md +2 -0
- package/.docs/reference/vectors/turbopuffer.md +4 -0
- package/.docs/reference/voice/mistral.md +127 -0
- package/.docs/reference/workspace/daytona-sandbox.md +2 -6
- package/.docs/reference/workspace/platform-filesystem.md +182 -0
- package/.docs/reference/workspace/platform-sandbox.md +200 -0
- package/.docs/reference/workspace/railway-sandbox.md +37 -1
- package/CHANGELOG.md +71 -0
- package/dist/{chunk-GLPCVXXO.js → chunk-HGADBLKG.js} +2 -2
- package/dist/{chunk-GLPCVXXO.js.map → chunk-HGADBLKG.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/stdio.js +1 -1
- package/dist/tools/docs.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Kenari
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 38 Kenari models through Mastra's model router. Authentication is handled automatically using the `KENARI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Kenari documentation](https://kenari.id/docs).
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "kenari/claude-
|
|
20
|
+
model: "kenari/claude-fable-5"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -34,31 +34,46 @@ for await (const chunk of stream) {
|
|
|
34
34
|
|
|
35
35
|
## Models
|
|
36
36
|
|
|
37
|
-
| Model
|
|
38
|
-
|
|
|
39
|
-
| `kenari/claude-
|
|
40
|
-
| `kenari/claude-opus-4-
|
|
41
|
-
| `kenari/claude-
|
|
42
|
-
| `kenari/
|
|
43
|
-
| `kenari/deepseek-v4-flash
|
|
44
|
-
| `kenari/deepseek-v4-
|
|
45
|
-
| `kenari/deepseek-v4-pro
|
|
46
|
-
| `kenari/
|
|
47
|
-
| `kenari/
|
|
48
|
-
| `kenari/
|
|
49
|
-
| `kenari/
|
|
50
|
-
| `kenari/
|
|
51
|
-
| `kenari/
|
|
52
|
-
| `kenari/
|
|
53
|
-
| `kenari/gpt-
|
|
54
|
-
| `kenari/
|
|
55
|
-
| `kenari/
|
|
56
|
-
| `kenari/
|
|
57
|
-
| `kenari/
|
|
58
|
-
| `kenari/
|
|
59
|
-
| `kenari/
|
|
60
|
-
| `kenari/
|
|
61
|
-
| `kenari/
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| ---------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `kenari/claude-fable-5` | 1.0M | | | | | | — | — |
|
|
40
|
+
| `kenari/claude-opus-4-7` | 1.0M | | | | | | — | — |
|
|
41
|
+
| `kenari/claude-opus-4-8` | 1.0M | | | | | | — | — |
|
|
42
|
+
| `kenari/claude-sonnet-5` | 1.0M | | | | | | — | — |
|
|
43
|
+
| `kenari/deepseek-v4-flash` | 1.0M | | | | | | — | — |
|
|
44
|
+
| `kenari/deepseek-v4-flash:free` | 1.0M | | | | | | — | — |
|
|
45
|
+
| `kenari/deepseek-v4-pro` | 1.0M | | | | | | — | — |
|
|
46
|
+
| `kenari/gemini-2-5-flash` | 1.0M | | | | | | — | — |
|
|
47
|
+
| `kenari/gemini-2-5-flash-lite` | 1.0M | | | | | | — | — |
|
|
48
|
+
| `kenari/gemini-3-1-flash-lite` | 1.0M | | | | | | — | — |
|
|
49
|
+
| `kenari/gemma-4-31b-it` | 262K | | | | | | — | — |
|
|
50
|
+
| `kenari/glm-4-7-flash:free` | 200K | | | | | | — | — |
|
|
51
|
+
| `kenari/glm-5-1` | 200K | | | | | | — | — |
|
|
52
|
+
| `kenari/glm-5-2` | 1.0M | | | | | | — | — |
|
|
53
|
+
| `kenari/gpt-5-4-mini` | 400K | | | | | | — | — |
|
|
54
|
+
| `kenari/gpt-5-5` | 1.1M | | | | | | — | — |
|
|
55
|
+
| `kenari/gpt-5-6-luna` | 1.1M | | | | | | — | — |
|
|
56
|
+
| `kenari/gpt-5-6-sol` | 1.1M | | | | | | — | — |
|
|
57
|
+
| `kenari/gpt-5-6-terra` | 1.1M | | | | | | — | — |
|
|
58
|
+
| `kenari/gpt-image-2` | 272K | | | | | | — | — |
|
|
59
|
+
| `kenari/gpt-oss-120b` | 131K | | | | | | — | — |
|
|
60
|
+
| `kenari/gpt-oss-20b` | 131K | | | | | | — | — |
|
|
61
|
+
| `kenari/grok-4-5` | 500K | | | | | | — | — |
|
|
62
|
+
| `kenari/grok-build-0-1` | 256K | | | | | | — | — |
|
|
63
|
+
| `kenari/kimi-k2-6` | 262K | | | | | | — | — |
|
|
64
|
+
| `kenari/kimi-k2-6:free` | 262K | | | | | | — | — |
|
|
65
|
+
| `kenari/kimi-k2-7-code` | 262K | | | | | | — | — |
|
|
66
|
+
| `kenari/kimi-k2-7-code:free` | 262K | | | | | | — | — |
|
|
67
|
+
| `kenari/kimi-k3` | 1.0M | | | | | | — | — |
|
|
68
|
+
| `kenari/mimo-v2-5` | 1.0M | | | | | | — | — |
|
|
69
|
+
| `kenari/mimo-v2-5-pro` | 1.0M | | | | | | — | — |
|
|
70
|
+
| `kenari/mimo-v2-5:free` | 1.0M | | | | | | — | — |
|
|
71
|
+
| `kenari/minimax-m3` | 512K | | | | | | — | — |
|
|
72
|
+
| `kenari/nemotron-3-nano-30b-a3b` | 262K | | | | | | — | — |
|
|
73
|
+
| `kenari/nemotron-3-super-120b-a12b` | 262K | | | | | | — | — |
|
|
74
|
+
| `kenari/nemotron-3-super-120b-a12b:free` | 262K | | | | | | — | — |
|
|
75
|
+
| `kenari/nemotron-3-ultra-550b-a55b` | 1.0M | | | | | | — | — |
|
|
76
|
+
| `kenari/qwen3-7-plus` | 1.0M | | | | | | — | — |
|
|
62
77
|
|
|
63
78
|
## Advanced configuration
|
|
64
79
|
|
|
@@ -70,7 +85,7 @@ const agent = new Agent({
|
|
|
70
85
|
name: "custom-agent",
|
|
71
86
|
model: {
|
|
72
87
|
url: "https://kenari.id/v1",
|
|
73
|
-
id: "kenari/claude-
|
|
88
|
+
id: "kenari/claude-fable-5",
|
|
74
89
|
apiKey: process.env.KENARI_API_KEY,
|
|
75
90
|
headers: {
|
|
76
91
|
"X-Custom-Header": "value"
|
|
@@ -89,7 +104,7 @@ const agent = new Agent({
|
|
|
89
104
|
const useAdvanced = requestContext.task === "complex";
|
|
90
105
|
return useAdvanced
|
|
91
106
|
? "kenari/qwen3-7-plus"
|
|
92
|
-
: "kenari/claude-
|
|
107
|
+
: "kenari/claude-fable-5";
|
|
93
108
|
}
|
|
94
109
|
});
|
|
95
110
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Kimi For Coding
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 3 Kimi For Coding models through Mastra's model router. Authentication is handled automatically using the `KIMI_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Kimi For Coding documentation](https://www.kimi.com/code/docs/en/third-party-tools/other-coding-agents.html).
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "kimi-for-coding/
|
|
20
|
+
model: "kimi-for-coding/k3"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -36,12 +36,9 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
-
| `kimi-for-coding/k2p5` | 262K | | | | | | — | — |
|
|
40
|
-
| `kimi-for-coding/k2p6` | 262K | | | | | | — | — |
|
|
41
|
-
| `kimi-for-coding/k2p7` | 262K | | | | | | — | — |
|
|
42
39
|
| `kimi-for-coding/k3` | 1.0M | | | | | | — | — |
|
|
40
|
+
| `kimi-for-coding/kimi-for-coding` | 262K | | | | | | — | — |
|
|
43
41
|
| `kimi-for-coding/kimi-for-coding-highspeed` | 262K | | | | | | — | — |
|
|
44
|
-
| `kimi-for-coding/kimi-k2-thinking` | 262K | | | | | | — | — |
|
|
45
42
|
|
|
46
43
|
## Advanced configuration
|
|
47
44
|
|
|
@@ -53,7 +50,7 @@ const agent = new Agent({
|
|
|
53
50
|
name: "custom-agent",
|
|
54
51
|
model: {
|
|
55
52
|
url: "https://api.kimi.com/coding/v1",
|
|
56
|
-
id: "kimi-for-coding/
|
|
53
|
+
id: "kimi-for-coding/k3",
|
|
57
54
|
apiKey: process.env.KIMI_API_KEY,
|
|
58
55
|
headers: {
|
|
59
56
|
"X-Custom-Header": "value"
|
|
@@ -71,8 +68,8 @@ const agent = new Agent({
|
|
|
71
68
|
model: ({ requestContext }) => {
|
|
72
69
|
const useAdvanced = requestContext.task === "complex";
|
|
73
70
|
return useAdvanced
|
|
74
|
-
? "kimi-for-coding/kimi-
|
|
75
|
-
: "kimi-for-coding/
|
|
71
|
+
? "kimi-for-coding/kimi-for-coding-highspeed"
|
|
72
|
+
: "kimi-for-coding/k3";
|
|
76
73
|
}
|
|
77
74
|
});
|
|
78
75
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# LLM Gateway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 173 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
8
8
|
|
|
@@ -64,6 +64,8 @@ for await (const chunk of stream) {
|
|
|
64
64
|
| `llmgateway/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 |
|
|
65
65
|
| `llmgateway/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
66
66
|
| `llmgateway/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
|
|
67
|
+
| `llmgateway/gemini-3.5-flash-lite` | 1.0M | | | | | | $0.30 | $3 |
|
|
68
|
+
| `llmgateway/gemini-3.6-flash` | 1.0M | | | | | | $2 | $8 |
|
|
67
69
|
| `llmgateway/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
68
70
|
| `llmgateway/gemma-4-26b-a4b-it` | 262K | | | | | | $0.07 | $0.34 |
|
|
69
71
|
| `llmgateway/gemma-4-31b-it` | 262K | | | | | | $0.13 | $0.38 |
|
|
@@ -133,6 +135,7 @@ for await (const chunk of stream) {
|
|
|
133
135
|
| `llmgateway/kimi-k2.6` | 262K | | | | | | $0.40 | $2 |
|
|
134
136
|
| `llmgateway/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
135
137
|
| `llmgateway/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
|
|
138
|
+
| `llmgateway/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
136
139
|
| `llmgateway/llama-3-70b-instruct` | 8K | | | | | | $0.51 | $0.74 |
|
|
137
140
|
| `llmgateway/llama-3.1-70b-instruct` | 128K | | | | | | $0.72 | $0.72 |
|
|
138
141
|
| `llmgateway/llama-3.1-nemotron-ultra-253b` | 128K | | | | | | $0.60 | $2 |
|
|
@@ -45,7 +45,7 @@ for await (const chunk of stream) {
|
|
|
45
45
|
| `moonshotai-cn/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
46
46
|
| `moonshotai-cn/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
47
47
|
| `moonshotai-cn/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
|
|
48
|
-
| `moonshotai-cn/kimi-k3` | 1.0M | | | | | |
|
|
48
|
+
| `moonshotai-cn/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
49
49
|
|
|
50
50
|
## Advanced configuration
|
|
51
51
|
|
|
@@ -45,7 +45,7 @@ for await (const chunk of stream) {
|
|
|
45
45
|
| `moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
46
46
|
| `moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
47
47
|
| `moonshotai/kimi-k2.7-code-highspeed` | 262K | | | | | | $2 | $8 |
|
|
48
|
-
| `moonshotai/kimi-k3` | 1.0M | | | | | |
|
|
48
|
+
| `moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
49
49
|
|
|
50
50
|
## Advanced configuration
|
|
51
51
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Nebius Token Factory
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 21 Nebius Token Factory models through Mastra's model router. Authentication is handled automatically using the `NEBIUS_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Nebius Token Factory documentation](https://docs.tokenfactory.nebius.com/).
|
|
8
8
|
|
|
@@ -40,6 +40,8 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `nebius/google/gemma-3-27b-it` | 110K | | | | | | $0.10 | $0.30 |
|
|
41
41
|
| `nebius/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.13 | $0.40 |
|
|
42
42
|
| `nebius/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.30 | $1 |
|
|
43
|
+
| `nebius/MiniMaxAI/MiniMax-M3` | 1.0M | | | | | | $0.30 | $1 |
|
|
44
|
+
| `nebius/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
|
|
43
45
|
| `nebius/NousResearch/Hermes-4-405B` | 128K | | | | | | $1 | $3 |
|
|
44
46
|
| `nebius/NousResearch/Hermes-4-70B` | 128K | | | | | | $0.13 | $0.40 |
|
|
45
47
|
| `nebius/nvidia/Llama-3_1-Nemotron-Ultra-253B-v1` | 128K | | | | | | $0.60 | $2 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# NovitaAI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 107 NovitaAI models through Mastra's model router. Authentication is handled automatically using the `NOVITA_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [NovitaAI documentation](https://novita.ai/docs/guides/introduction).
|
|
8
8
|
|
|
@@ -90,6 +90,8 @@ for await (const chunk of stream) {
|
|
|
90
90
|
| `novita-ai/moonshotai/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
|
|
91
91
|
| `novita-ai/moonshotai/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
92
92
|
| `novita-ai/moonshotai/kimi-k2.6` | 262K | | | | | | $0.80 | $3 |
|
|
93
|
+
| `novita-ai/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
94
|
+
| `novita-ai/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
93
95
|
| `novita-ai/nousresearch/hermes-2-pro-llama-3-8b` | 8K | | | | | | $0.14 | $0.14 |
|
|
94
96
|
| `novita-ai/openai/gpt-oss-120b` | 131K | | | | | | $0.05 | $0.25 |
|
|
95
97
|
| `novita-ai/openai/gpt-oss-20b` | 131K | | | | | | $0.04 | $0.15 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenCode Go
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 16 OpenCode Go models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenCode Go documentation](https://opencode.ai/docs/zen).
|
|
8
8
|
|
|
@@ -37,15 +37,16 @@ for await (const chunk of stream) {
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `opencode-go/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
40
|
-
| `opencode-go/deepseek-v4-pro` | 1.0M | | | | | | $
|
|
40
|
+
| `opencode-go/deepseek-v4-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
41
41
|
| `opencode-go/glm-5.1` | 203K | | | | | | $1 | $4 |
|
|
42
42
|
| `opencode-go/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
43
43
|
| `opencode-go/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
44
|
+
| `opencode-go/hy3` | 256K | | | | | | $0.14 | $0.58 |
|
|
44
45
|
| `opencode-go/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
45
46
|
| `opencode-go/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
46
47
|
| `opencode-go/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
47
48
|
| `opencode-go/mimo-v2.5` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
48
|
-
| `opencode-go/mimo-v2.5-pro` | 1.0M | | | | | | $
|
|
49
|
+
| `opencode-go/mimo-v2.5-pro` | 1.0M | | | | | | $0.43 | $0.87 |
|
|
49
50
|
| `opencode-go/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
50
51
|
| `opencode-go/minimax-m3` | 1.0M | | | | | | $0.30 | $1 |
|
|
51
52
|
| `opencode-go/qwen3.6-plus` | 1.0M | | | | | | $0.50 | $3 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenCode Zen
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 57 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
8
8
|
|
|
@@ -54,6 +54,8 @@ for await (const chunk of stream) {
|
|
|
54
54
|
| `opencode/gemini-3-flash` | 1.0M | | | | | | $0.50 | $3 |
|
|
55
55
|
| `opencode/gemini-3.1-pro` | 1.0M | | | | | | $2 | $12 |
|
|
56
56
|
| `opencode/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
|
|
57
|
+
| `opencode/gemini-3.5-flash-lite` | 1.0M | | | | | | $0.30 | $3 |
|
|
58
|
+
| `opencode/gemini-3.6-flash` | 1.0M | | | | | | $2 | $8 |
|
|
57
59
|
| `opencode/glm-5` | 205K | | | | | | $1 | $3 |
|
|
58
60
|
| `opencode/glm-5.1` | 205K | | | | | | $1 | $4 |
|
|
59
61
|
| `opencode/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
@@ -79,10 +81,10 @@ for await (const chunk of stream) {
|
|
|
79
81
|
| `opencode/gpt-5.6-terra` | 1.1M | | | | | | $3 | $15 |
|
|
80
82
|
| `opencode/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
81
83
|
| `opencode/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
82
|
-
| `opencode/hy3-free` | 190K | | | | | | — | — |
|
|
83
84
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
84
85
|
| `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
85
86
|
| `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
87
|
+
| `opencode/laguna-s-2.1-free` | 256K | | | | | | — | — |
|
|
86
88
|
| `opencode/mimo-v2.5-free` | 200K | | | | | | — | — |
|
|
87
89
|
| `opencode/minimax-m2.5` | 205K | | | | | | $0.30 | $1 |
|
|
88
90
|
| `opencode/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
@@ -37,8 +37,8 @@ for await (const chunk of stream) {
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| --------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `poolside/poolside/laguna-m.1` | 262K | | | | | | — | — |
|
|
40
|
+
| `poolside/poolside/laguna-s-2.1` | 1.0M | | | | | | — | — |
|
|
40
41
|
| `poolside/poolside/laguna-xs-2.1` | 262K | | | | | | — | — |
|
|
41
|
-
| `poolside/poolside/laguna-xs.2` | 262K | | | | | | — | — |
|
|
42
42
|
|
|
43
43
|
## Advanced configuration
|
|
44
44
|
|
|
@@ -68,7 +68,7 @@ const agent = new Agent({
|
|
|
68
68
|
model: ({ requestContext }) => {
|
|
69
69
|
const useAdvanced = requestContext.task === "complex";
|
|
70
70
|
return useAdvanced
|
|
71
|
-
? "poolside/poolside/laguna-xs.
|
|
71
|
+
? "poolside/poolside/laguna-xs-2.1"
|
|
72
72
|
: "poolside/poolside/laguna-m.1";
|
|
73
73
|
}
|
|
74
74
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Together AI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 21 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
|
|
8
8
|
|
|
@@ -36,7 +36,6 @@ for await (const chunk of stream) {
|
|
|
36
36
|
| ----------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
37
37
|
| `togetherai/deepcogito/cogito-v2-1-671b` | 164K | | | | | | $1 | $1 |
|
|
38
38
|
| `togetherai/deepseek-ai/DeepSeek-V4-Pro` | 512K | | | | | | $2 | $3 |
|
|
39
|
-
| `togetherai/essentialai/Rnj-1-Instruct` | 33K | | | | | | $0.15 | $0.15 |
|
|
40
39
|
| `togetherai/google/gemma-3n-E4B-it` | 33K | | | | | | $0.06 | $0.12 |
|
|
41
40
|
| `togetherai/google/gemma-4-31B-it` | 262K | | | | | | $0.39 | $0.97 |
|
|
42
41
|
| `togetherai/LiquidAI/LFM2-24B-A2B` | 33K | | | | | | $0.03 | $0.12 |
|
|
@@ -51,13 +50,10 @@ for await (const chunk of stream) {
|
|
|
51
50
|
| `togetherai/openai/gpt-oss-20b` | 131K | | | | | | $0.05 | $0.20 |
|
|
52
51
|
| `togetherai/pearl-ai/gemma-4-31b-it` | 32K | | | | | | $0.28 | $0.86 |
|
|
53
52
|
| `togetherai/Qwen/Qwen2.5-7B-Instruct-Turbo` | 33K | | | | | | $0.30 | $0.30 |
|
|
54
|
-
| `togetherai/Qwen/Qwen3-235B-A22B-Instruct-2507-tput` | 262K | | | | | | $0.20 | $0.60 |
|
|
55
|
-
| `togetherai/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.60 | $4 |
|
|
56
53
|
| `togetherai/Qwen/Qwen3.5-9B` | 262K | | | | | | $0.17 | $0.25 |
|
|
57
54
|
| `togetherai/Qwen/Qwen3.6-Plus` | 1.0M | | | | | | $0.50 | $3 |
|
|
58
55
|
| `togetherai/Qwen/Qwen3.7-Max` | 1.0M | | | | | | $1 | $4 |
|
|
59
|
-
| `togetherai/
|
|
60
|
-
| `togetherai/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
|
|
56
|
+
| `togetherai/thinkingmachines/Inkling` | 524K | | | | | | $1 | $4 |
|
|
61
57
|
| `togetherai/zai-org/GLM-5.2` | 262K | | | | | | $1 | $4 |
|
|
62
58
|
|
|
63
59
|
## Advanced configuration
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Weights & Biases
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 26 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
|
|
8
8
|
|
|
@@ -46,6 +46,7 @@ for await (const chunk of stream) {
|
|
|
46
46
|
| `wandb/meta-llama/Llama-3.1-8B-Instruct` | 128K | | | | | | $0.22 | $0.22 |
|
|
47
47
|
| `wandb/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.71 | $0.71 |
|
|
48
48
|
| `wandb/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.30 | $1 |
|
|
49
|
+
| `wandb/MiniMaxAI/MiniMax-M3` | 262K | | | | | | $0.29 | $1 |
|
|
49
50
|
| `wandb/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
|
|
50
51
|
| `wandb/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.95 | $4 |
|
|
51
52
|
| `wandb/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.94 | $4 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# ZenMux
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 120 ZenMux models through Mastra's model router. Authentication is handled automatically using the `ZENMUX_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [ZenMux documentation](https://docs.zenmux.ai).
|
|
8
8
|
|
|
@@ -83,6 +83,8 @@ for await (const chunk of stream) {
|
|
|
83
83
|
| `zenmux/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
84
84
|
| `zenmux/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
85
85
|
| `zenmux/moonshotai/kimi-k2.7-code-free` | 262K | | | | | | — | — |
|
|
86
|
+
| `zenmux/moonshotai/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
87
|
+
| `zenmux/moonshotai/kimi-k3-free` | 1.0M | | | | | | — | — |
|
|
86
88
|
| `zenmux/openai/gpt-5` | 400K | | | | | | $1 | $10 |
|
|
87
89
|
| `zenmux/openai/gpt-5-codex` | 400K | | | | | | $1 | $10 |
|
|
88
90
|
| `zenmux/openai/gpt-5.1` | 400K | | | | | | $1 | $10 |
|
|
@@ -15,6 +15,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
15
15
|
- [Abacus](https://mastra.ai/models/providers/abacus)
|
|
16
16
|
- [abliteration.ai](https://mastra.ai/models/providers/abliteration-ai)
|
|
17
17
|
- [AI-ROUTER](https://mastra.ai/models/providers/ai-router)
|
|
18
|
+
- [AKI.IO](https://mastra.ai/models/providers/aki-io)
|
|
18
19
|
- [Alibaba](https://mastra.ai/models/providers/alibaba)
|
|
19
20
|
- [Alibaba (China)](https://mastra.ai/models/providers/alibaba-cn)
|
|
20
21
|
- [Alibaba Coding Plan](https://mastra.ai/models/providers/alibaba-coding-plan)
|
|
@@ -33,6 +34,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
33
34
|
- [Chutes](https://mastra.ai/models/providers/chutes)
|
|
34
35
|
- [Clarifai](https://mastra.ai/models/providers/clarifai)
|
|
35
36
|
- [Claudinio](https://mastra.ai/models/providers/claudinio)
|
|
37
|
+
- [ClinePass](https://mastra.ai/models/providers/cline-pass)
|
|
36
38
|
- [CloudFerro Sherlock](https://mastra.ai/models/providers/cloudferro-sherlock)
|
|
37
39
|
- [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai)
|
|
38
40
|
- [Cortecs](https://mastra.ai/models/providers/cortecs)
|
|
@@ -57,6 +57,19 @@ The session is organized into sub-objects, each owning one domain of per-convers
|
|
|
57
57
|
|
|
58
58
|
## Methods
|
|
59
59
|
|
|
60
|
+
### Workspace
|
|
61
|
+
|
|
62
|
+
#### `getWorkspace()`
|
|
63
|
+
|
|
64
|
+
Return the workspace resolved for this session. This preserves session-level overrides and workspaces selected from the session scope.
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
const workspace = agentController.session.getWorkspace()
|
|
68
|
+
const skill = await workspace.skills?.get('code-review')
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Returns: `Workspace`
|
|
72
|
+
|
|
60
73
|
### Permissions
|
|
61
74
|
|
|
62
75
|
Session-scoped grants auto-approve tools without prompting. Grants are ephemeral — they reset when the session restarts and are never persisted.
|
|
@@ -96,6 +96,18 @@ export const agent = new Agent({
|
|
|
96
96
|
})
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
+
## Model strings
|
|
100
|
+
|
|
101
|
+
For the simplest setup, pass `model` as a string in `provider/model` format. Separate the provider and model name with a slash. Mastra reads the matching provider credentials from the environment, so this format doesn't require a provider package or import.
|
|
102
|
+
|
|
103
|
+
Popular provider strings and credentials:
|
|
104
|
+
|
|
105
|
+
- **OpenAI**: `openai/gpt-5.5` uses `OPENAI_API_KEY`.
|
|
106
|
+
- **Anthropic**: `anthropic/claude-sonnet-4-6` uses `ANTHROPIC_API_KEY`.
|
|
107
|
+
- **Google**: `google/gemini-2.5-pro` uses `GOOGLE_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY`.
|
|
108
|
+
|
|
109
|
+
See [models](https://mastra.ai/models) for supported model IDs and [environment variables](https://mastra.ai/models/environment-variables) for the complete provider list.
|
|
110
|
+
|
|
99
111
|
## Thread signals
|
|
100
112
|
|
|
101
113
|
Use Agent signals to send real-time input and context into a memory thread. Message APIs are for user-authored input. `sendSignal()` is the lower-level API for system-generated context.
|
|
@@ -435,7 +447,7 @@ Returns an `AgentThreadSubscription` object with these members:
|
|
|
435
447
|
|
|
436
448
|
**instructions** (`SystemMessage | ({ requestContext: RequestContext }) => SystemMessage | Promise<SystemMessage>`): Instructions that guide the agent's behavior. Can be a string, array of strings, system message object, array of system messages, or a function that returns any of these types dynamically. SystemMessage types: string | string\[] | CoreSystemMessage | CoreSystemMessage\[] | SystemModelMessage | SystemModelMessage\[]
|
|
437
449
|
|
|
438
|
-
**model** (`MastraLanguageModel | ({ requestContext: RequestContext }) => MastraLanguageModel | Promise<MastraLanguageModel>`): The language model used by the agent.
|
|
450
|
+
**model** (`MastraLanguageModel | ({ requestContext: RequestContext }) => MastraLanguageModel | Promise<MastraLanguageModel>`): The language model used by the agent. Pass a model router string in provider/model format, a model configuration or provider instance, or a function that resolves the model at runtime. See Model strings for common providers and environment variables.
|
|
439
451
|
|
|
440
452
|
**agents** (`Record<string, Agent> | ({ requestContext: RequestContext }) => Record<string, Agent> | Promise<Record<string, Agent>>`): Subagents that the agent can access. Can be provided statically or resolved dynamically.
|
|
441
453
|
|
|
@@ -132,6 +132,8 @@ const result = await agent.generate('message for agent')
|
|
|
132
132
|
|
|
133
133
|
**options.memory.options** (`MemoryConfig`): Additional memory configuration options including lastMessages, readOnly, semanticRecall, workingMemory, and filterIncompleteToolCalls.
|
|
134
134
|
|
|
135
|
+
**options.memory.onTitleGenerated** (`(title: string) => void | Promise<void>`): Callback fired asynchronously when a thread title is generated and persisted to storage. Title generation runs in the background and may complete after generate() returns. Only fires when generateTitle is enabled in memory options and the thread has no existing title.
|
|
136
|
+
|
|
135
137
|
**options.onFinish** (`LoopConfig['onFinish']`): Callback fired when generation completes.
|
|
136
138
|
|
|
137
139
|
**options.onStepFinish** (`LoopConfig['onStepFinish']`): Callback fired after each generation step.
|
|
@@ -456,4 +458,20 @@ const response = await agent.generate('Help me organize my day', {
|
|
|
456
458
|
console.log({ text, toolCalls, toolResults, finishReason, usage })
|
|
457
459
|
},
|
|
458
460
|
})
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### Using `onTitleGenerated`
|
|
464
|
+
|
|
465
|
+
When `generateTitle` is enabled in memory options, title generation runs asynchronously after the response completes. Use `onTitleGenerated` to react when the title is ready — for example, to push it to the client via SSE.
|
|
466
|
+
|
|
467
|
+
```typescript
|
|
468
|
+
const response = await agent.generate('What is quantum computing?', {
|
|
469
|
+
memory: {
|
|
470
|
+
thread: threadId,
|
|
471
|
+
resource: userId,
|
|
472
|
+
onTitleGenerated: title => {
|
|
473
|
+
console.log('Thread title:', title)
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
})
|
|
459
477
|
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# FirecrawlBrowser class
|
|
4
|
+
|
|
5
|
+
The `FirecrawlBrowser` class provides browser automation backed by the [Firecrawl Browser Sandbox](https://docs.firecrawl.dev/features/browser). It provisions remote browser sessions through the Firecrawl API and connects to them over the Chrome DevTools Protocol (CDP).
|
|
6
|
+
|
|
7
|
+
`FirecrawlBrowser` extends [`AgentBrowser`](https://mastra.ai/reference/browser/agent-browser) and exposes the same deterministic toolset. Use it when you want hosted browser sessions instead of a local Chromium install. For local automation, see [`AgentBrowser`](https://mastra.ai/reference/browser/agent-browser). For AI-powered interactions using natural language, see [`StagehandBrowser`](https://mastra.ai/reference/browser/stagehand-browser).
|
|
8
|
+
|
|
9
|
+
## Usage example
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Agent } from '@mastra/core/agent'
|
|
13
|
+
import { FirecrawlBrowser } from '@mastra/browser-firecrawl'
|
|
14
|
+
|
|
15
|
+
const browser = new FirecrawlBrowser({
|
|
16
|
+
apiKey: process.env.FIRECRAWL_API_KEY,
|
|
17
|
+
firecrawl: {
|
|
18
|
+
ttl: 600,
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export const browserAgent = new Agent({
|
|
23
|
+
id: 'browser-agent',
|
|
24
|
+
name: 'Browser Agent',
|
|
25
|
+
instructions: `You can browse the web. Use browser_snapshot to see the page structure,
|
|
26
|
+
then interact with elements using their refs (e.g., @e5).`,
|
|
27
|
+
model: 'openai/gpt-5.5',
|
|
28
|
+
browser,
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Constructor parameters
|
|
33
|
+
|
|
34
|
+
`FirecrawlBrowser` accepts all [`AgentBrowser` constructor parameters](https://mastra.ai/reference/browser/agent-browser) plus the following:
|
|
35
|
+
|
|
36
|
+
**apiKey** (`string`): Firecrawl API key. Falls back to the FIRECRAWL\_API\_KEY environment variable. The constructor throws if neither is set.
|
|
37
|
+
|
|
38
|
+
**apiUrl** (`string`): Base URL for a self-hosted Firecrawl API.
|
|
39
|
+
|
|
40
|
+
**firecrawl** (`FirecrawlBrowserSessionOptions`): Session options passed to the Firecrawl browser() API when creating sandbox sessions.
|
|
41
|
+
|
|
42
|
+
**firecrawl.ttl** (`number`): Maximum session lifetime in seconds.
|
|
43
|
+
|
|
44
|
+
**firecrawl.activityTtl** (`number`): Idle timeout in seconds before the sandbox recycles the session.
|
|
45
|
+
|
|
46
|
+
**firecrawl.streamWebView** (`boolean`): When true, Firecrawl may stream WebView frames for the remote session.
|
|
47
|
+
|
|
48
|
+
**firecrawl.profile** (`{ name: string; saveChanges?: boolean }`): Named Firecrawl sandbox profile. Set saveChanges: true to persist cookies and login state when the session ends; naming a profile alone does not save changes. Distinct from the top-level AgentBrowser profile option, which is a local Playwright user-data directory path.
|
|
49
|
+
|
|
50
|
+
**firecrawl.integration** (`string`): Integration label for Firecrawl analytics and routing.
|
|
51
|
+
|
|
52
|
+
**firecrawl.origin** (`string`): Origin hint for the Firecrawl browser session.
|
|
53
|
+
|
|
54
|
+
## Session lifecycle
|
|
55
|
+
|
|
56
|
+
Session provisioning depends on the `scope` option inherited from `AgentBrowser`:
|
|
57
|
+
|
|
58
|
+
- `'thread'` (default): Each conversation thread gets its own Firecrawl sandbox session, created on first use and deleted when the thread's browser session is destroyed.
|
|
59
|
+
- `'shared'`: One Firecrawl sandbox session is created when the browser launches and shared across all threads. The session is deleted when the browser closes.
|
|
60
|
+
|
|
61
|
+
In both cases, `FirecrawlBrowser` deletes the remote Firecrawl session when the browser closes, including when session creation or connection fails partway through.
|
|
62
|
+
|
|
63
|
+
## Tools
|
|
64
|
+
|
|
65
|
+
`FirecrawlBrowser` provides the same toolset as `AgentBrowser`, including `browser_goto`, `browser_snapshot`, `browser_click`, `browser_type`, and `browser_screenshot`. See the [`AgentBrowser` tool reference](https://mastra.ai/reference/browser/agent-browser) for the full list and tool parameters.
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [Firecrawl docs](https://mastra.ai/docs/browser/firecrawl)
|
|
70
|
+
- [`AgentBrowser` reference](https://mastra.ai/reference/browser/agent-browser)
|
|
71
|
+
- [Browser overview](https://mastra.ai/docs/browser/overview)
|