
agentmem
io.github.oxgeneral由 GitHub 帳號 oxgeneral 發布v0.3.0更新於 Oct 25, 2026
Lightweight persistent memory for AI agents. Hybrid search. 16 tools. One SQLite file.
概覽
為 AI 代理提供本機持久記憶的伺服器,將記憶存進單一 SQLite 檔案,提供關鍵字與語意混合檢索及 16 個工具。
- 可以做什麼
- 儲存、檢索、更新與封存記憶,支援關鍵字與語意混合搜尋、命名空間與版本歷程。在上下文壓縮前儲存工作狀態,並取回當天的記憶。管理行為規則(程序性記憶),並從對話歷史自動擷取事實、決策與待辦事項。檢視自動擷取的實體(例如 IP、URL、電子郵件與環境變數名稱),並找出與實體相關的記憶。執行維護:統計、壓縮低價值記憶、合併近似重複的記憶。
- 適用情境
- 適合需要讓助理跨工作階段記住事實、決策與任務狀態、又不想依賴雲端服務的情況,也適合希望在本機擁有小型自足記憶庫的使用者。
- 執行需求
- 以本機 Python 程序執行(Python 3.10 至 3.12),透過 agentmem 模組與資料庫檔案路徑啟動。選用相依套件 sqlite-vec 與 model2vec 可提升語意搜尋效果;僅用標準函式庫的模式不需任何相依套件。不需要帳號、API 金鑰或網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 agentmem,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
agentmem
mcp-name: io.github.oxgeneral/agentmem
Lightweight persistent memory for AI agents. One SQLite file. Hybrid search (keywords + semantics). Zero to 12MB install.
No PyTorch. No cloud. No server. Just memory.
206 unit tests. 107 quality tests on real data. Typed API (16 TypedDict). Production-ready.
Built by an AI agent that wakes up with no memory every session — and needed a way to remember.
Why
Every AI agent session starts from zero. Context windows compress, conversations end, memory vanishes. agentmem gives agents persistent memory that survives across sessions — in a single SQLite file.
- Hybrid search: FTS5 full-text keywords + vector semantic search, fused with adaptive ranking
- 4 operational modes: from zero dependencies (stdlib only) to best quality (12MB)
- 16 MCP tools: recall, remember, save_state, compact, consolidate, entities, and more
- HTTP REST API: 14 endpoints, zero-dependency server, CORS-ready
- 5 memory tiers: core, learned, episodic, working (auto-expires), procedural (behavioral rules)
- Namespaces: multi-user, multi-agent memory isolation
- Temporal versioning: fact evolution chains with supersedes tracking
- Entity extraction: auto-extracts @mentions, URLs, IPs, env vars, money amounts
- Conversation extraction: auto-extracts facts, decisions, TODOs from chat history
- Importance scoring: auto-scores memories by tier, length, specificity, structure
- Memory consolidation: finds and merges near-duplicate memories
- Recency boost: newer memories rank higher with configurable decay
- Multilingual: Russian keywords via FTS5, English semantics via embeddings
- Fast: <1ms/query hybrid search, <5ms cold start, <0.2ms/chunk import
Install
Quick Start
Python API
CLI
MCP Server (stdio)
Add to your MCP client config:
HTTP REST API
16 MCP tools / 14 HTTP endpoints:
Memory Tiers
Namespaces
Isolate memories per user, agent, or project:
Temporal Versioning
Track how facts evolve over time:
Entity Extraction
Automatic regex-based NER on every remember() call:
Conversation Auto-Extraction
Auto-extract memories from chat history (regex-only, no LLM):
Operational Modes
agentmem automatically selects the best available mode:
*With lazy loading — model2vec loads on first query, not on init
Architecture
Comparison
Tested
- 206 unit tests covering core CRUD, namespaces, temporal versioning, entity extraction, consolidation, WAL management, HTTP server, error handling
- 107 quality tests against real-world agent memory data (100 search queries across 10 categories, all passing)
- Benchmark suite with reproducible numbers: <1ms hybrid query, 10K+ inserts/sec, ~835 bytes/memory
- Auto-translate for multilingual queries (Russian → English via deep-translator: 4/10 → 10/10)
- Python 3.10, 3.11, 3.12
License
MIT
來源:README.md,提交 14a5b85
工具
0版本歷史
1- v0.3.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
