memorizz

MemoRizz: 一個為AI應用提供記憶層的Python函式庫。利用熱門資料庫和儲存解決方案來最佳化記憶體使用。提供實用類別和方法以進行高效的資料管理。

memorizz 是什麼?

MemoRizz: 一個為AI應用提供記憶層的Python函式庫。利用熱門資料庫和儲存解決方案來最佳化記憶體使用。提供實用類別和方法以進行高效的資料管理。

memorizz 概覽

這是什麼

MemoRizz 是一個 Python 框架,將持久記憶、模型、提示與推理連接起來,讓代理程式能夠記住重要資訊、重複使用經驗,並在多次對話中做出更好的決策。它作為 AI 應用的記憶層,利用常見的資料庫與儲存方案來最佳化記憶使用。

主要功能

  • 五種記憶管理:情節記憶、語意記憶、程序記憶、短期記憶與共享記憶。
  • 按代理、使用者與對話隔離記憶;支援本機檔案系統、MongoDB、Oracle 與 Notion(搭配獨立向量儲存)。
  • 擷取與檢索:將檔案與資料夾轉換為知識庫,支援可設定的區塊切割、嵌入與語意或混合搜尋。
  • 代理框架:MemAgent 與 MemAgentBuilder,支援 assistant、workflow 與 deep_research 模式。
  • MetaHarness:可透過 Codex、Claude Code、OpenHands、DeepSeek、pi、Hermes 或原生 MemAgent 工作器執行任務,並跨 harness 攜帶記憶範圍與學習證據。
  • 支援 Codex 與 Claude Code 的外掛,可透過本機或託管的 MCP 伺服器共享記憶。
  • 持續學習循環:擷取工具工作流程、將重複的成功程序提煉為可重複使用的技能,並在使用者的記憶上微調小型模型(嵌入與決策模型)。

使用情境

  • 建立能跨對話保留與回憶上下文的持久 AI 代理。
  • 從檔案與資料夾建立知識庫,進行語意或混合搜尋。
  • 將工作委派給專業代理,並協調多代理工作流程。
  • 將 MemoRizz 作為 Codex 與 Claude Code 的外掛,提供專案記憶與對話歷史。
  • 在外部 harness(Codex、Claude Code 等)上執行任務,並搭配記憶基礎與核准控制。

快速開始

需要 Python 3.10+。安裝並啟動 CLI(使用雲端模型): bash python -m pip install memorizz export OPENAI_API_KEY='your-key' memorizz 完全本機設定請使用 Ollama。儲存憑證並設定記憶: bash memorizz config set OPENAI_API_KEY memorizz memory configure memorizz notion connect 用 Python 建立記憶優先的代理: python from memorizz import MemAgentBuilder agent = ( MemAgentBuilder() .with_instruction('Remember useful context and use it to help the user.') .with_llm_config({'provider': 'openai', 'model': 'gpt-4o-mini'}) .with_memory_ids('my-assistant') .build_and_save() ) scope = {'memory_id': 'my-assistant', 'user_id': 'alice', 'thread_id': 'intro'} with agent.lifecycle(close_memory_provider=True): agent.run('I work on payments systems.', **scope) print(agent.run('What did I tell you about my work?', **scope))

授權與價格

原始碼以 PolyForm Noncommercial 1.0.0 授權提供。詳見 NOTICE。本專案為開源但僅限非商業使用。

內容整理自該專案公開的 README 與儲存庫資訊。

將此徽章加入你的 README

Featured on YunoDB 徽章樣式與說明

你是這個專案的維護者嗎?展示它已收錄於 YunoDB。

Markdown[![Featured on YunoDB](https://yunodb.com/badge/richmondalakememorizz.svg)](https://yunodb.com/tools/richmondalakememorizz?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/richmondalakememorizz?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/richmondalakememorizz.svg" alt="Featured on YunoDB" height="20"></a>