Interface: DatabricksWorkspaceOptions
Native Mastra workspace options plus Databricks path shortcuts.
Extends
Section titled “Extends”Omit<WorkspaceConfig,"filesystem"|"mounts"|"sandbox"|"skills">
Properties
Section titled “Properties”assistantPaths?
Section titled “assistantPaths?”
optionalassistantPaths?:boolean
Start from DEFAULT_DATABRICKS_WORKSPACE_PATHS. Defaults to true.
autoIndexPaths?
Section titled “autoIndexPaths?”
optionalautoIndexPaths?:string[]
Paths to auto-index on init(). Files in these directories will be indexed for search.
Example
Section titled “Example”['docs', 'support']Inherited from
Section titled “Inherited from”Omit.autoIndexPaths
autoSync?
Section titled “autoSync?”
optionalautoSync?:boolean
Auto-sync between fs and sandbox (default: false)
Inherited from
Section titled “Inherited from”Omit.autoSync
optionalbm25?:boolean|BM25Config| {bm25?:BM25Config;tokenize?:TokenizeOptions; }
Enable BM25 keyword search.
Pass true for defaults, a BM25Config for custom k1/b parameters,
or a { bm25?, tokenize? } object to also customise tokenization.
The tokenize field accepts a TokenizeOptions object that lets you
tune how text is split into tokens (e.g. for CJK or other non-Latin scripts).
Example
Section titled “Example”new Workspace({ bm25: { k1: 1.5, b: 0.75, tokenize: { removePunctuation: false, minLength: 1 }, },});Inherited from
Section titled “Inherited from”Omit.bm25
browser?
Section titled “browser?”
optionalbrowser?:MastraBrowser
Browser provider for web automation.
Must be a MastraBrowser instance with providerType: 'cli' (e.g., BrowserViewer).
SDK providers (AgentBrowser, StagehandBrowser) are not supported here —
use Agent.browser for SDK providers.
The browser is launched via Playwright and exposes a CDP URL that CLI tools
(agent-browser, browser-use, browse) can connect to.
Example
Section titled “Example”import { BrowserViewer } from '@mastra/browser-viewer';
const workspace = new Workspace({ sandbox: new LocalSandbox({ cwd: './workspace' }), browser: new BrowserViewer({ cli: 'agent-browser', headless: false, }),});Inherited from
Section titled “Inherited from”Omit.browser
cache?
Section titled “cache?”
optionalcache?:DatabricksWorkspaceCache
Filesystem cache filters. Ignored when the AppKit files-cache plugin is absent.
checkSkillFileMtime?
Section titled “checkSkillFileMtime?”
optionalcheckSkillFileMtime?:boolean
Check SKILL.md file mtime in addition to directory mtime for staleness detection.
When enabled, allows hot-reload detection of in-place SKILL.md edits (e.g., fixing a validation error or updating a skill description).
Trade-off: This doubles the stat() calls per skill during staleness checks. Recommended for local development only. Not recommended for cloud storage backends (S3, etc.) where stat() calls have higher latency.
Default
Section titled “Default”falseInherited from
Section titled “Inherited from”Omit.checkSkillFileMtime
embedder?
Section titled “embedder?”
optionalembedder?:Embedder
Embedder function for generating vectors. Required when vectorStore is provided.
Inherited from
Section titled “Inherited from”Omit.embedder
extraSkillMounts?
Section titled “extraSkillMounts?”
optionalextraSkillMounts?:LocalSkillMount[]
Extra LOCAL skill trees mounted read-only for every request’s skill
discovery. Used by the plugin to expose remote skills from local backing
storage at stable virtual paths (see remote-skills.ts). Databricks-hosted
remote skills need no entry here because the built-in Assistant mount
already scans them.
fallbackToTmp?
Section titled “fallbackToTmp?”
optionalfallbackToTmp?:boolean
Add user-scoped /tmp only when no configured Databricks path mounts writable.
optionalid?:string
Unique identifier (auto-generated if not provided)
Inherited from
Section titled “Inherited from”Omit.id
instructions?
Section titled “instructions?”
optionalinstructions?:object
Controls how a resolver-backed sandbox contributes to workspace instructions.
Defaults to dynamicSandbox: 'placeholder'. No effect on a static sandbox.
See DynamicSandboxInstructions.
dynamicSandbox?
Section titled “dynamicSandbox?”
optionaldynamicSandbox?:DynamicSandboxInstructions
Inherited from
Section titled “Inherited from”Omit.instructions
optionallsp?:boolean|LSPConfig
Enable LSP diagnostics for edit tools.
When enabled, edit tools (edit_file, write_file, ast_edit) will append type errors, warnings, and other diagnostics from language servers after edits.
LSP requires a sandbox with a process manager (sandbox.processes) to spawn
language server processes. It works with any sandbox backend (local, E2B, etc.).
Requires optional peer dependencies: vscode-jsonrpc, vscode-languageserver-protocol,
and the relevant language server (e.g. typescript-language-server for TypeScript).
true— Enable with defaultsLSPConfigobject — Enable with custom timeouts/settings
Default
Section titled “Default”undefined (disabled)Inherited from
Section titled “Inherited from”Omit.lsp
mounts?
Section titled “mounts?”
optionalmounts?:Record<string,WorkspaceFilesystem>
Native Mastra filesystems composed beside the Databricks paths.
optionalname?:string
Human-readable name
Inherited from
Section titled “Inherited from”Omit.name
onMount?
Section titled “onMount?”
optionalonMount?:OnMountHook
Hook called before mounting each filesystem into the sandbox.
Return values:
false- Skip mount entirely (don’t mount this filesystem){ success: true }- Hook handled the mount successfully{ success: false, error?: string }- Hook attempted mount but failedundefined/ no return - Use provider’s default mount behavior
This is useful for:
- Skipping specific filesystems (e.g., local filesystems in remote sandbox)
- Custom mount implementations
- Syncing files instead of FUSE mounting
Note: If your hook handles the mount, you’re responsible for the entire implementation. The sandbox provider won’t do any additional tracking.
Examples
Section titled “Examples”Skip local filesystems
const workspace = new Workspace({ sandbox: new E2BSandbox(), mounts: { '/data': new S3Filesystem({ bucket: 'data', ... }), '/local': new LocalFilesystem({ basePath: './data' }), }, onMount: ({ filesystem }) => { if (filesystem.provider === 'local') return false; },});Custom mount implementation
onMount: async ({ filesystem, mountPath, config, sandbox }) => { if (config?.type === 's3') { await sandbox.executeCommand?.('my-s3-mount', [mountPath]); return { success: true }; }}Inherited from
Section titled “Inherited from”Omit.onMount
operationTimeout?
Section titled “operationTimeout?”
optionaloperationTimeout?:number
Timeout for individual operations in milliseconds
Inherited from
Section titled “Inherited from”Omit.operationTimeout
paths?
Section titled “paths?”
optionalpaths?: readonlyDatabricksWorkspacePathValue[]
Databricks paths appended after the defaults. A string is shorthand for
{ path }; a resolver may return either form per request.
pluginContext?
Section titled “pluginContext?”
optionalpluginContext?:PluginContextLike
AppKit plugin context used to discover optional sibling capabilities.
sandbox?
Section titled “sandbox?”
optionalsandbox?:WorkspaceSandboxSelection
Command sandbox. Defaults to Monty. Pass false to disable it, or an
explicit Mastra sandbox/provider resolver for a remote transport.
sandboxCacheKey?
Section titled “sandboxCacheKey?”
optionalsandboxCacheKey?:WorkspaceSandboxCacheKey
Stable cache key for a resolver-backed sandbox, so background-process tools
reach the same sandbox across requests. No effect on a static sandbox.
See WorkspaceSandboxCacheKey.
Inherited from
Section titled “Inherited from”Omit.sandboxCacheKey
searchIndexName?
Section titled “searchIndexName?”
optionalsearchIndexName?:string
Custom index name for the vector store.
If not provided, defaults to a sanitized version of ${id}_search.
Must be a valid SQL identifier for SQL-based stores (PgVector, LibSQL):
- Start with a letter or underscore
- Contain only letters, numbers, or underscores
- Maximum 63 characters
Example
Section titled “Example”'my_workspace_vectors'Inherited from
Section titled “Inherited from”Omit.searchIndexName
skills?
Section titled “skills?”
optionalskills?:SkillsResolver
Native Mastra skill paths or resolver composed with path-declared skills.
skillSource?
Section titled “skillSource?”
optionalskillSource?:SkillSource
Custom SkillSource to use for skill discovery. When provided, this source is used instead of the workspace filesystem or LocalSkillSource.
Use VersionedSkillSource to read skills from the content-addressable blob store,
serving a specific published version without touching the live filesystem.
Example
Section titled “Example”import { VersionedSkillSource } from '@mastra/core/workspace';
const workspace = new Workspace({ skills: ['skills'], skillSource: new VersionedSkillSource(tree, blobStore, versionCreatedAt),});Inherited from
Section titled “Inherited from”Omit.skillSource
tools?
Section titled “tools?”
optionaltools?:WorkspaceToolsConfig
Per-tool configuration for workspace tools. Controls which tools are enabled and their safety settings.
This replaces the provider-level requireApproval and requireReadBeforeWrite
settings, allowing more granular control per tool.
Example
Section titled “Example”tools: { mastra_workspace_read_file: { enabled: true, requireApproval: false, }, mastra_workspace_write_file: { enabled: true, requireApproval: true, requireReadBeforeWrite: true, }, mastra_workspace_execute_command: { enabled: true, requireApproval: true, },}Inherited from
Section titled “Inherited from”Omit.tools
vectorStore?
Section titled “vectorStore?”
optionalvectorStore?:MastraVector<VectorFilter>
Vector store for semantic search. When provided along with embedder, enables vector and hybrid search.
Inherited from
Section titled “Inherited from”Omit.vectorStore