Search → Search
AI-generatedOverview
This node integrates with the Cognee memory engine to perform a search query on one or more datasets stored in Cognee. It allows users to specify the type of search algorithm to use, the datasets to query, the textual query itself, and how many top results to retrieve.
Typical use cases include:
- Retrieving relevant knowledge graph information from Cognee based on a natural language query.
- Searching multiple datasets simultaneously to gather comprehensive context.
- Using different search strategies (GraphCompletion, ChainOfThought, RagCompletion) depending on the desired reasoning or retrieval style.
For example, a user might want to query a customer support knowledge base stored in Cognee to find answers related to a specific product issue, or search across multiple project documentation datasets to gather insights for decision-making.
Properties
| Name | Meaning |
|---|---|
| Search Type | Selection of search types to query the Cognee memory engine. Options: GraphCompletion, ChainOfThought, RagCompletion |
| Datasets | One or more Cognee dataset names to search within. |
| Query | The text query string to search for in the specified datasets. |
| Top K | Number of top elements to retrieve during context creation (default is 10). |
Output
The node outputs JSON data containing the search results returned by the Cognee memory engine. This typically includes the most relevant elements or knowledge graph nodes matching the query according to the selected search type and datasets.
If the node supports binary data output, it would represent any associated files or attachments retrieved during the search, but this node primarily deals with JSON structured search results.
Dependencies
- Requires an API key credential for authenticating requests to the Cognee service.
- Needs the base URL of the Cognee API configured in the node credentials.
- The node sends POST requests to the
/api/searchendpoint of the Cognee API.
Troubleshooting
- Missing or invalid API key: Ensure that the API key credential is correctly set up and has sufficient permissions.
- Empty or invalid datasets list: The
Datasetsproperty must contain at least one valid dataset name; otherwise, the search will fail. - Invalid query string: The
Queryproperty cannot be empty; provide a meaningful search string. - Unexpected response format: If the Cognee API changes its response structure, the node may not parse results correctly.
- Network issues: Verify connectivity to the Cognee API base URL and that no firewall or proxy blocks the requests.
Common error messages usually relate to authentication failures, missing required parameters, or server errors from the Cognee API. Checking the node's execution logs and the API response body can help diagnose these issues.
Links and References
- Cognee API Documentation (example placeholder link)
- n8n Documentation on Creating Custom Nodes