Skip to main content

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 built-in storage provider uses the configured storage backend's blobs domain. External providers (for example, S3) are supplied via MastraEditorConfig.blobStores.

Usage example
Direct link to Usage example

src/mastra/index.ts
import { MastraEditor } from '@mastra/editor'
import { s3BlobStoreProvider } from '@mastra/s3'

new MastraEditor({
blobStores: {
[s3BlobStoreProvider.id]: s3BlobStoreProvider,
},
})

Properties
Direct link to Properties

id:

string
Unique provider identifier (for example, `"storage"`, `"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 provider
Direct link to Implementing a provider

src/providers/my-blob-store.ts
import type { BlobStore, BlobStoreProvider } from '@mastra/core/editor'

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.

On this page