Semantic when it helps. Exact when it matters.
Search HNSW vectors, BM25 text, and payload filters independently—or fuse them with Reciprocal Rank Fusion for resilient hybrid retrieval.
Choose a search modevectorcontentpayloadrank 01Keep vectors, text, metadata, and indexes beside your Go code. VecLite gives you HNSW, BM25, hybrid ranking, and an optional crash-safe WAL in one embeddable database—without another service to deploy.
0.03280.03170.0161Start in memory, point the same code at a file when you want persistence, and add HNSW, BM25, filters, or a WAL only when the workload calls for them.
:memory: or a database path.package main
import (
"fmt"
"log"
"github.com/abdul-hamid-achik/veclite"
)
func main() {
db, err := veclite.Open(":memory:") // or "search.veclite"
if err != nil {
log.Fatal(err)
}
defer db.Close()
docs := db.Collection("docs")
_, err = docs.Insert(
[]float32{0.1, 0.2, 0.3, 0.4},
map[string]any{"file": "README.md"},
)
if err != nil {
log.Fatal(err)
}
results, err := docs.Search(
[]float32{0.15, 0.25, 0.35, 0.45},
veclite.TopK(1),
)
if err != nil {
log.Fatal(err)
}
fmt.Println(results[0].Record.Payload["file"])
}Store the source text, payload, and multiple embeddings together. Query by meaning, exact language, metadata, or all three—then return the same logical record instead of reconciling separate systems.
Search HNSW vectors, BM25 text, and payload filters independently—or fuse them with Reciprocal Rank Fusion for resilient hybrid retrieval.
Choose a search modevectorcontentpayloadrank 01Give one item text, image, or audio embeddings. Each space keeps its own dimension, metric, profile, and optional HNSW index.
Atomic snapshots keep the database easy to move. Enable the optional WAL to fsync completed mutations, replay after a crash, and checkpoint automatically.
Persist provider, model, dimension, distance, normalization, and version. Compatibility checks tell your app when an index needs a rebuild.
ollama / nomic-embed-text
768d · cosine · normalized
version: chunker-v2 Design an embedding strategy VecLite adds explicit APIs for the lifecycle around retrieval: recency, importance, conversations, episodes, consolidation, notifications, and relationships. Your application decides when each policy runs.
Set TTLs and importance, start background cleanup when you want it, and apply temporal decay to vector retrieval.
Store session turns, parent-child threads, roles, and turn order beside the vectors that retrieve them.
Caller-driven consolidation and episode APIs help group related records while preserving the originals.
Subscriptions notify on matching inserts, while the knowledge graph adds typed entities, edges, and traversal.
3 turnsWhy did the write survive the restart?
Matched the WAL recovery guide and replay code.
The completed mutation was replayed over the last snapshot.
#1042WAL replay restores completed mutations after an interrupted writer.
VecLite is a Go library first, with additive CLI, HTTP, and MCP surfaces. Choose based on process ownership and language—not a different storage engine.
The HTTP server has no built-in authentication or TLS. Keep it local or put a trusted authenticated proxy in front of it.
veclite.Open("data.veclite")02HTTP serverMultiple local clientsLet one writer process own the database and expose the stable JSON contract to trusted clients.veclite serve data.veclite03CLI + JSONShells and language bridgesBuild scripts and early integrations around deterministic commands and JSON output.veclite search … --json04MCP serverAgents and coding toolsExpose search, records, memory, episodes, and graph operations as MCP tools over stdio.veclite mcp data.vecliteTutorials teach a workflow. Guides help you make a decision. Reference pages give you the exact contract. The new docs keep those jobs separate.
Open the documentationStart with a four-dimensional demo today. Grow into HNSW, hybrid ranking, named spaces, durable writes, and agent memory without changing databases.