Antarys is a high-performance vector database engineered for production-scale AI applications. Built from the ground up for speed, it delivers 1.5-2x faster text query and 6-8x faster image queries compared to leading alternatives, while maintaining superior recall accuracy.
- Performance Benchmarks
- Installation
- Quick Start
- Core Features
- Performance Optimization
- Advanced Features
- Type Safety
- Resources
- License
Benchmarked against leading vector databases using the OpenAI-compatible DBpedia Dataset (1M vectors, 1536 dimensions).
| Database | Throughput (vectors/sec) | Performance vs Antarys |
|---|---|---|
| Antarys | 2,017 | Baseline |
| Chroma | 1,234 | 1.6x slower |
| Qdrant | 892 | 2.3x slower |
| Milvus | 445 | 4.5x slower |
| Database | Avg Batch Time (ms) | P99 Latency (ms) |
|---|---|---|
| Antarys | 495.7 | 570.3 |
| Chroma | 810.4 | 890.2 |
| Qdrant | 1,121.6 | 1,456.8 |
| Milvus | 2,247.3 | 3,102.5 |
| Database | Throughput (queries/sec) | Avg Query Time (ms) | P99 Latency (ms) |
|---|---|---|---|
| Antarys | 602.4 | 1.66 | 6.9 |
| Chroma | 340.1 | 2.94 | 14.2 |
| Qdrant | 19.4 | 51.47 | 186.3 |
| Milvus | 4.5 | 220.46 | 892.1 |
| Database | Recall@100 (%) | Standard Deviation |
|---|---|---|
| Antarys | 98.47% | 0.0023 |
| Chroma | 97.12% | 0.0034 |
| Qdrant | 96.83% | 0.0041 |
| Milvus | 95.67% | 0.0056 |
View full benchmark repository →
Install Antarys with our one-line installer (macOS ARM and Linux x64):
curl -fsSL http://antarys.ai/start.sh | bashpip install antarysFor accelerated performance, install optional dependencies:
pip install antarys[performance]
# or individually
pip install numba lz4npm install @antarys/clientimportasynciofromantarysimportClientasyncdefmain():
# Initialize clientclient=Client(host="http://localhost:8080")
# Create collectionawaitclient.create_collection(
name="my_vectors",
dimensions=1536,
enable_hnsw=True
)
vectors=client.vector_operations("my_vectors")
# Upsert vectorsawaitvectors.upsert([
{
"id": "doc1",
"values": [0.1] *1536,
"metadata": {"category": "AI", "source": "research"}
},
{
"id": "doc2",
"values": [0.2] *1536,
"metadata": {"category": "ML", "source": "tutorial"}
}
])
# Query similar vectorsresults=awaitvectors.query(
vector=[0.15] *1536,
top_k=5,
include_metadata=True,
filter={"category": "AI"}
)
formatchinresults["matches"]:
print(f"ID: {match['id']}, Score: {match['score']:.4f}")
awaitclient.close()
asyncio.run(main())Create and manage vector collections with optimized parameters:
# Create collection with HNSW indexingawaitclient.create_collection(
name="documents",
dimensions=1536,
enable_hnsw=True,
shards=16,
m=16,
ef_construction=200
)
# List all collectionscollections=awaitclient.list_collections()
# Get collection detailsinfo=awaitclient.describe_collection("documents")
# Delete collectionawaitclient.delete_collection("documents")Generate embeddings without external API calls:
# Simple embeddingembedding=awaitclient.embed("Hello, World!")
# Batch embeddingsembeddings=awaitclient.embed([
"First document",
"Second document",
"Third document"
])
# Query-optimized embeddingsquery_emb=awaitclient.embed_query("What is artificial intelligence?")
# Document embeddings with progressdoc_embs=awaitclient.embed_documents(
documents=["Doc 1", "Doc 2", "Doc 3"],
show_progress=True
)
# Text similarity comparisonscore=awaitclient.text_similarity(
"machine learning",
"artificial intelligence"
)vectors=client.vector_operations("my_collection")
# Single vector upsertawaitvectors.upsert([
{
"id": "vec1",
"values": [0.1, 0.2, 0.3],
"metadata": {"type": "document", "timestamp": 1234567890}
}
])
# Batch upsert for large-scale operationsbatch= []
foriinrange(10000):
batch.append({
"id": f"vector_{i}",
"values": [random.random() for_inrange(1536)],
"metadata": {"category": f"cat_{i%5}"}
})
awaitvectors.upsert_batch(
batch,
batch_size=5000,
parallel_workers=8,
show_progress=True
)# Semantic search with filtersresults=awaitvectors.query(
vector=[0.1] *1536,
top_k=10,
include_metadata=True,
filter={"category": "research"},
threshold=0.7,
use_ann=True
)
# Batch queriesquery_vectors= [[0.1] *1536, [0.2] *1536, [0.3] *1536]
batch_results=awaitvectors.batch_query(
vectors=query_vectors,
top_k=5,
include_metadata=True
)
# Get specific vectorvector_data=awaitvectors.get_vector("vec1")
# Count vectorscount=awaitvectors.count_vectors()# Delete by IDsawaitvectors.delete(["vec1", "vec2", "vec3"])Configure the client for optimal performance based on your workload:
client=Client(
host="http://localhost:8080",
# Connection poolingconnection_pool_size=100,
# HTTP/2 and compressionuse_http2=True,
compression=True,
# Client-side cachingcache_size=1000,
cache_ttl=300,
# Threadingthread_pool_size=16,
# Reliabilityretry_attempts=5,
timeout=120
)client=Client(
connection_pool_size=20,
cache_size=500,
thread_pool_size=4
)
# Batch operationsbatch_size=1000parallel_workers=2client=Client(
connection_pool_size=50,
cache_size=2000,
thread_pool_size=8
)
# Batch operationsbatch_size=3000parallel_workers=4client=Client(
connection_pool_size=100,
cache_size=5000,
thread_pool_size=16
)
# Batch operationsbatch_size=5000parallel_workers=8Optimize HNSW parameters for your accuracy/speed requirements:
# Collection creationawaitclient.create_collection(
name="optimized",
dimensions=1536,
enable_hnsw=True,
m=16, # Connectivity (16-64 for high recall)ef_construction=200, # Construction quality (200-800)shards=32# Parallel processing
)
# Query-time tuningresults=awaitvectors.query(
vector=query_vector,
ef_search=200, # Search quality (100-800)use_ann=True# Enable HNSW acceleration
)# Validate vector dimensionsis_valid=awaitvectors.validate_vector_dimensions([0.1] *1536)
# Get collection dimensionsdims=awaitvectors.get_collection_dimensions()# Get cache statisticsstats=vectors.get_cache_stats()
print(f"Cache hit rate: {stats['hit_rate']:.2%}")
# Clear cachesawaitclient.clear_cache()
awaitvectors.clear_cache()# Check server healthhealth=awaitclient.health()
# Get server informationinfo=awaitclient.info()
# Collection statisticscollection_info=awaitclient.describe_collection("vectors")
print(f"Vector count: {collection_info.get('vector_count', 0)}")Antarys includes comprehensive type definitions:
fromantarys.typesimportVectorRecord, SearchResult, SearchParams# Type-safe vector recordrecord: VectorRecord= {
"id": "example",
"values": [0.1, 0.2, 0.3],
"metadata": {"key": "value"}
}
# Type-safe search parametersparams=SearchParams(
vector=[0.1] *1536,
top_k=10,
include_metadata=True,
threshold=0.8
)- Full Documentation - Complete API reference and guides
- Performance Report - Detailed benchmark analysis
- Benchmark Repository - Reproduce performance tests
- Node.js Client - TypeScript/JavaScript SDK
Antarys is released under the MIT License.
- Discord - Get help and discuss features
- GitHub Issues - Report bugs or request features
- Twitter - Follow for updates
⭐ Star this repo to help more developers discover Antarys!
