Practical overview
When it fits
Use it when building an AI application that needs to ingest documents, store them in a vector database and retrieve relevant passages for a query.
Who it is for
- TypeScript and JavaScript developers adding document retrieval to AI applications.
- Teams connecting application data to a vector database or adding retrieval to a Vercel AI SDK workflow.
Documented uses
- Ingest documents and prepare them for semantic retrieval.
- Connect an application to a vector database using provider packages.
- Retrieve relevant document content in response to an application query.
- Add vector-backed context retrieval to a Vercel AI SDK application.
Requirements & limits
- The core library does not by itself document every provider setup; database use generally requires a provider package.
- The README’s minimal retrieval example uses OpenAI for embeddings and requires an API key.
- The repository lists MIT licensing and describes Vectorstores as focused on vector databases rather than broader application frameworks.
- Vercel AI SDK integration is documented, and Weaviate is shown as a provider-package example.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Build a minimal retrieval example with OpenAI embeddings
Create an index from a document and retrieve relevant text for a query using the README’s example.
Before you start
- A supported JavaScript runtime; Node.js 20 or later is listed.
- The @vectorstores/core and openai packages, plus TypeScript, tsx and @types/node for the README’s example.
- An OpenAI API key, used by the example’s embedding function.
Steps
Install the core, OpenAI and development packages shown in the README.
Set the OPENAI_API_KEY environment variable.
Define an embedding function with the OpenAI client, create a Document and build a VectorStoreIndex from it.
Create a retriever from the index, submit a query and read the returned node text.
Expected outcome
The example returns text associated with a query against the indexed document.
Guide limitations
- The example uses a minimal in-memory-style index flow and does not document persistent database configuration.
- Runtime support for Vercel Edge Runtime and Cloudflare Workers has stated limitations.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- marcusschiesser/vectorstores · Official homepage title · retained in its source language

