Annoy is an approximate nearest neighbor search library with C++ core and Python bindings optimized for memory usage and disk-based index sharing across processes.
The tool solves the problem of finding similar points in high-dimensional space efficiently. It builds tree-based indexes using locality-sensitive hashing that can be serialized to disk and memory-mapped, allowing multiple processes to query the same index simultaneously without duplication. This decoupling of index creation from lookup enables workflows where indexes are built once and distributed as static files for production use.
Annoy suits projects with large datasets in moderate-to-high dimensional space where memory efficiency matters and you need to share indexes across multiple processes or machines. The README notes it performs well up to around 1,000 dimensions and supports multiple distance metrics including Euclidean, Manhattan, cosine, Hamming, and dot product. It is particularly valuable in recommendation systems and similar-item search where you have millions of vectors and want to minimize memory footprint while enabling fast lookups. The tool's distinguishing feature compared to other nearest neighbor libraries is its ability to use static file-based indexes that can be memory-mapped and shared, rather than requiring indexes to be rebuilt or held in memory per process.
The project maintains active continuous integration testing. Development follows a pattern of incremental feature additions, with contributions accepted for specific enhancements like on-disk index building. The codebase supports multiple language bindings beyond Python, including C++, Go, and Lua, indicating sustained interest in cross-platform usability.