Vector stores are databases optimized for storing and searching high-dimensional vectors (embeddings). Cipher supports multiple vector database providers for flexible deployment options.
Cipher supports six vector database types:
- Qdrant - High-performance vector search engine
- Milvus - Open-source vector database with cloud options
- ChromaDB - Developer-friendly open-source embedding database
- Pinecone - Managed vector database service
- Pgvector - PostgreSQL extension with ACID compliance and enterprise features
- Faiss - FaissDB
- Redis - Redis
- In-Memory - Built-in solution for development/testing
🔧 Qdrant Configuration
Qdrant is a high-performance vector search engine with excellent performance and features.
The easiest way to get started with Qdrant:
VECTOR_STORE_TYPE=qdrant
VECTOR_STORE_URL=https://your-cluster.qdrant.io
VECTOR_STORE_API_KEY=your-qdrant-api-keySetup Steps:
- Create account at Qdrant Cloud
- Create a new cluster
- Copy your cluster URL and API key
- Add to your
.envfile or yourjsonmcp config
Run Qdrant locally using Docker:
# Basic setup (data lost on removing the container)
docker run -d --name qdrant-basic -p 6333:6333 qdrant/qdrant
# With persistent storage
docker run -d --name qdrant-storage -v ./qdrant-data:/qdrant/storage -p 6333:6333 qdrant/qdrant# .env configuration
VECTOR_STORE_TYPE=qdrant
VECTOR_STORE_HOST=localhost
VECTOR_STORE_PORT=6333
VECTOR_STORE_URL=http://localhost:6333Add to your docker-compose.yml:
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- "6333:6333"
volumes:
- qdrant_data:/qdrant/storage
environment:
- QDRANT__SERVICE__HTTP_PORT=6333
volumes:
qdrant_data:🔧 Milvus Configuration
Milvus is an open-source vector database with excellent scalability.
Zilliz Cloud provides managed Milvus hosting:
# .env configuration
VECTOR_STORE_TYPE=milvus
VECTOR_STORE_URL=your-milvus-cluster-endpoint
VECTOR_STORE_USERNAME=your-zilliz-username
VECTOR_STORE_PASSWORD=your-zilliz-passwordSetup Steps:
- Create account at Zilliz Cloud
- Create a new cluster
- Get your cluster endpoint and credentials
- Add to your
.envfile or yourjsonmcp config
Run Milvus locally using the official installation script:
# Download the official installation script
curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh
# Start the Docker container
bash standalone_embed.sh start# .env configuration
VECTOR_STORE_TYPE=milvus
VECTOR_STORE_HOST=localhost
VECTOR_STORE_PORT=19530Services Started:
- Milvus server: Port 19530
- Embedded etcd: Port 2379
- Web UI: http://127.0.0.1:9091/webui/
- Data volume:
volumes/milvus
Service Management:
# Restart Milvus
bash standalone_embed.sh restart
# Stop Milvus
bash standalone_embed.sh stop
# Upgrade Milvus
bash standalone_embed.sh upgrade
# Delete Milvus (removes all data)
bash standalone_embed.sh delete🔧 ChromaDB Configuration
ChromaDB is a developer-friendly open-source embedding database designed for AI applications.
ChromaDB offers managed cloud hosting for production deployments:
# .env configuration
VECTOR_STORE_TYPE=chroma
VECTOR_STORE_URL=https://your-chroma-instance.chroma.dev
VECTOR_STORE_API_KEY=your-chroma-api-keySetup Steps:
- Create account at ChromaDB Cloud
- Create a new database instance
- Copy your instance URL and API key
- Add to your
.envfile or yourjsonmcp config
Run ChromaDB locally using Docker:
# Basic setup (data lost on removing the container)
docker run -d --name chroma-basic -p 8000:8000 chromadb/chroma
# With persistent storage
docker run -d --name chroma-storage -v ./chroma-data:/data -p 8000:8000 chromadb/chroma# .env configuration
VECTOR_STORE_TYPE=chroma
VECTOR_STORE_HOST=localhost
VECTOR_STORE_PORT=8000
VECTOR_STORE_URL=http://localhost:8000Important: For production deployments, review the ChromaDB deployment guide and security considerations.
Add to your docker-compose.yml:
services:
chromadb:
image: chromadb/chroma:latest
ports:
- "8000:8000"
volumes:
- chroma_data:/chroma/chroma
environment:
- IS_PERSISTENT=TRUE
- PERSIST_DIRECTORY=/chroma/chroma
- ANONYMIZED_TELEMETRY=FALSE
volumes:
chroma_data:# Basic setup
VECTOR_STORE_TYPE=chroma
VECTOR_STORE_URL=http://localhost:8000
# With SSL/TLS
VECTOR_STORE_TYPE=chroma
VECTOR_STORE_HOST=localhost
VECTOR_STORE_PORT=8000
VECTOR_STORE_SSL=trueDistance Metrics: Cipher automatically converts user-friendly terms:
euclidean→l2dot→ipcosine→cosine
Compatibility: Use ChromaDB 1.10.5 for best results. Array fields in metadata are automatically converted to strings.
🔧 Pinecone Configuration
Pinecone is a fully managed vector database service optimized for machine learning applications with excellent performance and scalability.
Pinecone is a cloud-native service that provides serverless vector search:
# Basic configuration
VECTOR_STORE_TYPE=pinecone
VECTOR_STORE_API_KEY=your-pinecone-api-key
VECTOR_STORE_COLLECTION=your-index-name # Collection names are used as indexes in PineconeSetup Steps:
- Create account at Pinecone
- Generate an API key from your project settings
- Choose your preferred region (us-east-1, us-west-2, etc.)
- Add configuration to your
.envfile or yourjsonmcp config
Pinecone automatically creates indexes with these settings:
VECTOR_STORE_TYPE=pinecone
VECTOR_STORE_API_KEY=your-pinecone-api-key
PINECONE_NAMESPACE=production
PINECONE_PROVIDER=aws
PINECONE_REGION=us-east-1Index Specifications:
- Serverless deployment with automatic scaling
- Cloud provider: AWS (default)
- Region: us-east-1 (default, configurable)
- Automatic index creation if not exists
🔧 PgVector Configuration
PgVector is a PostgreSQL extension for vector similarity search, combining the reliability of PostgreSQL with vector search capabilities.
Build a PgVector Docker container in local
docker run --name pgvector \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=user \
-e POSTGRES_DB=cipherDB \
-p 5432:5432 \
pgvector/pgvector:pg16Build a PostgreSQL docker with pgvector from local
# Connection URL format
VECTOR_STORE_TYPE=pgvector
VECTOR_STORE_URL=postgresql://user:password@localhost:5432/cipherDBMost cloud PostgreSQL services support pgvector extension:
VECTOR_STORE_TYPE=pgvector
VECTOR_STORE_URL=postgresql://<service-endpoint>
Index Specifications:
- Index types: HNSW (default) for better recall, IVFFlat for speed
- ACID compliance: Full PostgreSQL transaction support
- Automatic table/index creation if not exists
Setup Steps:
- Install PostgreSQL with pgvector extension
- Create database and user with appropriate permissions
- Add configuration to your
.envfile orjsonmcp config - Tables and indexes are created automatically on first use
🔧 FaissDB Configuration
Build a PostgreSQL docker with pgvector from local
# Connection format
VECTOR_STORE_TYPE=faiss
FAISS_BASE_STORAGE_PATH=path/to/your/folder
Specifications:
- Index types: Based on metric selection
- Automatic folder and index creation if not exists
🔧 Redis Vector Store
Redis Stack is supported as a vector storage backend in Cipher, using RediSearch for fast similarity search and metadata filtering. This backend is ideal for scalable deployments and supports multiple distance metrics.
Run Redis Stack with Docker:
docker run -d --name redis-stack -p 6379:6379 redis/redis-stack:latestAdd to your .env file:
VECTOR_STORE_TYPE=redis
#connect using host and port
VECTOR_STORE_HOST=localhost
VECTOR_STORE_PORT=6379
VECTOR_STORE_USERNAME=<your-username> # optional
VECTOR_STORE_PASSWORD=<your-password> # optional
#connect if using url
VECTOR_STORE_URL=redis://localhost:6379
VECTOR_STORE_DISTANCE=COSINE # Options: COSINE, L2, IPFor workspace-specific configuration:
WORKSPACE_VECTOR_STORE_TYPE=redis
# Connect using host and port
WORKSPACE_VECTOR_STORE_HOST=localhost
WORKSPACE_VECTOR_STORE_PORT=6379
WORKSPACE_VECTOR_STORE_USERNAME=<your-username> # optional
WORKSPACE_VECTOR_STORE_PASSWORD=<your-password> # optional
# Connect using url
WORKSPACE_VECTOR_STORE_URL=redis://localhost:6379
WORKSPACE_VECTOR_STORE_DISTANCE=COSINE # Options: COSINE, L2, IP- Distance Metrics: COSINE, L2 (Euclidean), IP (Inner Product)
- Vector Operations: insert, update, search, delete, list
- Metadata Filtering: range queries, any filters
- Pagination & Sorting: via RediSearch
🔧 In-Memory Vector Store
For development and testing, Cipher includes a built-in in-memory vector store:
# .env configuration
VECTOR_STORE_TYPE=in-memory
# No additional configuration neededFeatures:
- No external dependencies
- Fast for small datasets
- Data is lost when application restarts
- Perfect for development and testing
🛎️ Note: All the configuration variables below have a default value. By default, only knowledge memory is enabled, if you want enable reflection memory and workspace memory, please set USE_WORKSPACE_MEMORY=true and DISABLE_REFLECTION_MEMORY=false
⚙️ Knowledge and Reflection Collections
# Set the name for knowledge memory collection - default: "knowledge_memory"
VECTOR_STORE_COLLECTION=knowledge_memory
# Vector dimensions (must match your embedding model)
VECTOR_STORE_DIMENSION=1536
# Distance metric for similarity calculations
VECTOR_STORE_DISTANCE=Cosine # Options: Cosine, Euclidean, Dot (Qdrant/Milvus)
# VECTOR_STORE_DISTANCE=cosine # Options: cosine, l2, euclidean, ip, dot (ChromaDB)Cipher supports a separate collection for reflection memory:
# Set the name for reflection memory collection - default: "reflection_memory"
REFLECTION_VECTOR_STORE_COLLECTION=reflection_memory
# Disable reflection memory entirely
DISABLE_REFLECTION_MEMORY=true # default: true# Maximum number of vectors to store (in-memory only)
VECTOR_STORE_MAX_VECTORS=10000
# Search parameters
VECTOR_STORE_SEARCH_LIMIT=50
VECTOR_STORE_SIMILARITY_THRESHOLD=0.7🏢 Workspace Memory Collections
When using workspace memory, you can configure separate vector store settings:
# Enable workspace memory
USE_WORKSPACE_MEMORY=true # default: false
# Workspace-specific collection
WORKSPACE_VECTOR_STORE_COLLECTION=workspace_memory
# Use separate vector store for workspace (optional)
WORKSPACE_VECTOR_STORE_TYPE=qdrant # or: milvus, chroma, in-memory
WORKSPACE_VECTOR_STORE_HOST=localhost
WORKSPACE_VECTOR_STORE_PORT=6333
WORKSPACE_VECTOR_STORE_URL=http://localhost:6333
WORKSPACE_VECTOR_STORE_API_KEY=your-qdrant-api-key
# Workspace search settings
WORKSPACE_SEARCH_THRESHOLD=0.4
WORKSPACE_VECTOR_STORE_DIMENSION=1536
WORKSPACE_VECTOR_STORE_MAX_VECTORS=10000🔧 Common Issues
Dimension Error
Error: Vector dimension mismatch
Solution:
- Check your embedding model dimensions
- Update
VECTOR_STORE_DIMENSIONto match - Recreate collections if dimensions changed
Slow Search Performance
- Increase
VECTOR_STORE_SEARCH_LIMITfor more results - Adjust
VECTOR_STORE_SIMILARITY_THRESHOLD(lower = more results) - Consider upgrading to cloud-hosted solutions for better performance
Memory Usage (In-Memory Store)
- Reduce
VECTOR_STORE_MAX_VECTORSif memory is limited - Switch to external vector store for larger datasets
Common Errors:
Cannot find package '@chroma-core/default-embed'→ Use ChromaDB 1.10.5HTTP 422: Unprocessable Entity→ Metadata must be primitive types onlyInvalid distance metric→ Usecosine,l2, orip(auto-converted fromeuclidean/dot)
- Configuration - Main configuration guide
- Embedding Configuration - Embedding setup
- Workspace Memory - Team-aware memory system