Skip to main content
Version: 0.0.5 (stable)

agrag.common.data_models

Shared data models used by agrag components.

Modules:

  • candidate – Candidate items rejected by the extraction schema.
  • candidate_review – Models for candidate review and schema patches.
  • chunk – The Chunk model: one retrieval-sized piece of a Document.
  • community – The Community model: a Leiden-detected entity cluster with an LLM report.
  • cutover_job – Names and lifecycle states of the Cutover Job node.
  • data_point – The base class for a graph node.
  • default_schema – The default schema: nine entity types and eight typed relations.
  • document – The Document model: one unit of source text, before chunking.
  • dropped – Counts of items discarded during extraction or merge.
  • entity – A permanent mention-level graph node, accumulated by exact-name matching.
  • extraction – Pre-resolution entity and relation mentions produced by an Extractor.
  • graph_record – Graph storage record shapes for GraphStore.
  • graph_schema – The GraphSchema contract: entity and relation types extraction validates against.
  • normalization – The Normalization model: how a loader turned source bytes into text.
  • presets – Preset schema fragments that add entity types to a base schema.
  • provenance – Provenance types for a chunk.
  • query_value – A result row returned by a direct graph query.
  • relation – The canonical, deduped graph relationship that merge mechanics produces.
  • resolved_entity – Identity clusters for non-destructive entity resolution.
  • search_result – One retrieved item, tagged with source and relevance score.
  • stage_failure – Per-stage failure record and its per-call cap.
  • structure – Stable keys, node ids, reading order and ancestry for the sections of a Document.
  • update_decision – Outcomes for updating a stored document.
  • vector_record – Vector storage record shapes shared by VectorStore and GraphStore.

Classes:

  • Cardinality – Declared limits on distinct endpoints of one relation, across its patterns.
  • Chunk – One retrieval-sized piece of a Document.
  • Community – A cluster of entities detected by hierarchical Leiden, with an LLM report.
  • Distance – A distance metric a vector index compares embeddings with.
  • Document – One unit of source text, before chunking.
  • DocumentFamily – The shape of a document's source.
  • DocumentSection – One heading of a document and the content directly under it.
  • Entity – A permanent mention-level node, never destroyed once written.
  • EntityType – One kind of entity a schema recognizes.
  • GraphSchema – A versioned contract of entity and relation types.
  • NodeRecord – One graph node, ready to write.
  • Normalization – How a loader turned source bytes into Document.text.
  • PageProvenance – The location of a chunk across one or more pages.
  • Preset – A curated set of entity types to add to a base schema.
  • PropertySpec – The declaration of one property on an entity type.
  • Relation – A resolved relationship between two Entity nodes.
  • RelationRecord – One graph relationship, ready to write.
  • RelationType – One kind of relation a schema recognizes.
  • ResolvedEntity – A cluster of entities that refer to the same thing.
  • SearchResult – One retrieved item, tagged with where it came from.
  • SourceFormat – A source format that a loader can read.
  • TextProvenance – The location of a chunk inside flattened document text.
  • Unit – One piece of content in a section, such as a paragraph or a table.
  • UnitKind – The kind of content in a unit.
  • VectorRecord – One vector and its payload, ready to write to a collection or index.

Attributes: