# `Gralkor.Recall`
[🔗](https://github.com/elimydlarz/gralkor/blob/main/lib/gralkor/recall.ex#L1)

Orchestrate one recall call: search the graph, interpret the hits against
the buffered conversation, wrap the result in a `<gralkor-memory>` block.

Pure orchestration — all dependencies (search, interpret LLM call, turns
source) are passed as functions in `opts`. Production wiring lives in
`Gralkor.Client.Native`.

See `ex-recall` in `gralkor/TEST_TREES.md`.

# `group_id`

```elixir
@type group_id() :: String.t()
```

# `interpret_fn`

```elixir
@type interpret_fn() :: (String.t() -&gt; {:ok, [String.t()]} | {:error, term()})
```

# `opts`

```elixir
@type opts() :: [
  search_fn: search_fn(),
  interpret_fn: interpret_fn(),
  turns_fn: turns_fn(),
  max_results: pos_integer(),
  deadline_ms: pos_integer()
]
```

# `search_fn`

```elixir
@type search_fn() :: (group_id(), query :: String.t(), max :: pos_integer() -&gt;
                  {:ok, [String.t()]} | {:error, term()})
```

# `session_id`

```elixir
@type session_id() :: String.t() | nil
```

# `turns_fn`

```elixir
@type turns_fn() :: (String.t() -&gt; [[Gralkor.Message.t()]])
```

# `recall`

```elixir
@spec recall(group_id(), session_id(), String.t(), opts()) ::
  {:ok, String.t()} | {:error, :recall_deadline_expired | term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
