@mastra/mcp-docs-server 1.2.15-alpha.20 → 1.2.15-alpha.21
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/code-mode.md +1 -1
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +8 -8
- package/.docs/docs/browser/recording.md +2 -2
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +70 -7
- package/.docs/docs/capabilities/subagents.md +2 -2
- package/.docs/docs/deployment/cloud-providers.md +9 -9
- package/.docs/docs/deployment/overview.md +9 -9
- package/.docs/docs/deployment/sandbox.md +3 -3
- package/.docs/docs/deployment/web-framework.md +6 -6
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +2 -2
- package/.docs/docs/long-running-agents/signal-providers.md +2 -15
- package/.docs/docs/long-running-agents/signals.md +1 -1
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mcp/overview.md +42 -0
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +1 -1
- package/.docs/docs/memory/observational-memory.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +16 -16
- package/.docs/docs/observability/integrations/overview.md +3 -3
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth.md +8 -8
- package/.docs/docs/storage/overview.md +14 -13
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/snapshots.md +11 -11
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +17 -17
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/agent-frameworks/ai-sdk.md +2 -2
- package/.docs/guides/deployment/mastra-workers.md +1 -1
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/guides/index.md +8 -8
- package/.docs/guides/voice/overview.md +55 -106
- package/.docs/guides/voice/speech-to-text.md +7 -7
- package/.docs/guides/voice/text-to-speech.md +9 -10
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +2 -2
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +256 -3
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +7 -5
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/{reference/storage → integrations/databases}/oracledb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +2 -2
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +5 -5
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +3 -3
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +2 -2
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +5 -5
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +1 -1
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +5 -5
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +276 -44
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +2 -2
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +1 -1
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +3 -3
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +2 -2
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +141 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +437 -34
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +2 -2
- package/.docs/models/gateways/openrouter.md +3 -1
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/kilo.md +9 -6
- package/.docs/models/providers/opencode.md +0 -1
- package/.docs/reference/agent-controller/agent-controller-class.md +32 -1
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +1 -1
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +1 -1
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +2 -2
- package/.docs/reference/configuration.md +1 -26
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/file-based-agents/storage.md +1 -1
- package/.docs/reference/file-based-agents/studio.md +1 -1
- package/.docs/reference/index.md +27 -55
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +10 -10
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +1 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +1 -1
- package/.docs/reference/storage/composite.md +3 -3
- package/.docs/reference/storage/retention.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +2 -2
- package/.docs/reference/workers/overview.md +8 -8
- package/.docs/reference/workspace/platform-filesystem.md +2 -2
- package/.docs/reference/workspace/platform-sandbox.md +2 -2
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/CHANGELOG.md +9 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +5 -5
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +0 -0
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/auth0.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/clerk.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/firebase.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/okta.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/supabase.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/workos.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/inngest.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/temporal.md +0 -0
- /package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +0 -0
- /package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/express.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +0 -0
- /package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +0 -0
- /package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +0 -0
- /package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +0 -0
- /package/.docs/{guides/guide → integrations/tools}/firecrawl.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides/getting-started → reference}/manual-install.md +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/network-to-supervisor.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
|
@@ -1,10 +1,107 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# OpenAI
|
|
3
|
+
# OpenAI
|
|
4
|
+
|
|
5
|
+
## Voice
|
|
6
|
+
|
|
7
|
+
The OpenAIVoice class in Mastra provides text-to-speech and speech-to-text capabilities using OpenAI's models.
|
|
8
|
+
|
|
9
|
+
### Usage example
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { OpenAIVoice } from '@mastra/voice-openai'
|
|
13
|
+
|
|
14
|
+
// Initialize with default configuration using environment variables
|
|
15
|
+
const voice = new OpenAIVoice()
|
|
16
|
+
|
|
17
|
+
// Or initialize with specific configuration
|
|
18
|
+
const voiceWithConfig = new OpenAIVoice({
|
|
19
|
+
speechModel: {
|
|
20
|
+
name: 'tts-1-hd',
|
|
21
|
+
apiKey: 'your-openai-api-key',
|
|
22
|
+
},
|
|
23
|
+
listeningModel: {
|
|
24
|
+
name: 'whisper-1',
|
|
25
|
+
apiKey: 'your-openai-api-key',
|
|
26
|
+
},
|
|
27
|
+
speaker: 'alloy', // Default voice
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
// Convert text to speech
|
|
31
|
+
const audioStream = await voice.speak('Hello, how can I help you?', {
|
|
32
|
+
speaker: 'nova', // Override default voice
|
|
33
|
+
speed: 1.2, // Adjust speech speed
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
// Convert speech to text
|
|
37
|
+
const text = await voice.listen(audioStream, {
|
|
38
|
+
filetype: 'mp3',
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Configuration
|
|
43
|
+
|
|
44
|
+
#### Constructor options
|
|
45
|
+
|
|
46
|
+
**speechModel** (`OpenAIConfig`): Configuration for text-to-speech synthesis. (Default: `{ name: 'tts-1' }`)
|
|
47
|
+
|
|
48
|
+
**speechModel.name** (`'tts-1' | 'tts-1-hd' | 'whisper-1'`): Model name. Use 'tts-1-hd' for higher quality audio.
|
|
49
|
+
|
|
50
|
+
**speechModel.apiKey** (`string`): OpenAI API key. Falls back to OPENAI\_API\_KEY environment variable.
|
|
51
|
+
|
|
52
|
+
**listeningModel** (`OpenAIConfig`): Configuration for speech-to-text recognition. (Default: `{ name: 'whisper-1' }`)
|
|
53
|
+
|
|
54
|
+
**listeningModel.name** (`'tts-1' | 'tts-1-hd' | 'whisper-1'`): Model name. Use 'tts-1-hd' for higher quality audio.
|
|
55
|
+
|
|
56
|
+
**listeningModel.apiKey** (`string`): OpenAI API key. Falls back to OPENAI\_API\_KEY environment variable.
|
|
57
|
+
|
|
58
|
+
**speaker** (`OpenAIVoiceId`): Default voice ID for speech synthesis. (Default: `'alloy'`)
|
|
59
|
+
|
|
60
|
+
### Methods
|
|
61
|
+
|
|
62
|
+
#### `speak()`
|
|
63
|
+
|
|
64
|
+
Converts text to speech using OpenAI's text-to-speech models.
|
|
65
|
+
|
|
66
|
+
**input** (`string | NodeJS.ReadableStream`): Text or text stream to convert to speech.
|
|
67
|
+
|
|
68
|
+
**options** (`Options`): Configuration options.
|
|
69
|
+
|
|
70
|
+
**options.speaker** (`OpenAIVoiceId`): Voice ID to use for speech synthesis.
|
|
71
|
+
|
|
72
|
+
**options.speed** (`number`): Speech speed multiplier.
|
|
73
|
+
|
|
74
|
+
Returns: `Promise<NodeJS.ReadableStream>`
|
|
75
|
+
|
|
76
|
+
#### `listen()`
|
|
77
|
+
|
|
78
|
+
Transcribes audio using OpenAI's Whisper model.
|
|
79
|
+
|
|
80
|
+
**audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe.
|
|
81
|
+
|
|
82
|
+
**options** (`Options`): Configuration options.
|
|
83
|
+
|
|
84
|
+
**options.filetype** (`string`): Audio format of the input stream.
|
|
85
|
+
|
|
86
|
+
Returns: `Promise<string>`
|
|
87
|
+
|
|
88
|
+
#### `getSpeakers()`
|
|
89
|
+
|
|
90
|
+
Returns an array of available voice options, where each node contains:
|
|
91
|
+
|
|
92
|
+
**voiceId** (`string`): Unique identifier for the voice
|
|
93
|
+
|
|
94
|
+
### Notes
|
|
95
|
+
|
|
96
|
+
- API keys can be provided via constructor options or the `OPENAI_API_KEY` environment variable
|
|
97
|
+
- The `tts-1-hd` model provides higher quality audio but may have slower processing times
|
|
98
|
+
- Speech recognition supports multiple audio formats including mp3, wav, and webm
|
|
99
|
+
|
|
100
|
+
## Realtime
|
|
4
101
|
|
|
5
102
|
The OpenAIRealtimeVoice class provides real-time voice interaction capabilities using OpenAI's WebSocket-based API. It supports real time speech to speech, voice activity detection, and event-based audio streaming.
|
|
6
103
|
|
|
7
|
-
|
|
104
|
+
### Usage example
|
|
8
105
|
|
|
9
106
|
```typescript
|
|
10
107
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -55,9 +152,9 @@ await voice.send(microphoneStream)
|
|
|
55
152
|
voice.connect()
|
|
56
153
|
```
|
|
57
154
|
|
|
58
|
-
|
|
155
|
+
### Configuration
|
|
59
156
|
|
|
60
|
-
|
|
157
|
+
#### Constructor options
|
|
61
158
|
|
|
62
159
|
**model** (`string`): The model ID to use for real-time voice interactions. (Default: `'gpt-5.1-realtime-preview-2024-12-17'`)
|
|
63
160
|
|
|
@@ -65,7 +162,7 @@ voice.connect()
|
|
|
65
162
|
|
|
66
163
|
**speaker** (`string`): Default voice ID for speech synthesis. (Default: `'alloy'`)
|
|
67
164
|
|
|
68
|
-
|
|
165
|
+
#### Voice Activity Detection (VAD) Configuration
|
|
69
166
|
|
|
70
167
|
**type** (`string`): Type of VAD to use. Server-side VAD provides better accuracy. (Default: `'server_vad'`)
|
|
71
168
|
|
|
@@ -75,15 +172,15 @@ voice.connect()
|
|
|
75
172
|
|
|
76
173
|
**silence\_duration\_ms** (`number`): Milliseconds of silence before ending a turn. (Default: `1000`)
|
|
77
174
|
|
|
78
|
-
|
|
175
|
+
### Methods
|
|
79
176
|
|
|
80
|
-
|
|
177
|
+
#### `connect()`
|
|
81
178
|
|
|
82
179
|
Establishes a connection to the OpenAI Realtime service. Must be called before using speak, listen, or send functions.
|
|
83
180
|
|
|
84
181
|
**returns** (`Promise<void>`): Promise that resolves when the connection is established.
|
|
85
182
|
|
|
86
|
-
|
|
183
|
+
#### `speak()`
|
|
87
184
|
|
|
88
185
|
Emits a speaking event using the configured voice model. Can accept either a string or a readable stream as input.
|
|
89
186
|
|
|
@@ -95,7 +192,7 @@ Emits a speaking event using the configured voice model. Can accept either a str
|
|
|
95
192
|
|
|
96
193
|
Returns: `Promise<void>`
|
|
97
194
|
|
|
98
|
-
|
|
195
|
+
#### `listen()`
|
|
99
196
|
|
|
100
197
|
Processes audio input for speech recognition. Takes a readable stream of audio data and emits a 'listening' event with the transcribed text.
|
|
101
198
|
|
|
@@ -103,7 +200,7 @@ Processes audio input for speech recognition. Takes a readable stream of audio d
|
|
|
103
200
|
|
|
104
201
|
Returns: `Promise<void>`
|
|
105
202
|
|
|
106
|
-
|
|
203
|
+
#### `send()`
|
|
107
204
|
|
|
108
205
|
Streams audio data in real-time to the OpenAI service for continuous audio streaming scenarios like live microphone input.
|
|
109
206
|
|
|
@@ -111,7 +208,7 @@ Streams audio data in real-time to the OpenAI service for continuous audio strea
|
|
|
111
208
|
|
|
112
209
|
Returns: `Promise<void>`
|
|
113
210
|
|
|
114
|
-
|
|
211
|
+
#### `updateConfig()`
|
|
115
212
|
|
|
116
213
|
Updates the session configuration for the voice instance. This can modify voice settings and turn detection. It can also modify other parameters.
|
|
117
214
|
|
|
@@ -119,7 +216,7 @@ Updates the session configuration for the voice instance. This can modify voice
|
|
|
119
216
|
|
|
120
217
|
Returns: `void`
|
|
121
218
|
|
|
122
|
-
|
|
219
|
+
#### `addTools()`
|
|
123
220
|
|
|
124
221
|
Adds a set of tools to the voice instance. Tools allow the model to perform additional actions during conversations. When OpenAIRealtimeVoice is added to an Agent, any tools configured for the Agent will automatically be available to the voice interface.
|
|
125
222
|
|
|
@@ -127,19 +224,19 @@ Adds a set of tools to the voice instance. Tools allow the model to perform addi
|
|
|
127
224
|
|
|
128
225
|
Returns: `void`
|
|
129
226
|
|
|
130
|
-
|
|
227
|
+
#### `close()`
|
|
131
228
|
|
|
132
229
|
Disconnects from the OpenAI Realtime session and cleans up resources. Should be called when you're done with the voice instance.
|
|
133
230
|
|
|
134
231
|
Returns: `void`
|
|
135
232
|
|
|
136
|
-
|
|
233
|
+
#### `getSpeakers()`
|
|
137
234
|
|
|
138
235
|
Returns a list of available voice speakers.
|
|
139
236
|
|
|
140
237
|
Returns: `Promise<Array<{ voiceId: string; [key: string]: any }>>`
|
|
141
238
|
|
|
142
|
-
|
|
239
|
+
#### `on()`
|
|
143
240
|
|
|
144
241
|
Registers an event listener for voice events.
|
|
145
242
|
|
|
@@ -149,7 +246,7 @@ Registers an event listener for voice events.
|
|
|
149
246
|
|
|
150
247
|
Returns: `void`
|
|
151
248
|
|
|
152
|
-
|
|
249
|
+
#### `off()`
|
|
153
250
|
|
|
154
251
|
Removes a previously registered event listener.
|
|
155
252
|
|
|
@@ -159,7 +256,7 @@ Removes a previously registered event listener.
|
|
|
159
256
|
|
|
160
257
|
Returns: `void`
|
|
161
258
|
|
|
162
|
-
|
|
259
|
+
### Events
|
|
163
260
|
|
|
164
261
|
The OpenAIRealtimeVoice class emits the following events:
|
|
165
262
|
|
|
@@ -169,7 +266,7 @@ The OpenAIRealtimeVoice class emits the following events:
|
|
|
169
266
|
|
|
170
267
|
**error** (`event`): Emitted when an error occurs. Callback receives the error object.
|
|
171
268
|
|
|
172
|
-
|
|
269
|
+
#### OpenAI Realtime Events
|
|
173
270
|
|
|
174
271
|
You can also listen to [OpenAI Realtime utility events](https://github.com/openai/openai-realtime-api-beta#reference-client-utility-events) by prefixing with 'openAIRealtime:':
|
|
175
272
|
|
|
@@ -183,7 +280,7 @@ You can also listen to [OpenAI Realtime utility events](https://github.com/opena
|
|
|
183
280
|
|
|
184
281
|
**openAIRealtime:conversation.item.completed** (`event`): Emitted when an item in the conversation is completed.
|
|
185
282
|
|
|
186
|
-
|
|
283
|
+
### Available voices
|
|
187
284
|
|
|
188
285
|
The following voice options are available:
|
|
189
286
|
|
|
@@ -196,7 +293,7 @@ The following voice options are available:
|
|
|
196
293
|
- `shimmer`: Bright and energetic
|
|
197
294
|
- `verse`: Versatile and expressive
|
|
198
295
|
|
|
199
|
-
|
|
296
|
+
### Notes
|
|
200
297
|
|
|
201
298
|
- API keys can be provided via constructor options or the `OPENAI_API_KEY` environment variable
|
|
202
299
|
- The OpenAI Realtime Voice API uses WebSockets for real-time communication
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Integrations
|
|
4
|
+
|
|
5
|
+
Search integrations...
|
|
6
|
+
|
|
7
|
+
## Channels
|
|
8
|
+
|
|
9
|
+
- [Discord](https://mastra.ai/integrations/channels/discord)
|
|
10
|
+
- [GitHub](https://mastra.ai/integrations/channels/github)
|
|
11
|
+
- [iMessage](https://mastra.ai/integrations/channels/imessage)
|
|
12
|
+
- [Microsoft Teams](https://mastra.ai/integrations/channels/teams)
|
|
13
|
+
- [Slack](https://mastra.ai/integrations/channels/slack)
|
|
14
|
+
- [Telegram](https://mastra.ai/integrations/channels/telegram)
|
|
15
|
+
- [WhatsApp](https://mastra.ai/integrations/channels/whatsapp)
|
|
16
|
+
|
|
17
|
+
## Frameworks
|
|
18
|
+
|
|
19
|
+
- [Astro](https://mastra.ai/integrations/frameworks/astro)
|
|
20
|
+
- [Electron](https://mastra.ai/integrations/frameworks/electron)
|
|
21
|
+
- [Express](https://mastra.ai/integrations/frameworks/express)
|
|
22
|
+
- [Hono](https://mastra.ai/integrations/frameworks/hono)
|
|
23
|
+
- [NestJS](https://mastra.ai/integrations/frameworks/nestjs)
|
|
24
|
+
- [Next.js](https://mastra.ai/integrations/frameworks/next-js)
|
|
25
|
+
- [Nuxt](https://mastra.ai/integrations/frameworks/nuxt)
|
|
26
|
+
- [React + Vite](https://mastra.ai/integrations/frameworks/vite-react)
|
|
27
|
+
- [SvelteKit](https://mastra.ai/integrations/frameworks/sveltekit)
|
|
28
|
+
|
|
29
|
+
## Agentic UI
|
|
30
|
+
|
|
31
|
+
- [AI SDK UI](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui)
|
|
32
|
+
- [Assistant UI](https://mastra.ai/integrations/agentic-ui/assistant-ui)
|
|
33
|
+
- [CopilotKit](https://mastra.ai/integrations/agentic-ui/copilotkit)
|
|
34
|
+
- [OpenUI](https://mastra.ai/integrations/agentic-ui/openui)
|
|
35
|
+
|
|
36
|
+
## Sandboxes
|
|
37
|
+
|
|
38
|
+
- [AgentCore](https://mastra.ai/integrations/sandboxes/agentcore)
|
|
39
|
+
- [Apple Container](https://mastra.ai/integrations/sandboxes/apple-container)
|
|
40
|
+
- [Blaxel](https://mastra.ai/integrations/sandboxes/blaxel)
|
|
41
|
+
- [Daytona](https://mastra.ai/integrations/sandboxes/daytona)
|
|
42
|
+
- [Docker](https://mastra.ai/integrations/sandboxes/docker)
|
|
43
|
+
- [E2B](https://mastra.ai/integrations/sandboxes/e2b)
|
|
44
|
+
- [Modal](https://mastra.ai/integrations/sandboxes/modal)
|
|
45
|
+
- [Railway](https://mastra.ai/integrations/sandboxes/railway)
|
|
46
|
+
- [Vercel](https://mastra.ai/integrations/sandboxes/vercel)
|
|
47
|
+
|
|
48
|
+
## Observability
|
|
49
|
+
|
|
50
|
+
- [Arize](https://mastra.ai/integrations/observability/arize)
|
|
51
|
+
- [Arthur](https://mastra.ai/integrations/observability/arthur)
|
|
52
|
+
- [Braintrust](https://mastra.ai/integrations/observability/braintrust)
|
|
53
|
+
- [Confident AI](https://mastra.ai/integrations/observability/confident-ai)
|
|
54
|
+
- [Datadog](https://mastra.ai/integrations/observability/datadog)
|
|
55
|
+
- [Laminar](https://mastra.ai/integrations/observability/laminar)
|
|
56
|
+
- [Langfuse](https://mastra.ai/integrations/observability/langfuse)
|
|
57
|
+
- [LangSmith](https://mastra.ai/integrations/observability/langsmith)
|
|
58
|
+
- [OpenTelemetry](https://mastra.ai/integrations/observability/opentelemetry)
|
|
59
|
+
- [PostHog](https://mastra.ai/integrations/observability/posthog)
|
|
60
|
+
- [Sentry](https://mastra.ai/integrations/observability/sentry)
|
|
61
|
+
|
|
62
|
+
## Databases
|
|
63
|
+
|
|
64
|
+
- [Aurora DSQL](https://mastra.ai/integrations/databases/aurora-dsql)
|
|
65
|
+
- [ClickHouse](https://mastra.ai/integrations/databases/clickhouse)
|
|
66
|
+
- [Cloudflare D1](https://mastra.ai/integrations/databases/cloudflare-d1)
|
|
67
|
+
- [Cloudflare KV](https://mastra.ai/integrations/databases/cloudflare-kv)
|
|
68
|
+
- [Convex](https://mastra.ai/integrations/databases/convex)
|
|
69
|
+
- [DuckDB](https://mastra.ai/integrations/databases/duckdb)
|
|
70
|
+
- [DynamoDB](https://mastra.ai/integrations/databases/dynamodb)
|
|
71
|
+
- [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
|
|
72
|
+
- [LanceDB](https://mastra.ai/integrations/databases/lancedb)
|
|
73
|
+
- [libSQL](https://mastra.ai/integrations/databases/libsql)
|
|
74
|
+
- [MongoDB](https://mastra.ai/integrations/databases/mongodb)
|
|
75
|
+
- [MSSQL](https://mastra.ai/integrations/databases/mssql)
|
|
76
|
+
- [Neon Postgres](https://mastra.ai/integrations/databases/neon)
|
|
77
|
+
- [OracleDB](https://mastra.ai/integrations/databases/oracledb)
|
|
78
|
+
- [PostgreSQL](https://mastra.ai/integrations/databases/postgresql)
|
|
79
|
+
- [Redis](https://mastra.ai/integrations/databases/redis)
|
|
80
|
+
- [Upstash](https://mastra.ai/integrations/databases/upstash)
|
|
81
|
+
|
|
82
|
+
## Deploy
|
|
83
|
+
|
|
84
|
+
- [Amazon Bedrock AgentCore](https://mastra.ai/integrations/deploy/aws-bedrock-agentcore)
|
|
85
|
+
- [Amazon EC2](https://mastra.ai/integrations/deploy/amazon-ec2)
|
|
86
|
+
- [AWS Lambda](https://mastra.ai/integrations/deploy/aws-lambda)
|
|
87
|
+
- [Azure App Services](https://mastra.ai/integrations/deploy/azure-app-services)
|
|
88
|
+
- [Cloudflare](https://mastra.ai/integrations/deploy/cloudflare)
|
|
89
|
+
- [Digital Ocean](https://mastra.ai/integrations/deploy/digital-ocean)
|
|
90
|
+
- [Inngest](https://mastra.ai/integrations/deploy/inngest)
|
|
91
|
+
- [Kubernetes](https://mastra.ai/integrations/deploy/kubernetes)
|
|
92
|
+
- [Netlify](https://mastra.ai/integrations/deploy/netlify)
|
|
93
|
+
- [Temporal](https://mastra.ai/integrations/deploy/temporal)
|
|
94
|
+
- [Vercel](https://mastra.ai/integrations/deploy/vercel)
|
|
95
|
+
|
|
96
|
+
## Tools
|
|
97
|
+
|
|
98
|
+
- [Bright Data](https://mastra.ai/integrations/tools/brightdata)
|
|
99
|
+
- [Firecrawl](https://mastra.ai/integrations/tools/firecrawl)
|
|
100
|
+
- [Perplexity](https://mastra.ai/integrations/tools/perplexity)
|
|
101
|
+
- [Tavily](https://mastra.ai/integrations/tools/tavily)
|
|
102
|
+
|
|
103
|
+
## Voice
|
|
104
|
+
|
|
105
|
+
- [AWS Nova Sonic](https://mastra.ai/integrations/voice/aws-nova-sonic)
|
|
106
|
+
- [Azure](https://mastra.ai/integrations/voice/azure)
|
|
107
|
+
- [Cloudflare](https://mastra.ai/integrations/voice/cloudflare)
|
|
108
|
+
- [Deepgram](https://mastra.ai/integrations/voice/deepgram)
|
|
109
|
+
- [ElevenLabs](https://mastra.ai/integrations/voice/elevenlabs)
|
|
110
|
+
- [Google](https://mastra.ai/integrations/voice/google)
|
|
111
|
+
- [Inworld](https://mastra.ai/integrations/voice/inworld)
|
|
112
|
+
- [LiveKit](https://mastra.ai/integrations/voice/livekit)
|
|
113
|
+
- [Mistral](https://mastra.ai/integrations/voice/mistral)
|
|
114
|
+
- [Murf](https://mastra.ai/integrations/voice/murf)
|
|
115
|
+
- [OpenAI](https://mastra.ai/integrations/voice/openai)
|
|
116
|
+
- [Sarvam](https://mastra.ai/integrations/voice/sarvam)
|
|
117
|
+
- [Speechify](https://mastra.ai/integrations/voice/speechify)
|
|
118
|
+
- [xAI](https://mastra.ai/integrations/voice/xai)
|
|
119
|
+
|
|
120
|
+
## Auth
|
|
121
|
+
|
|
122
|
+
- [Auth0](https://mastra.ai/integrations/auth/auth0)
|
|
123
|
+
- [Better Auth](https://mastra.ai/integrations/auth/better-auth)
|
|
124
|
+
- [Clerk](https://mastra.ai/integrations/auth/clerk)
|
|
125
|
+
- [Firebase](https://mastra.ai/integrations/auth/firebase)
|
|
126
|
+
- [Google](https://mastra.ai/integrations/auth/google)
|
|
127
|
+
- [Okta](https://mastra.ai/integrations/auth/okta)
|
|
128
|
+
- [Supabase](https://mastra.ai/integrations/auth/supabase)
|
|
129
|
+
- [WorkOS](https://mastra.ai/integrations/auth/workos)
|
|
130
|
+
|
|
131
|
+
## Browsers
|
|
132
|
+
|
|
133
|
+
- [AgentBrowser](https://mastra.ai/integrations/browsers/agent-browser)
|
|
134
|
+
- [BrowserViewer](https://mastra.ai/integrations/browsers/browser-viewer)
|
|
135
|
+
- [Firecrawl](https://mastra.ai/integrations/browsers/firecrawl)
|
|
136
|
+
- [Stagehand](https://mastra.ai/integrations/browsers/stagehand)
|
|
137
|
+
|
|
138
|
+
## File storage
|
|
139
|
+
|
|
140
|
+
- [AgentFS](https://mastra.ai/integrations/file-storage/agentfs)
|
|
141
|
+
- [Amazon S3](https://mastra.ai/integrations/file-storage/amazon-s3)
|
|
142
|
+
- [Archil](https://mastra.ai/integrations/file-storage/archil)
|
|
143
|
+
- [Azure Blob](https://mastra.ai/integrations/file-storage/azure-blob)
|
|
144
|
+
- [Google Cloud Storage](https://mastra.ai/integrations/file-storage/google-cloud-storage)
|
|
145
|
+
- [Google Drive](https://mastra.ai/integrations/file-storage/google-drive)
|
|
146
|
+
- [Mesa](https://mastra.ai/integrations/file-storage/mesa)
|
|
147
|
+
- [Vercel Files](https://mastra.ai/integrations/file-storage/vercel-files)
|
|
@@ -277,5 +277,5 @@ try {
|
|
|
277
277
|
## Next Steps
|
|
278
278
|
|
|
279
279
|
- [Memory & Semantic Recall](https://mastra.ai/docs/memory/semantic-recall): Use embeddings for agent memory
|
|
280
|
-
- [RAG & Chunking](https://mastra.ai/
|
|
281
|
-
- [Vector Databases](https://mastra.ai/
|
|
280
|
+
- [RAG & Chunking](https://mastra.ai/reference/rag/chunking-and-embedding): Build retrieval-augmented generation systems
|
|
281
|
+
- [Vector Databases](https://mastra.ai/reference/rag/vector-databases): Store and query embeddings
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenRouter
|
|
4
4
|
|
|
5
|
-
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 341 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
|
|
8
8
|
|
|
@@ -339,6 +339,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
339
339
|
| `relace/relace-apply-3` |
|
|
340
340
|
| `relace/relace-search` |
|
|
341
341
|
| `sakana/fugu-ultra` |
|
|
342
|
+
| `sakana/sakana-namazu` |
|
|
342
343
|
| `sao10k/l3-lunaris-8b` |
|
|
343
344
|
| `sao10k/l3.1-euryale-70b` |
|
|
344
345
|
| `sao10k/l3.3-euryale-70b` |
|
|
@@ -355,6 +356,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
355
356
|
| `thinkingmachines/inkling-small` |
|
|
356
357
|
| `undi95/remm-slerp-l2-13b` |
|
|
357
358
|
| `upstage/solar-pro-3` |
|
|
359
|
+
| `upstage/solar-pro4` |
|
|
358
360
|
| `writer/palmyra-x5` |
|
|
359
361
|
| `x-ai/grok-4.20` |
|
|
360
362
|
| `x-ai/grok-4.20-multi-agent` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Vercel
|
|
4
4
|
|
|
5
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 323 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
8
8
|
|
|
@@ -187,6 +187,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
187
187
|
| `meta/llama-3.3-70b` |
|
|
188
188
|
| `meta/llama-4-maverick` |
|
|
189
189
|
| `meta/llama-4-scout` |
|
|
190
|
+
| `meta/muse-glimmer-30b` |
|
|
190
191
|
| `meta/muse-spark-1.1` |
|
|
191
192
|
| `meta/muse-spark-1.2` |
|
|
192
193
|
| `meta/muse-spark-1.2-contributor` |
|
package/.docs/models/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Model Providers
|
|
4
4
|
|
|
5
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
5
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 5466 models from 169 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Kilo Gateway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 349 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Kilo Gateway documentation](https://kilo.ai).
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `kilo/~anthropic/claude-haiku-latest` | 200K | | | | | | $1 | $5 |
|
|
41
41
|
| `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $5 | $25 |
|
|
42
42
|
| `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
|
|
43
|
-
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.08 | $0.
|
|
43
|
+
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.08 | $0.25 |
|
|
44
44
|
| `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $2 | $8 |
|
|
45
45
|
| `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
46
46
|
| `kilo/~moonshotai/kimi-latest` | 1.0M | | | | | | $3 | $14 |
|
|
@@ -157,9 +157,10 @@ for await (const chunk of stream) {
|
|
|
157
157
|
| `kilo/meta-llama/llama-3.2-1b-instruct` | 60K | | | | | | $0.03 | $0.20 |
|
|
158
158
|
| `kilo/meta-llama/llama-3.2-3b-instruct` | 131K | | | | | | $0.05 | $0.33 |
|
|
159
159
|
| `kilo/meta-llama/llama-3.3-70b-instruct` | 131K | | | | | | $0.10 | $0.32 |
|
|
160
|
-
| `kilo/meta-llama/llama-4-maverick` |
|
|
160
|
+
| `kilo/meta-llama/llama-4-maverick` | 128K | | | | | | $0.20 | $0.70 |
|
|
161
161
|
| `kilo/meta-llama/llama-4-scout` | 328K | | | | | | $0.10 | $0.30 |
|
|
162
162
|
| `kilo/meta-llama/llama-guard-4-12b` | 164K | | | | | | $0.18 | $0.18 |
|
|
163
|
+
| `kilo/meta/muse-glimmer-30b` | 131K | | | | | | $0.35 | $2 |
|
|
163
164
|
| `kilo/meta/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
|
|
164
165
|
| `kilo/meta/muse-spark-1.2` | 1.0M | | | | | | $1 | $4 |
|
|
165
166
|
| `kilo/microsoft/phi-4` | 16K | | | | | | $0.07 | $0.14 |
|
|
@@ -308,7 +309,7 @@ for await (const chunk of stream) {
|
|
|
308
309
|
| `kilo/qwen/qwen3-max` | 262K | | | | | | $0.78 | $4 |
|
|
309
310
|
| `kilo/qwen/qwen3-max-thinking` | 262K | | | | | | $0.78 | $4 |
|
|
310
311
|
| `kilo/qwen/qwen3-next-80b-a3b-instruct` | 262K | | | | | | $0.10 | $0.78 |
|
|
311
|
-
| `kilo/qwen/qwen3-next-80b-a3b-thinking` |
|
|
312
|
+
| `kilo/qwen/qwen3-next-80b-a3b-thinking` | 262K | | | | | | $0.15 | $1 |
|
|
312
313
|
| `kilo/qwen/qwen3-vl-235b-a22b-instruct` | 131K | | | | | | $0.26 | $1 |
|
|
313
314
|
| `kilo/qwen/qwen3-vl-235b-a22b-thinking` | 131K | | | | | | $0.40 | $4 |
|
|
314
315
|
| `kilo/qwen/qwen3-vl-30b-a3b-instruct` | 262K | | | | | | $0.13 | $0.52 |
|
|
@@ -338,6 +339,7 @@ for await (const chunk of stream) {
|
|
|
338
339
|
| `kilo/relace/relace-apply-3` | 256K | | | | | | $0.85 | $1 |
|
|
339
340
|
| `kilo/relace/relace-search` | 256K | | | | | | $1 | $3 |
|
|
340
341
|
| `kilo/sakana/fugu-ultra` | 1.0M | | | | | | $5 | $30 |
|
|
342
|
+
| `kilo/sakana/sakana-namazu` | 262K | | | | | | $0.95 | $4 |
|
|
341
343
|
| `kilo/sao10k/l3-lunaris-8b` | 8K | | | | | | $0.04 | $0.05 |
|
|
342
344
|
| `kilo/sao10k/l3.1-euryale-70b` | 131K | | | | | | $0.85 | $0.85 |
|
|
343
345
|
| `kilo/sao10k/l3.3-euryale-70b` | 131K | | | | | | $0.65 | $0.75 |
|
|
@@ -362,6 +364,7 @@ for await (const chunk of stream) {
|
|
|
362
364
|
| `kilo/thinkingmachines/inkling-small` | 524K | | | | | | $0.45 | $1 |
|
|
363
365
|
| `kilo/undi95/remm-slerp-l2-13b` | 6K | | | | | | $0.45 | $0.65 |
|
|
364
366
|
| `kilo/upstage/solar-pro-3` | 131K | | | | | | $0.15 | $0.60 |
|
|
367
|
+
| `kilo/upstage/solar-pro4` | 524K | | | | | | $0.30 | $1 |
|
|
365
368
|
| `kilo/writer/palmyra-x5` | 1.0M | | | | | | $0.60 | $6 |
|
|
366
369
|
| `kilo/x-ai/grok-4.20` | 2.0M | | | | | | $1 | $3 |
|
|
367
370
|
| `kilo/x-ai/grok-4.20-multi-agent` | 2.0M | | | | | | $1 | $3 |
|
|
@@ -373,14 +376,14 @@ for await (const chunk of stream) {
|
|
|
373
376
|
| `kilo/z-ai/glm-4.5` | 131K | | | | | | $0.60 | $2 |
|
|
374
377
|
| `kilo/z-ai/glm-4.5-air` | 131K | | | | | | $0.13 | $0.85 |
|
|
375
378
|
| `kilo/z-ai/glm-4.5v` | 66K | | | | | | $0.60 | $2 |
|
|
376
|
-
| `kilo/z-ai/glm-4.6` |
|
|
379
|
+
| `kilo/z-ai/glm-4.6` | 205K | | | | | | $0.55 | $2 |
|
|
377
380
|
| `kilo/z-ai/glm-4.6v` | 131K | | | | | | $0.30 | $0.90 |
|
|
378
381
|
| `kilo/z-ai/glm-4.7` | 203K | | | | | | $0.60 | $2 |
|
|
379
382
|
| `kilo/z-ai/glm-4.7-flash` | 203K | | | | | | $0.07 | $0.40 |
|
|
380
383
|
| `kilo/z-ai/glm-5` | 205K | | | | | | $1 | $3 |
|
|
381
384
|
| `kilo/z-ai/glm-5-turbo` | 203K | | | | | | $1 | $4 |
|
|
382
385
|
| `kilo/z-ai/glm-5.1` | 203K | | | | | | $1 | $4 |
|
|
383
|
-
| `kilo/z-ai/glm-5.2` |
|
|
386
|
+
| `kilo/z-ai/glm-5.2` | 262K | | | | | | $1 | $4 |
|
|
384
387
|
| `kilo/z-ai/glm-5v-turbo` | 203K | | | | | | $1 | $4 |
|
|
385
388
|
|
|
386
389
|
## Advanced configuration
|
|
@@ -93,7 +93,6 @@ for await (const chunk of stream) {
|
|
|
93
93
|
| `opencode/minimax-m2.7` | 205K | | | | | | $0.30 | $1 |
|
|
94
94
|
| `opencode/minimax-m3` | 512K | | | | | | $0.30 | $1 |
|
|
95
95
|
| `opencode/nemotron-3-ultra-free` | 1.0M | | | | | | — | — |
|
|
96
|
-
| `opencode/north-mini-code-free` | 256K | | | | | | — | — |
|
|
97
96
|
| `opencode/qwen3.5-plus` | 262K | | | | | | $0.20 | $1 |
|
|
98
97
|
| `opencode/qwen3.6-plus` | 262K | | | | | | $0.50 | $3 |
|
|
99
98
|
|
|
@@ -196,6 +196,37 @@ const session = await controller.getSessionByResource('project-42', 'editor-wind
|
|
|
196
196
|
|
|
197
197
|
Returns: `Promise<Session<TState> | undefined>`
|
|
198
198
|
|
|
199
|
+
#### `onSessionDeleted(listener)`
|
|
200
|
+
|
|
201
|
+
Subscribe to process-local notifications after `deleteSession()` tears down a live session. Listener errors are isolated and don't prevent other listeners from running. Call the returned function to unsubscribe.
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
const unsubscribe = controller.onSessionDeleted(session => {
|
|
205
|
+
console.log(`Closed ${session.identity.getResourceId()}`)
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
await controller.createSession({ resourceId: 'project-42' })
|
|
209
|
+
await controller.deleteSession({ resourceId: 'project-42' })
|
|
210
|
+
unsubscribe()
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
This listener is best-effort and runs only in the current process. It isn't a persisted deletion event.
|
|
214
|
+
|
|
215
|
+
Returns: `() => void`
|
|
216
|
+
|
|
217
|
+
#### `deleteSession({ resourceId, scope? })`
|
|
218
|
+
|
|
219
|
+
Tear down the materialized session for a resource and optional scope. The method aborts active work, then removes thread subscriptions, the active thread lock, and the live session from the controller registry. It doesn't delete persisted threads or messages.
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
const deleted = await controller.deleteSession({
|
|
223
|
+
resourceId: 'project-42',
|
|
224
|
+
scope: 'editor-window-1',
|
|
225
|
+
})
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Returns: `Promise<boolean>`. The result is `true` when a live session was removed and `false` when no matching live session exists or when another deletion is already in progress for the same resource and scope.
|
|
229
|
+
|
|
199
230
|
#### `setResourceId(session, { resourceId })`
|
|
200
231
|
|
|
201
232
|
Move a live session to another resource and clear its active thread binding.
|
|
@@ -424,4 +455,4 @@ await controller.stopIntervals()
|
|
|
424
455
|
- [Session reference](https://mastra.ai/reference/agent-controller/session)
|
|
425
456
|
- [Agents](https://mastra.ai/docs/agents/overview)
|
|
426
457
|
- [Workspace](https://mastra.ai/docs/workspace/overview)
|
|
427
|
-
- [Channels](https://mastra.ai/docs/capabilities/channels
|
|
458
|
+
- [Channels](https://mastra.ai/docs/capabilities/channels)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Added in:** `@mastra/core@1.22.0`
|
|
6
6
|
|
|
7
|
-
Channels connect agents to messaging platforms. Configure them via the `channels` property on the `Agent` constructor. The object you pass is a `ChannelConfig`. See the [Channels overview](https://mastra.ai/docs/capabilities/channels
|
|
7
|
+
Channels connect agents to messaging platforms. Configure them via the `channels` property on the `Agent` constructor. The object you pass is a `ChannelConfig`. See the [Channels overview](https://mastra.ai/docs/capabilities/channels) for concepts and platform setup instructions.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -382,6 +382,6 @@ type InlineLinkEntry =
|
|
|
382
382
|
|
|
383
383
|
## Related
|
|
384
384
|
|
|
385
|
-
- [Channels overview](https://mastra.ai/docs/capabilities/channels
|
|
385
|
+
- [Channels overview](https://mastra.ai/docs/capabilities/channels): Concepts, quickstart, and platform setup
|
|
386
386
|
- [Agent class](https://mastra.ai/reference/agents/agent): Constructor parameters and methods
|
|
387
387
|
- [Chat SDK adapters](https://chat-sdk.dev/adapters): Adapter configuration and platform setup
|
|
@@ -138,7 +138,7 @@ Scorer judges with legacy model adapters call `generateLegacy()`. They don't rec
|
|
|
138
138
|
|
|
139
139
|
## Migration to new API
|
|
140
140
|
|
|
141
|
-
> **Note:** The new `.generate()` method offers enhanced capabilities including AI SDK v5
|
|
141
|
+
> **Note:** The new `.generate()` method offers enhanced capabilities including compatibility with AI SDK v5 and later, better structured output handling, and improved streaming support. See the [migration guide](https://mastra.ai/reference/migrations/vnext-to-standard-apis) for detailed migration instructions.
|
|
142
142
|
|
|
143
143
|
### Quick Migration Example
|
|
144
144
|
|
|
@@ -219,7 +219,7 @@ await agent.generateLegacy(
|
|
|
219
219
|
|
|
220
220
|
## Related
|
|
221
221
|
|
|
222
|
-
- [Migration Guide](https://mastra.ai/
|
|
222
|
+
- [Migration Guide](https://mastra.ai/reference/migrations/vnext-to-standard-apis)
|
|
223
223
|
- [New .generate() method](https://mastra.ai/reference/agents/generate)
|
|
224
224
|
- [Generating responses](https://mastra.ai/docs/agents/overview)
|
|
225
225
|
- [Streaming responses](https://mastra.ai/docs/agents/overview)
|