Concept
Episodic Memory
Episodic Memory is the contextual record of ingestion: a chat turn, a document, a tool trace, or an event. It is the raw material MemLab extracts into facts, entities, and relations. Episodes are stored verbatim so extraction and provenance always trace back to a source.
Ingesting an episode
POST raw content to /v1/episodic-memories with an episodic_memory_type (MESSAGE, TEXT, DOCUMENT, JSON, IMAGE, or TOOL_TRACE). MemLab persists the content and returns an episode id immediately.
Extraction is asynchronous
After a write, MemLab queues the episode for extraction. The episode carries an extraction_status you can poll at /v1/episodic-memories/{id}/status; when it completes, the resulting Semantic Memories link back to the source episode.
Provenance
Every Semantic Memory keeps a reference to the Episodic Memory it came from, so you can always answer "why does MemLab believe this?".