Get started
Introduction
Klyro is an in-memory database with a familiar Redis interface. Store keys and collections, coordinate workers, publish events, run transactions, and add ranked text or vector retrieval when an application needs it.
Klyro keeps application data in one schema-free keyspace. Strings, lists, hashes, sets, and sorted sets cover common state, cache, queue, counter, and ranking workloads. Transactions, pub/sub, blocking list operations, and key expiry provide the coordination primitives around those data structures.
The server speaks RESP, so existing Redis clients can connect directly. It can write snapshots to disk, enforce a memory limit with configurable eviction, and store optional Memory indexes beside the core data types for keyword, vector, or hybrid retrieval.
What you get
- Useful data structures. Model values, counters, collections, queues, unique membership, and ranked sets without a schema.
- Atomic operations. Group commands in transactions and use optimistic locking when an update depends on the current value.
- Application coordination. Publish events, subscribe to channels, and block workers until queue items arrive.
- Controlled memory use. Expire keys and records, set a memory ceiling, and choose how Klyro evicts data when it reaches the limit.
- Restorable snapshots. Save the keyspace to disk and load it when the server starts again.
The shape of it
Use a published package or any RESP client. The same keyspace and command behavior are available from each language.
Optional ranked retrieval
Memory indexes add three retrieval modes to the same database. The mode is fixed when an index is created, and a mode that cannot serve a query returns an error.
| Mode | Keyword | Semantic | Needs vectors |
|---|---|---|---|
| SEARCH | Yes, BM25 | No | No |
| VECTOR | No | Yes | Yes |
| HYBRID (default) | Yes, BM25 | Yes | Yes |
Klyro stores and searches vectors but does not generate them. Send the float32 output from your embedding model; Klyro handles indexing, filtering, scoring, and fusion. Because the model runs outside the server, you can choose it independently for each index.
How a fused score is built
Keyword relevance is BM25 over an inverted index. Semantic similarity is the index metric, one of cosine, L2, or inner product. Both are rescaled onto a common range before they are combined, because BM25 is unbounded and cosine is not.
Recency halves every half-life, so a memory written this morning outranks an equally relevant one from last month. Importance is a value you set per record, which is how a stated preference stays ahead of small talk. Both weights are adjustable per index with MEM.CONFIG and per query with WEIGHTS.
Where ranked retrieval fits
Memory indexes suit thousands to low tens of thousands of records per index. Vector search uses an exact scan bounded by mem-max-scan; larger vector collections need an approximate index, which is planned. See limitations for the full picture before you depend on it.
