Product

How we handle memories: kinds, lifecycle, and graph consolidation

A deep dive into cognitive memory kinds, the human-in-the-loop lifecycle, and how graph consolidation keeps agent recall sharp over time.

Human memory is not a flat bucket of text snippets. We naturally distinguish between a specific debugging conversation that happened yesterday, an enduring architectural rule we follow across all codebases, a factual definition of an API, and external reference documentation.

When AI agents treat all context as unstructured text blocks, recall becomes noisy and inaccurate. To give agents reliable long-term recall, Kiomon organizes knowledge across three core dimensions: cognitive memory kinds, a staged lifecycle, and graph consolidation.

Cognitive Taxonomy Episodic Events & Sessions Semantic Facts & Concepts Procedural Rules & Guardrails Reference Docs & Specs Staged Lifecycle 1. Draft · Staged 2. Review Inbox Gate 3. Active Knowledge Graph Consolidation Ep Sem Proc Ref Salience & Decay Managed

The 4 Cognitive Memory Kinds

Rather than flattening every record into uniform embeddings, memory is categorized into four distinct functional kinds:

1. Episodic Memories (Timeline & Moments)

Episodic memories capture what happened during specific sessions: debugging discoveries, refactoring milestones, or meeting decisions. They are timestamped, contextual, and explain why past choices were made.

2. Semantic Memories (Facts & Concepts)

Semantic memories store timeless factual assertions, conceptual schemas, domain terminology, and architecture specifications. When an agent needs to know “what is our data retention policy?”, it queries semantic memory.

3. Procedural Memories (Rules & Guardrails)

Procedural memories define behavioral rules and standards: “Always run tests before committing”, “Never delete active customer tables”, or “Use functional components in React”. These rules are injected with highest salience during agent task planning.

4. Reference Memories (Documentation & Specs)

Reference memories represent cleaned external technical articles, API specifications, and reference manuals. They provide authoritative grounding with verifiable source URLs.

The Staged Memory Lifecycle

To prevent agents from hallucinating false assertions into permanent storage, memories move through a disciplined lifecycle:

1. Draft (Proposed by Agent) ──> 2. Review Inbox (Pending Approval)

                                            ├── [User Approves] ──> 3. Active Memory (Indexed & Linked)
                                            └── [User Rejects]  ──> 4. Archived (Dormant)
  1. Draft Stage: When an agent completes a task, it proposes reflections using draft_memory or reflect_session. These drafts remain completely invisible to search indices.
  2. Review Inbox: The developer verifies, edits, or approves the proposal in their dashboard.
  3. Active Stage: Approved memories are immediately indexed in hybrid search, embedded into vector storage, and linked to existing knowledge graph clusters.
  4. Archived / Forgotten: Superseded memories can be archived or forgotten cleanly without corrupting the historical audit log.

Graph Consolidation & Salience Weighting

t₀ · Debug Insight Vector cosine ranks t₁ · Refactor Note RRF fusion constant t₂ · Benchmark Metric Top-3 recall at 99.4% Procedural Rule Invariant decay shield Reference Spec Authoritative schema Consolidated Semantic Concept ΔS Boost (+) Grounded Recall • Top-K Evidence · MCP High-Precision Prompt Injection

As a knowledge base grows to thousands of memories, maintaining relevance requires active graph consolidation:

Reinforcement Weighting

Every time a memory is retrieved and successfully cited by an agent during a task, its salience score strengthens. Memories that consistently guide successful executions remain top-of-mind.

Relational Consolidation

When multiple episodic notes touch the same topic over weeks, the background graph engine discovers the common thread and links them to an overarching semantic concept, condensing disparate details into a coherent mental model.

Temporal Decay Protection

Procedural rules and core semantic definitions are flagged as invariant, ensuring that foundational project standards never decay or get crowded out by ephemeral session chatter.

A Memory System Built for Autonomous Workflows

By combining distinct cognitive kinds, staged human oversight, and continuous graph consolidation, developer agents transform from forgetful prompt-responders into dependable, long-term technical partners.

All field notes

Kiomon Engineering

We build persistent context, knowledge, and memory infrastructure for AI agents over native MCP.

Give your AI agent a brain that remembers

Stream persistent context to Claude Code, Cursor, and any MCP agent with zero setup friction.

Get started free View docs