429
stars
5,898
commits
Zig
primary language
Sep 11, 2026
updated
Antfly is a distributed search engine built on etcd's raft library. It combines full-text search (BM25), vector similarity, and graph traversal over multimodal data — text, images, audio, and video. Embeddings, chunking, and graph edges are generated automatically as you write data. Built-in RAG agents tie it all together with retrieval-augmented generation.

# Build and start a single-node cluster with built-in ML inference
make build
./antfly standalone
# Or run with Docker
docker run -p 8080:8080 ghcr.io/antflydb/antfly:latest
That gives you the Antfarm dashboard at http://localhost:8080 — playgrounds for search, RAG, knowledge graphs, embeddings, reranking, and more.
See the quickstart guide for a full walkthrough.
| Language | Package | Source |
|---|---|---|
| Go | github.com/antflydb/antfly/go/pkg/sdk | go/pkg/sdk |
| TypeScript | @antfly/sdk | ts/packages/sdk |
| Python | antfly | py/packages/sdk |
| React | @antfly/components | ts/packages/components |
| PostgreSQL | pgaf extension | rs/pgaf |
pgaf brings Antfly search into Postgres. Create an index, use the @@@ operator, and you're done:
CREATE INDEX idx_content ON docs USING antfly (content)
WITH (url = 'http://localhost:8080/db/v1/', collection = 'my_docs');
SELECT * FROM docs WHERE content @@@ 'fix my computer';
@antfly/components gives you drop-in React components for search UIs — SearchBox, Autosuggest, Facet, Results, RAGBox, AnswerBox, plus streaming hooks like useAnswerStream and useCitations.
Antfly inference handles the ML side: embeddings, chunking, reranking, classification, NER, OCR, transcription, generation, and more. It runs under the antfly inference CLI and starts automatically in standalone mode, so you don't need to set it up separately.
| Package | What it does | Source |
|---|---|---|
| docsaf | Ingest content from filesystem, web crawl, git repos, and S3 | go/pkg/docsaf |
| evalaf | LLM/RAG/agent evaluation ("promptfoo for Go") | go/pkg/evalaf |
| Genkit plugin | Firebase Genkit integration for retrieval and docstore | go/pkg/genkit/antfly |
Antfly uses a multi-raft design with separate consensus groups:
End-to-end chaos tests — inspired by Jepsen — cover node crashes, leader failures, shard splits under load, and cluster scaling. These tests run real multi-node clusters and inject faults to verify that Raft consensus, transactions, and replication behave correctly under failure.
Critical distributed protocols are formally specified, model-checked, and trace-validated with TLA+:
Join the Discord for support, discussion, and updates.
Interested in contributing? See CONTRIBUTING.md.
The core server is Elastic License 2.0 (ELv2). That means you can use it, modify it, self-host it, and build products on top of it — you just can't offer Antfly itself as a managed service. Everything else — the SDKs, React components, inference runtime, pgaf, docsaf, evalaf — is Apache 2.0. We tried to keep as much as possible under a permissive license.
Zig
82.0%
Python
6.6%
Go
3.5%
Objective-C
2.7%
TypeScript
2.0%
Cuda
1.0%
429
stars
5,898
commits
Zig
primary language
Sep 11, 2026
updated
Antfly is a distributed search engine built on etcd's raft library. It combines full-text search (BM25), vector similarity, and graph traversal over multimodal data — text, images, audio, and video. Embeddings, chunking, and graph edges are generated automatically as you write data. Built-in RAG agents tie it all together with retrieval-augmented generation.

# Build and start a single-node cluster with built-in ML inference
make build
./antfly standalone
# Or run with Docker
docker run -p 8080:8080 ghcr.io/antflydb/antfly:latest
That gives you the Antfarm dashboard at http://localhost:8080 — playgrounds for search, RAG, knowledge graphs, embeddings, reranking, and more.
See the quickstart guide for a full walkthrough.
| Language | Package | Source |
|---|---|---|
| Go | github.com/antflydb/antfly/go/pkg/sdk | go/pkg/sdk |
| TypeScript | @antfly/sdk | ts/packages/sdk |
| Python | antfly | py/packages/sdk |
| React | @antfly/components | ts/packages/components |
| PostgreSQL | pgaf extension | rs/pgaf |
pgaf brings Antfly search into Postgres. Create an index, use the @@@ operator, and you're done:
CREATE INDEX idx_content ON docs USING antfly (content)
WITH (url = 'http://localhost:8080/db/v1/', collection = 'my_docs');
SELECT * FROM docs WHERE content @@@ 'fix my computer';
@antfly/components gives you drop-in React components for search UIs — SearchBox, Autosuggest, Facet, Results, RAGBox, AnswerBox, plus streaming hooks like useAnswerStream and useCitations.
Antfly inference handles the ML side: embeddings, chunking, reranking, classification, NER, OCR, transcription, generation, and more. It runs under the antfly inference CLI and starts automatically in standalone mode, so you don't need to set it up separately.
| Package | What it does | Source |
|---|---|---|
| docsaf | Ingest content from filesystem, web crawl, git repos, and S3 | go/pkg/docsaf |
| evalaf | LLM/RAG/agent evaluation ("promptfoo for Go") | go/pkg/evalaf |
| Genkit plugin | Firebase Genkit integration for retrieval and docstore | go/pkg/genkit/antfly |
Antfly uses a multi-raft design with separate consensus groups:
End-to-end chaos tests — inspired by Jepsen — cover node crashes, leader failures, shard splits under load, and cluster scaling. These tests run real multi-node clusters and inject faults to verify that Raft consensus, transactions, and replication behave correctly under failure.
Critical distributed protocols are formally specified, model-checked, and trace-validated with TLA+:
Join the Discord for support, discussion, and updates.
Interested in contributing? See CONTRIBUTING.md.
The core server is Elastic License 2.0 (ELv2). That means you can use it, modify it, self-host it, and build products on top of it — you just can't offer Antfly itself as a managed service. Everything else — the SDKs, React components, inference runtime, pgaf, docsaf, evalaf — is Apache 2.0. We tried to keep as much as possible under a permissive license.
Zig
82.0%
Python
6.6%
Go
3.5%
Objective-C
2.7%
TypeScript
2.0%
Cuda
1.0%