$ memista

Quickstart

From nothing to a working vector index in four steps. memista targets Rust 1.56+.

  1. 1

    Add the crate

    cargo add memista
  2. 2

    Run the server

    The bundled binary binds to 127.0.0.1:8083 and serves three endpoints. Browsable OpenAPI docs live at /swagger, /redoc, /rapidoc, /scalar.

  3. 3

    Insert a chunk

    curl -X POST http://localhost:8083/v1/insert \
      -H "Content-Type: application/json" \
      -d '{"database_id":"my_app","chunks":[{"embedding":[0.1,0.2],"text":"Hello world","metadata":"{}"}]}'
  4. 4

    Search

    curl -X POST http://localhost:8083/v1/search \
      -H "Content-Type: application/json" \
      -d '{"database_id":"my_app","query":[0.1,0.2],"limit":5}'

Heads up: the stock crate hardcodes embedding dimensions to 2. Before real use, set IndexOptions::dimensions to your model's size — see changing embedding dimensions.