Skip to content

[FEATURE] Workspace search: vector and hybrid search without a client-side embedder #27021

Description

@tadjik1

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_selfembed so it can't collide with an index holding client-supplied vectors. searchIndexName still overrides it.
  • Vector mode, hybrid mode and the agent's search tool all work.
  • Setups with an embedder are 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

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

  1. dane-ai-mastra commented on Oct 14, 2026

    @dane-ai-mastra
    Contributor

    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.

  2. changed the title [-]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[/+] on Oct 14, 2026
  3. mastra-platform commented on Oct 14, 2026

    @mastra-platform
    Contributor

    Opened by @factory-dev: shipyard

    Type feature request — Workspace vector/hybrid search should support self-embedding vector stores without a client embedder
    Route Await approval
    Severity 🟢 low — enhancement; existing embedder-based setups work
    Confidence high — gap confirmed in code
    Effort medium — config validation, indexing and query paths in workspace search plus tests and docs
    Impact medium — removes the need for a second embedding provider for MongoDB Automated Embedding users
    Next step Maintainer to approve the scope, including the <id>_search_selfembed default index name; the author already has a draft implementation

    Understanding

    • packages/core/src/workspace/workspace.ts:702 throws vectorStore requires an embedder (INVALID_SEARCH_CONFIG) whenever a vector store is configured without an embedder.
    • The isSelfEmbedding capability already exists in packages/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. MongoDBVector already supports it (stores/mongodb/src/vector/index.ts).
    • Suggested direction: reuse the same pattern in Workspace search. Relax the config check when isSelfEmbedding is 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.
    • Workaround: configure a client-side embedder.

    Assumptions

    • I'm treating this as a feature request, not a bug. Requiring an embedder is the documented behavior today.
    • The proposed out-of-scope items (REST/editor stored workspaces, RAG tools, GraphRAG) are acceptable to leave out.

    Open questions

    • Should the default index naming (_search_selfembed suffix) 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.

  4. changed the title [-][FEATURE ]Workspace search: vector and hybrid search without a client-side embedder[/-] [+][FEATURE] Workspace search: vector and hybrid search without a client-side embedder[/+] on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions