Memwyre

io.github.memwyreai由 GitHub 帳號 memwyreai 發布v1.0.0更新於 Oct 24, 2026

Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.

已驗證Streamable HTTP可網頁執行知識與記憶AI 與機器學習

概覽

AI 產生的概覽

Memwyre 是託管的持久記憶與知識檢索層,讓助理在不同 AI 工具之間儲存、搜尋與讀取記憶。

可以做什麼
  • 以語意檢索與事實檢索搜尋已儲存的記憶與知識
  • 將新記憶、文件或對話內容存入記憶庫
  • 依參照取得某份已儲存的文件
  • 把記憶限制在特定專案或工作區範圍內,避免跨專案混用
  • 透過背景強化、摘要產生與依時間衰減淘汰過時事實
適用情境
適合希望上下文能在工作階段、編輯器與不同助理之間延續而不遺失的情境,也適合為 Cursor、VS Code 或 Claude Desktop 建立共用、可搜尋的知識庫。
執行需求
需要 Memwyre 遠端端點,不需本機執行環境或安裝套件。需要從 Memwyre 主控台產生的 bearer 權杖,透過 Authorization 標頭送出。隱含需要 Memwyre 帳號與網路存取。
安裝前請注意
Authorization bearer 權杖屬於機密憑證,請勿寫入共用設定或日誌。儲存的記憶會傳送到 Memwyre 託管服務,由其呼叫外部 LLM 與嵌入服務處理,並存入向量資料庫與關聯式資料庫。寫入與審核操作會改變長期儲存的記憶。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Memwyre,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.memwyreai%2Fmemwyre/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "memwyre": {
      "type": "http",
      "url": "https://server.memwyre.tech/mcp/",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

Memwyre

Persistent Shared Memory for Every AI.

[Memwyre Logo]

Website · Documentation · Console / App · Twitter / X

[FastAPI] [Vue 3] [Chrome Extension] [MCP] [LoCoMo Accuracy] [License: Apache 2.0]

Memwyre is an open-source, universal memory infrastructure and persistent knowledge retrieval layer for Large Language Models (LLMs), AI agents, and custom applications.

Rather than treating AI as stateless and losing context every time you switch between ChatGPT, Claude, Cursor, or different agent environments, Memwyre sits externally as a unified personal brain. It securely ingests, chunks, and structures your documents, web pages, conversations, and workflows—making them instantly retrievable across your entire AI toolchain.


Quickstart

🧑‍💻 I want to connect my AI tools

Build your own external memory layer using our consumer-facing dashboard or browser extension, and plug it directly into Cursor, VS Code, or Claude Desktop via MCP:

bash
npx -y install-memwyre

→ Jump to User Setup

🔧 I'm building AI agents & products

Interface with the unified memory vault, custom vector searches, and profile-based retrieval APIs:

  • Integration guides for custom AI agents and apps
  • Plug-and-play OpenClaw & Claude plugins
  • Direct vector storage without configuration

→ Jump to Developer Setup


Table of Contents

  1. Quickstart
  2. Core Features
  3. Ecosystem Tiers
  4. System Architecture & Core Workflows
  5. The LoCoMo Benchmark Evaluation
  6. Database Schema & Multi-Tenancy
  7. Installation & Setup
  8. Environment Configuration
  9. License

Core Features

  • Decoupled Persistent Memory: Acts as an external, LLM-agnostic memory layer. Your knowledge base follows you whether you are using OpenAI, Google Gemini, Anthropic Claude, or local model configurations.
  • Asynchronous Enrichment: Automatically refines memories, stripping filler text, generating summaries, extracting key entities, and producing atomic factual associations.
  • Dynamic Context Pruning & Recency Decay: Utilizes an Ebbinghaus-inspired logarithmic decay to deprecate outdated or contradictory user preferences chronologically, keeping context sizes optimized.
  • Approval-Based Inbox Flow: Introduces a memory dashboard inbox, allowing you to review, edit, approve, or reject auto-captured memories before committing them to long-term vector indexes.
  • Project-Scoped Containerization: Restricts vector searches and factual associations to specific workspaces or project scopes, providing robust multi-tenant containerization.

Ecosystem Tiers

Memwyre provides multiple ways to ingest and retrieve information:

  • 1. Web Application & Dashboard (Deployed on memwyre.tech): The main web app written in Vue 3 (Vite + Tailwind CSS), incorporating an onboarding tour, Monaco Editor for document management, billing integration, and a visual retrieval simulator to debug and verify vector rankings.
  • 2. Chrome Extension (Manifest V3) (Available on Chrome Web Store): Auto-injects context into web chat clients, maps authentication tokens, and allows users to save articles, code snippets, or conversational logs directly to their vault with a single click.
  • 3. Model Context Protocol (MCP) Server: A Python server mapping memory tools (search_memory, save_memory, get_document) directly into IDEs like Cursor and VS Code, or desktop assistants like Claude Desktop.
  • 4. CLI Tool: A Node-based Command Line Interface (cli/) providing terminal-level interaction, query testing, and batch document uploads.
  • 5. OpenClaw Plugin: A dedicated integration module (openclaw-plugin/) allowing multi-agent platforms to interface directly with the Memwyre memory vault.

System Architecture & Core Workflows

High-Level Components

Memwyre connects user clients to local or cloud vector search services and AI providers:

mermaid
flowchart TB    subgraph Client_Side ["Client Side"]        Browser["WebApp (Vue 3 / Vite)"]        Extension["Chrome Extension (MV3)"]        CLI["CLI Client (Node.js)"]    end
    subgraph Load_Balancer ["Ingress"]        Nginx["Nginx Reverse Proxy"]    end
    subgraph Backend_Core ["Backend API (FastAPI)"]        Auth_Mod["Auth & Users Module"]        Mem_Mod["Memory Management"]        Ret_Mod["Retrieval Engine"]        LLM_Mod["LLM Service (V1/V2)"]    end
    subgraph Background_Workers ["Celery Workers"]        Ingest_Worker["Ingestion & Chunking Worker"]        Dedupe_Worker["Deduplication Worker"]    end
    subgraph Data_Persistence ["Data Layer"]        Postgres[("PostgreSQL / SQLite")]        Pinecone[("Pinecone / ChromaDB")]        Redis[("Redis Message Broker")]    end        subgraph External_Services ["AI Inference"]        NVIDIA["NVIDIA NIM (Kimi K2.6)"]        Azure["Azure OpenAI (GPT-4o-mini)"]        Gemini["Google Gemini API"]    end
    Browser -->|HTTPS| Nginx    Extension -->|HTTPS| Nginx    CLI -->|HTTPS| Nginx    Nginx --> Backend_Core        Auth_Mod --> Postgres    Mem_Mod --> Postgres    Mem_Mod --> Ingest_Worker        Ret_Mod --> Pinecone    Ret_Mod --> Postgres    Ret_Mod --> External_Services        Ingest_Worker --> External_Services    Ingest_Worker --> Pinecone    Ingest_Worker --> Postgres

Ingestion Pipeline

Ingesting a memory triggers background worker tasks to process, embed, and structure raw data asynchronously:

mermaid
sequenceDiagram    participant User    participant API as FastAPI API    participant Worker as Celery Worker    participant LLM as LLM/Embedding Provider    participant Vector as Pinecone/ChromaDB    participant DB as PostgreSQL/SQLite
    User->>API: POST /memory (Raw Text Content)    API->>DB: Save Memory (Status: Pending)    API->>Worker: Dispatch Ingest Task    API-->>User: 202 Accepted (In progress)        Note over Worker: Asynchronous Processing    Worker->>LLM: Metadata Extraction (Titles, Tags)    Worker->>Worker: Semantic Chunking (Overlapping Splits)        loop Parallel Enrichment        Worker->>LLM: Enrich Chunk (Q&A Pairs, Summaries)        Worker->>LLM: Extract SPO Facts (Subject-Predicate-Object)    end        Worker->>Vector: Batch Upsert Embeddings (Chunks + Facts)    Worker->>DB: Write Chunks & Facts (Linked to Memory)    Worker->>DB: Update Memory Status (Approved/Active)

Parallelized Retrieval (RAG)

Retrieval queries run exact relational Fact lookups and fuzzy Semantic Search in parallel to feed LLM contexts with ultra-low latency:

mermaid
sequenceDiagram    participant User    participant API as FastAPI API    participant RetSvc as RetrievalService    participant Vector as Vector Store    participant DB as Relational DB    participant LLM as GenAI Model
    User->>API: Chat Query / RAG Trigger    API->>RetSvc: search_memories(Query, project_id)        par State Fact Lookups        RetSvc->>Vector: Vector Search (Factual matches)        RetSvc->>DB: SQL Filter (Valid & Non-superseded Facts)    and Semantic Search        RetSvc->>Vector: Vector Search (Chunk embeddings)        RetSvc->>RetSvc: MMR Re-ranking (Filter redundant chunks)    end        RetSvc->>RetSvc: Merge Results (State Facts + Chunk text)    RetSvc-->>API: Ranked Top-K Context Items        API->>LLM: Generate Answer (Prompt + Merged Context)    LLM-->>User: Streaming Response

The LoCoMo Benchmark Evaluation

The LoCoMo-10 (Long Conversational Memory) benchmark, introduced by Snap Research in "Evaluating Very Long-Term Conversational Memory of LLM Agents" (2024), evaluates AI agent systems on long-term memory, factual consistency, temporal alignment, and multi-hop reasoning over lengthy, multi-session dialog flows (up to 32 sessions and 26,000 tokens per conversation).

Performance Metrics (Memwyre vs. Flat Vector Systems)

Evaluation CategoryTest DescriptionFlat Vector RAGMemwyre Engine
Single-Hop RecallDirect retrieval of personal facts and values53.0%80.0%
Multi-Hop ReasoningLinking facts across distant chat sessions24.0%45.0%
Temporal AlignmentOrdering events and identifying timeframe changes48.0%74.0%
Open-Domain ReasoningContextual inferences and complex reasoning50.0%76.0%
Overall AccuracyWeighted average across all 1,540 test questions43.7%73.5%
Mean Token SizeAverage size of retrieved context sent to LLM prompt~26,000~3,000

[!TIP] Context Compression: Memwyre achieves a 88.5% context length reduction (retrieving 3,000 tokens instead of the 26,000-token raw conversational dialog) while significantly outperforming flat vector indexing in accuracy.

Architectural Enablers of LoCoMo Performance

  1. Dynamic Context Pruning: Strips out conversational noise (filler words, greetings, and distractors) during chunk enrichment.
  2. Two-Stage Re-ranking: Employs a broad, high-recall vector fetch stage followed by a Cross-Encoder re-ranker to pick only the most contextually relevant memory items.
  3. Ebbinghaus Logarithmic Recency Decay: Automatically deprecates older user preferences or conflicting facts chronologically when newer entries override them.
  4. Adversarial Immunity: Utilizes strict semantic containment, causing the retriever to fail cleanly and refuse hallucinations when queried on non-existent information.

Database Schema & Multi-Tenancy

Memwyre uses a hybrid storage model: metadata, relational facts, and user credentials reside in SQL tables (PostgreSQL/SQLite), while document chunks and enriched fact strings are mirrored in vector databases (Pinecone/ChromaDB).

👉 View the Detailed Database Schema for a complete breakdown of the Core Entities (users, projects, memories, documents, chunks, facts) and the Entity Relationship Diagram.

Fact Supersession & Project Containerization

  • Supersession: When a new fact matching the same subject and predicate is written (e.g. user moves from Berlin to Tokyo), the database marks the old record's is_superseded flag as true and updates valid_until to the current timestamp. This guarantees that temporal inquiries return state-accurate facts.
  • Containerization: Every memory, document, chunk, and fact contains a project_id. When querying, filters strictly enforce containment matching the current workspace's project_id, preventing leakage across different project environments.

Installation & Setup

Prerequisites

  • Python 3.11 or 3.12 (UV package manager recommended)
  • Node.js 18+ & npm
  • Redis server (for background Celery tasks)
  • PostgreSQL database (Optional; SQLite is used by default)

1. Backend API Setup

Navigate to the backend directory, initialize the environment, install dependencies, and start the FastAPI server:

bash
cd backend
# Create virtual environment and install packagesuv venvuv pip install -r requirements.txt
# Start the FastAPI serveruv run uvicorn app.main:app --reload

API Swagger UI documentation will be available at http://localhost:8000/docs.

2. Background Ingestion Worker

Ensure Redis is running, then start the Celery background worker to process ingestion queues:

bash
cd backenduv run celery -A app.celery_app worker --loglevel=info -P solo

3. Frontend Dashboard Setup

Install frontend packages and spin up the Vite development server:

bash
cd frontendnpm installnpm run dev

The web dashboard runs at http://localhost:5173.

4. Chrome Extension Installation

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable Developer mode (top-right toggle)
  3. Click Load unpacked (top-left)
  4. Select the extension/ folder from the root of this project.
  5. In the Web App, go to Settings -> Copy Extension Token and paste it into the Extension popup to link your session.

5. MCP Server Integration

Claude Desktop

Add the following to your Claude Desktop config (located at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "brain-vault": {      "command": "python",      "args": ["/path/to/memwyre/backend/mcp_server.py"]    }  }}
Cursor / VS Code

