# `Jido.AI.Retrieval.Store`
[🔗](https://github.com/agentjido/jido_ai/blob/v2.4.0/lib/jido_ai/retrieval/store.ex#L1)

In-process retrieval memory store backed by ETS.

# `memory`

```elixir
@type memory() :: %{
  :id =&gt; String.t(),
  :text =&gt; String.t(),
  optional(:metadata) =&gt; map(),
  optional(:inserted_at_ms) =&gt; non_neg_integer(),
  optional(:updated_at_ms) =&gt; non_neg_integer()
}
```

# `clear`

```elixir
@spec clear(String.t()) :: non_neg_integer()
```

Clears all memories from a namespace and returns the number removed.

# `ensure_table!`

```elixir
@spec ensure_table!() :: :ok
```

Ensures the ETS table exists.

# `namespace_entries`

```elixir
@spec namespace_entries(String.t()) :: [memory()]
```

Returns all memory entries in a namespace.

# `recall`

```elixir
@spec recall(String.t(), String.t(), keyword()) :: [map()]
```

Recalls top-k memories for a query using simple token-overlap scoring.

# `upsert`

```elixir
@spec upsert(String.t(), memory()) :: memory()
```

Inserts or updates a memory entry in the given namespace.

---

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