Skip to main content

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 自动注册,无需手动配置
  • 💾 永久存储 - 记忆永久保存到向量数据库
  • 🔍 智能搜索 - 基于语义的相似度搜索
  • 🏷️ 认知分类 - 自动分类为情景/语义/程序/情感/反思记忆
  • 🔒 隐私安全 - 机器隔离,验证码认领机制

完整示例

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 输入验证码认领这台机器。

文档

详细文档请访问: https://docs.t0ken.ai

开源

MemoryX 是开源项目,欢迎贡献代码!

Project details


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.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

t0ken_memoryx-1.0.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file t0ken_memoryx-1.0.2.tar.gz.

File metadata

  • Download URL: t0ken_memoryx-1.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for t0ken_memoryx-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8d1843f9119e67b87d2f010edad94589fb4e7312cd1c6045fe7b5760a8256bdd
MD5 af66869f643af6c94f1ce3fb86f2db2d
BLAKE2b-256 4d38c86d1e2001a028bc53140b912574ee6fcadaaca301c585292980c2f27037

See more details on using hashes here.

File details

Details for the file t0ken_memoryx-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: t0ken_memoryx-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for t0ken_memoryx-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 505698e887882f9a24df8f4cd6e9b85e7c6d73672a765296d80cd87600a0cca5
MD5 68a8a05cf1876cc72fde6ff56c2edee8
BLAKE2b-256 df7f3e0d58b997bed1af805078b87c5a9a8fe9bd796d0a933e326a7dbdab4059

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page