Skip to main content

General

VecLabs is a decentralized vector database for AI agents with cryptographic verification on Solana. It combines:
  • Rust HNSW core — sub-5ms p99 query latency with no garbage collection
  • Solana blockchain — immutable Merkle root proofs after every write
  • Shadow Drive — encrypted vector storage at $0.000039/MB/epoch
Result: 88% cheaper than Pinecone with verifiable data provenance that no centralized vector DB can offer.
VecLabs is built for AI engineers building production LLM agent systems:
  • Developers using LangChain, AutoGen, CrewAI, LlamaIndex
  • Teams deploying autonomous AI agents that need persistent memory
  • Enterprises in healthcare, legal, financial services requiring data provenance
  • Anyone currently using Pinecone, Qdrant, or Weaviate who wants faster queries + lower costs + on-chain verification
You don’t need to be a blockchain engineer. The SolVec SDK abstracts all blockchain complexity.
Alpha status (v0.1.0-alpha):Production-ready components:
  • Rust HNSW core (31 tests, 4.3ms p99)
  • AES-256-GCM encryption
  • Merkle tree + proof generation
  • Solana Anchor program (live on devnet)
  • TypeScript/Python SDKs
🚧 In progress:
  • Shadow Drive persistence (vectors currently in-memory)
  • WASM Rust bridge (SDK uses JS fallback)
  • Agent memory demo
📋 Planned:
  • Mainnet deployment
  • LangChain/AutoGen integrations
Recommendation: Use on devnet for testing. Mainnet launch expected Q2 2026.
FeatureVecLabsPinecone
Query latency (p99)4.3ms~25ms
Cost (1M vectors)~$8/month$70/month
Data ownershipYour walletTheir servers
VerificationOn-chain Merkle proofsNone
LanguageRust (no GC)Go/Python (GC pauses)
StorageDecentralized (Shadow Drive)Centralized cloud
Bottom line: VecLabs is faster, cheaper, and verifiable. Pinecone is more mature with a larger ecosystem.
Three components are decentralized:
  1. Storage: Vectors are encrypted and stored on Shadow Drive (Solana’s decentralized storage network), not on VecLabs servers
  2. Verification: Merkle roots are posted to Solana blockchain—publicly auditable by anyone
  3. Ownership: Data is encrypted with your Solana wallet key—only you can decrypt it
What’s NOT decentralized: The Rust HNSW query engine runs on your infrastructure (or VecLabs hosted nodes if you choose that option).

Solana & Blockchain

Three reasons:
  1. Speed: 400ms finality vs Ethereum’s 12+ minutes
  2. Cost: 0.00025pertransactionvsEthereums0.00025 per transaction vs Ethereum's 5-50 gas fees
  3. Infrastructure: Shadow Drive (Solana’s decentralized storage) is production-ready
For a vector database that commits Merkle roots after every write operation, Solana’s speed and cost make it the only practical choice.
No. The SolVec SDK handles all blockchain interactions automatically:
const sv = new SolVec({ network: 'devnet' });
const collection = sv.collection('my-data');
await collection.upsert([...vectors]);
// Merkle root posted to Solana automatically ✓
You only see the blockchain if you explicitly call collection.verify() to get the proof.
Yes, but very little:
  • Devnet: Free test SOL from faucet
  • Mainnet: 0.000005 SOL per transaction (0.00025at0.00025 at 50/SOL)
Example costs:
  • 1,000 write operations: ~$0.25
  • 10,000 write operations: ~$2.50
  • Queries: $0 (no on-chain cost)
Your wallet needs enough SOL to cover transaction fees. The SDK will warn you if balance is low.
Yes. The architecture separates concerns:
  • Queries: Run against in-memory Rust HNSW index—no blockchain dependency
  • Writes: Require Solana to post Merkle root—will fail if network is down
  • Verification: Requires Solana RPC—will fail if network is down
If Solana is temporarily unavailable, you can still query existing data. You cannot write new data or verify proofs until the network recovers.
Every VecLabs collection has a Solana address. View it on Solana Explorer:
const proof = await collection.verify();
console.log(proof.solanaExplorerUrl);
// https://explorer.solana.com/address/8iLpy...75Fm7?cluster=devnet
You’ll see:
  • Collection metadata
  • Merkle root hash
  • Timestamp of last update
  • Transaction history

Security & Encryption

