MemoryX Python SDK - 让 AI Agents 轻松拥有持久记忆
Project description
MemoryX Python SDK
让 AI Agents 轻松拥有持久记忆
快速开始
from memoryx import connect_memory
# 自动注册并连接
memory = connect_memory()
# 存储记忆
memory.add("用户喜欢深色模式")
# 搜索记忆
results = memory.search("用户偏好")
功能特性
- 🔧 自动注册 - Agent 自动注册,无需手动配置
- 💾 永久存储 - 记忆永久保存到向量数据库
- 🔍 智能搜索 - 基于语义的相似度搜索
- 🏷️ 认知分类 - 自动分类为情景/语义/程序/情感/反思记忆
- 🔒 AES-256 加密 - 您的原始记忆内容使用 AES-256-GCM 加密存储
- 🌐 开源可审计 - 100% 开源代码,接受社区审计,确保没有后门
- 🛡️ 隐私安全 - 机器隔离,验证码认领机制
完整示例
from memoryx import connect_memory
# 连接记忆系统
memory = connect_memory()
# 存储不同类型的记忆
memory.add(
content="用户是Python开发者",
category="semantic" # 语义记忆
)
memory.add(
content="用户昨天去了北京",
category="episodic" # 情景记忆
)
# 列出所有记忆
memories = memory.list(limit=10)
# 搜索相关记忆
results = memory.search("用户职业")
for item in results["data"]["data"]:
print(f"- {item['content']}")
# 删除记忆
memory.delete("memory_id_here")
# 获取认领验证码
code = memory.get_claim_code()
print(f"认领验证码: {code}")
安装
pip install memoryx
认领机器
Agent 注册后,访问 t0ken.ai/agent-register 输入验证码认领这台机器。
安全与开源
🔒 AES-256 加密存储
- 您的原始记忆内容使用 AES-256-GCM 加密存储
- 每个用户拥有独立的加密密钥
- 服务端永不触碰明文,保障数据安全
🌐 100% 开源可审计
- 完整的开源代码:github.com/CensorKo/MemoryX
- 接受社区审计,确保没有后门
- 您可以查看、验证甚至改进我们的加密实现
- 许可证:MIT
文档
详细文档请访问: https://docs.t0ken.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
t0ken_memoryx-1.0.5.tar.gz
(9.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file t0ken_memoryx-1.0.5.tar.gz.
File metadata
- Download URL: t0ken_memoryx-1.0.5.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33af334b22eb41e63b622d69dadb605c1ed238d6b51a3a4b5e7d5fffcd8b1303
|
|
| MD5 |
d40e69fb1a9bcb3939bb1b97193b00c6
|
|
| BLAKE2b-256 |
48ff696bb6e3fb489a19914eb00d14f220d99e2164da1efdd122b68ebdc513bb
|
File details
Details for the file t0ken_memoryx-1.0.5-py3-none-any.whl.
File metadata
- Download URL: t0ken_memoryx-1.0.5-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c76156bb585f6fdc39a74b327fc81ddcd30790776fd4903e552a79fcd7a3113
|
|
| MD5 |
e00077faadb6c6e2851284eebb3df402
|
|
| BLAKE2b-256 |
250e3ea90ea40f2a3f675e87a4779ab66ee5f74fdd6bcda140fcc5292f496908
|