cognee.memify()
Description
Runs the given extraction and enrichment tasks over a dataset. If no data is provided, the existing knowledge graph (filtered bynode_type/node_name) is passed to the first task; custom data can be provided instead.
Args:
extraction_tasks: List of Cognee Tasks to execute for graph/data extraction.
Entries may be Task instances or names of built-in memify tasks
(see Supported task names below).
enrichment_tasks: List of Cognee Tasks to handle enrichment of provided graph/data from extraction tasks.
Entries may be Task instances or names of built-in memify tasks.
data: The data to ingest. Can be anything when custom extraction and enrichment tasks are used.
Data provided here will be forwarded to the first extraction task in the pipeline as input.
If no data is provided the whole graph (or subgraph if node_name/node_type is specified) will be forwarded
dataset: Dataset name or dataset uuid to process.
user: User context for authentication and data access. Uses default if None.
node_type: Filter graph to specific entity types (for advanced filtering). Used when no data is provided.
node_name: Filter graph to specific named entities (for targeted search). Used when no data is provided.
vector_db_config: Custom vector database configuration for embeddings storage.
graph_db_config: Custom graph database configuration for relationship storage.
run_in_background: If True, starts processing asynchronously and returns immediately.
If False, waits for completion before returning.
Background mode recommended for large datasets (>100MB).
Use pipeline_run_id from return value to monitor progress.
Parameters
Optional[Sequence[Union[Task, str]]]
default:"None"
Task objects and/or supported task names for graph/data extraction. The two forms can be mixed in one list.
Optional[Sequence[Union[Task, str]]]
default:"None"
Task objects and/or supported task names for graph enrichment. The two forms can be mixed in one list.
Optional[Any]
default:"None"
Data to ingest. If not provided, operates on existing knowledge graph.
Union[str, UUID]
default:"'main_dataset'"
Dataset name or UUID to operate on.
User
default:"None"
User performing the operation.
Optional[Type]
default:"NodeSet"
Filter to specific entity types in the graph.
Optional[List[str]]
default:"None"
Filter to specific named entities.
Optional[dict]
default:"None"
Override vector database configuration.
Optional[dict]
default:"None"
Override graph database configuration.
bool
default:"False"
If true, return immediately and process in background.
Supported task names
extraction_tasks and enrichment_tasks accept Task instances, task names as plain strings, or a mix of both in the same list. Names are resolved against a curated registry that only exposes tasks runnable without required keyword arguments. Every call builds a fresh Task instance per name, so resolved tasks are never shared between runs.
The registry is shared by both parameters. These names are typically used for extraction:
And these for enrichment:
extract_code_docs reads the code graph itself, so a call that names only it as extraction task and passes no data skips projecting the graph. Pair it with ["add_data_points", "add_code_doc_edges"] (embed-only) or ["cognify_code_doc_chunks", "add_data_points", "add_code_doc_edges"] (with LLM entity extraction). This is the same pipeline as cognify_code_docs_pipeline(); see Store Docstrings as Searchable Memory.
get_triplet_datapoints was removed together with triplet embeddings and is rejected (see Invalid task names).
Each name is constructed with the same defaults the dedicated memify pipelines use, shown in parentheses above. To use different arguments, pass a Task instance instead of a name.
Tasks that require call-specific parameters are not in the registry and stay SDK-only. For example,
extract_feedback_qas requires session_ids, so it must be passed as Task(extract_feedback_qas, session_ids=[...]) rather than by name.Invalid task names
Names are resolved before any setup or database work happens, so a bad name fails fast without starting a pipeline run.- Python SDK — an unknown name, the removed name
get_triplet_datapoints, or an entry that is neither aTasknor astr, raisesCogneeValidationError. The message for an unknown name lists every supported name. - REST (
POST /api/v1/memify) — the same condition returns 422 Unprocessable Content; for an unknown name, the error body lists the supported names. Previously any non-empty task-name list failed with a 500.