Qdrant Vector Database

Set up Qdrant for semantic search.

Qdrant is a high-performance vector database used by Cortex for semantic search.

Docker Setup

Quick Start

docker run -p 6333:6333 qdrant/qdrant

With Persistent Storage

docker run -p 6333:6333 \
  -v qdrant_data:/qdrant/storage \
  qdrant/qdrant

Docker Compose

version: '3.8'
services:
  qdrant:
    image: qdrant/qdrant
    ports:
      - "6333:6333"
      - "6334:6334"
    volumes:
      - qdrant_data:/qdrant/storage
    environment:
      - QDRANT__SERVICE__GRPC_PORT=6334

volumes:
  qdrant_data:

Cloud Options

ProviderLink
Qdrant Cloudcloud.qdrant.io
AWSAvailable in AWS Marketplace
GCPAvailable in GCP Marketplace

Configuration

Add to your .env:

# Local Docker
QDRANT_URL=http://localhost:6333

# Qdrant Cloud
QDRANT_URL=https://your-cluster.qdrant.io:6333
QDRANT_API_KEY=your-api-key

Collection Setup

Cortex automatically creates the required collection on first run. Manual setup:

curl -X PUT http://localhost:6333/collections/cortex_memories \
  -H "Content-Type: application/json" \
  -d '{
    "vectors": {
      "size": 1536,
      "distance": "Cosine"
    }
  }'

Production Considerations

ConsiderationRecommendation
StorageUse persistent volumes
ReplicationEnable for high availability
IndexingUse HNSW for best performance
MemoryAllocate enough RAM for your dataset

Verifying Setup

curl http://localhost:6333/collections/cortex_memories

Should return collection details with vector configuration.