Layered Memory

The Alius Agent persists knowledge across Sessions through a layered memory system. Memory is divided into project memory and global memory scopes, each containing multiple storage layers.

Project Memory vs Global Memory

ScopeDescription
Project memoryStored under .alius/memory/, bound to the current workspace
Global memoryCross-project shared general knowledge

Storage Layers

Alius’s memory system includes the following storage layers:

Storage LayerTypeDescription
ConversationStoreWorking memoryStores the current Session’s conversation history
SessionStoreWorking memoryStores the current Session’s state and metadata
MemoryStoreGeneral memoryProject-level facts and knowledge storage
EpisodicStoreEpisodic memoryRecords of experiences from past Runs — what worked, what didn’t
SemanticStoreSemantic memoryExtracted project facts — architectural decisions, API contracts, naming conventions
ProceduralStoreProcedural memoryRecords of operational processes and steps

Context Memory (Working Memory)

Short-term memory during an active Session. Stores the current conversation context, recent tool outputs, and active plan state.

  • Scoped to the current Session
  • Cleared when the Session ends
  • Provides immediate context for each Turn
  • Managed through ConversationStore and SessionStore

Episodic Memory

Records of past experiences — what worked, what didn’t, and what was learned in previous Runs.

  • Persists across Sessions
  • Captures lessons learned from development rounds
  • Helps avoid repeating mistakes
  • Managed through EpisodicStore

Semantic Memory

Extracted facts and knowledge about the project — architectural decisions, API contracts, naming conventions, and domain knowledge.

  • Persists across Sessions
  • Builds a knowledge base about the project
  • Enables the Agent to understand project context without re-reading code
  • Managed through SemanticStore

Procedural Memory

Records of operational processes and steps — standard procedures for how to accomplish certain types of tasks.

  • Persists across Sessions
  • Records successful operational patterns
  • Foundation for workflow automation
  • Managed through ProceduralStore

Retrieval Engine

The RetrievalEngine is responsible for retrieving relevant information from memory layers to support the Agent’s current context.

Managing Memory

/memory save <text>     # Save a fact or lesson
/memory list            # View saved memories
/memory clear           # Clear global memory (requires confirmation)

How Memory Helps You

  1. Faster resumption — Context is preserved, no need to repeat explanations
  2. Learning from experience — Past Runs guide future decisions
  3. Building project knowledge — Facts accumulate into a project-specific knowledge base
  4. Self-evolution — Each iteration makes the Agent more effective for your project

Runtime Memory vs Workspace Documents

Alius distinguishes between two different data stores:

LocationContentDescription
.alius/memory/Runtime memory dataSessions, conversations, experiences, facts, etc.
.alius/workspace/Workspace documentsDesign documents, specifications, status records, etc.

They are stored in different directories and serve different purposes. Memory is runtime-managed data, while workspace documents are project design and planning materials.

Memory and Privacy

All memory is stored locally in the .alius/memory/ directory. No data is sent to external services unless you explicitly configure remote storage.