Python SDK for the Distributed Memory OS (MemOS)
Project description
MemOS Python SDK 🧠
Official Python client for Distributed MemOS, a production-ready cognitive memory infrastructure for autonomous AI systems.
Installation
pip install memos-sdk
Quick Start
from memos_sdk import MemOSClient, MemoryType
# Connect to the MemOS Cluster
client = MemOSClient("localhost:50051")
tenant_id = "00000000-0000-0000-0000-000000000001"
agent_id = "00000000-0000-0000-0000-000000000002"
# 1. Store a Memory
memory_id = client.store(
tenant_id=tenant_id,
agent_id=agent_id,
content="The user prefers a high-contrast dark mode with large fonts.",
memory_type=MemoryType.MEMORY_TYPE_EPISODIC,
importance=0.85
)
print(f"Stored Memory: {memory_id}")
# 2. Retrieve with Cognitive Search
results = client.retrieve(
tenant_id=tenant_id,
agent_id=agent_id,
query="UI preferences dark mode",
limit=3
)
for res in results:
print(f"[{res.score:.2f}] {res.memory.content}")
Features
- gRPC based high-performance communication.
- Supports Cognitive Ranking (Semantic + Temporal + Importance).
- Thread-safe client implementation.
- Context manager support (
with MemOSClient() as client:).
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
memos_sdk-0.1.0.tar.gz
(6.1 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 memos_sdk-0.1.0.tar.gz.
File metadata
- Download URL: memos_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30cf7863fabf98cd38c3dae459f80b5efd06649af8516d51d37bbc9b9573052f
|
|
| MD5 |
15aa68ff8982be342ea584d5a2bf84e1
|
|
| BLAKE2b-256 |
f2c0bf0d8a37f8906e2924d58002cb9fabcb6fef4fa5c15524d23ccb627ff91e
|
File details
Details for the file memos_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: memos_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0eb57882b9726afb4289b709092a2c2de15a1a38c66a80c8dc4b1af4ac381b1
|
|
| MD5 |
5aa041567cc7b2b278da488ff0d36cb5
|
|
| BLAKE2b-256 |
c30863b68468d29da0e419162a4f2b91a5b73b7d13324e88749920241acd114b
|