The vector database that fits.
Skeg combines vector search and key-value storage. Disk-backed indexes keep full vectors on disk, leaving memory for your model.
Use Skeg from a Redis client
Run the supported key-value commands alongside Skeg’s vector commands over RESP3.
- # macOS or Linux
- brew install skegdb/tap/skeg
- skeg --data-dir ./data
brew install skegdb/tap/skeg- # vectors and key-value, side by side
- > SKEG.VINDEX.CREATE docs 1024 tq2 disk
- > SKEG.VSET docs 1 <vec> PAYLOAD "ch-3"
- > SET session:42 "ctx"
- > SKEG.VSEARCH docs 10 100 <q> WITHPAYLOAD
# vectors and key-value, side by side
> SKEG.VINDEX.CREATE docs 1024 tq2 disk
> SKEG.VSET docs 1 <vec> PAYLOAD "ch-3"
> SET session:42 "ctx"
> SKEG.VSEARCH docs 10 100 <q> WITHPAYLOAD- import skeg
- with skeg.connect() as c:
- c.vindex_create("notes", dim=1024, backend="disk")
- c.vset("notes", 1, embedding)
- hits = c.vsearch("notes", q, k=10)
import skeg
with skeg.connect() as c:
c.vindex_create("notes", dim=1024, backend="disk")
c.vset("notes", 1, embedding)
hits = c.vsearch("notes", q, k=10)- # nearest vectors that also match
- > SKEG.VSET docs 7 <vec> PAYLOAD "user=alice type=pdf ts=20240115"
- > SKEG.VSEARCH docs 10 100 <q> WITHPAYLOAD \
- FILTER "user = alice AND ts >= 20240101"
# nearest vectors that also match
> SKEG.VSET docs 7 <vec> PAYLOAD "user=alice type=pdf ts=20240115"
> SKEG.VSEARCH docs 10 100 <q> WITHPAYLOAD \
FILTER "user = alice AND ts >= 20240101"- # every connection scoped from the handshake
- skeg --tenant-auth auth.kdb --tenant-strict \
- --admin-tenant ops
- > HELLO 3 AUTH ops s3cret
- > SKEG.QUOTA.SET acme 100000 *
# every connection scoped from the handshake
skeg --tenant-auth auth.kdb --tenant-strict \
--admin-tenant ops
> HELLO 3 AUTH ops s3cret
> SKEG.QUOTA.SET acme 100000 *- # limit admission headroom
- SKEG_MEMORY_LIMIT_BYTES=268435456 \
- skeg --data-dir ./data
# limit admission headroom
SKEG_MEMORY_LIMIT_BYTES=268435456 \
skeg --data-dir ./dataHow Skeg answers a vector query
A disk index uses quantized codes to find candidates and reads the original vectors to rerank them.
- 01 · WALKtq2codes in memory
The query traverses a Vamana graph using two-bit codes to shortlist candidates.
- 02 · READSSDwhere vectors live
Full float32 vectors stay on disk. Skeg reads the shortlisted vectors for reranking.
- 03 · RE-RANKf32final precision
Skeg rescores the shortlisted vectors at full precision.
- 04 · RETURNRESP3how it comes back
RESP3 returns IDs, scores and any requested payloads.
Inspect the server
Switch between the console and terminal to see how Skeg reports traffic, index state and maintenance. This preview uses simulated data.
| vindex | dim | tier | backend | vectors | base | delta | runs | tombstones |
|---|
| id | score | payload |
|---|
| shard | rows | vectors | not merged | runs | dead |
|---|
Illustrative values. skeg-console is a local, read-only web console on the official client; the terminal asks the same engine directly.
Run storage alongside a local model
Disk-backed indexes keep full vectors on disk so the database and model can share the same machine.
The drakkar is Skeg’s mark. The illustration shows a query and the nearby points a search can retrieve.
Why a drakkar →Try the local example
Start a server, load three vectors and run a filtered search.