EveryDev.ai
Subscribe
Home
Tools

4,791+ AI tools

  • New
  • Trending
  • Featured
  • Rate tools
  • Compare
  • Arena
Categories
  • Agents2432
  • Coding1785
  • Infrastructure837
  • Projects689
  • Research582
  • MCP557
  • Marketing486
  • Analytics468
  • Design396
  • Testing384
  • Data355
  • Security297
  • Integration249
  • Communication238
  • Prompts231
  • Extensions216
  • Commerce167
  • Voice162
  • DevOps161
  • Web117
  • Learning113
  • Finance33
AI Tools by Topic
  • AI Coding Assistants
  • Agent Frameworks
  • MCP Servers
  • AI Prompt Tools
  • Vibe Coding Tools
  • AI Design Tools
  • AI Database Tools
  • AI Website Builders
  • AI Testing Tools
  • LLM Evaluations
Follow Us
  • X / Twitter
  • LinkedIn
  • Reddit
  • Discord
  • Threads
  • Bluesky
  • Mastodon
  • YouTube
  • GitHub
  • Instagram
Get Started
  • Users
  • Rate Tools
  • About
  • Editorial Standards
  • Corrections & Disclosures
  • Community Guidelines
  • Advertise
  • Contact Us
  • Newsletter
  • Submit a Tool
  • Start a Discussion
  • Write A Blog
  • Share A Build
  • Terms of Service
  • Privacy Policy
Explore with AI
  • ChatGPT
  • Gemini
  • Claude
  • Grok
  • Perplexity
Agent Experience
  • llms.txt
Theme
With AI, Everyone is a Dev. EveryDev.ai ©
    1. Home
    2. Tools
    3. Hnswlib
    Hnswlib icon

    Hnswlib

    Search and Discovery

    Header-only C++ library with Python bindings for fast approximate nearest neighbor search using HNSW graphs.

    Visit Website

    At a Glance

    Pricing
    Open Source

    Header-only C++ HNSW library with Python bindings, released under the Apache License 2.0 with no-charge, royalty-free grant.

    Engagement

    Available On

    Windows
    macOS
    Linux
    API
    SDK

    Resources

    WebsiteDocsGitHubllms.txt

    Topics

    Search and DiscoveryVector DatabasesAI Development Libraries

    Alternatives

    chromem-goTypesenseParadeDB
    Developer
    nmslib

    Listed Oct 2026

    About Hnswlib

    Hnswlib is an open-source, header-only C++ implementation of the Hierarchical Navigable Small World (HNSW) algorithm for approximate nearest neighbor search, with Python bindings. It is maintained under the nmslib organization on GitHub and licensed under Apache 2.0. It supports incremental index construction, element updates, and deletions.

    What It Is

    Hnswlib builds graph-based vector indexes that return the k closest elements to a query vector. The README lists it as lightweight, with no dependencies other than C++11. Interfaces exist for C++ and Python, with external support for Java and R. Python users create an index for a chosen distance space and dimension, initialize it with capacity and graph parameters (M, ef_construction), add numpy vectors with optional integer labels, and run batch k-nearest-neighbor queries that return labels and distances.

    Index Operations and Distances

    The Python bindings support squared L2, inner product, and cosine distance. Custom user-defined distances are supported in C++. Items can be inserted incrementally, updated by reusing labels, marked as deleted, and later replaced by new items to control index size. Queries can use a filter on labels, and the thread count can be set for insertion and search. Indexes can be saved to and loaded from disk, and Python index objects are picklable. The query-time accuracy/speed trade-off is controlled with the ef parameter.

    Recent Releases

    The README describes version 0.10.0rc2 as a release candidate, not a stable PyPI upload. It adds an optional no-exceptions C++ API (*NoExceptions methods returning Status/StatusOr) so headers can be compiled with -fno-exceptions, stream-based saveIndex/loadIndex, and CI coverage across Clang, GCC, MSVC, ASAN and UBSAN. Version 0.8.0 added multi-vector document search and epsilon search in C++, and 0.7.0 added filtering and replacement of deleted elements.

    Setup Path

    Install with pip install hnswlib or build from source with pip install . after cloning the repository. The C++ examples cover multithreaded use, multivector search, epsilon search and filtering. The repository also documents reproducing a 200M SIFT test and an updates test.

    Hnswlib - 1

    Community Discussions

    Be the first to start a conversation about Hnswlib

    Share your experience with Hnswlib, ask questions, or help others learn from your insights.

    Pricing

    OPEN SOURCE

    Open Source (Apache-2.0)

    Header-only C++ HNSW library with Python bindings, released under the Apache License 2.0 with no-charge, royalty-free grant.

    • Header-only C++ with no dependencies other than C++11
    • C++ and Python interfaces
    • Incremental index construction and element updates
    • Element deletion via marking, with replacement
    • Filtering support

    Capabilities

    Key Features

    • Header-only C++11 implementation with no other dependencies
    • Python bindings with numpy support
    • Incremental index construction and element updates
    • Element deletion with replacement of deleted elements
    • Filtered search by label
    • Multi-threaded insertion and querying
    • Squared L2, inner product and cosine distances
    • Custom distance functions in C++
    • Multi-vector document search and epsilon search (C++)
    • Index save/load and pickle serialization
    • Optional no-exceptions C++ API

    Integrations

    NumPy
    R (RcppHnswlib)
    Java (external support)
    API Available
    View Docs

    Ratings & Reviews

    No ratings yet

    Be the first to rate Hnswlib and help others make informed decisions.

    Rate other tools you’ve used

    Developer

    nmslib

    Read more about nmslib
    WebsiteGitHub
    1 tool in directory

    Similar Tools

    chromem-go icon

    chromem-go

    Embeddable vector database for Go with a Chroma-like interface, zero third-party dependencies, in-memory storage and optional persistence.

    Typesense icon

    Typesense

    Open-source, typo-tolerant, in-memory search engine with a REST API, vector search, and client libraries.

    ParadeDB icon

    ParadeDB

    ParadeDB is a modern Elasticsearch alternative built as a Postgres extension, enabling full-text, hybrid, and faceted search directly within PostgreSQL.

    Browse all tools

    Related Topics

    Search and Discovery

    AI-powered tools for finding and exploring information.

    60 tools

    Vector Databases

    Specialized databases optimized for storing and retrieving vector embeddings that power semantic search, recommendation systems, and other AI applications with similarity matching.

    52 tools

    AI Development Libraries

    Programming libraries and frameworks that provide machine learning capabilities, model integration, and AI functionality for developers.

    434 tools
    Browse all topics
    Back to all toolsSuggest an edit
    ratings
    discussions