.env.example•5.82 kB
# Cipher Environment Configuration
# Copy this file to .env and fill in your actual values
# ====================
# API Configuration
# ====================
# At least one API key is required
OPENAI_API_KEY=your-openai-api-key-here
ANTHROPIC_API_KEY=your-anthropic-api-key-here
OPENROUTER_API_KEY=your-openrouter-api-key-here
QWEN_API_KEY=your-alibaba-cloud-api-key-here
GEMINI_API_KEY=your-gemini-api-key-here
VOYAGE_API_KEY=your-voyage-api-key-here
DEEPSEEK_API_KEY=your-deepseek-api-key-here
# Ollama Configuration (optional - only if using Ollama)
# OLLAMA_BASE_URL=http://localhost:11434
# ====================
# Embedding Configuration (optional)
# ====================
# Provider priority: OpenAI > Gemini > Ollama > Disabled
# If not specified in YAML, uses environment auto-detection
# Override embedding model (optional)
# EMBEDDING_MODEL=text-embedding-3-small
# Disable embeddings entirely (lightweight mode)
# DISABLE_EMBEDDINGS=true
# Optional: OpenAI base URL (for custom endpoints)
# OPENAI_BASE_URL=https://api.openai.com/v1
# ====================
# AWS Bedrock Configuration (optional - only if using AWS provider)
# ====================
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
AWS_DEFAULT_REGION=us-east-1
# Optional: AWS_SESSION_TOKEN=your-session-token
# ====================
# Azure OpenAI Configuration (optional - only if using Azure provider)
# ====================
AZURE_OPENAI_API_KEY=your-azure-openai-api-key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_VERSION=2024-10-01-preview
# ====================
# Application Settings
# ====================
NODE_ENV=development
CIPHER_LOG_LEVEL=info
REDACT_SECRETS=true
# API prefix for routes
# CIPHER_API_PREFIX=""
# ====================
# Storage Configuration
# ====================
STORAGE_CACHE_TYPE=in-memory
# STORAGE_CACHE_HOST=localhost
# STORAGE_CACHE_PORT=6379
# STORAGE_CACHE_USERNAME=
# STORAGE_CACHE_PASSWORD=
# STORAGE_CACHE_DATABASE=0
STORAGE_DATABASE_TYPE=in-memory
# STORAGE_DATABASE_NAME=cipher.db
# STORAGE_DATABASE_PATH=./data
# ====================
# Web Search Configuration
# ====================
WEB_SEARCH_ENABLE=true
WEB_SEARCH_ENGINE=duckduckgo # From now, cipher only supports duckduckgo engine
WEB_SEARCH_SAFETY_MODE=strict # Strict or moderate
WEB_SEARCH_MAX_RESULTS=2 # Number of search result at once
WEB_SEARCH_RATE_LIMIT=10 # Rate limit per minute
CIPHER_MULTI_BACKEND=1
CIPHER_PG_URL=postgres://cipheruser:cipherpass@localhost:5432/cipherdb
CIPHER_WAL_FLUSH_INTERVAL=5000
# ====================
# Memory Search Configuration
# ====================
# Options: knowledge, reflection, both
SEARCH_MEMORY_TYPE=both
# ====================
# Vector Store Configuration
# ====================
# Available types: in-memory, chromadb, qdrant, milvus, faiss, pgvector, pinecone, weaviate, redis
VECTOR_STORE_TYPE=in-memory
# Qdrant configuration (only used if VECTOR_STORE_TYPE=qdrant)
# VECTOR_STORE_HOST=localhost
# VECTOR_STORE_PORT=6333
# VECTOR_STORE_URL=http://localhost:6333
# VECTOR_STORE_API_KEY=your-qdrant-api-key
# Milvus configuration (only used if VECTOR_STORE_TYPE=milvus)
# VECTOR_STORE_HOST=localhost
# VECTOR_STORE_PORT=19530
# VECTOR_STORE_URL=your-milvus-cluster-endpoint
# VECTOR_STORE_API_KEY=your-milvus-api-key
# VECTOR_STORE_USERNAME=your-milvus-zilliz-cloud-username
# VECTOR_STORE_PASSWORD=your-milvus-zilliz-cloud-password
# Vector collection settings
# NOTE: Naming rules vary by database type (see comments in original file).
# The name of the main collection/index for knowledge memory.
#
# IMPORTANT: Naming rules are specific to your chosen VECTOR_STORE_TYPE:
# - ChromaDB, Milvus, pgvector: Alphanumeric and underscores (_). Hyphens (-) are not allowed.
# - Pinecone: Lowercase alphanumeric and hyphens (-). Underscores (_) are not allowed.
# - Qdrant: Alphanumeric, underscores (_), and hyphens (-) are all supported.
# - Weaviate: PascalCase only (e.g., MyNewCollection). No special characters.
# - Redis: Flexible; typically uses alphanumeric, _, -, and :.
VECTOR_STORE_COLLECTION=knowledge_memory
# VECTOR_STORE_COLLECTION_NAME=your_collection_name
VECTOR_STORE_DIMENSION=1536
VECTOR_STORE_DISTANCE=Cosine
VECTOR_STORE_ON_DISK=false
# VECTOR_STORE_MAX_VECTORS=10000
# ====================
# Reflection Memory Configuration
# ====================
REFLECTION_VECTOR_STORE_COLLECTION=reflection_memory
DISABLE_REFLECTION_MEMORY=true
# ====================
# MCP Configuration
# ====================
# MCP_GLOBAL_TIMEOUT=30000
# ====================
# Knowledge Graph Configuration (optional)
# ====================
# NEO4J LOCAL CONFIGURATION (for local development)
# Local Neo4j configuration
# KNOWLEDGE_GRAPH_HOST=localhost
# KNOWLEDGE_GRAPH_PORT=7687
# KNOWLEDGE_GRAPH_URI=bolt://localhost:7687
# KNOWLEDGE_GRAPH_USERNAME=neo4j
# KNOWLEDGE_GRAPH_PASSWORD=your-local-password
# KNOWLEDGE_GRAPH_DATABASE=neo4j
# NEO4J CLOUD CONFIGURATION (for cloud deployment)
# KNOWLEDGE_GRAPH_URI=neo4j+s://your-instance.databases.neo4j.io:7687
# KNOWLEDGE_GRAPH_USERNAME=neo4j
# KNOWLEDGE_GRAPH_PASSWORD=your-password
# KNOWLEDGE_GRAPH_DATABASE=neo4j
# CONFIGURATION FOR EVENT MANAGEMENT
# # Enable or disable event filtering (true/false)
# EVENT_FILTERING_ENABLED=false
# # Comma-separated list of event types to filter out (block)
# # Example: tool:executionStarted,tool:executionCompleted,llm:thinking
# EVENT_FILTERED_TYPES=
# # Enable or disable event persistence (true/false)
# EVENT_PERSISTENCE_ENABLED=true
# # Path to store event log files (if using file storage)
# EVENT_PERSISTENCE_PATH=./data/events
# Enable or disable input refinement for better retrieval
ENABLE_QUERY_REFINEMENT=true