Vector search and key-value storage.
Skeg stores vectors and application data in one database. Use RESP3 to write records and search vectors with metadata filters.
One protocol. Every client you already have.
Install one binary, point a Redis client at it, and the vector commands sit beside the ones you know.
- # 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 *- # a ceiling the engine obeys
- SKEG_MEMORY_LIMIT_BYTES=268435456 \
- skeg --data-dir ./data
# a ceiling the engine obeys
SKEG_MEMORY_LIMIT_BYTES=268435456 \
skeg --data-dir ./dataHow skeg answers a query
The corpus lives on disk. What stays in memory is a compressed sketch, small enough to walk and precise enough to shortlist. The full-precision answer is fetched once, at the end.
- 01 · WALKtq2codes in memory
The query walks a Vamana graph through two-bit codes, never the full vectors.
- 02 · READSSDwhere vectors live
Full float32 vectors stay on disk. Only rows that reach the re-rank are read.
- 03 · RE-RANKf32final precision
Survivors are re-scored at full precision. Compression never gets the last word.
- 04 · RETURNRESP3how it comes back
Ids, scores and payloads come back over the protocol your client speaks.
Every counter, one command away.
skeg-console streams health, traffic and every index live, one binary beside the engine. Or stay in the terminal: the same answers come back as plain text.
| 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.
A store that leaves room for the model.
A store that only works on a big machine decides who gets to build. Start from a hard budget instead, and a laptop becomes a deployment target.
The navigators who sailed these ships had no charts of the ocean. Every crossing was the same question: of everything I can see, what is closest to where I want to be?
That is a vector search. Every memory your agent has is a point of light in a very large sky. A query is a bearing; the answer is the handful of points that sit nearest.
Why a drakkar →Two minutes to your first search.
Install one binary, open a Redis client, and run a vector search on the machine in front of you.