> ## 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.

# argent memory

> Commands for searching and managing the agent's persistent memory.

## Overview

The `argent memory` commands let you interact with MemU, the agent's persistent memory database, directly from the command line.

## Commands

### `argent memory search <query>`

Search memories using FTS5 full-text search:

```bash theme={null}
argent memory search "infrastructure"
argent memory search "Jason preferences"
argent memory search "telegram OR discord"
```

Output:

```
Results (12 matches):

#42 [sig:8] 2026-01-15
  Jason runs 2x NVIDIA DGX Spark with 256GB unified memory

#87 [sig:7] 2026-01-20
  Infrastructure includes Dell R750: 2TB RAM, 72 cores, NVMe arrays

#103 [sig:6] 2026-02-01
  400 Gbps network backbone with MikroTik ROSA
```

### Options

| Flag                     | Description                                    |
| ------------------------ | ---------------------------------------------- |
| `--limit <n>`            | Max results (default: 20)                      |
| `--type <type>`          | Filter by type (fact, preference, event, etc.) |
| `--min-significance <n>` | Minimum significance score                     |
| `--entity <name>`        | Filter by entity                               |
| `--json`                 | Output as JSON                                 |

### `argent memory stats`

Show memory database statistics:

```bash theme={null}
argent memory stats
```

Output:

```
Memory Statistics:
  Total memories:  2,004
  By type:
    fact:          812
    preference:    234
    event:         445
    relationship:  198
    instruction:   167
    observation:   148
  Database size:   14.2 MB
  FTS5 index:      3.1 MB
  Avg significance: 5.4
```

### `argent memory export`

Export memories to a file:

<CodeGroup>
  ```bash JSON theme={null}
  argent memory export --format json > memories.json
  ```

  ```bash CSV theme={null}
  argent memory export --format csv > memories.csv
  ```

  ```bash Filtered theme={null}
  argent memory export --type preference --format json > preferences.json
  ```
</CodeGroup>

### `argent memory import`

Import memories from a file:

```bash theme={null}
argent memory import memories.json
```

<Warning>
  Importing merges with existing memories. Duplicates are detected by content hash and skipped.
</Warning>

### `argent memory delete <id>`

Delete a specific memory:

```bash theme={null}
argent memory delete 42
```

Requires confirmation unless `--force` is passed.

## Database Location

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

<Note>
  The database uses SQLite WAL mode for concurrent read access. Do not modify the database directly while the gateway is running.
</Note>

## FTS5 Search Tips

* Single keywords work best: `infrastructure`
* Use OR for alternatives: `telegram OR discord`
* Quotes for exact phrases: `"model router"`
* Prefix matching: `config*`
* Strip common stop words for better results
