Skip to main content

Module models

Module models 

Source
Expand description

Core data models.

Modules§

has_datapoint
The HasDataPoint trait used by the provenance-stamping algorithm in cognee-core::provenance.
memory
Memory entry types for typed remember() dispatch. Discriminated-union memory entries for remember() typed dispatch.
permission
Permission helpers.
temporal_event
Temporal event and timestamp types for the cognify pipeline.

Structs§

BackendConfig
Configuration for dynamically selecting/creating a backend.
BackendOverrides
Per-call backend configuration overrides.
CognifyInterval
A time range stored as a graph node of type “Interval”. Mirrors Python: cognee.modules.engine.models.Interval Field names time_from / time_to match Python exactly.
CognifyTimestamp
A point in time extracted from text during temporal cognify. Mirrors Python: cognee.modules.engine.models.Timestamp time_at stores milliseconds since Unix epoch (UTC) — same unit as Python.
Data
Represents a piece of data in the system, such as a file or a text. Fields match the Python cognee data table schema for cross-SDK compatibility.
DataPoint
Base model for all storage-layer entities.
Dataset
Document
A classified document derived from a Data item.
DocumentChunk
A chunk of text extracted from a document during the cognify pipeline.
EdgeMetadata
Edge metadata for relationships between DataPoints.
EdgeType
Storage-layer edge type model.
Embedding
Embedding vector for a data point field.
Entity
Storage-layer entity model.
EntityType
Storage-layer entity type model.
EventAttribute
An entity related to an event, extracted during temporal entity enrichment.
FeedbackEntry
Feedback attached to an existing QA entry.
QAEntry
A Q&A turn stored in the session cache.
RawExtractedTimestamp
LLM output schema for a timestamp. Mirrors Python task model Timestamp. All fields except year default to 1/0; the extractor computes time_at.
TemporalEvent
An event extracted from text, optionally anchored to a point or range in time. Mirrors Python: cognee.modules.engine.models.Event
TraceEntry
One step of an agent trace.
Triplet
A triplet representing a semantic relationship between two entities.
User
A registered user. Corresponds to Python cognee.modules.users.models.User.

Enums§

DataInput
MemoryEntry
Tagged union of typed memory payloads dispatched by remember_entry().

Traits§

HasDataPoint
Read / write access to the embedded DataPoint of a typed container, plus a hook to recurse into nested DataPoint-bearing children.

Functions§

classify_documents
Classify Data items into Documents based on file extension.
doc_type_for_extension
Map a file extension to a document type string, returning None for unrecognised extensions.
to_cognify_timestamp
Convert a raw LLM-extracted timestamp to a CognifyTimestamp with computed time_at. Returns None if the date is invalid (e.g. month=13).