RecallWeaver (织忆)
Local memory for evolving AI agents.
纯本地、零 Docker、无向量库,基于 SQLite 的 AI 动态记忆引擎。
Core Features
- 双时间戳时空图谱:记录事实演变,支持历史回溯。
- 动态遗忘打分池:指数衰减评分,过滤低价值噪音。
- 混合检索:FTS5 trigram 全文检索与图谱召回、重排。
Benchmarks
| 指标 | 结果 |
|---|---|
| 长稳测试 | 1,800 秒,50 并发,0 死锁 |
| P99 延迟 | 10.5 ms |
| 检索 Precision / Recall | 1.0 / 1.0(100 组评测数据) |
基准结果来自项目当前记录,实际表现取决于硬件、SQLite 版本和数据集。
Quick Start
python -m pip install recallweaver
当前发行元数据要求 Python 3.11.9。
from recallweaver import RecallWeaverAPI
api = RecallWeaverAPI("recallweaver.db")
api.add_memory("我对花生过敏", tenant_id="user-1")
memories = api.recall("过敏", limit=3, tenant_id="user-1")
print(memories[0].content if memories else "无相关记忆")
DSH 桌宠接入
安装 DSH 插件依赖并注册 Cordis 插件:
python -m pip install recallweaver==1.2.1
在 DSH profile 的 cordis.patch.yml 中加入:
- insert:
- id: recallweaver-memory
name: recallweaver-dsh
inject: [systemPrompt]
config:
python: python
timeoutMs: 10000
插件从当前会话读取最新用户消息,在本地写入并召回记忆,然后将结果加入
System Prompt。配置 RECALLWEAVER_PYTHON 可指定 Python 解释器;
RECALLWEAVER_DB_PATH 可指定 SQLite 文件路径。
完整安装步骤与配置说明见 DSH 桌宠接入指南。
Disclaimer
本项目仅供学习、研究和合法用途,不构成法律、医疗或其他专业建议。用户应 自行评估并负责其输入数据、数据库备份与访问控制,以及基于 AI 输出采取的 任何行动。项目按现状提供,不保证数据永不丢失、输出准确或适用于特定用途。 使用者应遵守适用法律、服务条款及他人权利;请勿输入未获授权的敏感信息。
Architecture
src/recallweaver/
├── api.py
├── db.py
├── memory_manager.py
├── graph.py
├── retrieval.py
├── decay_engine.py
├── server.py
├── extraction/
├── migrations/
└── observability/
架构决策记录见 docs/adr/。
License
Metadata
Release files for recallweaver 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recallweaver-1.2.2.tar.gz | 720.8 kB | Without provenance | Details for recallweaver-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recallweaver-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for recallweaver-1.2.2-py3-none-any.whl |
Total release size: 772.6 kB
Release files / recallweaver-1.2.2.tar.gz
| Download URL | recallweaver-1.2.2.tar.gz |
|---|---|
| Size | 720.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39d98a7eebacc6ced4377bd73c134ad6c54d852363ff521f442e4e98673ce23e
|
|
BLAKE2b-256 checksum How to use checksums |
64d82fa0866a479ac9c18dedb737d19c37f62f14bf6f2c57998abe2f38160110
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / recallweaver-1.2.2-py3-none-any.whl
| Download URL | recallweaver-1.2.2-py3-none-any.whl |
|---|---|
| Size | 51.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b960e439279639730db08496481d5e1df00c9ebc14863fc8b311bcc44c136df2
|
|
BLAKE2b-256 checksum How to use checksums |
b1638949aec8db54b0287726d7a6b01b669b3125b2db8da8c853d0f8a731947e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for recallweaver 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.