Skip to main content

Architecture Overview

CogMem is designed as a framework-agnostic, self-evolving knowledge layer that any AI agent can plug into. At its core is the Knowledge Kernel — a deterministic system that governs how information becomes knowledge. Above it sits the Adaptive Cognitive Plane (ACP) — a control layer that learns how to organize that knowledge more effectively over time.

Design Principles

Contract-First

Core contracts define interfaces without importing provider clients

Provider Isolation

Database clients live behind provider implementations

Event-Driven

Agents communicate via outbox events for loose coupling

Multi-Tenant

Every object scoped by tenant_id for isolation

Structure as Hypothesis

Every structural choice is a testable hypothesis, not a fixed decision

Safe Self-Evolution

All structural changes are proposed, reversible, and auditable

System Layers

The Adaptive Cognitive Plane is the key addition. It observes how the system performs, evaluates whether the current memory strategy is effective, and proposes structural changes when it detects a better approach — all safely and reversibly.

Data Flow

Ingestion Flow

Query Flow

Self-Evolution Flow

Core Domain Objects

Import Rules

These rules are strictly enforced:
  • Core contracts must NOT import provider clients (opensearch, neo4j, etc.)
  • Agents must only import core and contracts
  • Providers must NOT import FastAPI
  • Adapters wrap external frameworks (LangChain, CrewAI, etc.)
  • ACP services must only import core contracts and models — never providers directly

Next Steps

Adaptive Cognitive Plane

How the system evolves itself

Knowledge Kernel

Explore the cognitive core

Contracts

Learn about core interfaces

Knowledge Workflows

See workflow strategies