Elestia Open Source Ratings
4.8

hnswlib-node

Keep, but not for new work. 9th of 9 vector databases and clients.

hnswlib-node gives Node.js bindings to the C++ hnswlib library, for fast in-memory nearest-neighbour search with an index you can save to a file. It works and is fast, but it has had no release since March 2024 and it compiles native code on install. For new work, a maintained embedded store such as LanceDB, or pgvector if you already run Postgres, is usually the better pick.

Best for: Node.js developers who want a small, in-process HNSW index with no server, and who can build native addons.

WebsiteGitHubnpm

Scores

Overall4.8

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

It is a fast, working in-process HNSW index, and LangChain users may already have it. But it has had no release in over two years, its native install is fragile, and it lacks the storage and filtering that peers offer. Its growth trails the category. Keep it where it runs; for new work pick LanceDB for embedded use, pgvector if you run Postgres, or a hosted client.

  • npm latestPublishedAt: No release since March 2024.
  • peers LanceDB downloads: The embedded peer LanceDB grew roughly 10x in a year with active releases.
  • github.com/yoshoku/hnswlib-node/issues: Install failures remain unresolved.

GPT-6.2 Sol: 5.6, likely 4.4 to 6.8

The typed API and native search make it a reasonable choice for a local index on a controlled Node.js deployment. For most new embedded vector stores, LanceDB offers queryable metadata and a more recent release. A long npm release gap and native build friction limit the recommendation, while the scarce head-to-head evidence leaves room for it to score higher on workloads that only need nearest-neighbor search.

Needed by many3.6

How many developers need a tool for this job?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

Many AI apps need vector search, but this project covers only one slice of that job: an in-process index on Node.js. Teams that need a shared or hosted store, or that run on browser or edge runtimes, cannot use it. That makes it a clear niche inside a large category.

GPT-6.2 Sol: 3.2, likely 2.1 to 4.4

Embedding search is useful for semantic search and AI memory. This native binding serves the narrower group that wants a RAM-resident index inside a Node.js process. Surveys show that Node.js is widely used, but they give little indication of how many projects need this particular setup.

Helps a lot5.8

How well does it do the job for those who need it?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

The core HNSW search is fast and accurate, and the API is small and typed. But it is a bare index: no metadata, no filtering and no async search. Native builds often fail on install. Open issues on install errors, a wrong initIndex signature, and a process abort on wrong-typed input show rough edges. Embedded peers like LanceDB do more of the job.

GPT-6.2 Sol: 6.5, likely 5.4 to 7.6

Version 3.0.0 provides tunable HNSW, exact search, and typed methods for saving and loading an index. The small API and examples give developers and coding agents a clear starting point, though queries are synchronous and metadata stays in application code. A downstream project reported good recall on its own embeddings, while install friction, a reported native crash, and limited head-to-head testing of the Node binding keep the range wide.

Holds up over time4.0

Will it still be a good choice in two years?

Claude Opus 5.5: 3.5, likely 2.0 to 5.0

Commits continue (107 last year), but nearly all are Dependabot bumps and tooling changes. There has been no npm release since March 2024. One person maintains it, and install-bug issues from 2023 are still open. The repository is not abandoned, but it looks like keep-alive maintenance, and the ecosystem is moving towards full embedded stores.

  • github.com/yoshoku/hnswlib-node/commits/main: 33 of the 35 recent commits are Dependabot or merges of its PRs; no feature work.
  • npm latestPublishedAt: Last published 2024-03-11; 0 versions in the last year.
  • github contributors: 5 contributors and one main maintainer.

GPT-6.2 Sol: 4.5, likely 3.2 to 5.9

GitHub recorded 107 commits in the past year, and the build history shows ongoing dependency upkeep. The npm version has stood since March 2024, and several user issues have been open for years. LanceDB and Vectra both shipped in 2026, while future release cadence and maintainer coverage here remain uncertain.

  • github commitsLastYear, contributors: 107 commits in the past year and five contributors in total.
  • npm latestPublishedAt, versionsLastYear: Latest publication was March 2024, with zero versions in the past year.
  • github.com/yoshoku/hnswlib-node/actions/workflows/build.yml: Build history shows repeated dependency updates and maintainer merges.
  • github.com/yoshoku/hnswlib-node/issues: Several installation and API reports from 2023 and 2024 remain open.
  • peers latestPublishedAt: LanceDB and Vectra both published new versions in 2026.
Used widely4.0

How many use it, and is that growing?

Claude Opus 5.5: 4.5, likely 3.5 to 5.5

514k downloads in 4 weeks, up 2.5x on a year ago. That is below the 4.1x median, so it is losing ground, and most peers grew 3x to 19x. Many installs likely come through LangChain and AI app templates rather than direct choice. Its 424 dependent repos are a solid count against the peers, which points to a few thousand projects that chose it.

  • npm downloadsLast4Weeks: 514,169 now vs 207,480 a year ago: a 2.5x ratio, under the 4.1x median.
  • dependents: 424 repos and 40 packages, more than Chroma (294) and Milvus (348).
  • github stars: 139 stars; no Hacker News or Bluesky attention.

GPT-6.2 Sol: 3.5, likely 2.3 to 4.7

Four-week downloads rose from about 207,000 to 514,000, or 2.48 times, below the 4.1 catalog median. The 424 indexed dependent repositories exceed Chroma's 294 and Qdrant's 97, but trail Pinecone's 1,487. Optional downstream installs make direct choices hard to estimate, and the tracked social sources show no attention.

  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads grew 2.48 times, below the 4.1 benchmark.
  • dependents repos, packages; peers dependentRepos: 424 indexed repositories and 40 packages depend on it.
  • github stars; hackerNews stories; bluesky posts: 139 stars and zero tracked Hacker News stories or Bluesky posts.
  • github.com/proffesor-for-testing/agentic-qe/issues/439: Agentic QE installs it as an optional dependency and can fall back at runtime.
Vouched for4.3

Who stands behind it being good?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

Its main endorsement is LangChain.js, which uses it for the HNSWLib vector store. The quality evidence is about the upstream C++ hnswlib, not these bindings. I found no surveys, production write-ups or Node benchmarks of this package.

GPT-6.2 Sol: 4.6, likely 3.3 to 5.9

LangChain.js shipped an integration, and Agentic QE adopted the binding and published recall tests. LangChain has since sunset the community package that houses the integration. Most independent benchmarks cover the underlying Hnswlib engine, so evidence for the Node binding in production remains limited.

Safe6.2

How safe is it to depend on?

Claude Opus 5.5: 6.5, likely 5.0 to 7.5

It has no known advisories, only two runtime dependencies and an Apache-2.0 licence. But it compiles C++ at install time. There is no Scorecard data. One maintainer publishes releases. An open issue reports that wrong-typed input aborts the whole process, which is a stability risk for servers.

  • advisories total: 0 advisories in OSV.
  • npm dependencies: 2 runtime dependencies.
  • scorecard: No OpenSSF Scorecard result.
  • github.com/yoshoku/hnswlib-node/issues: Issue #401: wrong-typed elements abort the process.

GPT-6.2 Sol: 5.8, likely 4.3 to 7.3

The Apache-2.0 license is permissive, the package has two direct npm dependencies, and OSV lists zero advisories. Installation builds native code, and a reported process-abort bug still has an open fix. The long release gap, missing public security policy, and unavailable Scorecard leave uncertainty about how quickly fixes would reach npm.

Good

  • Fast approximate nearest-neighbour search from the well-known hnswlib C++ library, with no server to run.
  • Small, simple API to build, query, save and load an index, and it ships its own TypeScript types.
  • LangChain.js uses it for its HNSWLib vector store, so there are many examples to copy.
  • Apache-2.0 licence, only two runtime dependencies, and no known advisories.

Bad

  • No npm release since 3.0.0 in March 2024; recent commits are mostly Dependabot updates.
  • It compiles native code on install, and several open issues report failed installs on Windows, M-series Macs and Linux.
  • It is only an index: there is no metadata filtering, no document-level storage and no concurrent persistence. You build those yourself.
  • It runs on Node.js only, so it does not work in browsers or edge runtimes, and serverless platforms need a native build.

The numbers

npm downloads, 4 weeks
514k ×2.5 in a year
GitHub stars
139
Commits, 12 months
107
npm version
3.0.0 Mar 2024
Versions, 12 months
0
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
None
Licence
Apache-2.0

Read on 21 November 2026 from GitHub (yoshoku/hnswlib-node), npm (hnswlib-node), OSV and the OpenSSF Scorecard.

Vector databases and clients

  1. 7.6LanceDB
  2. 7.5pgvector-node
  3. 7.4Qdrant client
  4. 7.1Pinecone client
  5. 6.9Milvus client
  6. 6.7Weaviate client
  7. 6.0Chroma client
  8. 5.2Vectra
  9. 4.8hnswlib-node
Compare all 9 on six scores