AES-256-GCM encryption with keys derived from your Solana wallet:
  1. Your Solana wallet generates a master key
  2. Each vector is encrypted with AES-256-GCM before storage
  3. Encryption happens client-side in the SDK
  4. Encrypted vectors are stored on Shadow Drive
  5. VecLabs cannot decrypt your data—we never see your wallet private key
// Automatic encryption in SDK
await collection.upsert([{ id: 'v1', values: [...] }]);
// Vector encrypted with your wallet key before leaving your machine ✓
No. Your data is encrypted with a key derived from your Solana wallet private key. VecLabs infrastructure sees only:
  • Encrypted vector blobs on Shadow Drive
  • Merkle root hashes on Solana
  • Query operations (but not query content)
We cannot decrypt your vectors because we never have access to your wallet private key.
Your data is permanently inaccessible. This is the tradeoff of decentralized encryption:
  • Centralized DB: Company can reset your password / recover your data
  • VecLabs: No one can recover your data if you lose your key—not even VecLabs
Best practices:
  • Back up your Solana wallet seed phrase securely
  • Use hardware wallets for production workloads
  • Test recovery process on devnet before going to mainnet
Yes. Everything in your vector records is encrypted:
await collection.upsert([{
  id: 'mem_001',
  values: [...],              // Encrypted ✓
  metadata: {                 // Encrypted ✓
    text: 'Sensitive data',
    user_id: 'user_123'
  }
}]);
The only unencrypted data is the Merkle root (a 32-byte hash) posted to Solana.
Call .verify() to get cryptographic proof:
const proof = await collection.verify();

console.log(proof.merkleRoot);      // 32-byte hash of all vector IDs
console.log(proof.onChainRoot);     // Root stored on Solana
console.log(proof.match);           // true if they match
console.log(proof.timestamp);       // When root was posted
console.log(proof.solanaExplorerUrl); // View on blockchain
If proof.match === false, your local data does not match the on-chain root—indicating tampering or corruption.

Performance

Three architectural reasons:
  1. No garbage collection: Rust HNSW has no GC pauses (Python/Go do)
  2. In-memory queries: No network calls to remote storage during search
  3. Native machine code: Rust compiles to CPU instructions—no VM/interpreter overhead
Benchmark: 100K vectors, 384 dims, top-10 query
  • VecLabs p99: 4.3ms
  • Pinecone p99: ~25ms
Current benchmarks: Sub-5ms p99 at 100K vectors in memory.Theoretical limits:
  • In-memory: Limited by RAM (1M vectors ≈ 6GB for 1536 dims)
  • With Shadow Drive persistence: No hard limit (billions of vectors)
Scaling strategy:
  • Small datasets (under 1M vectors): In-memory for maximum speed
  • Large datasets (over 1M vectors): Shadow Drive with smart caching (coming in beta)
HNSW search complexity is logarithmic: O(log N)
Vectorsp99 Latency
10K~2ms
100K~4ms
1M~7ms (projected)
10M~10ms (projected)
Performance degrades slowly as dataset size increases—unlike brute-force search which is O(N).
HNSW inserts are fast: ~200μs per vector (1536 dims)Bottleneck is Solana transaction:
  • Merkle root update: ~400ms finality
  • Transaction cost: ~$0.00025
Optimization: Batch writes in SDK to amortize Solana cost:
await collection.upsert([...1000_vectors]);
// Single Solana transaction for 1000 vectors ✓
Not yet. Current architecture requires persistent memory for the HNSW index.Workaround: Use VecLabs hosted query nodes (coming soon)Future: WASM + Shadow Drive will enable cold-start serverless deployments

Migration & Integration

Three-line code change:
# Before (Pinecone)
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_KEY")
index = pc.Index("my-index")

# After (VecLabs)
from solvec import SolVec
sv = SolVec(wallet="~/.config/solana/id.json")
index = sv.collection("my-index")

# Everything else stays identical
index.upsert(vectors=[...])
index.query(vector=[...], top_k=10)
See the Pinecone Migration Guide or Qdrant Migration Guide for data export/import steps.
Native integration coming in beta. For now, use the generic vector store interface:
from langchain.vectorstores import VectorStore
from solvec import SolVec

class SolVecStore(VectorStore):
    def __init__(self):
        self.sv = SolVec(wallet="~/.config/solana/id.json")
        self.collection = self.sv.collection("langchain-memory")
    
    def add_texts(self, texts):
        # Implement using collection.upsert()
        pass
    
    def similarity_search(self, query, k=4):
        # Implement using collection.query()
        pass
