Memory OS AI

io.github.romainsantoli-web由 GitHub 帳號 romainsantoli-web 發布v3.0.1更新於 Oct 24, 2026

Adaptive memory for AI agents — FAISS search, chat extraction, cross-project linking

發布方自己的服務:Memory.fit

概覽

AI 產生的概覽

一套本地優先的語意記憶伺服器,可索引文件與聊天記錄,讓支援 MCP 的 AI 助理跨專案搜尋與回想內容。

可以做什麼
將 PDF、DOCX、TXT、PPTX、圖片與音訊資料夾索引到本機 FAISS 向量索引,圖片以 OCR、音訊以 Whisper 轉錄。對已索引內容進行語意搜尋、關鍵字出現次數統計與任務相關脈絡擷取,並列出文件及統計資訊。同步並保存來自 Claude、ChatGPT、Copilot 與終端機歷史的對話訊息,自動偵測聊天工作區,產生工作階段開始時的記憶簡報。連結或取消連結其他專案的記憶,讓脈絡跨工作區共用。設定雲端儲存後端,並在本機磁碟不足時推送、拉取或自動移轉記憶資料。
適用情境
適合希望助理跨工作階段、跨專案記住文件與過往對話的情境,尤其是資料留在本機的本地優先部署。也適合在多個工作區之間共用記憶,或需要檢索掃描版 PDF、圖片與音訊時使用。
執行需求
需要本機 Python 3.10+ 執行從 PyPI 安裝的 memory-os-ai 程序。選用系統工具:tesseract(OCR)、ffmpeg(音訊)、antiword(舊版 .doc)。選用環境變數 MEMORY_CACHE_DIR、MEMORY_MODEL、MEMORY_API_KEY、MEMORY_CLOUD_PROVIDER、MEMORY_CLOUD_CONFIG、MEMORY_DISK_THRESHOLD。雲端後端需各自的憑證與額外相依套件。
安裝前請注意
伺服器會讀取本機文件、聊天記錄與終端機歷史,請只指向你願意被索引的資料夾與來源。雲端溢出可能把記憶資料傳送給第三方服務(如 Google Drive、Dropbox、OneDrive、S3、Azure、Box、B2),這些需要存取權杖、AWS 金鑰或連線字串等憑證,並透過 MEMORY_CLOUD_CONFIG 傳入。相關工具會寫入、同步與刪除索引及記憶資料,包括取消專案連結與壓縮索引。MEMORY_API_KEY 僅用於 SSE/HTTP 驗證,預設未設定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Memory OS AI,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Memory OS AI

Adaptive memory system for AI agents — universal MCP server for Claude Code, Codex CLI, VS Code Copilot, ChatGPT, and any MCP-compatible client.

[Tests] [Coverage] [Python] [MCP] [VS Code] [Version] [License]

Concept

Memory OS AI transforms your local documents (PDF, DOCX, images, audio) into a semantic memory queryable by any AI model through the MCP (Model Context Protocol).

┌──────────────────────────────────┐│  AI Client (any MCP-compatible)  ││  Claude Code / Codex / Copilot   ││  ChatGPT / custom agents         │├──────────────────────────────────┤│         MCP Protocol             ││   stdio / SSE / Streamable HTTP  │├──────────────────────────────────┤│      Memory OS AI Server         ││  ┌────────┐  ┌───────────────┐   ││  │ FAISS  │  │ Chat Extractor│   ││  │ Index  │  │ (4 sources)   │   ││  └────────┘  └───────────────┘   ││  ┌────────────────────────────┐  ││  │ Cross-Project Linking      │  ││  └────────────────────────────┘  │└──────────────────────────────────┘

