Muninn - The Universal Memory Layer
Muninn is an advanced per-project memory system designed for AI agents. It uses the Context Exchange Protocol (CXP) to provide high-performance, token-efficient context management.
🛡️ Security & Privacy (Local-First)
Muninn is designed with a Privacy-First philosophy.
- - Local Storage: All project indexes and memories are stored exclusively on the host machine within the
.muninn/ folder (per project) or ~/.muninn/ (for global settings). - No Data Exfiltration: Muninn does not transmit any code, context, or memories to third-party servers or remote APIs. All processing (semantic search, indexing, and context injection) happens locally using the high-performance Rust-based CXP engine.
- Transparent Control: Memories are stored as standard Markdown files. You can inspect, edit, or delete them at any time.
⚙️ Integration
Muninn operates as an MCP (Model Context Protocol) server.
🚀 The Muninn Protocol (ENFORCED)
As an agent, you MUST follow the "Brain-First" workflow to remain efficient and accurate. The MCP server ensures project safety by validating context before allowing sensitive tool operations.
- 1. Orient Yourself (
brain_check): Call this at the start of every session or when switching projects. It loads the local project index and identifies key files and patterns. - Search Before You Code (
search_context): Never assume you know the codebase. Use local semantic search to find existing patterns or prior decisions. - Learn as You Go (
add_memory): Every significant fix, architectural decision, or user preference should be saved locally as a memory.
🛠 Tool Reference (MCP)
- -
init_project: Initialize a local Muninn Brain in a project directory. brain_check: MANDATORY orientation step. Loads local context and patterns.add_memory: Persist facts and decisions to the local .muninn/memories folder.search_context: Query the local project index semantically.reindex_context: Rebuild the local semantic index.health_check: Verify the status of the local Muninn system.
🦞 Pro-Tip for Agents
Muninn surgically retrieves only what's needed. Instead of reading large files, use
search_context to find the exact lines that matter. This significantly reduces context window overhead and token costs while keeping your work strictly local and secure.
Muninn - 通用记忆层
Muninn是一个为AI代理设计的高级项目级记忆系统。它使用上下文交换协议(CXP)提供高性能、高令牌效率的上下文管理。
🛡️ 安全与隐私(本地优先)
Muninn采用隐私优先的设计理念。
- - 本地存储:所有项目索引和记忆仅存储在主机的.muninn/文件夹(按项目)或~/.muninn/(全局设置)中。
- 无数据泄露:Muninn不会传输任何代码、上下文或记忆到第三方服务器或远程API。所有处理(语义搜索、索引和上下文注入)均使用基于Rust的高性能CXP引擎在本地完成。
- 透明控制:记忆以标准Markdown文件形式存储。您可以随时查看、编辑或删除它们。
⚙️ 集成
Muninn作为MCP(模型上下文协议)服务器运行。
🚀 Muninn协议(强制执行)
作为代理,您必须遵循大脑优先的工作流程以保持高效和准确。MCP服务器通过在允许敏感工具操作前验证上下文来确保项目安全。
- 1. 定位自身(braincheck):在每个会话开始时或切换项目时调用此功能。它会加载本地项目索引并识别关键文件和模式。
- 先搜索后编码(searchcontext):切勿假设您了解代码库。使用本地语义搜索查找现有模式或先前决策。
- 边学边记(add_memory):每个重要的修复、架构决策或用户偏好都应作为记忆保存在本地。
🛠 工具参考(MCP)
- - initproject:在项目目录中初始化本地Muninn大脑。
- braincheck:强制性的定位步骤。加载本地上下文和模式。
- addmemory:将事实和决策持久化到本地的.muninn/memories文件夹。
- searchcontext:语义查询本地项目索引。
- reindexcontext:重建本地语义索引。
- healthcheck:验证本地Muninn系统的状态。
🦞 代理专业提示
Muninn精准检索仅所需内容。与其读取大文件,不如使用search_context查找确切的关键行。这能显著减少上下文窗口开销和令牌成本,同时确保您的工作严格本地化且安全。