Hemlis is a high-performance vector database engineered for blazing-fast similarity search. This documentation will help you get started quickly and integrate Hemlis into your applications.
Hemlis is provided as a subscription service with Docker deployment. After subscribing, you'll receive access credentials and deployment instructions.
# Pull the Hemlis container (requires subscription)
docker pull hemlis/vectordb:latest
# Run with basic configuration
docker run -d \
--name hemlis-db \
-p 8080:8080 \
-e HEMLIS_API_KEY=your-api-key \
-e HEMLIS_CONFIG=production \
hemlis/vectordb:latest
# Verify the service is running
curl http://localhost:8080/health
All API requests require authentication via API key in the header:
Authorization: Bearer your-api-key
POST /vectors
Content-Type: application/json
{
"vectors": [
{
"id": "doc1",
"values": [0.1, 0.2, 0.3, ...],
"metadata": {"category": "tech", "title": "Document 1"}
},
{
"id": "doc2",
"values": [0.4, 0.5, 0.6, ...],
"metadata": {"category": "science", "title": "Document 2"}
}
]
}
POST /search
Content-Type: application/json
{
"vector": [0.1, 0.2, 0.3, ...],
"k": 10,
"filter": {
"category": "tech"
},
"threshold": 0.8
}
{
"results": [
{
"id": "doc1",
"score": 0.95,
"metadata": {"category": "tech", "title": "Document 1"}
}
],
"took": "2ms",
"total": 1
}
from langchain.vectorstores import Hemlis
from langchain.embeddings import OpenAIEmbeddings
# Initialize Hemlis vector store
vectorstore = Hemlis(
endpoint="http://localhost:8080",
api_key="your-api-key",
embedding_function=OpenAIEmbeddings()
)
# Add documents
documents = ["Document 1", "Document 2", "Document 3"]
vectorstore.add_texts(documents)
# Search similar documents
results = vectorstore.similarity_search("query text", k=5)
const HemlisSdk = require('@hemlis/sdk');
const client = new HemlisSdk({
endpoint: 'http://localhost:8080',
apiKey: 'your-api-key'
});
// Insert vectors
await client.insert({
vectors: [
{ id: 'doc1', values: [0.1, 0.2, 0.3] },
{ id: 'doc2', values: [0.4, 0.5, 0.6] }
]
});
// Search
const results = await client.search({
vector: [0.1, 0.2, 0.3],
k: 10
});
# Health check
curl -H "Authorization: Bearer your-api-key" \
http://localhost:8080/health
# Insert vectors
curl -X POST \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"vectors":[{"id":"test","values":[0.1,0.2,0.3]}]}' \
http://localhost:8080/vectors
# Search vectors
curl -X POST \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"vector":[0.1,0.2,0.3],"k":5}' \
http://localhost:8080/search
HEMLIS_API_KEY
- Your subscription API keyHEMLIS_PORT
- Server port (default: 8080)HEMLIS_CONFIG
- Configuration profile (development, production)HEMLIS_LOG_LEVEL
- Logging level (info, debug, error)HEMLIS_MAX_VECTORS
- Maximum vectors per collection# Production-ready Docker Compose
version: '3.8'
services:
hemlis:
image: hemlis/vectordb:latest
ports:
- "8080:8080"
environment:
- HEMLIS_API_KEY=your-production-key
- HEMLIS_CONFIG=production
- HEMLIS_LOG_LEVEL=info
volumes:
- hemlis-data:/var/lib/hemlis
restart: unless-stopped
volumes:
hemlis-data: