Skip to content

agentKnowledgeVSEmbeddings with Weaviate fails in 3.1.0 — TypeError: Cannot read properties of undefined (reading 'get') #5991

@bengoetzinger

Description

@bengoetzinger

Describe the bug

When using Weaviate as a knowledge base via agentKnowledgeVSEmbeddings in an AgentFlow V2 Agent node, every prediction fails with:

Error in Agent node: Error in similaritySearch
TypeError: Cannot read properties of undefined (reading 'get')
    at WeaviateStore.similaritySearchVectorWithScoreAndEmbedding (vectorstores.cjs:263:10)

flowise-components Weaviate.js initializes the Weaviate client using weaviate-ts-client v1.6.0 (v2 API):

const client = weaviate_ts_client_1.default.client({ scheme, host });
This v2 client does not have a collections property. However, @langchain/weaviate was upgraded to 1.0.1 in 3.1.0, which requires the v3 client and calls:

const collection = this.client.collections.get(this.indexName); // ← undefined.get()
The standalone Weaviate vector store node is unaffected — only agentKnowledgeVSEmbeddings in the Agent node triggers this path.

To Reproduce

  1. Create an AgentFlow V2 chatflow with an Agent node
  2. Add a self-hosted Weaviate knowledge base via agentKnowledgeVSEmbeddings
  3. Send any message
  4. Observe the error in worker logs:

Error invoking tool: Error: Error in similaritySearch TypeError: Cannot read properties of undefined (reading 'get') at WeaviateStore.similaritySearchVectorWithScoreAndEmbedding (.../vectorstores.cjs:263:10)

Expected behavior

The Agent node successfully queries Weaviate via agentKnowledgeVSEmbeddings and returns relevant documents.

Screenshots

No response

Flow

No response

Use Method

Docker

Flowise Version

3.1.0

Operating System

Linux

Browser

Chrome

Additional context

Versions confirmed:

Package Version
flowise 3.1.0
weaviate-ts-client (used by Weaviate.js) 1.6.0 (v2 API)
@langchain/weaviate 1.0.1 (expects v3 client)
weaviate-client 3.12.0 (v3, present but unused by Weaviate.js)

Suggested fix:

  • Update Weaviate.js in flowise-components to use weaviate-client v3 (connectToCustom) instead of weaviate-ts-client v1.6.0
  • Or pin @langchain/weaviate back to a version compatible with the v2 client until Weaviate.js is migrated

Workaround: Downgrade to Flowise 3.0.13.

Bug report generated with Claude Sonnet 4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions