Documentation Index
Fetch the complete documentation index at: https://docs.veclabs.xyz/llms.txt
Use this file to discover all available pages before exploring further.
1. Get an API key
Sign up at app.veclabs.xyz. Your API key will be shown once — save it.
2. Install the SDK
npm install @veclabs/solvec
3. Create a collection
import { SolVec } from '@veclabs/solvec';
const sv = new SolVec({ apiKey: process.env.RECALL_API_KEY });
const collection = sv.collection('agent-memory', { dimensions: 1536 });
4. Upsert vectors
await collection.upsert([{
id: 'mem_001',
values: embedding, // float[] of length 1536
metadata: { text: 'User prefers dark mode' }
}]);
The response includes a merkleRoot — a SHA-256 fingerprint of your collection. On Pro and above, this root is posted to the Solana Anchor program automatically.
5. Query
const results = await collection.query({
vector: queryEmbedding,
topK: 5
});
// results.matches: [{ id, score, metadata }]
6. Verify (Pro and above)
const proof = await collection.verify();
console.log(proof.solanaExplorerUrl);
// → https://explorer.solana.com/tx/...?cluster=devnet
The verify call fetches the on-chain Merkle root from Solana and computes it locally from your collection. If they match, your memory is intact and tamper-evident.
What’s free vs paid?
| Feature | Free | Pro ($25/mo) |
|---|
| Vectors | 5K | 500K |
| Writes/mo | 1K | 50K |
| Queries/mo | 10K | 500K |
| Irys permanent storage | ❌ | ✅ |
| Merkle root → Solana | ❌ | ✅ |
Free tier vectors live in Redis cache. Pro tier vectors are stored permanently on Arweave via Irys and anchored to Solana on every write.
LangChain integration
npm install @veclabs/solvec @langchain/core
import { RecallVectorStore } from '@veclabs/solvec/langchain';
import { OpenAIEmbeddings } from '@langchain/openai';
const store = await RecallVectorStore.fromTexts(
["User prefers dark mode", "Meeting at 3pm"],
[{ source: "chat" }, { source: "calendar" }],
new OpenAIEmbeddings(),
{ apiKey: process.env.RECALL_API_KEY, collection: "langchain-memory" }
);
const docs = await store.similaritySearch("user preferences", 3);