Official langchain-solvec package ships within 60 days of mainnet launch.
Yes. VecLabs works with any embedding model:
import OpenAI from 'openai';
import { SolVec } from 'solvec';

const openai = new OpenAI();
const sv = new SolVec({ network: 'devnet' });
const collection = sv.collection('openai-embeddings', { dimensions: 1536 });

// Generate embeddings
const response = await openai.embeddings.create({
  model: 'text-embedding-3-small',
  input: 'Your text here'
});

// Store in VecLabs
await collection.upsert([{
  id: 'doc_001',
  values: response.data[0].embedding,
  metadata: { text: 'Your text here' }
}]);
Two options:
  1. SDK export (in development):
const vectors = await collection.exportAll();
fs.writeFileSync('backup.json', JSON.stringify(vectors));
  1. Direct Shadow Drive access:
  • Your vectors are stored on Shadow Drive at a known address
  • Use Shadow Drive CLI to download encrypted files
  • Decrypt with your wallet key
Important: Export functionality ships before mainnet launch. No lock-in.

Pricing & Costs

VecLabs has no subscription fees. You pay only for:
  1. Solana transactions: ~$0.00025 per write
  2. Shadow Drive storage: ~$0.000039 per MB per epoch
Example: 1M vectors (1536 dims):
  • Storage: ~6GB = $0.04/month
  • 1,000 writes: ~$0.25
  • Total: ~$8/month
vs Pinecone: $70/month for 1M vectorsSavings: 88%
No. All costs are transparent and blockchain-verifiable:
  • ✅ Solana transaction fees: Public on-chain
  • ✅ Shadow Drive storage: Public pricing
  • ❌ No API rate limits
  • ❌ No “contact sales” enterprise pricing
  • ❌ No lock-in contracts
Formula:
Storage cost = (num_vectors × dims × 4 bytes) × $0.000039/MB/epoch
Write cost = num_writes × $0.00025
Query cost = $0 (runs on your infrastructure)
Examples:
VectorsDimsStorage1K writes/moTotal/mo
100K384$0.006$0.25~$0.26
1M768$0.12$0.25~$0.37
1M1536$0.24$0.25~$0.49
10M1536$2.40$0.25~$2.65
Solana transaction fees are denominated in lamports (1 SOL = 1B lamports).The network adjusts fees based on demand, not SOL price. Historically:
  • Transaction fees: 0.000010.00001 - 0.0005 regardless of SOL price
  • Much more stable than Ethereum gas
Worst case: If SOL goes to 500andfeesspike10x,yourmonthlycostgoesfrom500 and fees spike 10x, your monthly cost goes from 8 to ~$10. Still 85% cheaper than Pinecone.

Troubleshooting

Your wallet needs SOL to pay transaction fees.On devnet:
solana airdrop 2 --url devnet
On mainnet:
  • Buy SOL on an exchange
  • Transfer to your VecLabs wallet address
  • Minimum: ~0.01 SOL ($0.50) for 1,000+ transactions
The collection doesn’t exist yet. Create it first:
const collection = sv.collection('my-collection', {
  dimensions: 1536,
  create: true  // Auto-create if not exists
});
Check these:
  1. Verify vectors are inserted: await collection.describe()
  2. Check dimension match: Query vector dims must match collection dims
  3. Try higher topK: await collection.query({ vector, topK: 100 })
  4. Check distance metric: Cosine similarity requires normalized vectors
Diagnostics:
const stats = await collection.stats();
console.log(stats.indexSize);  // Number of vectors
console.log(stats.dimensions); // Vector dimensions
console.log(stats.metric);     // Distance metric
Common issues:
  • High dimensional vectors (>2048): Use PCA to reduce dims
  • Large topK (>100): Reduce to 10-50 for faster queries
  • Non-normalized vectors with cosine: Normalize before insert
Resources:Response time: Most issues answered within 24 hours.

Next Steps

Quickstart

Install VecLabs and run your first query in 5 minutes

Benchmarks

See full performance comparison with Pinecone, Qdrant, Weaviate

Architecture

Understand how Rust HNSW + Solana + Shadow Drive work

Migration Guide

Step-by-step Pinecone to VecLabs migration

Build docs developers (and LLMs) love