cogito-mem (Cogi)

io.github.meridian21lab由 GitHub 帳號 meridian21lab 發布v0.3.0更新於 Nov 3, 2026

為Claude Code及其他代理程式提供本機長期記憶:每條訊息逐字儲存,無需雲端。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Local long-term memory for Claude Code and other agents: every message kept word for word, no cloud.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

cogito-mem (Cogi) 的本機 MCP 服務;無需登入;STDIO;3 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 cogito-mem (Cogi),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

其他 MCP 客戶端

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

README

cogito-mem

Long-term memory for Claude Code, on your own machine. Cogi the squirrel keeps every message you and Claude exchange, and finds the right one again, even in over a million tokens of history. No API key, no cloud, no AI calls to store.

[Cogi the squirrel: Claude forgets. Cogi doesn't.]

Why try it

  • Claude can look back. Every message and reply is kept word for word, with its date. When something has dropped out of the context window, or happened last month, Claude searches for it and gets your exact words back.
  • It remembers what you did, too. The commands you ran (and whether they failed), the files you touched, what each sub-agent reported, and the lines of output that say how a command went: errors, metrics, how a long run ended.
  • Private and free. One folder on your computer. No account, no API key, no AI calls to save a message. Nothing leaves your machine.
  • Tested. In LongMemEval's long test, each question hides its answer in about 480 past sessions, some 1.2 million tokens. The past session holding the answer is among the first five Cogi finds for 93.0% of 500 questions, with no AI model involved, ahead of four other local memory plugins we ran on the same questions (86.6–89.8% at their best settings). On the short test, with about 50 sessions, it is 99.0%, level with the best. On LoCoMo, with GPT-5 mini answering, the 1,000 tokens Cogi hands back answer 89.4% of questions right, against 94.1% from rereading the whole conversation: 95% of the quality while the model reads about 9 times fewer tokens. A search over 10 million tokens takes 26 ms on a laptop CPU. See the results.

Install

You need Claude Code and uv, on macOS or Linux (Windows is experimental). Then, in a terminal:

sh
claude plugin install cogito-mem --marketplace meridian21lab/cogito-mem

The first start downloads the model (310 MB, about a minute). To get updates, turn on auto-update once: /plugin → Marketplaces → cogito-mem → Enable auto-update.

Step-by-step guide · Codex, Claude Desktop, Docker

Try it

  1. Tell Claude: Let's call the staging server "acorn".
  2. Clear its short-term memory: /clear
  3. Ask: What did we call the staging server? Claude answers "acorn": Cogi brought it back.

What Cogi runs, downloads and stores

  • Runs: four Claude Code hooks and one MCP server, cogi. Each runs the released cogito-mem package from PyPI at the exact version the plugin pins (uvx cogito-mem==<version>); the plugin's uv.lock lists that release and numpy with their checksums. After each reply and at the end of a session, the hooks save the new messages from the session's transcript. At the start of a session and with each prompt, they add the most relevant memories (about 400 tokens per prompt, each line with an id Claude can open). The MCP server gives Claude three tools, memory_query, memory_open and memory_append, answered by a small service that listens on your computer only (127.0.0.1:7327).
  • Downloads, once, over HTTPS: cogito-mem and its one dependency, numpy, from PyPI (by uv); llama.cpp's llama-server from llama.cpp's official GitHub releases (skipped if you already have it); and the EmbeddingGemma 2 model (310 MB) from Hugging Face. After that, Cogi makes no network calls.
  • Stores: everything in ~/.cogito-mem/ on your computer: your messages, a short note of what each turn did, what each sub-agent reported back, and at most 800 characters of each command's output (errors, metrics, how a long run ended), in one SQLite file. Common forms of API keys, tokens, private keys and passwords are replaced with [redacted] before anything is saved; the rest of tool output and what Claude's Read tool returns are never saved. Redaction goes by patterns, so others can get through. Sessions from before the install are read only if you ask (cogito-mem capture claude-code --all), and old sessions may hold secrets the redaction misses. Text inside <private>…</private> is skipped, and COGITO_MEM_CAPTURE=off pauses saving.
  • Sends: nothing. No account, no analytics, no telemetry. (The optional benchmark command, cogito-mem eval locomo-qa, which only you would run, sends benchmark questions to the LLM API you set up for it, with your own key.)
  • Removes cleanly: claude plugin uninstall cogito-mem@cogito-mem, then delete ~/.cogito-mem.

Every file, download and connection, with links to the source: What you install.

How it compares

cogito-memclaude-memMem0 plugincognee pluginSupermemory plugin
AI calls to store a messagenonean observer model per tool call (Haiku on your Claude plan by default)extraction on Mem0's serversextraction with your LLM key or claude -pin Supermemory's service
Account or API keynoneoptional sign-inMem0 Platform API keyan LLM key or the Claude CLIAPI key or login
Where your memory livesyour computeryour computer (cloud sync optional)Mem0's cloudyour computer (cloud optional)Supermemory's cloud (local mode available)
What comes backyour exact words, with datesAI-written observationsextracted memoriesgraph facts and summariesextracted memories
Searchable afterthe same turnthe observer's runa batch (every 5 exchanges)the next graph runthe background save

Keep your project's rules in CLAUDE.md, and let Cogi remember what happened.

Learn more

How it worksCollect, keep, find: what Cogi stores and how it finds it
Results · BenchmarksThe numbers, and how to reproduce them
API & MCP · ReferenceHTTP, Python, terminal, settings, FAQ, roadmap
What you install · Privacy · TermsEvery file, download and connection; privacy and terms
DevelopmentRunning the tests and the evaluations

Early access. v0.2 is new, built and tested (over 200 tests), and still being measured. Feedback and issues are very welcome.

License

MIT

來源:README.md,提交 12a720a

工具

3

memory_append

Save to memory

Save a note to the user's long-term memory: an idea, a decision, an open question or a fact the user stated. Write it so it makes sense on its own later. It is stored word for word with the current time and cannot be edited.

輸入參數text必填title

memory_query

Search memory

Search the user's long-term memory of earlier chats and sessions. Returns the few stored messages that best match, each with valid_at (when it was said) and a source pointing to the original message. Turn time phrases into valid_after (inclusive) and valid_before (exclusive): for 'a week ago' use a window of a few days around that date, for 'last month' that month. Today is Tuesday 2026-11-03 (UTC); the response's as_of is the current time.

輸入參數text必填max_tokensvalid_afterthis_sessionvalid_before

memory_open

Open a remembered message

Read one stored message whole, word for word, with the messages around it in its session. Give the id from a memory_query result or a cogito-mem pointer line.

輸入參數id必填afterbeforemax_tokens

版本歷史

3
  1. v0.3.0最新Nov 3, 2026
  2. v0.2.1Oct 21, 2026
  3. v0.2.0Oct 20, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分