
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 分
