monemie113-cell /CogniMem

Zero-LLM cognitive memory architecture for AI agents

★ 96⑂ 0👁 0▤ 0
PythonCreated 2026-09-15
+0
Daily
+0
Weekly
-6
Monthly
96
stars
0
forks
0
watchers
–
prs
–
issues
0
releases

README

CogniMem

A human-cognition-inspired, zero-LLM-dependency memory and retrieval architecture for AI agents

CogniMem is an innovative AI memory system that does not rely on any large language model. By simulating the brain's "associative thinking" and "hierarchical memory" mechanisms, it achieves 84.2% keyword hit rate and 26.4% exact match hit rate on the LoCoMo long-term dialogue benchmark, surpassing all publicly available zero-LLM solutions and approaching the performance of production systems that rely on GPT-4-level models.

English | 中文

------

 📖 Table of Contents

- Core Features
- Architecture Overview
- Core Innovations
- Benchmark Results
- Quick Start
- Project Structure
- Key Module Details
- Comparison with Competitors
- Design Philosophy
- Known Limitations
- Roadmap
- Contributing

------

 ✨ Core Features

- 🧠 Zero LLM Dependency: All retrieval and reasoning are pure statistical algorithms + rule-based systems, with no large model involvement
- 🔗 Associative Thinking Architecture: Stores structured entity-relation-entity triples instead of raw text
- 📊 IDF-Weighted Retrieval: Automatically identifies rare vs. frequent words and dynamically adjusts retrieval weights
- ⏰ Temporal Normalization: Automatically converts relative time expressions like "yesterday", "last week" into absolute dates
- 🕸️ Spreading Activation: Starting from seed entities, associates indirectly related memories along the graph structure
- 📐 Three-Layer Triples: Event layer (raw evidence) + Knowledge layer (graph relations) + Temporal layer (absolute dates)
- 🌱 Curiosity-Driven: Actively identifies knowledge gaps and generates exploratory questions
- 💾 Local Persistence: Based on SQLite, zero external dependencies, fully offline capable
- 🔬 Reproducible Benchmarks: All performance data can be reproduced via open-source scripts

------

 🏗️ Architecture Overview

CogniMem is built on a four-layer cognitive pipeline, backed by three persistent memory stores and a six-path hybrid retrieval system.

 Part 1 · Data Write Path

text
┌─────────────────────────────────────────────────────────────┐
│                        User Input                           │
└──────────────────────────────┬──────────────────────────────┘
                               ▼
┌─────────────────────────────────────────────────────────────┐
│  Layer 1 · Perception & Input Gate                          │
│  ├─ 6-dim scoring: importance / confidence / priority /     │
│  │                 timeliness / contradiction / relevance    │
│  └─ Filters noise; drops input below threshold              │
└──────────────────────────────┬──────────────────────────────┘
                               ▼
┌─────────────────────────────────────────────────────────────┐
│  Layer 2 · Engram Knowledge Lookup  (O(1) cache)            │
│  └─ Hash key-value cache; repeated queries return instantly │
└──────────────────────────────┬──────────────────────────────┘
                               ▼
┌────────────────

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON