Practical overview
When it fits
Use WVS when a web application needs browser-native vector storage and semantic retrieval over text, including as a retrieval component in an in-browser or other RAG workflow.
Who it is for
- Web developers adding semantic search to text collections.
- Developers building browser-based knowledge stores or retrieval components for RAG applications.
Documented uses
- Store text documents as vectors in browser IndexedDB.
- Retrieve documents similar in meaning to a query.
- Filter search results using metadata or text content.
- Manage a configured storage-size limit by removing least-recently-used documents.
Requirements & limits
- Choose an embedding integration based on infrastructure: OpenAI needs an API key and costs money; Ollama needs a local instance and embedding model; Hugging Face Transformers are also supported.
- Vectors are stored in browser IndexedDB, and the library documents an adjustable maximum size with least-recently-used removal when the limit is exceeded.
- The repository identifies the project as TypeScript and MIT-licensed.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add text and search with OpenAI embeddings
Use the documented VectorStorage API to add a text document with metadata and run a semantic similarity search.
Before you start
- Install the package with npm.
- An OpenAI API key; the README notes that OpenAI embeddings cost money.
Steps
Import VectorStorage and OpenAIEmbedder from web-vector-storage.
Create VectorStorage with an OpenAIEmbedder configured with the API key.
Call addText with the document text and a metadata object.
Call similaritySearch with a query and receive the results.
Expected outcome
A similarity-search result list for the query, based on vectors stored in browser IndexedDB.
Guide limitations
- The documented example uses OpenAI embeddings, which require an API key and incur cost.
- The guide covers adding one text and searching; it does not describe a complete RAG application.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- lestan/web-vector-storage · Official homepage title · retained in its source language

