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

# search_memory

> Search across ALL stored transcriptions by keyword or meaning. No audio_path needed, queries everything in memory.

Unlike `search_audio` and `deep_search` which operate on a single file, `search_memory` searches across every transcription Augent has ever stored. No file path needed. One query, every file.

Two modes:

* **keyword** (default): literal substring matching. Fast, exact.
* **semantic**: meaning-based search using embeddings. Finds content even when the exact words don't match.

***

## Example: keyword mode

**Request:**

```json theme={null}
{
  "query": "dopamine"
}
```

**Response:**

```json theme={null}
{
  "query": "dopamine",
  "mode": "keyword",
  "results": [
    {
      "title": "Huberman Lab - How To Focus",
      "file_path": "/Users/you/Downloads/Huberman Lab - How To Focus.webm",
      "start": 1024.3,
      "end": 1031.7,
      "text": "...**dopamine** is not about pleasure. It's about motivation and the pursuit of reward, not the reward itself...",
      "timestamp": "17:04"
    }
  ],
  "match_count": 1,
  "total_segments": 3200,
  "files_searched": 47
}
```

***

## Example: semantic mode

**Request:**

```json theme={null}
{
  "query": "how sleep affects muscle recovery",
  "mode": "semantic"
}
```

**Response:**

```json theme={null}
{
  "query": "how sleep affects muscle recovery",
  "mode": "semantic",
  "results": [
    {
      "title": "Dr. Peter Attia - Drive Ep 87",
      "file_path": "/Users/you/Downloads/Dr. Peter Attia - Drive Ep 87.webm",
      "start": 2145.8,
      "end": 2153.2,
      "text": "...your body does most of its tissue repair between 2 and 4 AM during deep sleep. Skip that window and you're training for nothing...",
      "timestamp": "35:45",
      "similarity": 0.8134
    }
  ],
  "total_segments": 4200,
  "files_searched": 47,
  "model_used": "all-MiniLM-L6-v2"
}
```

***

## Example: CSV export

**Request:**

```json theme={null}
{
  "query": "remote work",
  "output": "~/Desktop/remote-work.csv"
}
```

When `output` is provided and results exist, a CSV file is written and `csv_path` is added to the response:

```json theme={null}
{
  "query": "remote work",
  "mode": "keyword",
  "results": [...],
  "match_count": 8,
  "csv_path": "/Users/you/Desktop/remote-work.csv"
}
```

The CSV contains clean columns (Source, Timestamp, Snippet) with bold markers stripped.

***

## Parameters

| Parameter       | Required | Default   | Description                                                                         |
| --------------- | -------- | --------- | ----------------------------------------------------------------------------------- |
| `query`         | Yes      | —         | Search query. A word/phrase for keyword mode, or natural language for semantic mode |
| `mode`          | No       | `keyword` | `keyword` for literal matching, `semantic` for meaning-based search                 |
| `top_k`         | No       | `10`      | Maximum number of results to return                                                 |
| `output`        | No       | —         | File path to save results (`.csv` or `.xlsx`)                                       |
| `context_words` | No       | `25`      | Words of context per result. Use `150` for full evidence blocks. Semantic mode only |
| `dedup_seconds` | No       | `0`       | Merge matches within this many seconds. Use `60` for Q\&A. Semantic mode only       |

***

## Notes

<Tip>`search_memory` operates entirely on what's already stored. No transcription runs. If you haven't transcribed any files yet, it returns zero results.</Tip>

<Tip>Keyword mode is fast — it scans segment text directly. Semantic mode computes embeddings on first use (then cached). Default to keyword unless you need meaning-based matching.</Tip>

<Tip>Also available via CLI: `augent memory search "query"` with `--semantic` and `--top-k` flags.</Tip>
