Skip to main content

cognee.memify()

Description

Enrichment pipeline in Cognee, can work with already built graphs. If no data is provided existing knowledge graph will be used as data, custom data can also be provided instead which can be processed with provided extraction and enrichment tasks. Provided tasks and data will be arranged to run the Cognee pipeline and execute graph enrichment/creation. This is the core processing step in Cognee that converts raw text and documents into an intelligent knowledge graph. It analyzes content, extracts entities and relationships, and creates semantic connections for enhanced search and reasoning. Args: extraction_tasks: List of Cognee Tasks to execute for graph/data extraction. enrichment_tasks: List of Cognee Tasks to handle enrichment of provided graph/data from extraction 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

Union[List[Task], List[str]]
default:"None"
List of Task objects or task names for graph/data extraction.
Union[List[Task], List[str]]
default:"None"
List of Task objects or task names for graph enrichment.
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.

How memify() differs from cognify()

Examples

See the Memify pipeline guides for lower-level enrichment walkthroughs, or the Self-Improvement Quickstart for the v1.0 user-facing flow.