Configuration
Required Environment Variables
Vector Storage Configuration
Qdrant Configuration
Milvus Configuration
Development Configuration
Knowledge Memory Tools
Cipher provides two main tools for knowledge memory management:Extract & Operate Memory Tool
cipher_extract_and_operate_memory
This tool automatically processes conversations and determines what knowledge should be stored, updated, or removed. It uses intelligent content analysis and LLM-powered decision making to extract meaningful programming knowledge while avoiding redundant or low-quality information.
Key Features:
- Automatic knowledge extraction from conversations
- Intelligent similarity detection to prevent duplicates
- LLM-powered decision making for memory operations (ADD/UPDATE/DELETE)
- Rich metadata tagging and categorization
- Code pattern recognition and preservation
Input Parameters
Input Parameters
Output Structure
Output Structure
Storage Payload
Storage Payload
Knowledge memories are stored with rich metadata:
Memory Search Tool
cipher_search_memory
This tool performs semantic search over the stored knowledge base to retrieve relevant information based on natural language queries. It uses vector similarity search to find the most contextually relevant knowledge for any given question or topic.
Key Features:
- Natural language query processing
- Semantic similarity search using embeddings
- Configurable result filtering and ranking
- Detailed metadata and confidence scoring
- Fast retrieval with similarity thresholds
Input Parameters
Input Parameters
Output Structure
Output Structure
Advanced Features
Intelligent Content Filtering
Knowledge memory automatically filters content to focus on significant programming knowledge:- Technical Patterns: Identifies code blocks, commands, and implementation details
- Programming Concepts: Extracts algorithms, design patterns, and best practices
- Domain Knowledge: Captures project-specific information and configurations
- Quality Assessment: Evaluates content relevance and completeness
LLM-Powered Decision Making
When enabled, the system uses LLM analysis to make intelligent memory operation decisions:- Similarity Analysis: Compares new content with existing memories
- Content Enhancement: Identifies improved or corrected versions
- Contradiction Detection: Finds conflicting information requiring updates
- Deduplication: Prevents redundant memory entries
Automatic Tagging
Extracts technical tags from content for improved organization:Code Pattern Extraction
Automatically identifies and preserves code patterns:Examples
Basic Knowledge Extraction
Basic Knowledge Extraction
Memory Search Example
Memory Search Example
Update Operation Example
Update Operation Example
Best Practices
Configuration
- Set similarity threshold to 0.8+ for high-quality knowledge extraction
- Use
maxSimilarResults: 3-5
to prevent information overload - Enable
useLLMDecisions: true
for better ADD/UPDATE/DELETE decisions
Search Strategies
- Query with context: “React async patterns” vs just “async”
- Set
top_k: 3-7
for focused results,top_k: 10+
for exploration - Use
similarity_threshold: 0.4+
to filter noise
Memory Management
- Review UPDATE operations - cipher may merge similar knowledge incorrectly
- Monitor confidence scores - items below 0.6 may need manual review
- Use
enableDeleteOperations: false
initially to prevent data loss - Enable debug logging - set
CIPHER_LOG_LEVEL=debug
to see detailed logs forcipher_extract_and_operate_memory
(not visible at info level)