.env
file) - Highest prioritycipher.yml
) - Medium priorityVariable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
OPENAI_API_KEY | API key for OpenAI services | Required | Used for LLM operations and always required for embedding functionality |
ANTHROPIC_API_KEY | API key for Anthropic Claude models | Optional | Required when provider: anthropic in cipher.yml |
OPENROUTER_API_KEY | API key for OpenRouter | Optional | Required when provider: openrouter in cipher.yml |
OLLAMA_BASE_URL | Base URL for local Ollama instance | Default: http://localhost:11434/v1 | Required when provider: ollama in cipher.yml; no API key needed |
OPENAI_BASE_URL | Custom OpenAI API endpoint | Default: https://api.openai.com/v1 | Override for custom deployments (Azure, proxies, etc.) |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
NODE_ENV | Node.js environment mode | development, production, test | Default: development |
CIPHER_LOG_LEVEL | Controls logging verbosity | error, warn, info, debug, silly | Default: info |
REDACT_SECRETS | Redact sensitive info in logs | true, false | Default: true |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
STORAGE_CACHE_TYPE | Type of caching backend | in-memory, redis | Default: in-memory |
STORAGE_CACHE_HOST | Redis server hostname | Default: localhost | Required when STORAGE_CACHE_TYPE=redis |
STORAGE_CACHE_PORT | Redis server port | Default: 6379 | Number |
STORAGE_CACHE_PASSWORD | Redis authentication password | Optional | Only if Redis requires auth |
STORAGE_CACHE_DATABASE | Redis database number | Default: 0 | Number (0-15 typically) |
STORAGE_DATABASE_TYPE | Persistent storage backend | in-memory, sqlite | Default: in-memory |
STORAGE_DATABASE_PATH | Directory path for SQLite | Example: ./data | Where to store the database file |
STORAGE_DATABASE_NAME | SQLite database filename | Default: cipher.db | Database file name within the path |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
SEARCH_MEMORY_TYPE | Which memory types to search | knowledge, reflection, both (Default: both) | Controls which memory collections are queried |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
VECTOR_STORE_TYPE | Vector database backend type | in-memory, qdrant, milvus (Default: in-memory) | Storage for embeddings and similarity search |
VECTOR_STORE_HOST | Vector database hostname | Example: localhost | Required for Qdrant, Milvus |
VECTOR_STORE_PORT | Vector database port | Examples: 6333 (Qdrant), 19530 (Milvus) | Number |
VECTOR_STORE_URL | Complete URL for vector database | Example: http://localhost:6333 | Alternative to host/port |
VECTOR_STORE_API_KEY | Auth for cloud vector databases | Optional | Qdrant Cloud, Zilliz Cloud (Milvus) |
VECTOR_STORE_USERNAME | Username for Milvus auth | Optional | Zilliz Cloud and self-hosted Milvus |
VECTOR_STORE_PASSWORD | Password for Milvus auth | Optional | Pairs with username |
VECTOR_STORE_COLLECTION | Name of the knowledge collection | Default: knowledge_memory | Collection name for storing knowledge embeddings |
VECTOR_STORE_DIMENSION | Vector embedding dimensions | Default: 1536 | Must match embedding model output |
VECTOR_STORE_DISTANCE | Distance metric for similarity | Cosine, Euclidean, Dot, Manhattan (Default: Cosine) | How vectors are compared for similarity |
VECTOR_STORE_ON_DISK | Store vectors on disk (Qdrant) | true, false (Default: false) | Performance vs storage trade-off |
VECTOR_STORE_MAX_VECTORS | Max vectors in memory | Default: 10000 | Memory usage limit for in-memory storage |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
REFLECTION_VECTOR_STORE_COLLECTION | Name of the reflection memory collection | Default: reflection_memory | Separate collection for agent reflection/learning |
DISABLE_REFLECTION_MEMORY | Disable reflection memory | true, false (Default: true) | Performance optimization for simpler use cases |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
MCP_GLOBAL_TIMEOUT | Global timeout for all MCP ops | Default: 30000 (ms) | Max time to wait for MCP server responses |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
KNOWLEDGE_GRAPH_ENABLED | Enable advanced KG features | true, false (Default: false) | Enables Neo4j-based relationship modeling |
KNOWLEDGE_GRAPH_TYPE | Knowledge graph backend type | neo4j, in-memory (Default: in-memory) | Choose between Neo4j and in-memory graph |
KNOWLEDGE_GRAPH_HOST | Neo4j database hostname | Default: localhost | |
KNOWLEDGE_GRAPH_PORT | Neo4j bolt protocol port | Default: 7687 | Number |
KNOWLEDGE_GRAPH_URI | Complete Neo4j connection URI | Example: bolt://localhost:7687 | Alternative to host/port |
KNOWLEDGE_GRAPH_USERNAME | Neo4j authentication username | Default: neo4j | |
KNOWLEDGE_GRAPH_PASSWORD | Neo4j authentication password | Required for Neo4j connection | |
KNOWLEDGE_GRAPH_DATABASE | Neo4j database name | Default: neo4j | Supports multiple databases in Neo4j 4.0+ |
Variable | Purpose | Values/Default | Notes/Usage |
---|---|---|---|
EMBEDDING_MODEL | Override default embedding model | Default: text-embedding-3-small | Control which OpenAI embedding model to use |
EMBEDDING_TIMEOUT | Timeout for embedding requests | Default: 30000 (ms) | |
EMBEDDING_MAX_RETRIES | Max retry attempts for embedding | Default: 3 | Number (0-10) |
OPENAI_API_KEY
- For embeddings, even with other LLM providersANTHROPIC_API_KEY
- When using AnthropicOPENROUTER_API_KEY
- When using OpenRouterSTORAGE_CACHE_HOST
when STORAGE_CACHE_TYPE=redis
VECTOR_STORE_HOST
or VECTOR_STORE_URL
when VECTOR_STORE_TYPE=qdrant
VECTOR_STORE_HOST
or VECTOR_STORE_URL
when VECTOR_STORE_TYPE=milvus
KNOWLEDGE_GRAPH_PASSWORD
when KNOWLEDGE_GRAPH_ENABLED=true
and KNOWLEDGE_GRAPH_TYPE=neo4j
.env
files to version controlREDACT_SECRETS=true
in production.env
files