Features

  • 21 MCP tools for memory management, search, chat persistence, project linking, and cloud storage
  • Semantic search with FAISS + SentenceTransformers (all-MiniLM-L6-v2)
  • Multi-format ingestion: PDF, DOCX, TXT, images (OCR), audio (Whisper), PPTX
  • Chat extraction: auto-detects Claude, ChatGPT, Copilot, and terminal history
  • Cross-project linking: share memory across multiple workspaces
  • Cloud storage overflow: auto-backup to Google Drive, iCloud, Dropbox, OneDrive, S3, Azure, Box, B2
  • 3 transports: stdio (default), SSE (--sse), Streamable HTTP (--http)
  • MCP Resources: memory://documents/*, memory://logs/conversation, memory://linked/*
  • Local-first: all data on your machine by default, cloud only when disk runs low

21 MCP Tools

ToolDescription
memory_ingestIndex a folder of documents into FAISS
memory_searchSemantic search across all indexed content
memory_search_occurrencesCount keyword occurrences across documents
memory_get_contextGet relevant context for the current task
memory_list_documentsList all indexed documents with stats
memory_transcribeTranscribe audio files (Whisper)
memory_statusEngine status (index size, model, device)
memory_compactCompact/deduplicate the FAISS index
memory_chat_syncSync messages from configured chat sources
memory_chat_source_addAdd a chat source (Claude, ChatGPT, etc.)
memory_chat_source_removeRemove a chat source
memory_chat_statusStatus of all chat sources
memory_chat_auto_detectAuto-detect chat workspaces on disk
memory_session_briefFull memory briefing for session start
memory_chat_savePersist conversation messages to memory
memory_project_linkLink another project's memory
memory_project_unlinkUnlink a project
memory_project_listList all linked projects
memory_cloud_configureConfigure cloud storage backend for overflow
memory_cloud_statusShow local disk + cloud storage status
memory_cloud_syncPush/pull/auto-sync between local and cloud

Quick Start

Prerequisites

  • Python 3.10+
  • Optional: tesseract (OCR), ffmpeg (audio), antiword (legacy .doc)
bash
# macOSbrew install tesseract ffmpeg antiword
# Ubuntu/Debiansudo apt-get install tesseract-ocr ffmpeg antiword

Install

bash
git clone https://github.com/romainsantoli-web/Memory-os-ai.gitcd Memory-os-aipip install -e ".[dev,audio]"

Auto-Setup (recommended)

bash
# Setup for your AI client:memory-os-ai setup claude-code    # Claude Codememory-os-ai setup codex          # Codex CLImemory-os-ai setup vscode         # VS Code Copilotmemory-os-ai setup claude-desktop # Claude Desktopmemory-os-ai setup chatgpt        # ChatGPT (manual bridge)memory-os-ai setup all            # All of the above
# Check status:memory-os-ai setup status

Manual Start

bash
# stdio (default — Claude Code, VS Code, Codex)memory-os-ai
# SSE transport (port 8765)memory-os-ai --sse
# Streamable HTTP (port 8765)memory-os-ai --http

Project Structure

Memory-os-ai/├── src/memory_os_ai/│   ├── __init__.py          # Public API: MemoryEngine, ChatExtractor, TOOL_MODELS│   ├── __main__.py          # python -m memory_os_ai entry point│   ├── server.py            # MCP server — 21 tools, 3 transports, resources│   ├── engine.py            # FAISS engine — indexing, search, compact, session brief│   ├── cloud_storage.py     # 8 cloud backends (GDrive, iCloud, Dropbox, OneDrive, S3, Azure, Box, B2)│   ├── storage_router.py    # Smart routing: local-first with cloud overflow│   ├── models.py            # 21 Pydantic models + TOOL_MODELS registry│   ├── chat_extractor.py    # 4 extractors: Claude, ChatGPT, Copilot, terminal│   ├── instructions.py      # MEMORY_INSTRUCTIONS for AI clients│   └── setup.py             # Auto-setup CLI for 5 AI clients├── bridges/│   ├── claude-code/         # CLAUDE.md with memory rules│   ├── claude-desktop/      # config.json for Claude Desktop│   ├── codex/               # AGENTS.md for Codex CLI│   ├── vscode/              # mcp.json for VS Code│   └── chatgpt/             # mcp-connection.json for ChatGPT├── tests/                   # 410+ tests — 96% coverage│   ├── test_memory.py       # Engine + models (60 tests)│   ├── test_chat_extractor.py  # Chat extraction (39 tests)│   ├── test_bridges.py      # Bridge configs (22 tests)│   ├── test_gaps.py         # Compact, cross-project, resources (34 tests)│   ├── test_server_dispatch.py # Server dispatch + async (61 tests)│   ├── test_setup.py        # Setup CLI targets│   ├── test_z_coverage_boost.py # Coverage boost (35 tests)│   └── test_zz_full_coverage.py # Full coverage (97 tests)├── pyproject.toml           # v3.1.0 — deps, scripts, coverage config + cloud optional deps├── Dockerfile               # Container deployment└── README.md

