Overview
This guide shows how to build an AI agent with persistent memory that survives across sessions. Every conversation is embedded, stored in SolVec, and retrievable via semantic search. After each write, the memory state is cryptographically verified on Solana.Unlike traditional vector databases where memory lives on someone else’s servers, SolVec memory is:
- Encrypted with your Solana wallet key
- Verifiable against an on-chain Merkle root
- Portable — you own the data, not the platform
Prerequisites
- Node.js 18+
- OpenAI API key (or any embedding provider)
- Solana wallet (optional for verification)
Installation
Complete Example
1. Initialize SolVec Client
2. Store Conversation Memory
Every user message is embedded and stored with metadata:3. Recall Relevant Memories
Retrieve semantically similar past conversations:4. Build the Agent Loop
Combine memory storage + recall + LLM generation:5. Verify Memory Integrity
Prove that memory hasn’t been tampered with:Full Usage Example
Why This Matters
Persistent Memory
Agent memory survives restarts. No data loss.
Verifiable State
Cryptographically prove memory hasn’t been tampered with.
Semantic Search
Recall relevant context across thousands of conversations.
Data Ownership
You own the memory, not the database provider.
Next Steps
RAG Application
Build a full RAG pipeline with document chunking
LangChain Integration
Use SolVec as a LangChain vector store