Recall
Recall information from the knowledge graph.
This is a memory-oriented alias for the search endpoint. All search types and options from v1 are supported.
Request Parameters
Field names are shown camelCased in the schema (e.g. searchType, datasetIds, topK); both camelCase and snake_case are accepted.
- search_type (Optional[SearchType]): Type of search to perform (default: GRAPH_COMPLETION). Pass null to enable automatic query routing.
- datasets (Optional[List[str]]): Dataset names to search within
- dataset_ids (Optional[List[UUID]]): Dataset UUIDs to search within; take precedence over dataset names when both are provided
- query (str): The search query string
- system_prompt (Optional[str]): System prompt for completion searches
- node_name (Optional[List[str]]): Filter to specific node sets
- top_k (Optional[int]): Maximum results (default: 15)
- only_context (bool): Return only the LLM context
- verbose (bool): Verbose output
- include_references (bool): Include source/provenance references in completion results (default: true)
- session_id (Optional[str]): Session whose cached QA and trace entries should be searched
- scope (Optional[str | List[str]]): Memory sources to include: “graph”, “session”, “trace”, “session_context”, “all”, “auto”, or a list of these (default: “auto” — session first when session_id is set, else graph)
Error Codes
- 402/403/404/409/422: Cognee errors (payment required, permission denied, missing user, session-dataset conflict, prerequisites not met) return their own status code and message via the global error handler
- 409 Conflict: Unexpected non-Cognee error during recall
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Search strategy, e.g. GRAPH_COMPLETION, RAG_COMPLETION, CHUNKS, SUMMARIES. Pass null to let cognee auto-route the query to the best strategy.
SUMMARIES, CHUNKS, RAG_COMPLETION, HYBRID_COMPLETION, TRIPLET_COMPLETION, GRAPH_COMPLETION, GRAPH_COMPLETION_DECOMPOSITION, GRAPH_SUMMARY_COMPLETION, CYPHER, NATURAL_LANGUAGE, GRAPH_COMPLETION_COT, GRAPH_COMPLETION_CONTEXT_EXTENSION, FEELING_LUCKY, TEMPORAL, CODING_RULES, CHUNKS_LEXICAL, AGENTIC_COMPLETION, CODE Dataset names to search within. Omit (null) to search all datasets you have read access to.
Dataset UUIDs to search within; takes precedence over 'datasets' names when both are provided. Leave empty to resolve by name.
null
Restrict results to these node sets (the node_set values passed to /v1/add or /v1/remember). Omit to search all nodes.
null
Include source/provenance references in completion results.
Session whose cached QA and trace entries should be searched. With search_type null and no datasets, session hits short-circuit the graph search.
null
Which memory sources to include: 'graph', 'session', 'trace', 'session_context', 'all', 'auto', or a list of these. Defaults to 'auto' (session first when session_id is set, else graph).
null
Profile to render for the 'session_context' scope: 'qa' (conversational) or 'agent' (tool/workflow). Ignored by other scopes.
Response
Successful Response
- ResponseQAEntry
- ResponseAgentTraceEntry
- ResponseSessionContextEntry
- ResponseGraphEntry
"session"