> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argentos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory Overview

> How ArgentOS remembers — MemU is the agent's persistent brain.

## Overview

Memory is what separates a personal AI from a stateless chatbot. ArgentOS uses <Tooltip tip="Memory Unit — ArgentOS's persistent memory system backed by SQLite with full-text search, significance scoring, and embeddings.">**MemU**</Tooltip> (Memory Unit) as its persistent memory system -- a SQLite database with full-text search, significance scoring, and rich metadata that gives your agent long-term recall.

Every important fact, preference, event, and relationship your agent learns is stored in MemU and can be recalled across sessions, channels, and time.

## Architecture

```mermaid theme={null}
flowchart TD
  A["Chat + tasks + events"] --> B["MemU (lived experience)"]
  B --> C["Personal memory recall"]

  A --> L["LCM (DAG compression)"]
  L --> M["Compressed history + fresh tail"]

  D["Uploaded docs / library files"] --> E["RAG ingestion (chunk + embed + ACL)"]
  E --> F["Knowledge recall (library search)"]

  G["Contemplation episodes"] --> H["SIS lessons (patterns)"]

  C --> I["Runtime prompt context"]
  M --> I
  F --> I
  H --> I
  I --> J["Argent response"]
```

<CardGroup cols={2}>
  <Card title="LCM (Within-Session)" icon="layer-group" href="/memory/lcm">
    DAG-based context compression — every message stored permanently, searchable even after compaction. Never lose context mid-conversation.
  </Card>

  <Card title="MemU (Across Sessions)" icon="database" href="/memory/memu">
    Persistent memory — facts, preferences, relationships recalled across sessions, channels, and time.
  </Card>

  <Card title="RAG Library" icon="book" href="/memory/architecture-lanes">
    Uploaded knowledge — what was studied. Chunk, embed, ACL-scoped search.
  </Card>

  <Card title="SIS" icon="lightbulb" href="/memory/sis-reliability">
    Pattern consolidation — what was learned over time.
  </Card>
</CardGroup>

## How Memory Works

### Storing

When the agent encounters important information, it uses the `memory_store` tool to save it:

```json theme={null}
{
  "tool": "memory_store",
  "input": {
    "content": "Jason prefers open-source solutions when quality is comparable",
    "type": "preference",
    "significance": 8,
    "entities": ["Jason"]
  }
}
```

Storage can be triggered by the agent automatically (when it recognizes important information) or by the user asking the agent to remember something.

### Recalling

When the agent needs context, it uses `memory_recall` to search:

```json theme={null}
{
  "tool": "memory_recall",
  "input": {
    "query": "Jason's software preferences"
  }
}
```

MemU searches using FTS5 full-text search, ranks results by relevance and significance, and returns the most relevant memories.

### Bootstrap Injection

At session start, ArgentOS also injects relevant memories directly into the system prompt. This gives the agent immediate context without needing to explicitly search.

## Memory Database

MemU stores memories in a SQLite database at:

```
~/.argentos/memory.db
```

The database uses FTS5 (Full-Text Search 5) for fast text search and supports semantic similarity via embeddings.

## Key Concepts

| Concept             | Description                                                                 |
| ------------------- | --------------------------------------------------------------------------- |
| **Significance**    | A 1-10 score indicating how important a memory is (higher = more important) |
| **Entities**        | People, places, and things referenced in the memory                         |
| **Identity fields** | Emotional context, relationships, and personal attributes                   |
| **Embeddings**      | Vector representations for semantic similarity search                       |
| **Auto-capture**    | The agent automatically stores important information without being asked    |

## Deep Dives

<CardGroup cols={2}>
  <Card title="Lossless Context Management" icon="layer-group" href="/memory/lcm">
    DAG compression with full recall — grep, describe, expand
  </Card>

  <Card title="MemU Architecture" icon="microchip" href="/memory/memu">
    Database schema, FTS5, embeddings
  </Card>

  <Card title="Semantic Search" icon="magnifying-glass" href="/memory/semantic-search">
    How search and ranking work
  </Card>

  <Card title="Identity Fields" icon="id-card" href="/memory/identity-fields">
    Rich metadata for nuanced recall
  </Card>

  <Card title="Architecture Lanes" icon="road" href="/memory/architecture-lanes">
    MemU + RAG + SIS as one runtime system
  </Card>

  <Card title="PG+Redis Migration" icon="database" href="/memory/pg-redis">
    PostgreSQL and Redis migration architecture
  </Card>

  <Card title="Profile Collapse" icon="compress" href="/memory/profile-collapse">
    Automated deduplication of operational snapshots
  </Card>

  <Card title="Consciousness Memory" icon="atom" href="/memory/consciousness-memory">
    Experimental observation layer for consolidated knowledge
  </Card>

  <Card title="Health Runbook" icon="heart-pulse" href="/memory/health-runbook">
    Daily checks + incident triage
  </Card>

  <Card title="SIS Reliability" icon="chart-line" href="/memory/sis-reliability">
    Consolidation reliability and observability
  </Card>
</CardGroup>
