pub struct RawDocument {Show 24 fields
pub source: String,
pub source_id: String,
pub title: String,
pub summary: Option<String>,
pub content: String,
pub url: Option<String>,
pub last_modified: i64,
pub metadata: HashMap<String, String>,
pub memory_type: Option<String>,
pub domain: Option<String>,
pub source_agent: Option<String>,
pub confidence: Option<f32>,
pub confirmed: Option<bool>,
pub stability: Option<String>,
pub supersedes: Option<String>,
pub pending_revision: bool,
pub entity_id: Option<String>,
pub quality: Option<String>,
pub is_recap: bool,
pub enrichment_status: String,
pub supersede_mode: String,
pub structured_fields: Option<String>,
pub retrieval_cue: Option<String>,
pub source_text: Option<String>,
}Expand description
A raw document fetched from any source, ready for chunking and embedding.
Fields§
§source: StringSource identifier (“gmail”, “notion”, “local_files”, etc.)
source_id: StringUnique ID within the source (message ID, page ID, file path)
title: StringDocument title (filename, subject line, page title)
summary: Option<String>LLM-generated summary (stored separately from chunk content)
content: StringPlain text content
url: Option<String>Deep link back to the source (URL, file path)
last_modified: i64Unix timestamp of last modification
metadata: HashMap<String, String>Additional metadata
memory_type: Option<String>Memory category: “preference”, “decision”, “fact”, “goal”, “relationship”
domain: Option<String>Domain context: “work”, “personal”, “health”, or “project:
source_agent: Option<String>Which AI agent stored this memory (e.g. “claude-code”, “chatgpt”)
confidence: Option<f32>Confidence score (0.0-1.0) assigned by the storing agent
confirmed: Option<bool>Whether a human has confirmed this memory
stability: Option<String>Stability tier: “new”, “learned”, or “confirmed”
supersedes: Option<String>source_id of the memory this entry supersedes (version chain)
pending_revision: boolWhether this is a pending revision awaiting human approval (Protected tier supersede)
entity_id: Option<String>Link to a knowledge graph entity (nullable, cascade handled manually)
quality: Option<String>Quality assessment: “low”, “medium”, “high” (NULL = unassessed)
is_recap: boolWhether this memory is a recap/summary of other memories
enrichment_status: StringDeprecated: enrichment status is now derived from the enrichment_steps table.
This field is ignored on INSERT. Kept for API compatibility with downstream consumers.
supersede_mode: StringHow superseded content is handled: “hide” (default) or “archive” (visible but muted)
structured_fields: Option<String>JSON object with type-specific structured fields (e.g. {“claim”: “…”, “context”: “…”})
retrieval_cue: Option<String>LLM-generated question this memory answers – embedded for vector search
source_text: Option<String>Original prose content, preserved when structured_fields are promoted to primary content
Trait Implementations§
Source§impl Clone for RawDocument
impl Clone for RawDocument
Source§fn clone(&self) -> RawDocument
fn clone(&self) -> RawDocument
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more