@byterover/cipher

中文文档
0.3.0发布于 2025/08/28Elastic-2.0TypeScriptESM + CJS近 30 天下载 2639

Memory-powered AI agent framework with real-time WebSocket communication, MCP integration, and composable patterns

此软件包已被标记为弃用

This package has been deprecated. The project has evolved into byterover-cli. See https://github.com/campfirein/byterover-cli for the new project.

原始使用文档
文档目录21 节
  1. Overview
  2. Quick Start 🚀
  3. NPM Package (Recommended for Most Users)
  4. Docker
  5. From Source
  6. CLI Usage 💻
  7. Configuration
  8. Basic Configuration ⚙️
  9. Environment Variables 🔐
  10. MCP Server Usage
  11. Quick Setup
  12. Tutorial Video: Claude Code with Cipher MCP
  13. Documentation
  14. 📚 Complete Documentation
  15. 🚀 Next Steps
  16. Contributing
  17. Community & Support
  18. Contributors
  19. MseeP.ai Security Assessment Badge
  20. Star History
  21. License

Cipher

Cipher Agent Logo

Memory-powered AI agent framework with MCP integration

License Beta Documentation Discord

Overview

Cipher is an opensource memory layer specifically designed for coding agents. Compatible with Cursor, Windsurf, Claude Desktop, Claude Code, Gemini CLI, AWS's Kiro, VS Code, Roo Code, Trae, and Warp through MCP, and coding agents, such as Kimi K2. (see more on examples)

Built by Byterover team

Key Features:

  • 🔌 MCP integration with any IDE you want.
  • 🧠 Auto-generate AI coding memories that scale with your codebase.
  • 🔄 Switch seamlessly between IDEs without losing memory and context.
  • 🤝 Easily share coding memories across your dev team in real time.
  • 🧬 Dual Memory Layer that captures System 1 (Programming Concepts & Business Logic & Past Interaction) and System 2 (reasoning steps of the model when generating code).
  • ⚙️ Install on your IDE with zero configuration needed.

Quick Start 🚀

# Install globally
npm install -g @byterover/cipher

# Or install locally in your project
npm install @byterover/cipher

Docker

Show Docker Setup
# Clone and setup
git clone https://github.com/campfirein/cipher.git
cd cipher

# Configure environment
cp .env.example .env
# Edit .env with your API keys

# Start with Docker
docker-compose up --build -d

# Test
curl http://localhost:3000/health

💡 Note: Docker builds automatically skip the UI build step to avoid ARM64 compatibility issues with lightningcss. The UI is not included in the Docker image by default.

To include the UI in the Docker build, use: docker build --build-arg BUILD_UI=true .

From Source

pnpm i && pnpm run build && npm link

CLI Usage 💻

Show CLI commands
# Interactive mode
cipher

# One-shot command
cipher "Add this to memory as common causes of 'CORS error' in local dev with Vite + Express."

# API server mode
cipher --mode api

# MCP server mode
cipher --mode mcp

# Web UI mode
cipher --mode ui

⚠️ Note: When running MCP mode in terminal/shell, export all environment variables as Cipher won't read from .env file.

💡 Tip: CLI mode automatically continues or creates the "default" session. Use /session new <session-name> to start a fresh session.

Cipher Web UI

The Cipher Web UI provides an intuitive interface for interacting with memory-powered AI agents, featuring session management, tool integration, and real-time chat capabilities.

Configuration

Cipher supports multiple configuration options for different deployment scenarios. The main configuration file is located at memAgent/cipher.yml.

Basic Configuration ⚙️

Show YAML example
# LLM Configuration
llm:
  provider: openai # openai, anthropic, openrouter, ollama, qwen
  model: gpt-4-turbo
  apiKey: $OPENAI_API_KEY

# System Prompt
systemPrompt: 'You are a helpful AI assistant with memory capabilities.'

# MCP Servers (optional)
mcpServers:
  filesystem:
    type: stdio
    command: npx
    args: ['-y', '@modelcontextprotocol/server-filesystem', '.']

📖 See Configuration Guide for complete details.

Environment Variables 🔐

Create a .env file in your project root with these essential variables:

Show .env template
# ====================
# API Keys (At least one required)
# ====================
OPENAI_API_KEY=sk-your-openai-api-key
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key
GEMINI_API_KEY=your-gemini-api-key
QWEN_API_KEY=your-qwen-api-key

# ====================
# Vector Store (Optional - defaults to in-memory)
# ====================
VECTOR_STORE_TYPE=qdrant  # qdrant, milvus, or in-memory
VECTOR_STORE_URL=https://your-cluster.qdrant.io
VECTOR_STORE_API_KEY=your-qdrant-api-key

# ====================
# Chat History (Optional - defaults to SQLite)
# ====================
CIPHER_PG_URL=postgresql://user:pass@localhost:5432/cipher_db

# ====================
# Workspace Memory (Optional)
# ====================
USE_WORKSPACE_MEMORY=true
WORKSPACE_VECTOR_STORE_COLLECTION=workspace_memory

# ====================
# AWS Bedrock (Optional)
# ====================
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_DEFAULT_REGION=us-east-1

# ====================
# Advanced Options (Optional)
# ====================
# Logging and debugging
CIPHER_LOG_LEVEL=info  # error, warn, info, debug, silly
REDACT_SECRETS=true

# Vector store configuration
VECTOR_STORE_DIMENSION=1536
VECTOR_STORE_DISTANCE=Cosine  # Cosine, Euclidean, Dot, Manhattan
VECTOR_STORE_MAX_VECTORS=10000

# Memory search configuration
SEARCH_MEMORY_TYPE=knowledge  # knowledge, reflection, both (default: knowledge)
DISABLE_REFLECTION_MEMORY=true  # default: true

💡 Tip: Copy .env.example to .env and fill in your values:

cp .env.example .env

MCP Server Usage

Cipher can run as an MCP (Model Context Protocol) server, allowing integration with MCP-compatible clients like Claude Desktop, Cursor, Windsurf, and other AI coding assistants.

Quick Setup

To use Cipher as an MCP server in your MCP client configuration:

{
    "mcpServers": {
        "cipher": {
            "type": "stdio",
            "command": "cipher",
            "args": ["--mode", "mcp"],
            "env": {
                "MCP_SERVER_MODE": "aggregator",
                "OPENAI_API_KEY": "your_openai_api_key",
                "ANTHROPIC_API_KEY": "your_anthropic_api_key"
            }
        }
    }
}

📖 See MCP Integration Guide for complete MCP setup and advanced features.

👉 Built‑in tools overview — expand the dropdown below to scan everything at a glance. For full details, see docs/builtin-tools.md 📘.

Built-in Tools (overview)
  • Memory
    • cipher_extract_and_operate_memory: Extracts knowledge and applies ADD/UPDATE/DELETE in one step
    • cipher_memory_search: Semantic search over stored knowledge
    • cipher_store_reasoning_memory: Store high-quality reasoning traces
  • Reasoning (Reflection)
    • cipher_extract_reasoning_steps (internal): Extract structured reasoning steps
    • cipher_evaluate_reasoning (internal): Evaluate reasoning quality and suggest improvements
    • cipher_search_reasoning_patterns: Search reflection memory for patterns
  • Workspace Memory (team)
    • cipher_workspace_search: Search team/project workspace memory
    • cipher_workspace_store: Background capture of team/project signals
  • Knowledge Graph
    • cipher_add_node, cipher_update_node, cipher_delete_node, cipher_add_edge
    • cipher_search_graph, cipher_enhanced_search, cipher_get_neighbors
    • cipher_extract_entities, cipher_query_graph, cipher_relationship_manager
  • System
    • cipher_bash: Execute bash commands (one-off or persistent)

Tutorial Video: Claude Code with Cipher MCP

Watch our comprehensive tutorial on how to integrate Cipher with Claude Code through MCP for enhanced coding assistance with persistent memory:

Cipher + Claude Code Tutorial

Click the image above to watch the tutorial on YouTube.

For detailed configuration instructions, see the CLI Coding Agents guide.

Documentation

📚 Complete Documentation

TopicDescription
ConfigurationComplete configuration guide including agent setup, embeddings, and vector stores
LLM ProvidersDetailed setup for OpenAI, Anthropic, AWS, Azure, Qwen, Ollama, LM Studio
Embedding ConfigurationEmbedding providers, fallback logic, and troubleshooting
Vector StoresQdrant, Milvus, In-Memory vector database configurations
Chat HistoryPostgreSQL, SQLite session storage and management
CLI ReferenceComplete command-line interface documentation
MCP IntegrationAdvanced MCP server setup, aggregator mode, and IDE integrations
Workspace MemoryTeam-aware memory system for collaborative development
ExamplesReal-world integration examples and use cases

🚀 Next Steps

For detailed documentation, visit:

Contributing

We welcome contributions! Refer to our Contributing Guide for more details.

Community & Support

cipher is the opensource version of the agentic memory of byterover which is built and maintained by the byterover team.

  • Join our Discord to share projects, ask questions, or just say hi!
  • If you enjoy cipher, please give us a ⭐ on GitHub—it helps a lot!
  • Follow @kevinnguyendn on X

Contributors

Thanks to all these amazing people for contributing to cipher!

Contributors

MseeP.ai Security Assessment Badge

MseeP.ai Security Assessment Badge

Star History

Star History Chart

License

Elastic License 2.0. See LICENSE for full terms.

版本与发布记录

@byterover/cipher 共发布 6 个版本,首次发布于 2025/07/15;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.3.0latest2025/08/281.2 年前
0.2.22025/08/081.3 年前
0.2.12025/08/061.3 年前
0.2.02025/07/301.3 年前
0.1.12025/07/151.3 年前
0.1.02025/07/151.3 年前

关于 @byterover/cipher 的常见问题

@byterover/cipher 是什么?

Memory-powered AI agent framework with real-time WebSocket communication, MCP integration, and composable patterns注意:该包已被作者标记为弃用——This package has been deprecated. The project has evolved into byterover-cli. See https://github.com/campfirein/byterover-cli for the new project.

如何安装 @byterover/cipher?

在项目目录运行 npm install @byterover/cipher,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cipher,可以用 npx cipher 直接运行。

@byterover/cipher 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@byterover/cipher 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@byterover/cipher 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@byterover/cipher 可以商用吗?

@byterover/cipher 使用 Elastic-2.0 许可。声明的许可为 Elastic-2.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@byterover/cipher 的下载量有多少?

根据 npm 官方下载统计,@byterover/cipher 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,639 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@byterover/cipher 还在维护吗?

最新版本 0.3.0 发布于 2025/08/28(1.2 年前);至今共发布 6 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/07/15。作者已将其标记为弃用,新项目建议寻找替代方案。