BlobStoreProvider
BlobStoreProvider is the interface a package implements to register a blob store with MastraEditor. Blob stores hold content-addressable skill blobs and other large artifacts produced by the editor.
The editor doesn't register a built-in blob store provider. When no provider ID is given, it falls back to the configured storage backend's blobs domain. External providers (for example, S3) are supplied via MastraEditorConfig.blobStores.
Usage exampleDirect link to Usage example
src/mastra/index.ts
import { MastraEditor } from '@mastra/editor'
import { s3BlobStoreProvider } from '@mastra/s3'
new MastraEditor({
blobStores: {
[s3BlobStoreProvider.id]: s3BlobStoreProvider,
},
})
PropertiesDirect link to Properties
id:
string
Unique provider identifier (for example,
"s3").name:
string
Human-readable name for UI display.
description?:
string
Short description.
configSchema?:
Record<string, unknown>
JSON Schema describing provider-specific configuration. Used by the UI to render config forms.
createBlobStore:
(config: TConfig) => BlobStore | Promise<BlobStore>
Create a runtime
BlobStore instance from the stored config. Called when the editor resolves a blob store via MastraEditor.resolveBlobStore(providerId, config).Implementing a providerDirect link to Implementing a provider
src/providers/my-blob-store.ts
import type { BlobStoreProvider } from '@mastra/core/editor'
import type { BlobStore } from '@mastra/core/storage'
export const myBlobStoreProvider: BlobStoreProvider<{ bucket: string; region: string }> = {
id: 'my-blob-store',
name: 'My Blob Store',
description: 'Object-store-backed blob storage.',
configSchema: {
type: 'object',
required: ['bucket', 'region'],
properties: {
bucket: { type: 'string' },
region: { type: 'string' },
},
},
async createBlobStore(config): Promise<BlobStore> {
return createMyBlobStore({ bucket: config.bucket, region: config.region })
},
}
When no providerId is passed to MastraEditor.resolveBlobStore(), the editor falls back to the storage backend's blobs domain.
RelatedDirect link to Related
- MastraEditor class: Provider registry and
resolveBlobStore()method.