Practical overview
When it fits
Use Entity Db when an application needs browser-side vector storage and similarity search, and IndexedDB is an appropriate storage layer for that application.
Who it is for
- JavaScript developers adding semantic search or recommendations to a browser-based application.
- Builders creating browser-side knowledge stores for retrieval-augmented features.
- Developers who already have embeddings and want to insert and query vectors directly.
Documented uses
- Store text and generate embeddings through a configured Transformers.js model.
- Search stored vectors by text query using cosine similarity.
- Insert and query precomputed vectors without using automatic embedding generation.
- Update or delete stored vector records.
Requirements & limits
- The library is documented as browser-based and uses IndexedDB for persistent storage.
- Automatic embedding generation uses Transformers.js and a model configured at initialization.
- Cosine similarity is the documented search method.
- Binary vectors are marked experimental, with a stated trade-off between smaller, faster comparisons and possible loss of result quality.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Entity Db and initialize a browser database
Add the library to a JavaScript project and configure its database instance for browser-side vector storage.
Before you start
- A JavaScript project using a package manager such as npm, yarn, pnpm, or bun.
- A database path value and a Transformers.js model identifier, as shown in the README.
Steps
Install the package with your package manager: the command below,
yarn add @babycommando/entity-db,pnpm add @babycommando/entity-db, orbun add @babycommando/entity-db.npm install @babycommando/entity-dbImport
EntityDBfrom@babycommando/entity-db.Initialize it with a
vectorPathand a model identifier, for exampleXenova/all-MiniLM-L6-v2.
Expected outcome
A configured EntityDB instance for browser-side vector operations.
Guide limitations
- These steps cover installation and initialization only; they do not document a complete application build or deployment.
- The example configures a Transformers.js model; the README also describes manual insertion and querying for precomputed vectors.
Insert text and query for similar entries
Store text with automatically generated embeddings and retrieve similar entries using a text query.
Before you start
- Entity Db installed and initialized with a database path and Transformers.js model.
Steps
Insert a text record with
await db.insert({ text: "..." }).Pass a query string to
await db.query("...").Use the returned results in the application.
Expected outcome
Text records are stored with generated embeddings and the query returns similar results by cosine similarity.
Guide limitations
- The README does not specify result-ranking controls or a production deployment procedure.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- babycommando/entity-db · Official homepage title · retained in its source language

