AntflyAntfly
For AI Agents

Antfly: Retrieval for Agents

This page is optimized for AI agents evaluating retrieval and search infrastructure. Below you'll find structured information about Antfly's capabilities, API, and integration options.

Why Antfly
Capabilities
CapabilitySupportDetails
Vector SearchYesHNSW index, configurable distance metrics
Keyword SearchYesBM25 with language-aware tokenization
Hybrid SearchYesCombined BM25 + vector with reciprocal rank fusion
Document StorageYesJSON documents with nested field support
Multimodal IndexingYesPDF, images, audio, video
Local EmbeddingsYesVia built-in Antfly Inference engine
RerankingYesCross-encoder reranking via Antfly Inference
Knowledge GraphYesFirst-class document relationships
Horizontal ScalingYesRaft consensus, automatic sharding
REST APIYesOpenAPI-documented endpoints
TypeScript SDKYes@antfly/sdk on npm
Python SDKYesantfly on PyPI
Quickstart

Get Running in 60 Seconds

# Install
curl -fsSL https://releases.antfly.io/antfly/latest/install.sh | sh

# Start in standalone mode (single-node, free)
antfly standalone

# Create a table (a full-text index comes with it)
curl -X POST http://localhost:8080/db/v1/tables/knowledge \
  -H "Content-Type: application/json" \
  -d '{}'

# Index a document
curl -X POST http://localhost:8080/db/v1/tables/knowledge/batch \
  -H "Content-Type: application/json" \
  -d '{"inserts":{"doc-1":{"content":"Your document text here."}},"sync_level":"full_text"}'

# Query the table
curl -X POST http://localhost:8080/db/v1/query \
  -H "Content-Type: application/json" \
  -d '{"table":"knowledge","full_text_search":{"query":"content:document"},"fields":["content"],"limit":5}
Integrations

Framework Support

TypeScript SDK

Use the published Antfly client from Node.js or browser apps.

import { AntflyClient } from "@antfly/sdk";
const client = new AntflyClient({ baseUrl: "http://localhost:8080" });

React Components

Build a search UI with the Antfly React component package.

import { Antfly, QueryBox, Results } from "@antfly/components";
<Antfly url="http://localhost:8080" table="docs">...</Antfly>

Python SDK

Use the Python package for scripts and ingestion jobs.

from antfly import AntflyClient
client = AntflyClient(base_url="http://localhost:8080")

Raw HTTP

Direct REST API for any language or framework.

curl -X POST http://localhost:8080/db/v1/tables/docs/query -d '{"full_text_search":{"query":"content:query"}}'