Skip to main content

Prerequisites

Before installing VecLabs, ensure you have:
  • Node.js 16+ (for TypeScript) or Python 3.10+ (for Python)
  • No Solana wallet required for basic operations (upsert, query, delete)
  • Solana wallet needed for on-chain verification features (optional)
Vectors are currently stored in-memory. Persistent decentralized storage via Shadow Drive is in active development and ships in v0.2.0.

Install the SDK

VecLabs provides SDKs for both TypeScript and Python with identical APIs.
npm install solvec@alpha
The TypeScript package is published as solvec on npm (currently alpha: solvec@alpha). The Python package is solvec on PyPI with the --pre flag for alpha releases.

Verify Installation

Verify your installation by checking the package version:
import { SolVec } from 'solvec';

const sv = new SolVec({ network: 'devnet' });
console.log('VecLabs SDK loaded successfully');

Network Configuration

VecLabs supports three Solana networks:

Mainnet Beta

Production environment for live applications

Devnet

Development environment for testing (recommended for getting started)

Localnet

Local Solana validator for offline development

Optional: Solana Wallet Setup

For on-chain verification features, you’ll need a Solana wallet:
1

Install Solana CLI

Follow the official Solana installation guide or use:
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
2

Generate or import a keypair

# Generate a new keypair
solana-keygen new --outfile ~/.config/solana/id.json

# Or import an existing one
solana-keygen recover --outfile ~/.config/solana/id.json
3

Connect wallet to SDK

import { SolVec } from 'solvec';
import * as path from 'path';
import * as os from 'os';

const sv = new SolVec({
  network: 'devnet',
  walletPath: path.join(os.homedir(), '.config/solana/id.json')
});
Never commit your Solana wallet keypair to version control. Add *.json wallet files to your .gitignore.

Custom RPC Endpoint

For production applications, consider using a dedicated RPC provider:
import { SolVec } from 'solvec';

const sv = new SolVec({
  network: 'mainnet-beta',
  rpcUrl: 'https://your-rpc-provider.com'  // Helius, QuickNode, etc.
});

Current Status

VecLabs is in alpha with a stable API surface:
FeatureStatus
upsert / query / delete / fetch✅ Working
Cosine, euclidean, dot product metrics✅ Working
Metadata filtering✅ Working
Merkle root computation✅ Working
verify() method✅ Working (local computation)
Solana on-chain Merkle updates🚧 In progress
Shadow Drive persistence🚧 In progress (in-memory for now)
WASM Rust HNSW bridge🚧 In progress (JS fallback for now)

GitHub Repository

View source code and contribute

Solana Program

Live on Solana devnet

npm Package

TypeScript SDK on npm

PyPI Package

Python SDK on PyPI

Next Steps

Quickstart Guide

Learn how to create your first vector collection and perform searches

Build docs developers (and LLMs) love