Python SDK for Mnemo — AI memory that forgets intelligently
Project description
mnemoai
Python SDK for Mnemo — AI memory that forgets intelligently.
Installation
pip install mnemo-memory
Prerequisites
Start the Mnemo server:
npx @mnemoai/server
# or with OpenAI:
OPENAI_API_KEY=sk-... npx @mnemoai/server
Quick Start
from mnemo import MnemoClient
client = MnemoClient() # connects to http://localhost:18100
# Store memories
client.store("User prefers dark mode", category="preference")
client.store("User is a backend engineer at Acme Corp", category="fact")
# Recall
results = client.recall("What does the user do?")
for memory in results:
print(f"[{memory.score:.2f}] {memory.text}")
# Stats
stats = client.stats()
print(f"Total memories: {stats.totalEntries}")
# Delete
client.delete("memory-id")
# Cleanup
client.close()
Context Manager
with MnemoClient() as client:
client.store("User likes Python")
results = client.recall("programming language preferences")
Configuration
client = MnemoClient(
base_url="http://localhost:8080", # custom server URL
timeout=60.0, # request timeout in seconds
)
API
| Method | Description |
|---|---|
client.store(text, category?, importance?, scope?) |
Store a memory |
client.recall(query, limit?, scope_filter?, category?) |
Recall memories |
client.delete(memory_id) |
Delete a memory |
client.stats() |
Get statistics |
client.health() |
Health check |
Types
from mnemo import Memory, RecallResult, Stats, MemoryCategory
MemoryCategory:"preference" | "fact" | "decision" | "entity" | "other" | "reflection"Memory:text,score,category,importance,timestampStats:totalEntries,scopeCounts,categoryCounts
Links
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
mnemo_memory-0.1.1.tar.gz
(4.7 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 mnemo_memory-0.1.1.tar.gz.
File metadata
- Download URL: mnemo_memory-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aac149ce91c8eb2f2880f50031f19af2b94b94e9e6b52c1cf8b0765390e6d981
|
|
| MD5 |
753113dd123ac0d3b00baa0b510d1218
|
|
| BLAKE2b-256 |
eb4d428037235b31bf9affec047ca4ab440619ebc2075cef7326ab64c61a2a76
|
File details
Details for the file mnemo_memory-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mnemo_memory-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8d7f2d155731d2abbe753f148e10e7e1ab54d70a7dc390d6de467bb3facefc7
|
|
| MD5 |
35debf12f669f02521242edb7878753e
|
|
| BLAKE2b-256 |
ce24fcac62832a13caf293af71d1b3f083f72d06c901dfaf7d0e2b878db5e47d
|