# Quickstart

> USearch for Wolfram

Put the library's directory on `$LibraryPath` and load the package.
Below is a minimal example mirroring the API in `wolfram/Test.wls`.

```wolfram
PrependTo[$LibraryPath, "build_release"];
Get["wolfram/USearch.wl"];

(* Create an index: metric, quantization, dimensions *)
index = DenseInitRam["inner", "bf16", 3];
DenseReserve[index, 10];

(* Insert a batch, one key per vector row *)
rows = {{0.2, 0.6, 0.4}, {0.4, 0.6, 0.2}};
DenseInsert[index, {FromDigits["5f9c2b718e4d4a63b2f10c7a9d3e6b58", 16], 43}, rows];

(* Search on the kernel's own thread, five matches per query, written in an arena *)
local = ArenaInit[];
matches = DenseSearch[index, rows, 5, local]
matches["Keys"]       (* {{key, key}, {key, key}}, nearest first *)
matches["Scores"]

(* Spawn the workers the same verbs run on, and an arena where they compute *)
executor = ExecutorForRam[];
arena = ArenaInit["Executor"->executor];
matches = DenseSearch[DenseIndexOn[index, executor], rows, 5, arena];

(* Get and multiply reuse the same arena, and every result is copied out of it *)
DenseGet[index, 43, arena]
products = DenseMultiply[DenseIndexOn[index, executor], rows, arena];

(* Metadata and counters *)
DenseDescribe[index]

(* Save, load as a new index; handles are freed once nothing refers to them *)
DenseSave[DenseIndexOn[index, executor], "index.safegraphs"];
loaded = DenseLoadRam["index.safegraphs", "Executor"->executor];
ClearAll[loaded, index, arena, local, executor];
```

