Architecture

Three layers.Each does one thing well.

Python decides what to remember and what to return. C++ finds nearest neighbours fast. SQLite keeps everything safe.

The stack

Built in layers.

  1. 01Memory logic

    Python. Facts, topics, importance, ranking, truth and the answer check — rules and small fitted models, no LLM.

  2. 02Vector engine

    C++17. One HNSW index per user, SIMD distance kernels, new vectors searchable immediately.

  3. 03Storage

    SQLite in WAL mode — the system of record for every memory, embedding and fact.

  4. 04Restart-safe

    The engine can restart at any time. On start-up the API rebuilds every index from SQLite.

Your agents

SDK or REST · API key

Recallix API · Python

facts · topics · importance · ranking · truth · answer check

SQLite

system of record

Vector engine · C++

one HNSW index per user

On start-up the API rebuilds every index from SQLite.

Python

Memory logic.

Store and recall pipelines built from rules, embeddings and small fitted models. No LLM anywhere in the loop: the only neural models are small encoders that score text (embeddings, the answer check, the deep-recall re-ranker), run locally on CPU.

RecallEngine

Full-text, entity and vector candidates, ranked by a learned logistic model, then answer-checked.

TruthEngine

One current value per fact: newer values supersede, “X is not V” removes V only.

AnswerChecker

Local SQuAD 2.0 reader. Decides whether any returned memory actually answers.

Second pass

Refills the places after the first five with a second search and the messages around the best result.

Deep recall

Optional, per request: a local cross-encoder re-reads 50 candidates with the question. Slower; better when the answer is spread over several memories.

Importance

1 + 9·σ(w·x) over novelty, information content, specificity and cue words.

C++17

Vector engine.

An HNSW index per user with heuristic neighbour selection, shared-mutex concurrency and SIMD distance kernels.

0.17 ms
average search
1M vectors, one thread
92.1%
recall@10
against exact search

Per-user indexes

Namespaces keep every user’s vectors apart; one background thread links new vectors.

Instant visibility

Vectors not yet linked into the graph are scanned exactly, so new memories are found at once.

SIMD

NEON on ARM64, AVX2 + FMA on x86-64, scalar elsewhere — reported at runtime.

Shared secret

The engine refuses to start without RECALLIX_INTERNAL_KEY.

SQLite

Storage.

The system of record, in WAL mode. Every vector index is derived from it and rebuilt automatically after a restart.

Episodic

Each memory with its embedding, the embedding model’s name, a content hash and an FTS5 index.

Long-term

Promoted facts with Ebbinghaus-style decay.

Working

A sliding window of each user’s recent messages.

Recall log

Candidate signals per recall — feedback turns them into training data.

Built with

The stack.

Python 3.11

FastAPI, Pydantic, NumPy; optional sentence-transformers and a QA reader

C++17

Own HNSW implementation, NEON / AVX2 intrinsics, cpp-httplib, nlohmann-json

SQLite

WAL mode, FTS5 full-text search, JSON1

Next.js

This site — static export, every number read from the evaluation output

Give your agents a memory.

Free to self-host. Source available. A few lines of code.