Skip to content

Instantly share code, notes, and snippets.

@up1
Last active July 20, 2025 14:31
Show Gist options
  • Save up1/8112063f5b1e91ffed0d50011355d479 to your computer and use it in GitHub Desktop.
Save up1/8112063f5b1e91ffed0d50011355d479 to your computer and use it in GitHub Desktop.
Shared memory with Cipher
// Install
$npm install -g @byterover/cipher
// Verify
$cipher --version
0.1.1
// Config API Key for OpenAI in file .env
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
OLLAMA_BASE_URL=http://localhost:11434/v1
// Start with multiple mode
$cipher "Hello, how are you?" # One-shot test
$cipher --mode mcp # Start as MCP server
$cipher --mode web # Start as Web server
// Hello world
cipher "Hello, how are you?"
21:20:26 INFO: Loading agent config from /demo/memAgent/cipher.yml
21:20:26 INFO: MemAgent created
21:20:26 INFO: Starting MemAgent...
21:20:26 INFO: MCP Manager: MCPManager initialized
21:20:26 INFO: MCP Manager: Initializing 1 servers
21:20:26 INFO: MCP Manager: Connecting to server: filesystem
21:20:26 INFO: MCP Manager: Registered client: filesystem
21:20:26 INFO: MCP Connection: Connecting to filesystem (stdio)
Secure MCP Filesystem Server running on stdio
21:20:27 INFO: MCP Connection: Successfully connected to filesystem
21:20:27 INFO: MCP Manager: Successfully connected to server: filesystem
21:20:27 INFO: MCP Manager: Retrieved 12 total tools
21:20:27 INFO: MCP Manager: Retrieved 0 total prompts
21:20:27 INFO: MCP Manager: Retrieved 0 total resources
21:20:27 INFO: MCP Manager: Initialization complete
21:20:29 INFO: [EMBEDDING:FACTORY] Successfully created OpenAI embedder
21:20:29 INFO: [EMBEDDING:MANAGER] Successfully created embedder from environment
21:20:29 INFO: Embedding manager initialized successfully
21:20:29 INFO: [VectorStoreFactory] Creating dual collection vector storage from environment
21:20:29 INFO: DualCollectionVectorManager: Initialized with dual collections
21:20:29 INFO: DualCollectionVectorManager: Connecting collections...
21:20:29 INFO: [VectorStoreManager] Vector storage system connected
21:20:29 INFO: DualCollectionVectorManager: Knowledge collection connected
21:20:29 INFO: [VectorStoreManager] Vector storage system connected
21:20:29 INFO: DualCollectionVectorManager: Reflection collection connected
21:20:29 INFO: [VectorStoreFactory] Dual collection vector storage created successfully
21:20:29 INFO: Dual collection vector storage manager initialized successfully
21:20:29 INFO: [KG-Factory] Knowledge graph is disabled in environment
21:20:29 INFO: Knowledge graph is disabled in environment configuration
21:20:29 INFO: LLM service initialized successfully
21:20:29 INFO: InternalToolManager: Initializing...
21:20:29 INFO: InternalToolRegistry: Initializing...
21:20:29 INFO: InternalToolRegistry: Initialized successfully
21:20:29 INFO: InternalToolManager: Initialized successfully with config:
21:20:29 INFO: Registering all internal tools...
21:20:29 INFO: Tool definitions loaded successfully
21:20:29 INFO: InternalToolManager: Successfully registered tool 'cipher_extract_and_operate_memory'
21:20:29 INFO: InternalToolManager: Successfully registered tool 'cipher_memory_search'
21:20:29 INFO: InternalToolManager: Successfully registered tool 'cipher_store_reasoning_memory'
21:20:29 INFO: InternalToolManager: Successfully registered tool 'cipher_extract_reasoning_steps'
21:20:29 INFO: InternalToolManager: Successfully registered tool 'cipher_evaluate_reasoning'
21:20:29 INFO: InternalToolManager: Successfully registered tool 'cipher_search_reasoning_patterns'
21:20:29 INFO: Tool registration completed
21:20:29 INFO: Internal tools registration completed
21:20:29 INFO: MemAgent started successfully
21:20:29 INFO: Initializing CLI interface...
21:20:29 INFO: CLI interface ready
πŸ€” Processing...
21:20:29 INFO: MCP Manager: Retrieved 12 total tools
21:20:29 INFO: UnifiedToolManager: Combined tools loaded successfully
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ πŸ€– AI Response ──────────────────────────┐
β”‚ β”‚
β”‚ Hello! I'm doing great, thank you. How can I assist you today? β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
# Start with MCP server
$cipher --mode mcp
# Cursor MCP ΰΉ‚ΰΈ”ΰΈ’ΰΉƒΰΈŠΰΉ‰ default config
{
"mcpServers": {
"cipher": {
"command": "cipher",
"args": ["--mode", "mcp"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key",
"VECTOR_STORE_TYPE": "qdrant",
"KNOWLEDGE_GRAPH_ENABLED": "true",
"MAX_ITERATIONS": "30"
}
}
}
}
# Claude Code
$claude mcp add cipher -s user -e OPENAI_API_KEY=your-openai-api-key -- cipher --mode mcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment