Metadata-Version: 2.4
Name: memx-sdk
Version: 0.1.1
Summary: Python client for memX shared memory platform
Project-URL: Homepage, https://github.com/MehulG/memx
Project-URL: Repository, https://github.com/MehulG/memx
Project-URL: Documentation, https://github.com/MehulG/memx#readme
Author-email: Mehul <memx.founders@gmail.com>
License: MIT
License-File: LICENSE
Requires-Python: >=3.8
Requires-Dist: hatchling<2.0.0,>=1.27.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: websockets
Description-Content-Type: text/markdown

# 🧠 memx-sdk

A Python client for [memX](https://github.com/MehulG/memX) — a real-time shared memory layer for multi-agent LLM systems.

Built for fast, schema-validated coordination between autonomous agents. Supports JSON key/value operations, schema enforcement, and pub/sub via WebSocket.

---

## 🚀 Features

- 🔑 Authenticate via API keys
- 📥 Get/set JSON values by key
- 📐 Define and validate key schemas
- 🔄 Real-time memory sync via WebSocket
- 🔔 Pub/sub for key-level updates

---

## 📦 Installation

```bash
pip install memx-sdk
```

## 🧪 Usage Example

Log in to [dashboard](https://mem-x.vercel.app) and create api keys with relevent scopes.

```python
from memx_sdk import Client

client = Client(api_key="your-api-key")

# Define schema
client.set_schema("agent:goal", {
    "type": "object",
    "properties": { "x": { "type": "number" }, "y": { "type": "number" } },
    "required": ["x", "y"]
})

# Set a value
client.set("agent:goal", {"x": 3, "y": 5})

# Get a value
value = client.get("agent:goal")
print(value)

# Subscribe to updates
def on_update(data):
    print("Updated:", data)

client.subscribe("agent:goal", callback=on_update)
```

## 🛠️ Requirements
- Python 3.7+
- httpx
- websockets

## 📄 License
MIT

## 🧠 Learn More
- Dashboard: https://mem-x.vercel.app
- Project: [memX README](https://github.com/MehulG/memX)