Cloud Storage (v3.1.0)

When local disk runs low (< 500 MB free by default), memory data automatically overflows to a configured cloud backend.

Supported Providers

ProviderInstallCredentials
Google Drivepip install memory-os-ai[cloud-gdrive]credentials_json or token_json + folder_id
iCloud Drive(macOS native, no extra deps)container name (default: memory-os-ai)
Dropboxpip install memory-os-ai[cloud-dropbox]access_token + folder
OneDrive(auto-detects mount) or Graph APImount_path or access_token
Amazon S3pip install memory-os-ai[cloud-s3]bucket, aws_access_key_id, aws_secret_access_key
Azure Blobpip install memory-os-ai[cloud-azure]connection_string + container
Boxpip install memory-os-ai[cloud-box]access_token + folder_id
Backblaze B2pip install memory-os-ai[cloud-b2]application_key_id, application_key, bucket_name
All providerspip install memory-os-ai[cloud-all]—

Usage

bash
# Configure via environment (auto-activates on server start)export MEMORY_CLOUD_PROVIDER=icloudexport MEMORY_CLOUD_CONFIG='{"container": "memory-os-ai"}'memory-os-ai
# Or configure at runtime via MCP tool:#   memory_cloud_configure(provider="s3", credentials={"bucket": "my-bucket", ...})#   memory_cloud_status()       → local disk + cloud usage#   memory_cloud_sync("push")   → backup to cloud#   memory_cloud_sync("pull")   → restore from cloud#   memory_cloud_sync("auto")   → offload if disk low

Configuration

Environment Variables

VariableDefaultDescription
MEMORY_CACHE_DIR~/.memory-os-aiCache / FAISS index directory
MEMORY_MODELall-MiniLM-L6-v2SentenceTransformer model name
MEMORY_API_KEY(none)Optional API key for SSE/HTTP auth
MEMORY_CLOUD_PROVIDER(none)Cloud provider name (see table above)
MEMORY_CLOUD_CONFIG(none)JSON credentials or path to JSON file
MEMORY_DISK_THRESHOLD524288000Bytes free before cloud overflow (500 MB)

Development

bash
# Install dev dependenciespip install -e ".[dev]"
# Run testspython -m pytest tests/ -v
# Run with coveragepython -m pytest tests/ --cov=memory_os_ai --cov-report=term-missing
# Coverage threshold: 80% (enforced in pyproject.toml)

License

GNU Lesser General Public License v3.0 (LGPL-3.0). See LICENSE for details.

For commercial licensing, contact [email protected].

Part of the OpenClaw Ecosystem

Memory OS AI is designed to work alongside the OpenClaw agent infrastructure:

RepoDescription
setup-vs-agent-firmFactory for AI agent firms — 28 SKILL.md, 5 SOUL.md, 15 sectors
mcp-openclaw-extensions115 MCP tools — security audit, A2A bridge, fleet management
Memory OS AI (this repo)Semantic memory + chat persistence — universal MCP bridge

Together they form a complete stack: memory (this repo) → skills & souls (setup-vs-agent-firm) → security & orchestration (mcp-openclaw-extensions).

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.


⚠️ Contenu généré par IA — validation humaine requise avant utilisation.

來源:README.md,提交 b26fbc6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v3.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

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

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

其他 Memory 整合