agentmemory-client
AgentMemory 微服务的 Python 客户端 SDK。提供三层记忆(会话/用户/Agent)的便捷访问接口。
安装
pip install agentmemory-client
快速开始
from agentmemory import MemoryClient
client = MemoryClient("http://localhost:8080", api_key="dev-secret")
# 注册 Agent
client.setup(agent_id="book_bot", persona="你是书籍推荐助手")
# 开始会话
session = client.session_start(agent_id="book_bot", user_id="zhang")
# 对话
session.add_message(role="user", content="推荐一本 Python 书")
ctx = session.inject_context(query="推荐一本 Python 书")
# ctx.to_messages() 返回标准 OpenAI 消息格式,可直接传入 LLM
API
| 端点 | 说明 |
|---|---|
MemoryClient.setup() |
注册/更新 Agent |
MemoryClient.session_start() |
创建会话 |
Session.add_message() |
追加消息 |
Session.inject_context() |
注入三层记忆上下文 |
MemoryClient.search_user_memories() |
语义/全文检索用户记忆 |
MemoryClient.get_user_profile() |
获取用户画像 |
MemoryClient.health() |
健康检查 |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 agentmemory_client_nullwinters-0.1.0.tar.gz.
File metadata
- Download URL: agentmemory_client_nullwinters-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d19fb58e5186295e93047f6b1b2440975bb15f29e467470f08cfeed747d0389f
|
|
| MD5 |
1638e819176e7631f3b54a9fd1624bb7
|
|
| BLAKE2b-256 |
8a75dff3a3e300a37c11a86ad7343d7f1300659d9608c757e2151f73d7f068ef
|
File details
Details for the file agentmemory_client_nullwinters-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentmemory_client_nullwinters-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
278264d99d593e2dae77cafe2bc77aa0ad513dfa5c277b6cc7cbd55e995a074d
|
|
| MD5 |
eeec5f5feac9a6f54b2870e1fb41f056
|
|
| BLAKE2b-256 |
d9773fc4fbe0dca046f5fcdd7287dd7eaad4f94e57bcfcaaaf0586d60f5662e0
|