Python SDK for MyMemo — Agent memory ledger on Turso/libSQL
Project description
mymemo
Python SDK for MyMemo — Agent memory ledger on Turso/libSQL.
Install
pip install mymemo
Quick Start
from mymemo import MyMemoConfig, create_clients, MemoryStore, rank
from mymemo.types import MemoryFactDraft, IncidentBase, SearchQuery
import time
# Configure
config = MyMemoConfig(
routing={"primary": "wss://your-db.turso.io", "replica": "file:./local.db"}
)
# Connect
clients = create_clients(config)
store = MemoryStore(clients.writer, dimension=384)
# Write memory
meta = IncidentBase(scope="my-agent", incident_id="1", timestamp=int(time.time()))
store.write(MemoryFactDraft(content="User prefers dark mode", category="user_preference"), meta)
# Search
results = store.get_candidates(SearchQuery(scope="my-agent", keyword="dark"))
ranked = rank(results, SearchQuery(scope="my-agent"))
Features
- Idempotent writes — SHA256 deterministic IDs, no duplicates
- Hybrid search — FTS5 full-text + vector similarity
- Adaptive ranking — time decay, category-specific tuning
- GC — automatic eviction of stale memories
- NaN defense — rejects invalid vectors at write time
- Shared database — compatible with the TypeScript core SDK
License
MIT
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
mymemo-0.1.2.tar.gz
(7.8 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 mymemo-0.1.2.tar.gz.
File metadata
- Download URL: mymemo-0.1.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd2dc52ecb70f22974c1ed145a9a47bc06dee5c2a555a2523aae92cf3235f16f
|
|
| MD5 |
b0f8bdca67e625147cefd4e90ecfa189
|
|
| BLAKE2b-256 |
0a6c48950f9dd23ad5e6b7d975cacdcacbd0bf6f8a89719e94dfc61b9f60b813
|
File details
Details for the file mymemo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mymemo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
523e18a00f86266d9769c241f7311b7d118ccc509945d6581153f596eed571ac
|
|
| MD5 |
1155819fc2f589de606cbbea1a7c1b89
|
|
| BLAKE2b-256 |
059da669e0017f87a9e09c0aee79e0b3182ccb6cab11215f3b389db0ca632f00
|