ὕλη (hylē): matter, the raw stuff from which form emerges. In Aristotle's hylomorphism, every entity is hyle (matter) + morphe (form). Hyle stores your memories as raw matter; the index is the form that makes them retrievable.
Most AI memory systems face a fundamental tradeoff: compress memories into knowledge graphs (like Cognee) and lose the original nuance, or store raw text and struggle with retrieval.
Hyle resolves this with the Library Model:
| Layer | Analogy | Implementation | Purpose |
|---|---|---|---|
| Hyle (原文层) | Books on shelves | Raw text in SQLite | Zero-loss storage |
| Morphe (索引层) | Card catalog | Sparse index nodes with metadata | Fast structured lookup |
| Syndesmos (关联层) | Cross-references | Lightweight link graph | Chain recall via connections |
| Noesis (语义层) | The librarian's intuition | Embedding vectors | Semantic similarity search |
Graph-based memory systems (e.g., Cognee) construct knowledge graphs by extracting entities via LLM. This introduces a critical problem: LLM common-sense nodes are noise in memory.
When building a knowledge graph from "I discussed PostgreSQL migration with Alice yesterday", the LLM creates nodes like:
PostgreSQL→is a→relational databaseAlice→is a→human name
These are common knowledge — the LLM already knows them. In a memory system, they're pure noise that:
- Dilutes unique user-specific information
- Creates high-degree "black hole" nodes in graph traversal
- Wastes 300-700 nodes/day of storage and processing
Hyle avoids this by never extracting entities for storage. Instead, we store original text and create sparse index entries that point back to the source. The LLM's knowledge stays in the LLM; only novel, user-specific information gets persisted.
┌─────────────────────────────────────────────┐
│ Noesis Layer │
│ (Embedding-based Semantic Match) │
│ Replaces TF-IDF with real vectors │
├─────────────────────────────────────────────┤
│ Syndesmos Layer │
│ (Lightweight Link Graph) │
│ Chain recall: A→B→C via links │
├─────────────────────────────────────────────┤
│ Morphe Layer │
│ (Sparse Index Nodes) │
│ Metadata: time, person, topic, etc. │
├─────────────────────────────────────────────┤
│ Hyle Layer │
│ (Raw Text Storage) │
│ Zero-loss, always complete │
└─────────────────────────────────────────────┘
- Store originals, not abstractions — The LLM already knows common knowledge; only user-specific information is worth persisting
- Index nodes are pointers, not content — A Morphe node doesn't contain the memory; it points to the Hyle record
- Links are sparse and intentional — Unlike knowledge graphs that auto-extract every relation, links are created only when semantically meaningful
- Embedding replaces TF-IDF — The one gap in NOESIS-II; Hyle uses proper vector embeddings for semantic matching
- Novelty detection with knowledge boundary — Distinguishes "new to this user" from "new to the LLM"
from hyle import HyleMemory
mem = HyleMemory(db_path="~/.hyle/memories.db")
# Store a memory
mem.store("Discussed PostgreSQL migration plan with Alice. She suggested using pg_dump with --jobs=4 for parallel export.")
# Recall by meaning
results = mem.recall("database migration discussion")
# Recall by connection chain
results = mem.recall_chain("PostgreSQL", max_hops=3)
# Time-bounded recall
results = mem.recall("migration", time_range=("2025-06-20", "2025-06-25"))| Feature | Hyle | Cognee | mem0 | MemGPT |
|---|---|---|---|---|
| Storage | Raw text (zero-loss) | Knowledge graph (lossy) | Key-value pairs | Message history |
| Retrieval | 4-layer (text→index→link→embedding) | 14 graph modes | Semantic search | Recency + relevance |
| Knowledge pollution | None (no entity extraction) | Severe (LLM common-sense nodes) | Minimal | N/A |
| Novelty detection | Knowledge boundary filter | None | None | None |
| Embedding-based | Yes (Noesis layer) | Yes | Yes | Limited |
| Memory-specific | Episodic memory focus | Knowledge management | Preference memory | Conversation memory |
hyle/
├── hyle/
│ ├── __init__.py
│ ├── storage/ # Hyle Layer - raw text storage
│ │ ├── __init__.py
│ │ └── raw_store.py
│ ├── index/ # Morphe Layer - sparse index
│ │ ├── __init__.py
│ │ └── sparse_index.py
│ ├── recall/ # Syndesmos Layer - link graph + chain recall
│ │ ├── __init__.py
│ │ ├── link_graph.py
│ │ └── chain_recall.py
│ ├── semantic/ # Noesis Layer - embedding search
│ │ ├── __init__.py
│ │ └── vector_search.py
│ ├── core.py # HyleMemory main API
│ ├── schema.py # Database schema
│ └── novelty.py # Knowledge boundary detector
├── tests/
├── docs/
├── examples/
├── pyproject.toml
└── README.md
Hyle (ὕλη) is Ancient Greek for "matter" — the raw material from which all things are formed. In Aristotle's hylomorphic theory, every concrete entity is a compound of hyle (matter, potentiality) and morphe (form, actuality).
This maps perfectly to our memory architecture:
- Hyle = the raw experiential text (matter, the undifferentiated potential)
- Morphe = the sparse index that gives structure and retrievability (form)
- Syndesmos = the links that connect memories (bindings)
- Noesis = the semantic understanding that enables intuitive recall (intellection)
Without hyle, morphe is empty structure. Without morphe, hyle is inaccessible chaos. Together, they make memory that is both complete and retrievable.
MIT
Hyle evolved from NOESIS-II, incorporating lessons from comparing with Cognee's knowledge graph approach and identifying the knowledge pollution problem in graph-based memory systems.