Repository navigation
[FEATURE] Workspace search: vector and hybrid search without a client-side embedder #27021
Description
Problem Statement
Workspace vector and hybrid search require an embedder, even when the vector store generates embeddings itself. With MongoDBVector configured for Automated Embedding and no embedder, new Workspace(...) throws "vectorStore requires an embedder".
#25009 and #27002 made semantic recall and Observational Memory work with such stores. Workspace search still embeds every indexed file and every search query on the client.
Proposed Solution
Use the isSelfEmbedding flag from #25009 for Workspace search too:
const workspace = new Workspace({
filesystem: new LocalFilesystem({ basePath: './workspace' }),
vectorStore: new MongoDBVector({ id: 'search', uri, dbName, autoEmbed: { model: 'voyage-4' } }),
})
await workspace.search('how do I reset a password?')- The config check accepts a store that embeds itself without an
embedder. - Files are indexed as text and queries are sent as text. Writes are grouped, up to 100 documents per upsert.
- The index defaults to
<workspace id>_search_selfembedso it can't collide with an index holding client-supplied vectors.searchIndexNamestill overrides it. - Vector mode, hybrid mode and the agent's search tool all work.
- Setups with an
embedderare unchanged.
No store changes are needed; MongoDBVector already supports all of this.
Component
Other: @mastra/core (workspace search)
Alternatives Considered
Keep requiring an embedder for Workspace search. That works, but it means an embedding provider and a second API key for users whose MongoDB already generates the embeddings.
Example Use Case
As a developer using MongoDB with Automated Embedding, I want Workspace search to use the same server-side embeddings as the rest of my setup, without adding an embedding provider just for this feature.
Additional Context
- Follows up on feat(memory): semantic recall without a client-side embedder #25009 and [FEATURE] Observational Memory: semantic search without a client-side embedder #27002.
- Out of scope: stored-workspace configuration through the REST API and editor, RAG tools, GraphRAG, and the experimental Subconscious knowledge memory.
- I have an implementation, including docs, and will open a draft PR once this is triaged.
- The live test is opt-in because it needs a cluster with Automated Embedding and bills embedding usage. The rest is covered by unit tests with a mocked store.
Verification
- I have searched the existing issues to make sure this is not a duplicate
- I have provided sufficient context for the team to understand the request
Activity
dane-ai-mastra commentedon Oct 14, 2026
Thank you for opening this issue. It is waiting for maintainer triage or approval.
Please wait until maintainers remove the triage or approval label before opening a pull request.
[-]Workspace search: vector and hybrid search without a client-side embedder, for stores that embed server-side[/-][+][FEATURE ]Workspace search: vector and hybrid search without a client-side embedder[/+]mastra-platform commentedon Oct 14, 2026
<id>_search_selfembeddefault index name; the author already has a draft implementationUnderstanding
packages/core/src/workspace/workspace.ts:702throwsvectorStore requires an embedder(INVALID_SEARCH_CONFIG) whenever a vector store is configured without an embedder.isSelfEmbeddingcapability already exists inpackages/core/src/vector/vector.ts(feat(memory): semantic recall without a client-side embedder #25009). Memory semantic recall (packages/core/src/memory/memory.ts,processors/memory/semantic-recall.ts) and Observational Memory ([FEATURE] Observational Memory: semantic search without a client-side embedder #27002) already use it.MongoDBVectoralready supports it (stores/mongodb/src/vector/index.ts).isSelfEmbeddingis true, send documents and queries as text, batch upserts, and use a separate default index so it can't mix with an index of client-supplied vectors. Setups with an embedder stay unchanged.embedder.Assumptions
Open questions
_search_selfembedsuffix) and the batch size of 100 be adopted as proposed?Reproduction
Not applicable (feature request). The failing check was confirmed by reading the code at
workspace.ts:702.[-][FEATURE ]Workspace search: vector and hybrid search without a client-side embedder[/-][+][FEATURE] Workspace search: vector and hybrid search without a client-side embedder[/+]