7-Layer Memory Model
Just like human biological cognition, artificial agents require layered memory tiers that balance immediate working context against long-term procedural workflows and immutable facts.
The 7 Cognitive Memory Tiers
Memron organises agent knowledge into seven structured layers:
| Layer | Name | Storage & Lifecycle | Typical Content |
|---|---|---|---|
Layer 1 | Working Memory | In-memory ephemeral / session cache | Current prompt state, active files, temporary scratchpad |
Layer 2 | Episodic Memory | PostgreSQL episodes table | Past conversation turns, user intents, task attempts |
Layer 3 | Semantic Memory | pgvector embeddings + graph_nodes | Distilled atomic facts, user coding standards, invariants |
Layer 4 | Procedural Memory | success_recipes table | Reusable how-to playbooks, debugging recipes, build steps |
Layer 5 | Evaluative Memory | run_traces & hallucination flags | Failure cases, anti-patterns, contradiction detection |
Layer 6 | Social Memory | trust_registry & shared buckets | Cross-agent transferable context, team guidelines |
Layer 7 | Archive Memory | Sovereign encrypted forensic snapshots | Raw immutable conversation audit trail |
Context Compression via 3-Token Pointers
Instead of injecting full raw conversation histories into agent system prompts, Memron replaces dense context with lightweight pointers (e.g., ^ptr_82a1f). When the agent specifically requires the underlying data during reasoning, it calls memory_recall or includes the pre-compiled anti-hallucination packet.
Token Economics