Back to Overview

Memory System

Context-Aware Semantic Storage (CASS)

The Memory System (formerly CASS — Context-Aware Session Store) provides a 3-layer memory model: Episodic (permanent session history), Working (per-agent with TTL), and Procedural (learned patterns). Uses native vector search for semantic retrieval.

[MEMORY]

Memory System

_

<episodic:preferences/>
<working:project_ctx/>
<procedural:patterns/>
<episodic:decisions/>
<working:semantic/>
<episodic:task_history/>
<procedural:styles/>
<working:domain_knowledge/>
dimensions: 1536embeddings: 8similarity: cosine
01 / EPISODIC

Past decisions and task history stored as high-dimensional vectors in the memories table.

02 / WORKING

Active project context and semantic knowledge clustered for fast retrieval.

03 / PROCEDURAL

Learned code patterns and styles—agents query by meaning, not keywords.

Memory Types

Episodic

Session-indexed permanent history — task outcomes, errors, solutions

Working

Per-agent current context — auto-expires after configurable TTL

Procedural

Pattern-based learned approaches — reusable techniques (deferred)

agent_learning

Specific learnings stored with importance scores and embeddings

How Semantic Search Works

  1. 1.Agent queries the Memory System with natural language
  2. 2.Query converted to vector embedding
  3. 3.Nearest neighbors found via cosine similarity
  4. 4.Relevant context returned to agent

Key Operations

  • store()Add knowledge with embeddings
  • search()Semantic search for relevant context
  • update()Refresh stale knowledge
  • prune()Remove outdated entries

Storage

The Memory System stores memories with vector embeddings in the DataLayer:

DataLayer → .cass/memory.db (vector-enabled)