# Zvec Local RAG

> Skill: Zvec Local RAG (Embedded Vector DB)

- Skill: `calvinvette/zvec-local-rag` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add calvinvette/zvec-local-rag`
- Raw SKILL.md: https://api.skillmd.com/api/skills/calvinvette/zvec-local-rag/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: calvinvette (https://skillmd.com/u/calvinvette)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/calvinvette/zvec-local-rag

---

# Skill: Zvec Local RAG (Embedded Vector DB)

## Purpose
Provide **local / embedded** vector storage for RAG using **Zvec** (in-process vector database). citeturn2view0

## What this skill provides
- Zvec collection lifecycle: create/open/destroy on disk citeturn5view3
- Upsert documents with vectors + scalar metadata citeturn5view0turn6view0
- Vector similarity query with optional scalar filter and selectable fields citeturn5view2
- Fetch/delete primitives citeturn5view3
- MCP adapter for OpenCode (stdio) citeturn0search1turn0search11

## Embeddings and reranking
- Embeddings are pluggable via env vars (`ZVEC_EMBED_*`) with:
  - `openai_compat` embeddings endpoint, or
  - local `sentence-transformers`.
- Rerank is default **none**; hook exists for future cross-encoder reranking.

## OpenCode MCP
Use the `zvec-local-rag-mcp` console script after `pip install -e ".[mcp]"`.

See root README for full OpenCode config examples.

