CogMem: A Self-Evolving Knowledge Operating System
Most LLM memory systems focus on recall. CogMem focuses on knowledge formation — and learns how to do it better over time. CogMem is a Personal Knowledge Operating System (KOS): a long-running cognitive system that ingests messy personal data—notes, documents, conversations, web content—and incrementally transforms it into structured, inspectable, and reusable knowledge. What makes CogMem unique is that it doesn’t just store knowledge — it evolves how it organizes, retrieves, and restructures knowledge based on observed outcomes. The system learns which memory strategies work best for your domain and adapts its own data structures accordingly.Quick Start
Get up and running in 5 minutes
Knowledge Kernel
Explore the cognitive core
Adaptive Cognitive Plane
How the system evolves itself
Architecture
Understand how CogMem works
Why CogMem Exists
LLMs are powerful, but their default memory model is fragile:- Context windows are short
- Chat history is unstructured
- Important facts are overwritten or forgotten
- Contradictions accumulate silently
- Knowledge is not inspectable or explainable
- Memory strategies are fixed — the same approach is used regardless of domain
The Knowledge Kernel
At the center of CogMem is a Knowledge Kernel: a persistent, deterministic system responsible for how memory is formed, structured, and maintained.The Knowledge Kernel is not an agent.
It does not generate text.
It governs knowledge lifecycle.
- Admission control — deciding what information is worth remembering
- Transformation — promoting raw data into structured representations
- Conflict tracking — identifying and retaining competing claims
- Maintenance — merging, decaying, refreshing, and reinforcing memories
- Governance — tracking source, confidence, and scope of knowledge
The Adaptive Cognitive Plane
Above the Knowledge Kernel sits the Adaptive Cognitive Plane (ACP) — a self-evolving control layer that learns how to organize knowledge more effectively. The ACP introduces three key capabilities:- Memory Strategies — explicit, versioned hypotheses about how to chunk, index, retrieve, and maintain knowledge for a given domain
- Outcome Signals — feedback loops that capture how well the system performed (retrieval success, user corrections, latency, cost)
- Self-Restructuring — safe, auditable changes to data structures when the system detects a better approach
Structure as a Hypothesis
Traditional systems treat their data structures as fixed. CogMem treats every structural choice — chunking strategy, retrieval mode, graph schema, claim predicates — as a testable hypothesis.Safety by Design
Self-evolving systems require strong safety guarantees. CogMem enforces:- Every change is a proposal — the Meta-Kernel proposes, it never executes directly
- Every change is reversible — base strategies are preserved for rollback
- Every change is auditable — all decisions emit kernel events with rationale
- Evaluation windows — new strategies are observed before being confirmed
- No autonomous code modification — ACP changes data structures, never code
- No opaque mutations — every structural change is logged and explainable
Knowledge Formation Pipeline
CogMem organizes personal data through a multi-stage pipeline:
Each stage is inspectable, auditable, and subject to restructuring by the Adaptive Cognitive Plane.
Evidence-First Memory
CogMem treats claims, not text, as the core unit of memory. Every claim stores:- Supporting passages — the evidence
- Source — user-asserted, inferred, or retrieved
- Timestamp — when it was learned
- Confidence — how certain the system is
- Conflicts — other claims that contradict it
Knowledge Workflows
Instead of ad-hoc retrieval, CogMem introduces Knowledge Workflows — repeatable strategies governed by the active MemoryStrategy. A workflow transforms stored knowledge into useful artifacts:- Personal Wikipedia pages — entity dossiers with facts and evidence
- Project timelines — ordered claims/events over time
- Decision histories — how and why decisions were made
- Cross-source summaries — unified views across documents
- Contradiction reports — surface conflicting claims for review
Inspectability by Design
CogMem is designed to be debuggable — especially important for a self-evolving system. Developers and users can inspect:- Raw tables of items, passages, entities, and claims
- Graph relationships between entities
- Evidence trails for any conclusion
- The event stream of kernel decisions
- Active memory strategies and their version history
- Outcome signals that triggered strategy changes
- Restructuring proposals with rationale and risk assessment
Solo Mode (Recommended)
CogMem is designed to run as a personal system. In Solo Mode, all memory, embeddings, graph data, and strategy state can live locally in a single database, enabling:- Privacy — your data stays on your device
- Offline operation — no cloud dependency
- Iterative experimentation — rapid development cycles
- Dissertation-friendly evaluation — reproducible research
- Local self-evolution — the system adapts to your domain without cloud calls
Enterprise Mode
Best-of-breed databases for production scale:
- Postgres - Admin, objects, outbox
- OpenSearch - Text search with highlights
- Neo4j - Entity graph
- Qdrant - Vector embeddings
Solo Mode
Single database for simplicity:
- SurrealDB - All capabilities in one
- Perfect for development
- Easy local setup
Framework-Agnostic by Design
CogMem does not replace agent frameworks—it supports them. LangGraph, CrewAI, or custom agents can interact with CogMem as clients, relying on the Knowledge Kernel to handle memory, structure, and recall consistently over time. The Adaptive Cognitive Plane works transparently beneath these integrations.Summary
CogMem is not a chat memory store. It is not a workflow engine. It is a self-evolving knowledge operating system — a cognitive substrate that transforms unorganized personal data into structured, explainable, and evolving knowledge, and learns to do it better over time.Next Steps
Knowledge Kernel
Deep dive into the cognitive core
Adaptive Cognitive Plane
How the system evolves itself
Quick Start
Your first search