Antfly: Distributed, Multimodal Search and Memory and Graphs in Go
Hey HN, I’m excited to share Antfly: a distributed document database and search engine written in Go that combines full-text, vector, and graph search. Use it for distributed multimodal search and memory, or for local dev and small deployments. I built this to give developers a single-binary deployment with native ML inference (via a built-in service called Termite), meaning you don't need external API calls for vector search unless you want to use them. Some things that might interest this crowd: Capabilities: Multimodal indexing (images, audio, video), MongoDB-style in-place updates, and streaming RAG. Distributed Systems: Multi-Raft setup built on etcd's library, backed by Pebble (CockroachDB's storage engine). Metadata and data shards get their own Raft groups. Single Binary: antfly swarm gives you a single-process deployment with everything running. Good for local dev and small deployments. Scale out by adding nodes when you need to. Ecosystem: Ships with a Kubernetes operator and an MCP server for LLM tool use. Native ML inference: Antfly ships with Termite. Think of it like a built-in Ollama for non-generative models too (embeddings, reranking, chunking, text generation). No external API calls needed, but also supports them (OpenAI, Ollama, Bedrock, Gemini, etc.) License: I went with Elastic License v2, not an OSI-approved license. I know that's a topic with strong feelings here. The practical upshot: you can use it, modify it, self-host it, build products on top of it, you just can't offer Antfly itself as a managed service. Felt like the right tradeoff for sustainability while still making the source available. Happy to answer questions about the architecture, the Raft implementation, or anything else. Feedback welcome!
- API Platform
- Cloud Native
- Data Analytics
✨ AI Summary
Antfly is a distributed document database and search engine written in Go that combines full-text, vector, and graph search capabilities. It features a single-binary deployment with built-in ML inference for embeddings and other tasks.
Best For
Developers needing a unified search solution for multimodal data (images, audio, video), Teams looking for a self-hosted, distributed search and memory system for RAG applications, Projects requiring local development or small deployments without external API dependencies
Why It Matters
It provides a single, self-contained system for multimodal search with native ML inference, eliminating the need for external API calls while supporting distributed scaling.
Key Features
- Combines full-text, vector, and graph search in a single distributed database
- Built-in ML inference service for embeddings, reranking, and chunking without external APIs
- Supports multimodal indexing of images, audio, and video documents
- Single binary deployment for local development with easy scaling to distributed clusters
Use Cases
- A media company wants to build an internal archive search system where journalists can find video clips, audio interviews, and images using natural language queries. Instead of maintaining separate databases for different media types and relying on external AI services, their engineering team deploys Antfly as a single binary on their internal servers. Journalists can now search across all media formats simultaneously, and the system automatically suggests related content using graph relationships between people, events, and topics mentioned in the materials.
- A startup developing an AI-powered research assistant needs to implement a memory system that remembers user interactions, documents, and web pages across sessions. Their developers use Antfly's local deployment mode for prototyping, leveraging its built-in embedding models to vectorize content without API costs. As they scale, they distribute the database across multiple nodes while maintaining the ability to perform semantic searches over past conversations and retrieved documents, enabling their assistant to provide contextually relevant answers.
- An e-commerce platform wants to enhance product discovery by allowing customers to search using images or vague descriptions. Their backend team implements Antfly to index product images, descriptions, and customer review sentiments. When a user uploads a photo of a desired item, the system finds visually similar products and recommends complementary items based on purchase graph patterns, all while handling real-time inventory updates through MongoDB-style operations.