Skip to main content
plyra-memory organises storage into three cognitive layers. Each serves a different purpose and uses different retrieval mechanics.

Working memory

The current session scratchpad. Entries live in-memory and are written to SQLite for durability. Fast writes, no vector indexing overhead.
Working memory is flushed to episodic at session end:

Episodic memory

The event timeline. Every working memory entry becomes an episodic record when flushed. Stored in SQLite with a ChromaDB vector index for semantic search. Episodic records carry:
  • content — the original text
  • agent_id — which agent stored it
  • session_id — which session it came from
  • timestamp — when it was stored
  • importance — float score (0.0–1.0), influences retrieval ranking
Learn explicit facts directly into episodic:

Semantic memory

The knowledge graph. Facts stored as subject–predicate–object triples. Deduplicated automatically — storing the same fact twice has no effect.

FactRelation values

Layer storage

Default paths

Override via env vars