AgentDB Vector Search

Implements semantic vector search with AgentDB for document retrieval and similarity matching.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/optimaxin/Tredev_Gems --skill agentdb-vector-search-optimaxin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: AgentDB Vector Search
Source: https://github.com/optimaxin/Tredev_Gems/tree/main/.claude/skills/agentdb-vector-search
Command: npx skills add https://github.com/optimaxin/Tredev_Gems --skill agentdb-vector-search-optimaxin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agentdb, agentic-flow.

What problem does it solve? Building semantic search and RAG systems requires efficient vector storage, indexing, and similarity querying, which is complex to implement from scratch and slow with traditional databases. ## Core Features & Use Cases - Vector Storage & Search: Store document embeddings and run similarity queries with HNSW indexing, cosine/euclidean/dot metrics, and sub-millisecond retrieval. - Hybrid & MMR Search: Combine vector similarity with metadata filters and use Maximal Marginal Relevance for diverse, non-redundant results. - Quantization & CLI Tooling: Reduce memory 4-32x with binary, scalar, or product quantization, and manage databases via the agentdb CLI (init, query, import, export, stats). - Use Case: Build a RAG pipeline where user questions are embedded, matched against a knowledge base of stored document vectors, and the retrieved context is passed to an LLM for answer generation. ## Quick Start Initialize an AgentDB vector database and store my documents with embeddings so I can run semantic similarity searches against them.

Frequently Asked Questions about AgentDB Vector Search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up vector search with AgentDB?

Initialize a database with npx agentdb@latest init ./vectors.db, specifying the embedding dimension for your model. Then store documents with embeddings via the API or CLI and query them using similarity search with a chosen distance metric.

How to build a RAG pipeline with vector search?

Embed the user question, run a similarity search against stored document vectors with a threshold around 0.7, and pass the retrieved context to an LLM prompt. AgentDB supports this via retrieveWithReasoning with MMR for diverse context.

What embedding dimensions does AgentDB support?

AgentDB supports any dimension configured at initialization. Common values are 1536 for OpenAI ada-002, 768 for sentence-transformers, and 384 for all-MiniLM-L6-v2, set with the --dimension flag during init.

Does AgentDB support metadata filtering with vector search?

Yes, hybrid search combines vector similarity with metadata filters such as category or date ranges. You pass a query plus a filters object, and results must satisfy both the similarity and metadata conditions.

Why is my vector search using too much memory?

High memory usage comes from storing full-precision vectors. Enable quantization in the adapter: binary gives 32x reduction, scalar gives 4x, and product quantization gives 8-16x reduction.

Why are my similarity search results irrelevant?

Poor relevance usually stems from a low similarity threshold or mismatched embedding dimensions. Raise the threshold toward 0.8, verify your database dimension matches your embedding model, or enable MMR for more diverse results.