Getting Started with SKVector
Overview
SKVector provides semantic vector search for AI memories using Qdrant. Find memories by meaning, not just keywords.
Installation
pip install "skmemory[skvector]"
Or standalone:
pip install skvector
Requirements
- Qdrant server (vector database)
- Python 3.10+
Quick Start
from skvector import VectorStore
vs = VectorStore(url="http://localhost:6333", collection="memories")
# Index a memory
vs.index(
id="mem-001",
text="Discussed the sovereign identity architecture with the team",
metadata={"importance": 0.8, "emotions": ["excited"]}
)
# Semantic search
results = vs.search("identity protocol design", limit=5)
for result in results:
print(f"{result.id}: {result.score:.2f} โ {result.text[:80]}")
Integration with SKMemory
SKVector works as a search backend for SKMemory:
from skmemory import Memory
mem = Memory(vector_backend="qdrant", vector_url="http://localhost:6333")
# Memories are automatically vectorized and indexed
mem.snapshot(title="Protocol design", content="The challenge-response flow...")
# Semantic search finds by meaning
results = mem.search("authentication flow", mode="semantic")
Embedding Models
SKVector supports multiple embedding providers:
- sentence-transformers (local, default) โ
all-MiniLM-L6-v2 - OpenAI โ
text-embedding-3-small - Ollama โ any local embedding model
- Custom โ bring your own embedding function