Configure your editor's MCP settings to run the server via command line:

bash
python /path/to/memwyre/backend/mcp_server.py

6. Node CLI Setup

Install dependencies and run the command line tool globally:

bash
cd clinpm installnode index.js --help

Environment Configuration

Copy the example environment file in the backend/ directory and configure the variables:

bash
cp backend/.env.example backend/.env

Key environment parameters:

env
# --- Base Secrets & Database ---SECRET_KEY="your-strong-random-64-character-string"DATABASE_URL="postgresql://postgres:password@localhost/brain-vault"
# --- Redis & Celery ---CELERY_BROKER_URL="redis://localhost:6379/0"REDIS_URL="redis://localhost:6379/0"
# --- Vector Database (Pinecone) ---PINECONE_API_KEY="your-pinecone-api-key"PINECONE_HOST="https://your-pinecone-index-host"PINECONE_SPARSE_HOST="https://your-optional-sparse-index-host"
# --- LLM Providers & Embeddings ---MEMORY_ENGINE_VERSION="v2"  # "v1" for NVIDIA, "v2" for Azure/OpenAIAZURE_OPENAI_API_KEY="your-azure-key"AZURE_OPENAI_ENDPOINT="https://your-resource-name.cognitiveservices.azure.com/"AZURE_OPENAI_DEPLOYMENT="gpt-4o-mini"AZURE_OPENAI_EMBEDDING_DEPLOYMENT="text-embedding-3-small"
# --- V1 Compatibility (NVIDIA NIM) ---EMBEDDING_API_KEY="your-nvidia-embedding-key"LLM_API_KEY="your-nvidia-llm-key"

License

This project is licensed under the Apache License, Version 2.0 (Apache-2.0). See the LICENSE and NOTICE files for details.

來源:README.md,提交 e7f083d

工具

0
該伺服器需要 API 金鑰等憑證,因此 SourceWeft 無法在沒有憑證的情況下讀取其工具,也未收錄。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 60%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分