cognee.recall()
Description
recall() is the main retrieval entry point in Cognee v1.0.
- It auto-routes queries by default when you do not specify
query_type. - It can search the permanent graph, session memory, or both.
- It returns
RecallResponseitems sourced from graph retrieval, session retrieval, or both depending on the request.
Parameters
Natural-language query to run against memory.
Forces a specific retrieval strategy instead of using auto-routing.
Restricts graph retrieval to the named datasets. Dataset names are resolved only against datasets owned by the current user.
Restricts graph retrieval by dataset UUIDs instead of names. Use this for shared datasets that the current user can access but did not create. When provided, this takes precedence over
datasets and the name-to-UUID lookup is skipped.Maximum number of results to return.
When
True, Cognee chooses a retrieval strategy automatically if query_type is not set.Controls whether retrieval uses
session, graph, or the default automatic combination logic.Additional keyword options
| Option | Type | What it does |
|---|---|---|
system_prompt | str | Overrides the system prompt used for completion-style answers. |
system_prompt_path | str | Loads the system prompt from a file path. |
node_name | list[str] | Restricts retrieval to matching node names or node sets. |
node_name_filter_operator | str | Controls how node_name filters are combined. |
only_context | bool | Returns retrieved context without generating the final LLM answer. |
session_id | str | Enables session-aware retrieval and session-cache lookup. |
wide_search_top_k | int | Expands the candidate set used before final ranking in graph retrieval. |
triplet_distance_penalty | float | Adjusts ranking for triplet-based retrieval paths. |
feedback_influence | float | Applies stored feedback weights during ranking where supported. |
verbose | bool | Returns additional retrieval details from lower-level search flows. |
retriever_specific_config | dict | Passes advanced configuration directly to the selected retriever. |
user | object | Runs retrieval under a specific user context. |
Return value
recall() returns a list of RecallResponse items. Depending on the request, results may come from session memory, permanent graph retrieval, or both.
For the full breakdown of session-hit shapes, graph-backed wrappers, and per-search-type payloads, see Recall — What recall returns.