Skip to main content

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

agentmemory_client_nullwinters-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file agentmemory_client_nullwinters-0.1.0.tar.gz.

File metadata

File hashes

Hashes for agentmemory_client_nullwinters-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d19fb58e5186295e93047f6b1b2440975bb15f29e467470f08cfeed747d0389f
MD5 1638e819176e7631f3b54a9fd1624bb7
BLAKE2b-256 8a75dff3a3e300a37c11a86ad7343d7f1300659d9608c757e2151f73d7f068ef

See more details on using hashes here.

File details

Details for the file agentmemory_client_nullwinters-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentmemory_client_nullwinters-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 278264d99d593e2dae77cafe2bc77aa0ad513dfa5c277b6cc7cbd55e995a074d
MD5 eeec5f5feac9a6f54b2870e1fb41f056
BLAKE2b-256 d9773fc4fbe0dca046f5fcdd7287dd7eaad4f94e57bcfcaaaf0586d60f5662e0

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 Sentry Error logging StatusPage Status page