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

# memory_search

> Semantic search across your knowledge graph.

# memory\_search

Layered search across distilled knowledge dossiers with automatic fallback to raw evidence. Returns entity matches with snippets rather than synthesized answers.

Use `memory_search` when you want to browse, explore, or discover entities in your memory -- rather than get a direct answer to a specific question.

## Parameters

| Parameter | Type   | Required | Default  | Description                                                                                                                         |
| --------- | ------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `query`   | string | Yes      | --       | Search query                                                                                                                        |
| `depth`   | string | No       | `"auto"` | Search depth: `"distilled"` (entities only), `"raw"` (conversation history), or `"auto"` (tries distilled first, falls back to raw) |

## Read-only

Yes. This tool only reads from your memory.

## Example usage

```json theme={null}
{
  "query": "authentication architecture"
}
```

```json theme={null}
{
  "query": "React projects",
  "depth": "distilled"
}
```

```json theme={null}
{
  "query": "that conversation about caching",
  "depth": "raw"
}
```

The response returns entity matches with URIs like `baselayer://project/my-app`. Use `get_entity` to read the full dossier for any result.

<Tip>
  Prefer `ask_question` for factual questions where you want a direct answer. Use `memory_search` when you want to browse or discover what entities exist in your memory.
</Tip>

## Depth modes

* **`"distilled"`** -- Searches only the knowledge graph (entities and facts). Fast and focused.
* **`"raw"`** -- Searches the raw conversation history. Slower, but finds things that haven't been distilled yet.
* **`"auto"`** -- Tries distilled first. If results are insufficient, automatically falls back to raw. This is the default and usually the right choice.

<Warning>
  Do not act on partial `memory_search` results. Always read the full entity with `get_entity` before making decisions based on search results.
</Warning>
