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() |
健康检查 |
Metadata
Release files for agentmemory-client-nullwinters 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentmemory_client_nullwinters-0.1.0.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentmemory_client_nullwinters-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / agentmemory_client_nullwinters-0.1.0.tar.gz
| Download URL | agentmemory_client_nullwinters-0.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d19fb58e5186295e93047f6b1b2440975bb15f29e467470f08cfeed747d0389f
|
|
BLAKE2b-256 checksum How to use checksums |
8a75dff3a3e300a37c11a86ad7343d7f1300659d9608c757e2151f73d7f068ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / agentmemory_client_nullwinters-0.1.0-py3-none-any.whl
| Download URL | agentmemory_client_nullwinters-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
278264d99d593e2dae77cafe2bc77aa0ad513dfa5c277b6cc7cbd55e995a074d
|
|
BLAKE2b-256 checksum How to use checksums |
d9773fc4fbe0dca046f5fcdd7287dd7eaad4f94e57bcfcaaaf0586d60f5662e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|