Skip to content

Repository files navigation

Antarys Vector Database

Antarys Logo

Blazingly Fast Vector Database for Everyone

GitHub Repo starsLicense: MITPython Package


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.

🎥 See Antarys In Action With Image Search

Watch the demo video

Table of Contents

Performance Benchmarks

Benchmarked against leading vector databases using the OpenAI-compatible DBpedia Dataset (1M vectors, 1536 dimensions).

Write Performance

DatabaseThroughput (vectors/sec)Performance vs Antarys
Antarys2,017Baseline
Chroma1,2341.6x slower
Qdrant8922.3x slower
Milvus4454.5x slower

Batch Operations

DatabaseAvg Batch Time (ms)P99 Latency (ms)
Antarys495.7570.3
Chroma810.4890.2
Qdrant1,121.61,456.8
Milvus2,247.33,102.5

Query Performance

DatabaseThroughput (queries/sec)Avg Query Time (ms)P99 Latency (ms)
Antarys602.41.666.9
Chroma340.12.9414.2
Qdrant19.451.47186.3
Milvus4.5220.46892.1

Search Quality & Recall

DatabaseRecall@100 (%)Standard Deviation
Antarys98.47%0.0023
Chroma97.12%0.0034
Qdrant96.83%0.0041
Milvus95.67%0.0056

View full benchmark repository →

Installation

Download Antarys Database

Install Antarys with our one-line installer (macOS ARM and Linux x64):

curl -fsSL http://antarys.ai/start.sh | bash

Install Python Client

pip install antarys

For accelerated performance, install optional dependencies:

pip install antarys[performance]
# or individually
pip install numba lz4

Alternative: Node.js Client

npm install @antarys/client

View Node.js documentation →

Quick Start

importasynciofromantarysimportClientasyncdefmain():
# 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())

Core Features

Collections

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")

Built-in Text Embeddings

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"
)

Vector Operations

Upsert Vectors

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
)

Query Vectors

# 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 Vectors

# Delete by IDsawaitvectors.delete(["vec1", "vec2", "vec3"])

Performance Optimization

Client Configuration

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
)

Scale-Based Recommendations

Small Scale (< 1M vectors)

client=Client(
connection_pool_size=20,
cache_size=500,
thread_pool_size=4
)
# Batch operationsbatch_size=1000parallel_workers=2

Medium Scale (1M - 10M vectors)

client=Client(
connection_pool_size=50,
cache_size=2000,
thread_pool_size=8
)
# Batch operationsbatch_size=3000parallel_workers=4

Large Scale (10M+ vectors)

client=Client(
connection_pool_size=100,
cache_size=5000,
thread_pool_size=16
)
# Batch operationsbatch_size=5000parallel_workers=8

HNSW Index Tuning

Optimize 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
)

Advanced Features

Dimension Validation

# Validate vector dimensionsis_valid=awaitvectors.validate_vector_dimensions([0.1] *1536)
# Get collection dimensionsdims=awaitvectors.get_collection_dimensions()

Cache Management

# Get cache statisticsstats=vectors.get_cache_stats()
print(f"Cache hit rate: {stats['hit_rate']:.2%}")
# Clear cachesawaitclient.clear_cache()
awaitvectors.clear_cache()

Health Monitoring

# 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)}")

Type Safety

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
)

Resources

License

Antarys is released under the MIT License.

Community


Star this repo to help more developers discover Antarys!

About

Python client for Antarys vector database, optimized for large-scale vector operations with built-in caching, parallel processing, and dimension validation.

Topics

Resources

Stars

232 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages