Forge your vector database. Own it forever. Local-first, encrypted, quantum-inspired.
Project description
VecForge
Forge your vector database. Own it forever.
Local-first · Encrypted · Hybrid Search · Zero Cloud Dependency
VecForge is a universal, local-first Python vector database with enterprise security, multimodal ingestion, and optional quantum-inspired acceleration.
Built by Suneel Bose K — Founder & CEO, ArcGX TechLabs Private Limited
⚡ 5-Line Quickstart
from vecforge import VecForge
db = VecForge("my_vault")
db.add("Patient admitted with type 2 diabetes", metadata={"ward": "7"})
results = db.search("diabetic patient")
print(results[0].text)
That's it. No API keys. No cloud. No config files. Your data stays on your machine.
🔥 Why VecForge?
| Feature | Pinecone | ChromaDB | VecForge |
|---|---|---|---|
| Local-first | ❌ Cloud-only | ✅ | ✅ Always |
| Encryption at rest | ❌ | ❌ | ✅ AES-256 |
| Hybrid search | ✅ | ❌ | ✅ Dense + BM25 |
| Namespace isolation | ✅ Cloud | ❌ | ✅ Local |
| RBAC | ✅ Cloud | ❌ | ✅ Built-in |
| Audit logging | ❌ | ❌ | ✅ JSONL |
| Price | $$$$ | Free | ✅ Free |
📦 Install
pip install vecforge
From source (development)
git clone https://github.com/bosekarmegam/vecforge.git
cd vecforge
pip install -e ".[dev]"
System Requirements
Windows users: VecForge uses PyTorch under the hood, which requires the Microsoft Visual C++ Redistributable. Install it before running VecForge.
📖 See the full Installation Guide for GPU, encryption, and platform-specific options.
🔐 Encrypted Vault
import os
from vecforge import VecForge
db = VecForge(
"secure_vault",
encryption_key=os.environ["VECFORGE_KEY"],
audit_log="audit.jsonl",
deletion_protection=True,
)
db.add("Top secret patient data", namespace="ward_7")
🔍 Hybrid Search
results = db.search(
"elderly diabetic hip fracture",
top_k=5,
alpha=0.7, # 70% semantic, 30% keyword
rerank=True, # cross-encoder precision boost
namespace="ward_7",
filters={"year": {"gte": 2023}},
)
📖 See the Search Guide for alpha tuning, metadata operators, and reranking strategies.
📄 Auto-Ingest Documents
# Ingest entire directories — auto-detects format
db.ingest("medical_records/") # PDF, DOCX, TXT, MD, HTML
📖 See the Ingestion Guide for chunking configuration and supported formats.
🛡️ Multi-Tenant Namespaces
db.create_namespace("hospital_a")
db.create_namespace("hospital_b")
db.add("Patient data A", namespace="hospital_a")
db.add("Patient data B", namespace="hospital_b")
# Tenant isolation — hospital_a never sees hospital_b's data
results = db.search("patient", namespace="hospital_a")
🖥️ CLI
vecforge ingest my_docs/ --vault my.db
vecforge search "diabetes" --vault my.db --top-k 5
vecforge stats my.db
vecforge export my.db -o data.json
vecforge serve --vault my.db --port 8080
📖 See the CLI Reference for all commands and options.
🌐 REST API
vecforge serve --vault my.db --port 8080
# Add document
curl -X POST http://localhost:8080/api/v1/add \
-H "Content-Type: application/json" \
-d '{"text": "Patient record", "namespace": "default"}'
# Search
curl -X POST http://localhost:8080/api/v1/search \
-H "Content-Type: application/json" \
-d '{"query": "diabetes", "top_k": 5}'
📖 See the REST API Reference for all endpoints with request/response schemas.
🧪 Examples
Ready-to-run example scripts demonstrating real-world use cases:
| Example | Description |
|---|---|
| 🏥 Hospital Search | Medical record search with namespace isolation per ward |
| ⚖️ Legal Documents | NDA and contract search with type/year filtering |
| 🌍 GIS Data Search | Geospatial dataset discovery with USGS, Sentinel, OSM |
| 🤖 RAG Pipeline | Retrieval-Augmented Generation with VecForge as backend |
| 🏢 Multi-Tenant SaaS | Namespace isolation, RBAC, and audit logging demo |
| 💻 Codebase Assistant | Code documentation semantic search |
# Run any example
python examples/hospital_search.py
python examples/gis_data_search.py
python examples/rag_pipeline.py
📚 Documentation
Getting Started
- ⚡ Quickstart — Get running in 5 minutes
- 📦 Installation — All install options & system requirements
User Guides
- 🧠 Core Concepts — Vaults, namespaces, hybrid search explained
- 🔍 Search Guide — Alpha tuning, filters, reranking
- 🔐 Security Guide — Encryption, RBAC, audit logging
- 📄 Ingestion Guide — PDF, DOCX, HTML, TXT ingestion & chunking
Reference
- 📖 API Reference — Full Python API documentation
- 🖥️ CLI Reference — All CLI commands & options
- 🌐 REST API — FastAPI server endpoints
- ⚙️ Configuration — All config options in one place
📊 Benchmarks
Verified on Phase 2 benchmark suite (
benchmarks/bench_search.py)
| Operation | VecForge (Actual) | North Star Target | Pinecone | ChromaDB |
|---|---|---|---|---|
| Search 1k docs | 0.04ms p50 | — | ~80ms | ~200ms |
| Search 10k docs | 1.63ms p50 | — | ~80ms | ~200ms |
| Search 100k docs | 11.31ms p50 ✅ | <15ms | ~80ms | ~200ms |
| Ingest 100k docs | 2.9M docs/sec | — | Manual | Manual |
| BM25 Search 10k | 9.40ms p50 | — | N/A | N/A |
| Encrypted search | <20ms overhead | <20ms | N/A | N/A |
Quality Gates
| Check | Result |
|---|---|
| Ruff lint | ✅ All checks passed |
| Mypy type check | ✅ 0 errors (27 files) |
| Pytest | ✅ 128/128 tests pass |
| Coverage | 89% (core modules 85-100%) |
⚖️ License
Business Source License 1.1 (BSL)
- ✅ Free for personal, research, open-source, and non-commercial use
- ✅ Read, modify, and share freely
- 📋 Commercial use requires a license from ArcGX TechLabs
Contact: suneelbose@arcgx.in
Built with ❤️ by Suneel Bose K · ArcGX TechLabs Private Limited
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vecforge-1.0.0.tar.gz.
File metadata
- Download URL: vecforge-1.0.0.tar.gz
- Upload date:
- Size: 40.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca543afa888b5c1895b4c0fccbe41e60a8fd660229cace2a0c35771d85f22995
|
|
| MD5 |
5d391b111fd6f8640d39e20617be0775
|
|
| BLAKE2b-256 |
cf64e5d4b5be6f24ca00059c8fcf40b182d9cdad95bb308a9f3f1a0fe9c92c79
|
File details
Details for the file vecforge-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vecforge-1.0.0-py3-none-any.whl
- Upload date:
- Size: 54.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bacf3f1fb38d240c1ee0d6bbbe1e9ee8665ee80d1f3fccc537f6780e081e14be
|
|
| MD5 |
6e711098ee82d5cab976fff6b733c4ca
|
|
| BLAKE2b-256 |
de1cdccbcdf8b736e88448545c2d08b6f5ef12a0e61c966cd591e8902b46c781
|